About Partition Table

Partition is a piece of disk space marked to belong to some operating system. Partition table is located in the first sector (cylinder 0, head 0 and sector 1) of each Harddisk. It has information about sizes and locations of partitions on Harddisk. The partition information is started on offset 1BEH of master boot sector. Each partition entry is 16 bytes long. The total partition table is 64 bytes long. Then partition table is limited to maximum 4 entries. That's, there are maximum 4 partitions, called primary partition, can be created on Harddisk.

But many people want to create more than 4 partitions. The extended partition is designed for this. Master extended partition is a primary partition. Differing from other partitions, the first sector of extended partition is not a boot sector, but another partition table, called logical partition table.
Commonly, there are only two partition entries in logical partition table. One points to a partition, called logical partition. And the boundary of this logical partition must be limited in the extended partition. The other entry, if needed, of the extended partition table points to next logical partition table. Similarly, its boundary is limited in its parents extended partition. The next logical partition table may have two partition entries too. The one points to a logical partition. The other points to another logical partition table and the rest may be deduced by analogy. Therefore, many partitions could be created in extended partition.

Now let us have a look at the layout of a partition entry.
The 16 bytes of one entry are as follows:
OFFSET BYTE DESCRIPTION
0 1 Boot labels. Tell computer to boot from this partition
1 1 Starting head
2 1 Lower 6 bits (bit 0 to bit 5) is starting sector

Higher 2 bits (bit 6 to bit 7) is the higher bits of starting cylinder

3 1 The lower 8 bits of starting cylinder
4 1 Partition type
5 1 Ending head
6 1 Lower 6 bits (bit 0 to bit 5) is ending sector.

Higher 2 bits (bit 6 to bit 7) is the higher bits of ending cylinder

7 1 The lower 8 bits of ending cylinder
8 4 Leading sectors of this partition
12 4 Number of sectors of this partition

(a) Boot label (offset 0):
Most disks have one primary partition, but some people want to have more than one operating system on their computers, therefore, they have to create other primary partitions. In order to tell the computer which operating system is ready to boot from, one Active Partition is needed. That's why partition table always keeps an indicator of the currently Active Partition - the one from which the computer boots. In Partition Table Doctor or Super Fdisk, the Active Partition is figured out by Active with Yes.

(b) Starting position (offset 1-3):
Describes the partition's starting position, the cylinder, the head and the sector. Also called starting CHS.
Starting head = (OFFSET 1)
starting sector = (OFFSET 2) & 0x3f
starting cylinder = (((OFFSET 2) & 0xc0)<<2)|(OFFSET 3)

(c) Partition type (offset 4):
Indicate what file system is in the partition. For example, 06 or 0E indicates a FAT file system. 0B or 0C indicates a FAT32 file system. 07 indicate NTFS or OS/2 HPFS file system.

(d) Ending position (offset 5-7):
Describes the partition's ending position, the cylinder, the head and the sector. Also called ending CHS.

(e) Leading sectors (offset 8-11):
The number of sectors before this partition. If we count all sectors on Harddisk sequentially from zero, this field will exactly point to the first sector of this partition.

(f) Number of sectors (offset 12-15):
The total number of sectors on this partition. So the size of this partition will be (Number of sectors)*512/1048576 MB.

Copyright © 2005-2011 CHENGDU Yiwo® Tech Development Co., Ltd. ALL RIGHTS RESERVED.

Privacy Policy | License | Legal Counsel