The boot manager simply for everyone!  
Product
Order
Support
  Format part. sec.
About us

Format of MBR partition sector

MBR partition sector describe MBR partitions, i.e. they contains the information about the position, size and type of the MBR partitions.

All MBR partition sectors have exactly the same format (see table below). It should be noted, however, that the boot loader code is present only in the MBR partition sector. In the partition sectors for logical drives the boot loader code is empty.

The boot loader code is relevant only when booting by UEFI.

---------------------------------------
MBR partition sector (length 512 bytes)
---------------------------------------
Offset  Bytes  Meaning
   
 000h    446    boot loader code
 1BEh    16     1. partition entry
 1CEh    16     2. partition entry
 1DEh    16     3. partition entry
 1EEh    16     4. partition entry
 1FEh    2      signature (55h AAh)
-------------------------------------

------------------------------------------------------
MBR partition entry (length 16 bytes)
------------------------------------------------------
Off. Bytes Meaning
  
00h   1    80h = active partition / 00h = not active
01h   1    begin of partition (head number)
02h   1    begin of partition (sector number)   [*]
03h   1    begin of partition (cylinder number) [*]
04h   1    partition ID
05h   1    end of partition (head number)
06h   1    end of partition (sector number)     [*]
07h   1    end of partition (cylinder number)   [*]
08h   4    rel. sectors (# sec. to begin of partition)
0Ch   4    number of sectors in partition 
-----------------------------------------------------

[*] Remark:
The byte for the sector number (offset 2 respectively 6) contains 
the CHS sector number in the bits 0-5.
Hence in the CHS format the sector number occupies 6 bits.
The remaining two bits 6+7 belong to the CHS cylinder number,
they represent the high bits 8+9 of the CHS cylinder number.
The byte for the cylinder number (offset 3 respectively 7) contains 
the low bits 0-7 of the CHS cylinder number.
Hence in the CHS format the cylinder number occupies 10 bits.

The byte at offset 0 specifies whether the partition is active or not. In the standard boot process (without boot manager) the partition marked as active is booted automatically.

Obviously that there are two ways to specify the position of a partition. Namely the CHS format and the LBA format. In the CHS format the position of a partition is specified by cylinder/head/sector numbers specifying begin and end of the partition (24 bit each). In the LBA format the position of a partition is specified by specifying the relative sector (begin of partition) and total number of sectors (32 bit each).

For disks up to a size of 8 GB the 24 bit of the CHS format are sufficient to specify all partitions.

For larger disks these 24 bits are not any more sufficient. The 32 bit of the LBA format allows addressing of all disk sectors up to a maximum disk size of 2048 GB (2 TB).