Basic disks can use either the master boot record (MBR) or GUID partition table (GPT) partitioning style. x86-based computers use disks with the MBR partitioning style and Itanium-based computers use disks with the GPT partitioning style.
The following figure compares a basic MBR disk to a basic GPT disk.
A comparison of MBR and GPT disks is listed in the following table.
The master boot record (MBR), the most important data structure on the disk, is created when the disk is partitioned. The MBR contains a small amount of executable code called the master boot code, the disk signature, and the partition table for the disk. At the end of the MBR is a 2-byte structure called a signature word or end of sector marker, which is always set to 0x55AA. A signature word also marks the end of an extended boot record (EBR) and the boot sector.
The disk signature, a unique number at offset 0x01B8, identifies the disk to the operating system. Windows Server 2003 uses the disk signature as an index to store and retrieve disk information, such as drive letters, in the registry.
Master boot code
The master boot code performs the following activities:
-
Scans the partition table for the active partition.
-
Finds the starting sector of the active partition.
-
Loads a copy of the boot sector from the active partition into memory.
-
Transfers control to the executable code in the boot sector.
If the master boot code cannot complete these functions, the system displays a message similar to one of the following:
Invalid partition table.
Error loading operating system.
Missing operating system.
Note
-
Floppy disks and removable disks, such as Iomega Zip disks, do not contain an MBR. The first sector on these disks is the boot sector. Although every hard disk contains an MBR, the master boot code is used only if the disk contains the active primary partition.
Partition Table on Basic Disks
The partition table, which is a 64-byte data structure that is used to identify the type and location of partitions on a hard disk, conforms to a standard layout, independent of the operating system. Each partition table entry is 16 bytes long, with a maximum of four entries. 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)
The following example shows a partial printout of an MBR revealing the partition table from a computer with three partitions. When there are fewer than four partitions on a disk, the remaining partition table fields are set to the value 0.
000001B0: 80 01 ..
000001C0: 01 00 07 FE BF 09 3F 00 - 00 00 4B F5 7F 00 00 00 ......?...K....
000001D0: 81 0A 07 FE FF FF 8A F5 - 7F 00 3D 26 9C 00 00 00 .........=&....
000001E0: C1 FF 05 FE FF FF C7 1B - 1C 01 D6 96 92 00 00 00 ................
000001F0: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 ..............
The following figure provides an example of how to interpret the sector printout of the partition table. The Boot Indicator, System ID, Relative Sectors, and Total Sectors values correspond to the values described in the table titled “Partition Table Fields” later in this section.
Interpreting Data in the Partition Table
The following table describes the fields in each entry in the partition table. The Sample Values correspond to the first partition table entry shown in the previous example. The Byte Offset values correspond to the addresses of the first partition table entry. There are three additional entries whose values can be calculated by adding 10h to the byte offset value specific for each additional partition table entry (for example, add 20h for partition table entry 3 and 30h for partition table entry 4).
The following table and sections following the table provide additional detail about these fields.
Partition Table Fields
|
Byte Offset
|
Field Length
|
Sample Value1 |
Field Name and Definition
|
|
0x01BE
|
1 byte
|
80
|
Boot Indicator. Indicates whether the volume is the active partition. Legal values include:
-
00. Do not use for booting.
-
80. Active partition.
|
|
0x01BF
|
1 byte
|
01
|
Starting Head.
|
|
0x01C0
|
6 bits
|
01 *2
|
Starting Sector. Only bits 0–5 are used. The upper two bits, 6 and 7, are used by the Starting Cylinder field.
|
|
0x01C1
|
10 bits
|
00 *
|
Starting Cylinder. Uses 1 byte in addition to the upper 2 bits from the Starting Sector field to make up the cylinder value. The Starting Cylinder is a 10-bit number that has a maximum value of 1023.
|
|
0x01C2
|
1 byte
|
07
|
System ID. Defines the volume type. See the table titled “System ID Values” later in this section for sample values.
|
|
0x01C3
|
1 byte
|
FE
|
Ending Head.
|
|
0x01C4
|
6 bits
|
BF *
|
Ending Sector. Only bits 0–5 are used. The upper two bits, 6 and 7, are used by the Ending Cylinder field.
|
|
0x01C5
|
10 bits
|
09 *
|
Ending Cylinder. Uses 1 byte in addition to the upper 2 bits from the Ending Sector field to make up the cylinder value. The Ending Cylinder is a 10-bit number, with a maximum value of 1023.
|
|
0x01C6
|
4 bytes
|
3F 00 00 00
|
Relative Sectors. The offset from the beginning of the disk to the beginning of the volume, counting by sectors.
|
|
0x01CA
|
4 bytes
|
4B F5 7F 00
|
Total Sectors. The total number of sectors in the volume.
|
1. Numbers larger than one byte are stored in little endian format, or reverse-byte ordering. Little endian format is a method of storing a number so that the least significant byte appears first in the hexadecimal number notation. For example, the sample value for the Relative Sectors field in the previous table, 3F 00 00 00, is a little endian representation of 0x0000003F. The decimal equivalent of this little endian number is 63.
2. Sample values marked with an asterisk (*) do not accurately represent the value of the fields, because the fields are either 6 bits or 10 bits and the data is recorded in bytes.
Boot Indicator Field
The first element of the partition table, the Boot Indicator field, indicates whether the volume is the active partition. Only one primary partition on the disk can have this field set. See the previous table for the acceptable values.
It is possible to have different operating systems and different file systems on different volumes. By using disk configuration tools, such as the Windows Server 2003-based Disk Management and DiskPart, or the MS-DOS-based Fdisk, to designate a primary partition as active, the Boot Indicator field for that partition is set in the partition table.
System ID Field
Another element of the partition table is the System ID field. It defines which file system, such as FAT16, FAT32, or NTFS, was used to format the volume. The System ID field also identifies an extended partition, if one is defined. Windows Server 2003 uses the System ID field to determine which file system device drivers to load during startup. The following table identifies the values for the System ID field.
System ID Values
|
Partition Type
|
ID Value
|
|
0x01
|
FAT12 primary partition or logical drive (fewer than 32,680 sectors in the volume)
|
|
0x04
|
FAT16 partition or logical drive (32,680–65,535 sectors or 16 MB–33 MB)
|
|
0x05
|
Extended partition
|
|
0x06
|
BIGDOS FAT16 partition or logical drive (33 MB–4 GB)
|
|
0x07
|
Installable File System (NTFS partition or logical drive)
|
|
0x0B
|
FAT32 partition or logical drive
|
|
0x0C
|
FAT32 partition or logical drive using BIOS INT 13h extensions
|
|
0x0E
|
BIGDOS FAT16 partition or logical drive using BIOS INT 13h extensions
|
|
0x0F
|
Extended partition using BIOS INT 13h extensions
|
|
0x12
|
EISA partition or OEM partition
|
|
0x42
|
Dynamic volume
|
|
0x84
|
Power management hibernation partition
|
|
0x86
|
Multidisk FAT16 volume created by using Windows NT 4.0
|
|
0x87
|
Multidisk NTFS volume created by using Windows NT 4.0
|
|
0xA0
|
Laptop hibernation partition
|
|
0xDE
|
Dell OEM partition
|
|
0xFE
|
IBM OEM partition
|
|
0xEE
|
GPT partition
|
|
0xEF
|
EFI System partition on an MBR disk
|
Windows Server 2003 does not support multidisk volumes that are created by using Windows NT 4.0 or earlier, and that use System ID values 0x86, 0x87, 0x8B, or 0x8C.
Before you upgrade from Windows NT Server 4.0 to Windows Server 2003, you must first back up and then delete all multidisk volumes. After you complete the upgrade, create dynamic volumes and restore the data. If you do not delete the multidisk volumes before beginning Setup, you must use the Ftonline tool, which is part of Windows Support Tools, to access the volume after Setup completes.
If you are upgrading from Windows 2000 to Windows Server 2003, you must convert the multidisk volumes to dynamic before you begin Setup, or Setup does not continue.
MS-DOS can only access volumes that have a System ID value of 0x01, 0x04, 0x05, or 0x06. However, you can delete volumes that have the other values listed in the table titled “System ID Values” earlier in this section by using Disk Management, DiskPart, or the MS-DOS tool Fdisk.
Starting and Ending Cylinder, Head, and Sector Fields
The Starting and Ending Cylinder, Head, and Sector fields (collectively known as the CHS fields) are additional elements of the partition table. These fields are essential for starting the computer. The master boot code uses these fields to find and load the boot sector of the active partition. The Starting CHS fields for non-active partitions point to the boot sectors of the remaining primary partitions and the extended boot record (EBR) of the first logical drive in the extended partition, as shown in the figure titled “Interpreting Data in the Partition Table” earlier in this section.
Knowing the starting sector of an extended partition is very important for low-level disk troubleshooting. If your disk fails, you need to work with the partition starting point (among other factors) to retrieve stored data.
The Ending Cylinder field in the partition table is 10 bits long, which limits the number of cylinders that can be described in the partition table to a range of 0 through 1,023. The Starting Head and Ending Head fields are each one byte long, which limits the field range from 0 through 255. The Starting Sector and Ending Sector fields are each six bits long, which limits the range of these fields from 0 through 63. However, the enumeration of sectors starts at 1 (not 0, as for other fields), so the maximum number of sectors per track is 63.
Because Windows Server 2003 supports hard disks that are low-level formatted with a standard 512-byte sector, the maximum disk capacity described by the partition table is calculated as follows:
Maximum capacity = sector size cylinders (10 bits) heads (8 bits) sectors per track (6 bits).
Using the maximum possible values yields:
512 1024 256 63 (or 512 x 224) = 8,455,716,864 bytes or 7.8 gigabytes (GB).
Windows Server 2003 and other Windows-based operating systems that support BIOS INT 13h extensions can access partitions that exceed the first 7.8 GB of the disk by ignoring the Starting and Ending CHS fields in favor of the Relative Sectors and Total Sectors fields.
Windows 2000 and Windows Server 2003 ignore the Starting and Ending CHS fields regardless of whether the partition exceeds the first 7.8 GB of the disk. However, Windows Server 2003 must place the appropriate values in the Starting and Ending CHS fields because Windows 95, Windows 98, and Windows Millennium Edition (which all support BIOS INT 13h extensions) use the Starting and Ending CHS fields if the partition does not exceed the first 7.8 GB of the disk. These fields are also required to maintain compatibility with the BIOS INT 13h for startup.
MS-DOS and other Windows operating systems that do not support BIOS INT 13h extensions ignore partitions that exceed the 7.8 GB boundary because these partitions use a System ID that is recognized only by operating systems that support BIOS INT 13h extensions.
Both the operating system and the computer must support BIOS INT 13h extensions if you want to create partitions that exceed the first 7.8 GB of the disk.
Relative Sectors and Total Sectors Fields
The Relative Sectors field represents the offset from the beginning of the disk to the beginning of the volume, counting by sectors, for the volume described by the partition table entry. The Total Sectors field represents the total number of sectors in the volume.
Using the Relative Sectors and Total Sectors fields (resulting in a 32-bit number) provides eight more bits than the CHS scheme to represent the total number of sectors. This allows you to create partitions that contain up to 232 sectors. With a standard sector size of 512 bytes, the 32 bits used to represent the Relative Sectors and Total Sectors fields translates into a maximum partition size of 2 terabytes (or 2,199,023,255,552 bytes).
Note
The following figure shows the MBR, partition table, and boot sectors on a basic disk with four partitions. The definitions of the fields in the partition table and the extended partition tables are the same.
Detail of a Basic Disk with Four Partitions
Extended Boot Record on Basic Disks
An extended boot record (EBR), which consists of an extended partition table and the signature word for the sector, exists for each logical drive in the extended partition. It contains the only information on the first side of the first cylinder of each logical drive in the extended partition. The boot sector in a logical drive is usually located at either Relative Sector 32 or 63. However, if there is no extended partition on a disk, there are no EBRs and no logical drives.
The first entry in an extended partition table for the first logical drive points to its own boot sector. The second entry points to the EBR of the next logical drive. If no further logical drives exist, the second entry is not used and is recorded as a series of zeros. If there are additional logical drives, the first entry of the extended partition table for the second logical drive points to its own boot sector. The second entry of the extended partition table for the second logical drive points to the EBR of the next logical drive. The third and fourth entries of an extended partition table are never used.
As shown in the following figure, the EBRs of the logical drives in the extended partition are a linked list. The figure shows three logical drives on an extended partition, illustrating the difference in extended partition tables between preceding logical drives and the last logical drive.
Detail of an Extended Partition on a Basic Disk
With the exception of the last logical drive on the extended partition, the format of the extended partition table, which is described in the following table, is repeated for each logical drive: the first entry identifies the logical drive’s own boot sector and the second entry identifies the next logical drive’s EBR. The extended partition table for the last logical drive has only its own partition entry listed. The second through fourth entries of the last extended partition table are not used.
Contents of Extended Partition Table Entries
|
Entry
|
Contents
|
|
First
|
Information about the current logical drive in the extended partition, including the starting address for the boot sector preceding the data.
|
|
Second
|
Information about the next logical drive in the extended partition, including the address of the sector that contains the EBR for the next logical drive. If no additional logical drives exist, this field is not used.
|
|
Third
|
Not used.
|
|
Fourth
|
Not used.
|
The fields in each entry of the extended partition table are identical to the MBR partition table entries. For more information about partition table fields, see the table titled “Partition Table Fields” earlier in this section.
The Relative Sectors field in an extended partition table entry shows the number of bytes that are offset from the beginning of the extended partition to the first sector in the logical drive. The number in the Total Sectors field refers to the number of sectors that make up the logical drive. The value of the Total Sectors field equals the number of sectors from the boot sector defined by theextended partition table entry to the end of the logical drive.
Because of the importance of the MBR and EBR sectors, it is recommended that you run disk-scanning tools regularly and that you regularly back up all your data files to protect against losing access to a volume or an entire disk.