Partition Table Entry Format
The format of partition table entry of any Partition in MBR has been given in the next table. Every Partition Entry of any MBR may be broken into the following bytes with their specific meanings:
Boot Type Indicator Byte (1 Byte) : If this byte is 00H, it means the partition is not active and if the byte is 80H, it means the partition is an Active partition or Bootable partition. Although the presence of any other byte then these is not expected, yet if there is any other byte is present it may be due to partition table corruption or due to any VIRUS attack in the partition table.
Starting Cylinder – Head – Sector Number of the Partition (3 Bytes) : When we calculate the CHS (Cylinder, Head, and Sector) of any disk, The Physical CHS are counted as follows:
- The Physical Sector is counted starting from 1.
- The Physical Head is counted from 0.
- The Physical Cylinder is counted from 0 (See the Previous Chapter for Details)
The Byte at offset 01H represents the starting Head Number in hexadecimal System for the partition.
6 Least Significant Bits of Byte at offset 02H make Starting Sector Number of the partition and Combination of remaining 2 Bits (as Two Most Significant Bits) plus 8 Bits of another Byte at offset 03H (Rest 8 least Significant Bits of the 10-Bit Number) make the Starting Cylinder Number of the Partition.
Offset |
Meaning |
Size |
Description |
00H |
Boot Type Indicator Byte |
1 Byte |
If Byte is 00H, the Partition is Inactive and if Byte is 80H , The Partition is Active (or Bootable) |
01H |
Head Number of Beginning of the Partition |
1 Byte |
Starting Head number of the Partition in Hexadecimal System |
02H |
Sector and Cylinder Number of Beginning of the Partition |
2 Bytes |
6 Bits of First Byte make Starting Sector Number and Combination of remaining 2 Bits (as Two Most Significant Bits) plus 8 Bits of another Byte (Rest 8 least Significant Bits of the 10-Bit Number ) make the Starting Cylinder Number of the Partition |
04H |
File System indicator Byte |
1 Byte |
File System Indicator Byte in Hexadecimal system (See the Table given next for Indicators) |
05H |
Head Number of End of the Partition |
1 Byte |
Ending Head Number of the Partition in Hexadecimal System |
06H |
Sector and Cylinder Number of End of the Partition |
2 Bytes |
6 Bits of First Byte make Ending Sector Number and Combination of remaining 2 Bits (as Two Most Significant Bits) plus 8 Bits of another Byte (Rest 8 least Significant Bits of the 10-Bit Number ) make the Ending Cylinder Number of the Partition |
08H |
Relative Sector number of Beginning of the Partition
|
4 Bytes |
Number of Sectors Between the MBR and the First Sector in the Partition |
0CH |
Number of Sectors of the Partition |
4 Bytes |
Number of Sectors in the Partition |
Total = 16 Bytes |
The Cylinder and Sector Encoding has been given in the example of a sample partition table study performed next.
File System Indicator Byte (1 Byte) : File System Indicator Byte at offset 04H represents the file system of that partition. The table, listing the File System Indicator Byte for various File Systems has been given next in this chapter.
Ending Cylinder – Head – Sector Number of the Partition (3 Bytes) : Encoding is same as for Starting Cylinder – Head – Sector Number of the Partition.
Relative Sector number of Beginning of the Partition (4 Bytes) : Number of Sectors between the MBR and the First Sector in the Partition in Hexadecimal System.
Number of Sectors of the Partition (4 Bytes) : Number of Sectors in the Partition in Hexadecimal system.
It should always be remembered that the Cylinder, Head and Sector numbers are those which should be passed to BIOS. Thus, if BIOS is using translation (LBA mode or INT 13H Extensions Support), the values may not represent the physical CHS values. For large hard drives (Greater than 8.4 GB) the CHS values may be invalid. These values should generally be ignored and the absolute sector values are used instead.
|