The Partition Boot Sector contains information that the file system uses to access the volume. On x86-based computers, the Master Boot Record use the Partition Boot Sector on the system partition to load the operating system Kernel files, or in the case of Windows NT, the boot loader.
The Windows NT Partition Boot Sector consists of:
The BIOS Parameter Block (bytes 11 through 35 of the Partition Boot Sector) describes physical parameters of the volume. The extended BIOS Parameter Block begins immediately after the BIOS Parameter Block. The length of this structure is different for FAT and NTFS volumes. The information in the BIOS Parameter Block and the extended BIOS Parameter Block is used by disk device drivers to read and configure volumes.
The Partition Boot Sector is the first 512-byte sector at the beginning of the volume. The sector always ends with 0x55AA, which is a sector signature word that marks the end of the sector.
Table 3.2 describes the fields in the Partition Boot Sector for a volume formatted with the FAT file system. The sample values are the data in the corresponding fields in the hex dump in Figure 3.7, presented later in this section.
Table 3.2 Partition Boot Sector for FAT volumes
Byte Offset (in hex) | Field Length | Sample Value | Meaning |
00 | 3 bytes | EB 3C 90 | Jump instruction |
03 | 8 bytes | MSDOS5.0 | OEM Name in text |
0B | 25 bytes | BIOS Parameter Block | |
24 | 26 bytes | Extended BIOS Parameter Block | |
3E | 448 bytes | Bootstrap code | |
1FE | 2 bytes | 0x55AA | End of sector marker |
The following figure is a hex printout of the Partition Boot Sector for a FAT volume. The printout is formatted in three sections:
Figure 3.7. Partition Boot Sector for a FAT volume on x86-based computer
Table 3.3 shows the layout of the BIOS Parameter Block and the extended BIOS Parameter Block. The sample values correspond to the data in Figure 3.7.
Table 3.3 BIOS Parameter Block and Extended BIOS Parameter Block Fields for FAT volumes
Byte Offset | Field Length |
|
|
0x0B | WORD | 0x0002 | Bytes per Sector. The size of a hardware sector. For most disks in use in the United States, the value of this field is 512. |
0x0D | BYTE | 0x08 | Sectors Per Cluster. The number of sectors in a cluster. The default cluster size for a volume depends on the volume size and the file system. |
0x0E | WORD | 0x0100 | Reserved Sectors. The number of sectors from the Partition Boot Sector to the start of the first file allocation table, including the Partition Boot Sector. The minimum value is 1. If the value is greater than 1, it means that the bootstrap code is too long to fit completely in the Partition Boot Sector. |
0x10 | BYTE | 0x02 | Number of file allocation tables (FATs). The number of copies of the file allocation table on the volume. Typically, the value of this field is 2. |
0x11 | WORD | 0x0002 | Root Entries. The total number of file name entries that can be stored in the root folder of the volume. |
0x13 | WORD | 0x0000 | Small Sectors. The number of sectors on the volume if the number fits in 16 bits (65535). For volumes larger than 65536 sectors, this field has a value of 0 and the Large Sectors field is used instead. |
0x15 | BYTE | 0xF8 | Media Type. Provides information about the media being used. A value of 0xF8 indicates a hard disk. |
0x16 | WORD | 0xC900 | Sectors per file allocation table (FAT). Number of sectors occupied by each of the file allocation tables on the volume. |
0x18 | WORD | 0x3F00 | Sectors per Track. The apparent disk geometry in use when the disk was formatted. |
0x1A | WORD | 0x1000 | Number of Heads. The apparent disk geometry in use when the disk was formatted. |
0x1C | DWORD | 3F 00 00 00 | Hidden Sectors. Same as the Relative Sector field in the Partition Table. |
0x20 | DWORD | 51 42 06 00 | Large Sectors. If the Small Sectors field is zero, this field contains the total number of sectors in the volume. If Small Sectors is nonzero, this field contains zero. |
0x24 | BYTE | 0x80 | Physical Disk Number. This is related to the BIOS physical disk number. Floppy drives are numbered starting with 0x00 for the A disk. Physical hard disks are numbered starting with 0x80. The value is typically 0x80 for hard disks, regardless of how many physical disk drives exist, because the value is only relevant if the device is the startup disk. |
0x25 | BYTE | 0x00 | Current Head. Not used by the FAT file system. Therefore, Windows NT uses this field to store two flags: |
0x26 | BYTE | 0x29 | Signature. Must be either 0x28 or 0x29 in order to be recognized by Windows NT. |
0x27 | 4 bytes | CE 13 46 30 | Volume Serial Number. A unique number that is created when you format the volume. |
0x2B | 11 bytes | NO NAME | Volume Label. This field was used to store the volume label, but the volume label is now stored as special file in the root directory. |
0x36 | 8 bytes | FAT16 | System ID. Either FAT12 or FAT16, depending on the format of the disk. |
Table 3.4 describes the fields in the Partition Boot Sector for a volume formatted with the NTFS file system. The sample values are the data in the corresponding fields in the hex dump in Figure 3.8, presented later in this section.
Table 3.4 Partition Boot Sector for NTFS volume
Byte Offset (in hex) |
| Sample Value |
|
00 | 3 bytes | EB 5B 00 | Jump instruction |
03 | 8 bytes | NTFS | OEM Identifier |
0B | 25 bytes | BIOS Parameter Block | |
24 | 48 bytes | Extended BIOS Parameter Block | |
54 | 426 bytes | Bootstrap code | |
1FE | WORD | 0x55AA | End of sector marker |
Note
The bootstrap code for an NTFS volume is longer than the 426 bytes shown here. When you format an NTFS volume, the format program allocates the first 16 sectors for the Partition Boot Sector and the bootstrap code.
The extra data fields after the BIOS Parameter Block form an extended BIOS Parameter Block for NTFS. The data in these fields enable the boot loader to find the Master File Table (MFT) during the startup process. In the NTFS file system, the MFT is not located in a predefined sector as is the case for the file allocation table on a FAT volume. Thus, the MFT can be moved if there is a bad sector in its normal location. However, if these data are corrupt, the MFT cannot be located and Windows NT assumes the volume has not been formatted.
Note
The MFT contains information about all of the files on an NTFS volume. See Chapter 17, "Disk and File System Basics," in the Windows NT Workstation Resource Guide for details about the MFT.
The following figure is a hex dump of the Partition Boot Sector for an NTFS volume (formatted when running Windows NT 4.0). The printout is formatted in three sections:
Figure 3.8. Partition Boot Sector for a NTFS volume on an x86-based computer
The next table describes the fields for the BIOS Parameter Block and the Extended BIOS Parameter Block. The fields starting at 0x0B, 0x0D, 0x15, 0x18, 0x1A, and 0x1C are the same as the corresponding fields for FAT volumes, as described in Table 3.3.
Table 3.5 BIOS Parameter Block and Extended BIOS Parameter Block Fields for NTFS volumes
Byte Offset |
|
|
|
0x0B | WORD | 0x0002 | Bytes per Sector. |
0x0D | BYTE | 0x01 | Sectors per Cluster. |
0x0E | WORD | 0x0000 | Reserved sectors. |
0x10 | BYTE | 0x00 | Always 0. |
0x11 | WORD | 0x0000 | Always 0. |
0x13 | WORD | 0x0000 | Not used by NTFS. |
0x15 | BYTE | 0xF8 | Media Type. |
0x16 | WORD | 0x0000 | Always 0. |
0x18 | WORD | 0x3F00 | Sectors per Track. |
0x1A | WORD | 0x1000 | Number of Heads. |
0x1C | DWORD | 90 42 06 00 | Hidden Sectors. |
0x20 | DWORD | 00 00 00 00 | Not used by NTFS. |
0x24 | DWORD | 80 00 80 00 | Not used by NTFS. |
0x28 | LONGLONG | A0 3E 06 00 00 00 00 00 | Total Sectors. |
0x30 | LCN | 10 00 00 00 00 00 00 00 | Logical cluster number for $MFT. |
0x38 | LCN | 51 1F 03 00 00 00 00 00 | Logical cluster number for $MFTMirr. |
0x40 | DWORD | 02 00 00 00 | Clusters per file record segment. |
0x44 | DWORD | 04 00 00 00 | Clusters per index block. |
0x48 | LONGLONG | 5B 1F DD 2C 4F DD 2C A2 | Volume Serial Number. |
0x50 | DWORD | 00 00 00 00 | Checksum. |
For information about the Master File Table and the $MFT and $MFTMirr files, see Chapter 17, "Disk and File System Basics," in the Windows NT Workstation Resource Guide.