- Extended boot record
An Extended Boot Record (EBR), or Extended Partition Boot Record (EPBR)fn|1, 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.fn|2 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.fn|3 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.fn|4EBR 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 adisk editor as 55h first and AAh last, because IBM-compatible PCs storehexadecimal Words in reverse orderfn|5 (see table below).Structures
* Included inside the previous field.
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:
:*Starting Sector = relative offset between this EBR sector and the first sector of the logical partition::Note: This will be the same value for each EBR on the same hard disk; usually 63.:*Number of Sectors = total count of sectors for this logical partition ::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:
:*Starting Sector = relative address of next EBR within extended partition::or: Starting Sector = LBA address of next EBR "minus" LBA address of extended partition's first EBR
:*Number of Sectors = total count of sectors for next logical partition, but count starts from the next EBR sector::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 sectorsfn|2 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
* This term is used by "PowerQuest's" (now
Symantec ) diagnostic software programs, such as their PartitionInfo utility (included withPartition Magic ), when extended partition information is displayed.
* The EBR is located on the very first sector of an otherwise "unused area" which is equal to the number of "sectors per track;" normally, 63 sectors. In this regard, each logical partition "mimicks" the layout of a hard disk's structure for its first primary partition, since the MBR is located on the very first sector of the disk, the first sector of Track 0 (normally followed by 62 unused sectors) and then theboot sector of its first primary partition.
* Therefore, any operating system or utility program that must access or enumerate all logical drive partitions, must follow this "chain" of entries until the last EBR, containing only one entry, has been read.
* Under most DOS and some Windows operating systems, the number of "logical drives" in an extended partition was limited to 23, because the FDISK program couldn't create any more drives than it could assign a drive letter to; thus, assuming C: is a primary drive, the DOS drive letters D: through Z: allow for only 23 more drives. Under Windows NT and later, an unlimited number of logical partitions can be created using the Computer Management's, Disk Management Extension; though in practice, users rarely created more than 23, since the Windows NT shell (user interface) was still limited to accessing only those drives with an A: through Z: drive letter. Some newer operating systems may implement an AA: through ZZ: drive lettering scheme; making it possible to access over 670 logical drives.
* This is called "little-endian" notation; in which theleast significant byte of a number is stored in a lower memory location than the more significant bytes, and finally the most significant byte is last (higher in memory).
* The IBM Boot Manager (included withOS/2 operating systems and some early versions ofPartition Magic ), adds at least one 9-byte entry (starting at offset 0x18A) to each EBR sector. The entry is comprised of a "flag value" byte (indicating if the partition is on the IBM Boot Manager menu) followed by an 8-byte ASCII string which is the name to be used on the menu. If the partition is not included on the boot menu (such as data only partitions), the flag byte is zero; in which case, the following 8-byte field may contain an ASCII representation of that partition's starting sector number (in hexadecimal).References
See also
*
Master Boot Record
*Disk partitioning
*Logical Block Addressing
*BIOS interrupt call
*BSD disklabel External links
* [http://mh-nexus.de/hxd/ HxD] - A freeware "Windows" disk editor which can be used to explore and study sector contents, such as an EBR sector.
Wikimedia Foundation. 2010.