Write new information to MBR, modify the values of partition table entry

Files Recovery Software
Home Contact Details Customer Support Download Demo Products  

 
 

/* Write New Information to MBR *\

/* To write the values to MBR partition table, Uncomment the biosdisk function given below */

// biosdisk ( 3, 0x80, 0, 0, 1, 1, &p ) ;

display(); /* Display the Modified Information */
getch();
}

Comments on coding:

The program given above is a sample program to show how we can modify the values of partition table entry of MBR. If you want to modify the values of partition entry for such logical partitions, which lie in extended partition, you have to modify the values in partition table of Extended MBR.

The values which have been given here to modify the partition table entry are just for demonstrate, how to modify. Never modify partition table with illegal or illogical values. By doing so the entire partition may become inaccessible.

The structure partition is used to read the partition entry from partition table and structure part to read MBR. To actually make the modifications in partition table uncomment the biosdisk( ) function.

If you want to modify the values of starting and ending, sectors and cylinder numbers of the partition, calculate the values, as described in the comments of the program to read and display the partition table of MBR, discussed in the starting of this chapter.

Previous page

page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13

 

 

Chapter 13

 

page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

Next page

 

Chapter 15

 

page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17

Next page
 
 
Data Recovery Book
 
Chapter 1 An Overview of Data Recovery
Chapter 2 Introduction of Hard Disks
Chapter 3 Logical Approach to Disks and OS
Chapter 4 Number Systems
Chapter 5 Introduction of C Programming
Chapter 6 Introduction to Computer Basics
Chapter 7 Necessary DOS Commands
Chapter 8 Disk-BIOS Functions and Interrupts Handling With C
Chapter 9 Handling Large Hard Disks
Chapter 10 Data Recovery From Corrupted Floppy
Chapter 11 Making Backups
Chapter 12 Reading and Modifying MBR with Programming
Chapter 13 Reading and Modifying DBR with Programming
Chapter 14 Programming for “Raw File” Recovery
Chapter 15 Programming for Data Wipers
Chapter 16 Developing more Utilities for Disks
Appendix Glossary of Data Recovery Terms
 
 
Pro Data Doctor

Home

Products

Contact Details

Customer Support

Download Demo

Terms and Conditions

 
Pro Data Doctor