Extended boot record explained

An Extended Boot Record (EBR), or Extended Partition Boot Record (EPBR), is a descriptor for a logical partition under the common DOS disk drive partitioning system. In that system, when one (and only one) partition record entry in the Master Boot Record (MBR) is designated an "extended partition," then that partition can be subdivided into a number of logical drives. The actual structure of that extended partition is described by one or more EBRs, which are located inside the extended partition. The first (and sometimes only) EBR will always be located on the very first sector of the extended partition.

Unlike primary partitions, which are all described by a single partition table within the MBR, and thus limited in number,each EBR precedes the logical partition it describes. If another logical partition follows, then the first EBR will contain an entry pointing to the next EBR; thus, multiple EBRs form a sort of chain from the first to the next, and finally to the last one. This means the number of logical drives that can be formed within an extended partition is limited only by the amount of available disk space.

EBR structure and values

EBRs have essentially the same structure as the MBR; except only the first two entries of the partition table are supposed to be used, besides having the mandatory boot record signature (or magic number) of 0xAA55 at the end of the sector. As always, this 2-byte signature appears in a disk editor as 55h first and AAh last, because IBM-compatible PCs store hexadecimal Words in reverse order (see table below).

Structures

Common Structure of Extended Boot Records:
Offsets
( within EBR sectors )
ContentsSize
in
bytes
HexDec
000 - 1BD000 - 445Generally unused; normally filled with zero-bytes446
18A - 192394 - 402Possible IBM Boot Manager menu entry9
1BE - 1CD446 - 461Partition Table's First entry16
1CE - 1DD462 - 477Partition Table's Second entry16
1DE - 1FD478 - 509Unused, but should be filled with zero-bytes32
1FE51055hBoot Record signature:
0xAA55 (AA55h)
2
1FF511AAh
512


Structure of an MBR or EBR 16-byte Partition Table Entry:
Offsets
( within each entry )
Byte CountDescription
0  1Boot indicator (80h for active; otherwise, 00h)
1 - 3  3Starting CHS (Cylinder, Head, Sector) values
4  1Partition-type descriptor
5 - 7  3Ending CHS (Cylinder, Head, Sector) values
8 - 11  4Starting Sector
12 - 15  4Partition Size (in Sectors)

Values

The following are general rules that apply only to values found in the 4-byte fields of an EBR's partition table entries (cf. Tables above). These values depend upon the partitioning tool(s) used to create or alter them, and in fact, most operating systems that use the Extended partitioning scheme (including Microsoft DOS and Windows, and Linux) ignore the "Number of sectors" value in entries which point to another EBR sector; with only one exception: that value must be one or greater for Linux operating systems.

The first entry of an EBR partition table points to the logical partition belonging to that EBR:

Note: This will be the same value for each EBR on the same hard disk; usually 63.

Note: The unused sectors in the same track as the EBR, are not considered part of the logical partition for this count value.

The second entry of an EBR partition table will contain zero-bytes if it's the last EBR in the extended partition; otherwise, it points to the next EBR in the EBR chain:

or: Starting Sector = LBA address of next EBR minus LBA address of extended partition's first EBR

Note: Unlike the first entry in an EBR's partition table, this Number of Sectors count includes the next logical partition's EBR sector along with the other sectors in its otherwise unused track. (Compare Diagram 1 and 2 below.)


Diagram 1. What the Starting and
Total Number of sectors values of
1st entry point to and enumerate.


Diagram 2. What the Starting and Total
Number of
sectors values of an EBR's
2nd entry point to and enumerate.

Remarks:
First, the diagrams above are not to scale: The thin white lines between each "EBR" and its logical "partition" represent the remainder of an unused area usually 63 sectors in length; including the single EBR sector (shown at a greatly exaggerated size).

Also, on some systems, a large gap of unused space may exist between the end of a logical partition and the next EBR, or between the last logical partition and the end of the whole extended partition itself, if any previously created logical partition has been deleted or resized (shrunk).

Examples

Example 1 (unreal)

The first example shows an extended partition with 6,000 sectors and 3 logical partitions.
Remark: Neither a tiny extended partition with only 3 MB nor a hard drive with 20 sectors per track are realistic but these values have been chosen to make this example more readable.

Example 2 (unreal)

The same extended partition as in example 1 after the 2nd logical partition was deleted and the last one was shortened.

Footnotes

See also

External links