Detailed description of Hard Disk Partition Table

Source: Internet
Author: User

Hard drive primary Boot Sector = hard drive primary Boot Record (MBR) + Hard Disk Partition Table (DPT)
--------------------------------------------------------------
Physical location: 0, 0, and 1 sectors (clindyer 0, side 0, Sector 1)
Size: 512 bytes
Among them: MBR 446 bytes (BD), DPT 64 bytes (01be--01fd), ending mark 2 bytes (55 aa)
Function: the MBR directs the system to DBR by checking the DPT partition information;
Read: Use Norton diskedit and choose drive --> physical disk--hard disk from the object menu,
Then, select disk partition table in the object menu to read the data, and use the write object to option in the Tools menu to save the data to the specified file for backup;
Write: Use Norton diskedit, select drive --> Floopy disk from the object menu, and select the DPT
File, and then use the write object to --> physical sector option in the Tools menu to write to 001
(Clindyer 0, side 0, Sector 1 );

Details:
000h--08ah MBR startupProgram(Search for boot partition)
08bh--0d9h MBR startup string
0dah--1bch ("0 ")
1beh--1fdh Hard Disk Partition Table
1feh--1ffh end sign (55aa)>

Active partition primary Boot Sector (DBR)
--------------------------
Physical location: 1 side, 0 channels, 1 Sector (clindyer 0, side 1, Sector 1)
Size: fat16 1 slice, 512 bytes
FAT32 3 sector 1536 bytes
Function: includes information such as machine CMOS (ipv--0059), checks the information, and directs the specified system file, such as ntldr;
Read: Use Norton diskedit and choose drive --> Logical Disk--disk C from the object menu,
Then, select Boot Record from the object menu to read the data and use
The write object to option is saved to the specified file for backup;
Write: Use Norton diskedit, select drive --> Floopy disk from the object menu, and select the backup DBR.
File, and then use the write object to --> physical sector option in the Tools menu to write to 011
(Clindyer 0, side 1, Sector 1 );

Details:

000h--002h 3 byte jump command (to start the program and jump to 03eh)
003h--03dh BIOS parameter Area
03eh--19dh DOS Startup Program
19eh--1e5h boot string
1e6h--1fdh file name (Io. sys, msdos. sys)
1feh--1ffh end mark (55aa)

Hard Disk Partition Table (DPT)
---------------------
Meaning analysis of the number of bytes of the Offset address

01be 1 partition type: 00 indicates inactive partition: 80 indicates active partition; others are invalid partitions.

01bf ~ 01c1 3 * start address of the partition (surface/sector/track), usually the start address of the first partition
The value must be 010100 for the three bytes because there are 0 sectors and 1 sector on the first side.

01c2 1 # partition operating system type.

01c3 ~ 01c5 3 * end address of the partition (surface/Fan/channel)

01c6 ~ 01c9 4 start logical sector of the partition

01ca ~ 01cd 4 Total number of sectors occupied by the partition

Note: * Note the distribution of bytes in the Start address (surface/sector/track) and end address (surface/Fan/track) of the partition:

00000000 01000001 00010101
~~~~~~~~ = ^ =

~ Face (head) 8 bits
^ 6-digit sector
= 10 bits

# Partition operating system type (File Format flag)

4---dos fat16 <32 m
5--extend
6--dos fat16> 32 m
7---ntfs (OS/2)
83---linux> 64 m

DPT has a total of 64 bytes (01be--01fd). As shown above, each partition occupies 16 bytes, so it can represent four partitions.
That is why the sum of the primary and extended partitions of a disk can only be four.

 

Logical drive
-----------
The extended partition information is located in the hard disk partition table (DPT) shown above, while the logic drive information is located in the extended partition
The START slice, that is, the slice corresponding to the start address (surface/sector/track) of the partition. The information in this slice corresponds to the Master Guide of the hard disk.
The difference between a sector is that it does not contain MBR, while the 16-byte partition information indicates the start and end addresses of the logical drive.

Therefore, when the disk contains only one primary partition and one extended partition (including multiple logical drives ),
Otherwise, data in the primary Boot Sector of the hard disk is lost (including DPT). You can also recover the entire hard disk by using the data on the logical drive.

For example, the following is a hard disk partition.

Total sectors of the Start fan (logical) end fan
MBR 0 0 1 ------
C 0 1 1 276 239 63 4,188,239 4,188,177
Expansion 277 0 1 554 239 63 4,188,240 8,391,599 4,203,360
D 277 1 554 239 63 4,188,303 8,391,599 4,203,297

If the primary Partition Table is corrupted, You can manually search for the logical drive data contained in the extended partition table. In this example, the data corresponding to the D disk is used, and then the start fan (logical) is used) 63 is the start fan (logical) of the corresponding extended partition. Changing the start address (surface/sector/track) to 0 is the start address of the extended partition. then, you can use the extended partition to obtain the information of primary partition C, and then you can use the fdisk/MBR command and manually enter the partition table to restore the entire hard disk.

It is troublesome to use this method. If you know the size of each partition, you can use PQ magic 5 to repartition the disk to the original size (Note: never apply it, we only use it to obtain data), and view info to obtain the above
Delete the partition, and then manually modify the DPT table using Norton disk2000 to restore the entire hard disk.

Partition Table data corresponding to this example:

80 01
01 00 06 EF 7f 14 3f 00 00 00 11 E8 3f 00 00 00
41 15 05 ef bf 2a 50 E8 3f 00 60 23 40 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA

Extended partition table data:
00 01
41 15 07 ef bf 2a 8f E8 3f 00 21 23 40 00

Note: The start sector of the logic and the total number of partitions are low on the left. For example, if the start address of the extended partition in this example is 50 E8 3f 00, it must be changed to 00 3f E8 50 before decimal conversion, the total number of partitions occupied 60 23 40 00 must be changed to 00 40 23 60. Similarly, when you manually enter this value, the high/low conversion is required.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.