In previous article we have talked about hard disk partition, a defined storage space of the hard drive. And Partition table is located at the first sector (cylinder 0, head 0 and sector 1, MBR of each hard disk. It memorizes information about sizes and locations of partitions on hard disk. The Partition Table conforms to a standard layout that is independent of the operating system. Each Partition Table entry is 16 bytes long, making a maximum of 4 entries available. Thus there is a maximum of 4 partitions, which is called primary partition and can be created on hard disk.
Each entry starts at a predetermined offset from the beginning of the sector, as follows:
|Partition 1||0x01BE (446)|
|Partition 2||0x01CE (462)|
|Partition 3||0x01DE (478)|
|Partition 4||0x01EE (494)|
Each of the four Partition Table entries contains the following elements, in the following structure:
|0||byte||Boot indicator bit flag: 0 = no, 0x80 = bootable (or "active")|
|2||6 bits||Starting sector (Bits 6-7 are the upper two bits for the Starting Cylinder field.)|
|3||10 bits||Starting Cylinder|
|6||6 bits||Ending Sector (Bits 6-7 are the upper two bits for the ending cylinder field)|
|7||10 bits||Ending Cylinder|
|8||uint32_t||Relative Sector (to start of partition -- also equals the partition's starting LBA value)|
|12||uint32_t||Total Sectors in partition|
The Master Boot Record is the traditional way of storing partition information about a hard disk, along with some boot code. That is, the Partition Table is contained inside the MBR, which is stored in the first sector (cylinder 0, head 0, sector 1 -- or, alternately, LBA 0) of the hard drive.
The Boot Indicator field indicates whether the volume is the system partition. On x-86-based computers, only one primary partition on the disk should have this field set. This field is used only on x86-based computers. On RISC-based computers, the NVRAM contains the information for finding the files to load.
Describe the partition's starting position, the cylinder, the head and the sector. Also be called starting CHS.
For primary partitions and logical drives, the System ID field describes the file system used to format the volume. Windows NT uses this field to determine what file system device drivers to load during startup. It also identifies the extended partition, if there is one defined.
Ending Head fields is one byte long, which limits this field to the range 0 - 255.
For primary partitions, the Relative Sectors field represents the offset from the beginning of the disk to the beginning of the partition, counting by sectors.
The Number of Sectors field represents the total number of sectors in the partition.
That's all for the basic information about partition table. For some users, partition may be really difficult to understand. To make things easy, simply get a Free Partition Manager to create, resize, delete, and manipulate these partitions on the hard disk drive without any efforts.