BIOS parameter block
The BIOS parameter block (BPB) is a data structure embedded in the boot sector of a volume formatted with the File Allocation Table (FAT) file system, providing critical metadata about the volume's geometry, layout, and parameters necessary for operating systems and bootloaders to access and manage the storage medium.[1] Introduced with MS-DOS 2.0 in the early 1980s to support floppy disks and hard drives, the BPB evolved across versions of the FAT file system to accommodate larger storage capacities and varying media types, with significant updates in MS-DOS 3.0 for volumes exceeding 64 kilobytes and the introduction of FAT32 in Windows 95 OSR2 for drives up to 2 terabytes.[1] Its primary purpose is to enable file system drivers to interpret the volume's structure, including sector and cluster sizes, the location and size of file allocation tables (FATs), and details like the root directory, ensuring compatibility across BIOS-based booting environments and legacy systems.[2] The BPB occupies the first 25 bytes (offsets 11 to 35 in the 512-byte boot sector) for basic FAT12 and FAT16 variants, extending to 90 bytes for FAT32 to include additional fields like the root cluster number and file system version.[1] Key fields in the BPB define essential attributes, such as BPB_BytsPerSec (bytes per sector, typically 512), BPB_SecPerClus (sectors per cluster, a power of 2 from 1 to 128), BPB_NumFATs (number of FAT copies, usually 2 for redundancy), and BPB_TotSec32 (total sectors on the volume for larger drives).[1] For FAT32, unique extensions like BPB_FATSz32 specify the FAT size in sectors, while BPB_RootClus indicates the starting cluster of the root directory, replacing the fixed root entry count used in earlier FAT versions.[1] These parameters, combined with media descriptors and volume serial numbers, allow for volume identification and error recovery, though the BPB's fixed format assumes BIOS interrupt services for low-level disk access, limiting its direct use in modern UEFI environments without emulation.[2] Despite the rise of advanced file systems like NTFS and exFAT, the BPB remains relevant for compatibility with removable media, embedded systems, and legacy boot processes.[3]Overview
Definition and Purpose
The BIOS parameter block (BPB) is a data structure, typically 25–90 bytes long, embedded in the volume boot record (VBR) of a partition or floppy disk.[4] It serves as a foundational element in file systems like FAT, containing metadata that describes the physical and logical layout of the storage volume.[5] The primary purpose of the BPB is to supply essential parameters to the operating system loader and BIOS routines for initializing and accessing the file system, including details on sector sizes, cluster counts, and file allocation table (FAT) locations.[4] This enables the boot process to interpret the volume's organization without requiring prior knowledge of the hardware specifics.[6] Historically, the BPB was designed for compatibility with the IBM PC BIOS, allowing access to storage media via low-level interrupts without full operating system intervention, and it originated in MS-DOS 2.0 as an evolution from earlier CP/M-derived formats.[5] A key benefit is its role in standardizing volume layout descriptions, which facilitates cross-operating system mounting of compatible media, unlike many modern file systems that use dedicated superblocks for metadata.[6]Location and Role in Boot Process
The BIOS parameter block (BPB) resides in the first sector, known as sector 0, of a logical volume or partition on the storage media.[1] This sector, often referred to as the boot sector or volume boot record (VBR), begins with executable boot code: bytes 0–2 contain a jump instruction to skip to the boot code, and bytes 3–10 hold the OEM name identifying the formatting software or operating system.[1] The BPB itself starts at offset byte 11 within this 512-byte sector and extends variably depending on the file system version, providing essential parameters for disk access without which the operating system cannot interpret the volume layout.[7] During the boot process, the BIOS plays a central role in accessing the BPB by loading the boot sector via its disk services, specifically Interrupt 13h (INT 13h). Following the power-on self-test (POST), the BIOS uses INT 13h function AH=02h to read the boot sector from track 0, sector 1 (or equivalent logical block address) into memory at physical address 07C00h, with parameters specifying the drive in DL, head in DH, cylinder in CH, and sector in CL.[8] Once loaded, the boot sector code executes and transfers control to the operating system loader, such as IO.SYS in MS-DOS. The loader then parses the BPB starting at offset 11 to extract volume parameters, enabling it to calculate and locate the root directory and file allocation table (FAT) for loading subsequent system files like MSDOS.SYS.[7] Access to the BPB and subsequent sectors occurs exclusively through BIOS disk services like INT 13h, which handle low-level I/O translation between physical and logical addressing.[8] Variations in BPB location and access arise based on the storage media. For non-partitioned media like floppy disks, the boot sector containing the BPB occupies the absolute first sector of the disk, with no preceding partition table, allowing direct BIOS access during boot.[1] On partitioned hard disks, the master boot record (MBR) in the disk's first sector contains a partition table that specifies the starting sector of the active partition; the BIOS loads this MBR first via INT 13h, executes its code to identify the boot partition, and then reads the VBR (including the BPB) from that partition's first sector.[8] If the BPB is invalid or inconsistent—such as a mismatched media descriptor byte indicating an unrecognized disk type—the boot process fails, often resulting in errors reported by the operating system loader. In MS-DOS, IO.SYS may detect this during parsing and invoke Interrupt 24h for critical error handling, displaying messages like "Invalid media type" or prompting the user with "Abort, Retry, Fail?" options; unresolved issues halt booting to prevent data corruption.[7] The BIOS itself may return error codes via INT 13h, such as 0Ch for "media type not found" on diskettes or 04h for "sector not found" on fixed disks, requiring a system reset (INT 13h AH=00h) before retrying.[8]Historical Development
Origins in Early DOS Versions
The BIOS parameter block (BPB) originated in the development of early disk operating systems for the Intel 8086 processor, beginning with 86-DOS, also known as QDOS, created by Tim Paterson at Seattle Computer Products in 1980.[9][10] Paterson designed 86-DOS as a quick implementation to demonstrate the capabilities of SCP's 8086 board, drawing inspiration from CP/M but optimizing for faster file access and larger volumes without fixed size limits.[10] This system was licensed to Microsoft and adapted into MS-DOS 1.0, released in 1981 alongside the IBM PC, which targeted single-sided 5.25-inch floppy disks as the primary storage medium.[9] MS-DOS 1.x versions, including 1.0 through 1.25, lacked a formal on-disk BPB, relying instead on hardcoded assumptions in the I/O subsystem for disk geometry and layout.[5] These fixed parameters assumed 512-byte sectors, 40 tracks per disk, 8 sectors per track, and single-sided operation, yielding a 160 KB formatted capacity per floppy—sufficient for the IBM PC's initial configuration but inflexible for variations.[11][12] A single media descriptor byte in the boot sector provided minimal format identification, but the absence of a structured BPB meant no support for hard disks or alternative floppy densities, limiting compatibility to the original IBM hardware setup.[5] The introduction of a true BPB came with MS-DOS 2.0 in 1983, marking a pivotal advancement to accommodate the IBM PC/XT's hard disk support and evolving floppy formats.[11] This version embedded the BPB in the boot sector starting at offset 0x0B, providing essential geometry details like bytes per sector, sectors per cluster, and reserved sectors to enable dynamic volume configuration.[5] The FORMAT.COM utility leveraged the BPB to create partitions on hard disks, allowing multiple logical volumes on a single physical drive and facilitating removable media interchangeability.[11] The initial BPB structure was compact at 13 bytes, adequate for FAT12 file systems on small volumes up to 10 MB.[13] This design was influenced by the IBM PC BIOS's INT 13h disk services, which exposed cylinder-head-sector (CHS) geometry to the operating system, necessitating a standardized way to translate BIOS parameters into file system layouts. The BPB addressed the growing need for media flexibility, as users increasingly employed double-sided floppies (360 KB) and hard drives, ensuring DOS could boot and operate across diverse storage without hardcoded limitations.[11]Evolution Through Microsoft Operating Systems
The BIOS Parameter Block (BPB) underwent significant enhancements starting with MS-DOS 3.0 in 1984 to accommodate the increasing storage capacities of emerging hardware, such as the 1.2 MB floppy drives introduced with the IBM PC AT and hard drives up to 20 MB. This version introduced 16-bit cluster numbering in the BPB, enabling support for FAT16 file systems on volumes larger than 4 MB, which was a departure from the 12-bit limitations of earlier DOS versions.[5][6] By MS-DOS 3.2 in 1987 and MS-DOS 3.31 in 1987, the BPB was further extended to include fields for sectors per track, number of heads, hidden sectors (expanded to 32 bits), and total sectors (also 32 bits), allowing partitions up to 32 MB while maintaining compatibility with existing media.[5][14] MS-DOS 4.0 in 1988 added the Extended BPB (EBPB) with a volume serial number—a 32-bit unique identifier generated from the format time—to prevent errors from mounting identical volumes across systems, alongside fields for disk unit numbers and file system type to support multiple file systems like HPFS.[6] These changes were driven by the rapid growth in storage from megabytes to tens of megabytes, necessitating more robust volume identification and layout descriptions.[5] The introduction of FAT32 support in Windows 95 OSR2 in 1996, bundled with MS-DOS 7.10, marked a major evolution with native FAT32 support through an even more extended BPB, incorporating 32-bit sectors per FAT, FAT mirroring flags, and the root directory's starting cluster, which enabled volumes up to 2 TB while preserving backward compatibility by allowing older bootloaders to ignore unused fields.[5][6] This adaptation addressed the shift to gigabyte-scale storage in consumer PCs, ensuring the BPB could describe larger cluster chains without breaking legacy DOS applications.[14] In the post-DOS era, the BPB remained integral to Windows NT-based systems for FAT compatibility; for instance, the NTLDR bootloader in Windows NT 3.1 through XP parsed the BPB in FAT volume boot records to locate the file system during boot, and the BOOTMGR in Windows Vista and later continued this support for hybrid or legacy setups.[15] The design influenced subsequent file systems, such as exFAT introduced in Windows XP with SP2 in 2006, which retained a BPB-like structure in its volume boot record to describe allocation units and volume layout for flash media up to exabyte scales.[16] However, with the transition to UEFI firmware in the mid-2000s, the BPB's role diminished for primary boot volumes, as GPT partition tables and EFI system partitions (formatted as FAT32) supplanted MBR-based legacy modes, though Windows still parses BPB fields for any remaining FAT volumes to ensure compatibility.[2] This deprecation reflects the broader move away from BIOS-limited storage addressing toward more scalable, secure boot environments.[17]General Structure
Core BPB Fields
The core BIOS Parameter Block (BPB) fields form the foundational set of parameters in the boot sector of FAT volumes, providing essential details about the disk geometry, allocation units, and volume structure to enable proper file system access and management. These fields, spanning offsets 11 through 35 in the boot sector, are mandatory across all BPB variants and ensure compatibility for basic volume operations, such as reading sectors and navigating the File Allocation Table (FAT). They originated in early DOS implementations and have remained consistent in their core purpose, though later extensions build upon them for larger volumes.[1] The following table summarizes the core BPB fields, including their offsets (relative to the boot sector start), sizes, typical values, and roles:| Field Name | Offset (bytes) | Size (bits) | Typical Value(s) | Purpose |
|---|---|---|---|---|
| Bytes per sector | 11–12 | 16 | 512 | Specifies the number of bytes in each sector, defining the smallest unit for read/write operations; valid values are 512, 1024, 2048, or 4096.[1] |
| Sectors per cluster | 13 | 8 | 1, 2, 4, 8 (powers of 2 from 1 to 128) | Indicates the number of sectors grouped into one allocation unit (cluster), optimizing storage efficiency by reducing FAT overhead for small files.[1] |
| Reserved sectors | 14–15 | 16 | 1 | Counts the sectors reserved at the volume's beginning, typically including only the boot sector itself, before the FAT begins; must be at least 1.[1] |
| Number of FATs | 16 | 8 | 2 | Defines the count of FAT copies on the volume for redundancy and reliability during error recovery.[1] |
| Root directory entries | 17–18 | 16 | 512 (for FAT12/FAT16) | Specifies the maximum number of 32-byte entries in the root directory; the directory size is this value multiplied by 32 bytes, with 0 used in some extended variants.[1] |
| Total sectors (small) | 19–20 | 16 | Varies (for volumes under 32 MB) | Provides a 16-bit count of total sectors on the volume; set to 0 if the 32-bit version is used instead.[1] |
| Media descriptor | 21 | 8 | 0xF8 (hard disks), 0xF0 (floppies) | Identifies the media type, influencing FAT caching and interrupt behaviors; common values include 0xF0–0xFF for different storage media.[1] |
| Sectors per FAT (small) | 22–23 | 16 | Varies based on volume size | Gives the 16-bit sector count per FAT; determines the FAT's size and is set to 0 when using the extended 32-bit version.[1] |
| Sectors per track | 24–25 | 16 | 63 (common for hard disks) | Describes the sectors per track in the BIOS geometry model, used for legacy interrupt 13h access to the disk.[1] |
| Number of heads | 26–27 | 16 | 16 or 255 (common for hard disks) | Indicates the number of heads in the BIOS CHS addressing scheme for compatibility with early hardware.[1] |
| Hidden sectors | 28–31 | 32 | Varies (e.g., partition offset) | Counts the sectors hidden before the volume's start, such as those in preceding partitions or track 0; 0 for non-partitioned media like floppies.[1] |
| Total sectors (large) | 32–35 | 32 | Varies (for volumes over 32 MB) | Offers a 32-bit total sector count for larger volumes; used when the 16-bit field is 0, providing support for capacities beyond 32 MB.[1] |
Extended BPB (EBPB) Fields
The Extended BIOS Parameter Block (EBPB) extends the core BPB by adding optional fields beginning at byte offset 36 within the boot sector of a volume, providing support for advanced features such as volume identification, drive-specific metadata, and compatibility with larger storage media.[1] Introduced in DOS 3.4 in 1988, the EBPB adds 26 bytes for FAT12 and FAT16 volumes (extending the boot sector up to offset 61) and up to 54 bytes for FAT32 volumes (up to offset 89), enhancing volume portability by including unique identifiers that help operating systems distinguish between similar media and prevent accidental swaps of identical volumes.[1][18] For FAT12 and FAT16 volumes, the EBPB includes the following fields, which provide essential metadata for boot processes and file system recognition:| Field Name | Offset | Size (bytes) | Description |
|---|---|---|---|
| Physical Drive Number (BS_DrvNum) | 36 | 1 | An 8-bit value indicating the physical drive, such as 0x80 for the first hard drive or 0x00 for a floppy; used by boot code to identify the boot device during interrupt 13h calls.[1][18] |
| Reserved (NT) (BS_Reserved1) | 37 | 1 | An 8-bit Windows-specific field, functioning as a flag related to bootable partitions and volume integrity checks; typically set to 0x00 during volume creation.[18] |
| Signature (BS_BootSig) | 38 | 1 | An 8-bit value that must be 0x29 to validate the presence of the following EBPB fields.[1] |
| Volume Serial Number (BS_VolID) | 39–42 | 4 | A 32-bit unique identifier generated by combining the current timestamp (date and time of formatting) with a pseudo-random element to ensure volume uniqueness across systems.[1][18] |
| Volume Label (BS_VolLab) | 43–53 | 11 | An ASCII string representing the volume name, padded with spaces if shorter than 11 characters; defaults to "NO NAME " if no label is specified, matching the root directory entry.[1][18] |
| File System Type (BS_FilSysType) | 54–61 | 8 | An informational ASCII string identifying the file system, such as "FAT12 " or "FAT "; not used by Microsoft drivers to determine the actual FAT type but aids in compatibility.[1][18] |
| Field Name | Offset | Size (bytes) | Description |
|---|---|---|---|
| Sectors per FAT (BPB_FATSz32) | 36–39 | 4 | A 32-bit count of sectors occupied by each FAT table, allowing for larger file allocation tables.[1][18] |
| FAT Flags (BPB_ExtFlags) | 40–41 | 2 | A 16-bit value indicating the active FAT (for non-mirrored setups) and mirroring behavior; bit 7 set to 1 disables mirroring.[18] |
| File System Version (BPB_FSVers) | 42–43 | 2 | 16-bit value indicating the file system version (high byte: major, low byte: minor; typically 0:0 for compatibility).[1] |
| Root Cluster (BPB_RootClus) | 44–47 | 4 | A 32-bit number specifying the first cluster of the root directory (typically 2).[18] |
| FSInfo Sector (BPB_FSInfo) | 48–49 | 2 | A 16-bit offset to the FSInfo structure sector (usually 1), which stores free cluster counts for optimization.[18] |
| Backup Boot Sector (BPB_BkBootSec) | 50–51 | 2 | A 16-bit offset to the backup boot sector (usually 6), providing redundancy for boot parameters.[18] |
| Reserved (BPB_Reserved) | 52–63 | 12 | Reserved for future use; all bytes must be set to 0.[1] |
BPB for FAT File Systems
DOS 2.0 BPB (FAT12/FAT16)
The DOS 2.0 BIOS Parameter Block (BPB) was introduced in March 1983 alongside MS-DOS 2.0, representing the first iteration of the operating system to provide native support for hard disk drives with capacities up to 10 MB, in addition to floppy disk media. This version shifted from earlier DOS reliance on implicit media detection via the first byte of the File Allocation Table (FAT) to a structured BPB embedded in the boot sector for explicit volume parameterization, enabling more reliable initialization of FAT12 and FAT16 file systems.[19][18] The BPB structure spans bytes 11 through 23 (offsets 0x0B to 0x17) of the 512-byte boot sector, comprising exactly 13 bytes and excluding any extended BPB (EBPB) fields that would appear in later versions. It incorporates the core BPB fields—such as bytes per sector (BPB_BytsPerSec, 2 bytes), sectors per cluster (BPB_SecPerClus, 1 byte), number of reserved sectors (BPB_RsvdSecCnt, 2 bytes), number of FATs (BPB_NumFATs, 1 byte), root directory entries (BPB_RootEntCnt, 2 bytes), media descriptor (BPB_Media, 1 byte), and sectors per FAT (BPB_FATSz16, 2 bytes)—to define the basic layout of the volume.[6] Distinct to this variant are its 16-bit limitations for total sectors (BPB_TotSec16, 2 bytes, maximum 65,535 sectors) and sectors per FAT (BPB_FATSz16, 2 bytes), which preclude support for larger volumes requiring 32-bit addressing. Geometry parameters such as sectors per track and number of heads are not stored in the BPB but are predefined for floppy media or detected via BIOS for hard drives.[6] Among its constraints, the DOS 2.0 BPB omits fields for volume serial number and volume label, relying instead on the media descriptor byte for basic identification. It also assumes a fixed-size root directory, typically configured for 512 entries (16 KB at 32 bytes per entry) to maximize compatibility, without provisions for dynamic expansion as seen in subsequent file systems. These design choices reflect the era's hardware constraints, limiting FAT12 volumes to under 16 MB and FAT16 to 32 MB in practice, though the 10 MB hard disk support utilized larger 4 KB clusters to accommodate the era's drives.[18][19] A representative example illustrates its application: for a standard 360 KB double-sided 5.25-inch floppy disk (formatted double density), the BPB sets sectors per cluster to 2 (yielding 1 KB clusters), total sectors to 720, root directory entries to 112, sectors per FAT to 2, and media descriptor to 0xFE, ensuring proper FAT12 organization. The geometry (9 sectors per track, 2 heads, 80 tracks) is predefined for this media type. In terms of compatibility, the BPB is parsed by the COMMAND.COM command interpreter during the boot process to load the file system into memory and mount the volume, while the FORMAT.COM utility generates and writes the BPB tailored to the detected media type, such as floppies or early hard disks. This minimalistic format ensured broad interoperability with MS-DOS 2.0's utilities and hardware but necessitated upgrades in later versions for scaling to larger storage.[18][1]| Offset | Size (bytes) | Field Name | Description |
|---|---|---|---|
| 11 | 2 | BPB_BytsPerSec | Bytes per logical sector (typically 512) |
| 13 | 1 | BPB_SecPerClus | Sectors per cluster (power of 2, e.g., 2 for 1 KB) |
| 14 | 2 | BPB_RsvdSecCnt | Number of reserved sectors (usually 1) |
| 16 | 1 | BPB_NumFATs | Number of FAT copies (typically 2) |
| 17 | 2 | BPB_RootEntCnt | Number of root directory entries (e.g., 112 for 360 KB floppy) |
| 19 | 2 | BPB_TotSec16 | Total sectors in volume (16-bit; maximum 65,535) |
| 21 | 1 | BPB_Media | Media descriptor (e.g., 0xFE for 360 KB floppy) |
| 22 | 2 | BPB_FATSz16 | Sectors per FAT (16-bit) |
DOS 3.0–3.31 BPB (FAT12/FAT16)
The BIOS Parameter Block (BPB) for MS-DOS versions 3.0 through 3.31, spanning from its initial release in August 1984 to the 3.31 update in late 1987, refined the structure introduced in earlier DOS versions to better accommodate hard disk drives and emerging media formats while supporting FAT12 and FAT16 file systems.[20][18] This iteration added geometry and partition fields but did not incorporate a full Extended BPB (EBPB). The structure varied slightly between subversions: for DOS 3.0 to 3.30, it occupies bytes 11 through 29, including a 2-byte hidden sectors field at offsets 28–29; for DOS 3.31, it extends to bytes 11 through 35, with a 4-byte hidden sectors field at offsets 28–31 and the addition of a 32-bit total sectors field (BPB_TotSec32) at offsets 32–35.[6][18] This BPB_TotSec32 field, used only when BPB_TotSec16 is set to zero, allowed for partitions up to 2 GB in size for FAT16 volumes when using larger cluster sizes like 32 KB—surpassing the 16-bit total sectors limit (BPB_TotSec16 at offsets 19–20) that capped earlier volumes at around 32 MB.[21] The BPB structure in this era maintained core fields for physical and logical volume description, such as bytes per sector (offsets 11–12, typically 512), sectors per cluster (offset 13, a power of 2), number of reserved sectors (offsets 14–15, usually 1), number of FATs (offset 16, often 2), root directory entries (offsets 17–18, fixed at 512 for many configurations), media descriptor (offset 21), and sectors per FAT (offsets 22–23). Additional geometry fields included sectors per track (offsets 24–25), number of heads (offsets 26–27), and hidden sectors (offsets 28–29 for DOS 3.0-3.30 or 28–31 for 3.31), which FDISK.COM populated during partitioning to indicate sectors preceding the volume's start, making the BPB indispensable for multi-partition setups on hard drives. For instance, on a typical 20 MB hard disk drive formatted under DOS 3.x, the BPB would specify 512 bytes per sector, 9 sectors per FAT for a FAT12 layout (though larger drives often shifted to FAT16), and 512 root directory entries to balance directory size with sector alignment.[22][14][18][23] Sub-version changes further tailored the BPB for new hardware. DOS 3.2, released in 1986, incorporated support for 1.44 MB high-density 3.5-inch floppy disks by allowing sectors per cluster values of 1, optimizing for the increased capacity while preserving backward compatibility with smaller media. In DOS 3.31, refinements to the media descriptor byte (offset 21) extended compatibility to CD-ROM drives, using values like 0xF8 to denote non-removable optical media, which facilitated integration with MSCDEX.EXE for accessing ISO 9660 volumes alongside FAT structures. These evolutions built on the minimal BPB from DOS 2.0 by emphasizing hard disk partitioning and volume scaling, ensuring robust operation in environments with multiple drives or emerging peripherals.[22][18][11][21]DOS 4.0 EBPB (FAT12/FAT16/HPFS)
The DOS 4.0 Extended BIOS Parameter Block (EBPB) represents the first comprehensive extension of the BPB structure, introduced in 1988 with MS-DOS 4.0 and used in OS/2 1.x, including HPFS support in the Extended Edition released that year, to support larger volumes up to 2 GB while incorporating additional metadata for volume identification and file system typing. Spanning 51 bytes from offsets 11 to 61 (0x0B to 0x3D) in the boot sector, it builds on prior DOS versions by adding fields for enhanced compatibility and redundancy, particularly for FAT12 and FAT16 file systems on hard disks. This structure maintains the core geometry parameters—such as bytes per sector, sectors per cluster, and reserved sectors—while extending to include drive-specific and volume-specific details, enabling more robust boot processes and file system management.[24] Key unique features of the DOS 4.0 EBPB include a boot signature byte of 0x29 at offset 38 (0x26 in the boot sector), which validates the structure's integrity; a physical drive number byte at offset 36 (0x24), indicating the boot device (e.g., 0x80 for the first hard drive); a 32-bit volume serial number at offsets 39–42 (0x27–0x2A), typically generated as (creation time shifted left by 16 bits) OR a random value for uniqueness; an 11-byte volume label at offsets 43–53 (0x2B–0x35), truncated to uppercase ASCII if longer; and an 8-byte file system type string at offsets 54–61 (0x36–0x3D), such as "FAT12 " or "FAT16 ". The sectors per FAT field remains 16-bit, limiting FAT sizes but supporting volumes up to the 2 GB threshold, with two FAT copies providing redundancy for backup and recovery. For example, during formatting, the volume serial might combine the high word of the creation timestamp with a pseudorandom low word to ensure collision resistance across disks.[24] The EBPB layout was adapted for HPFS in OS/2, using the identical structure for boot sector geometry but differentiating via the file system type field set to "HPFS ", while setting sectors per cluster to 4 to align with HPFS's 2 KB allocation units (though the BPB primarily describes physical layout rather than logical clustering). This adaptation focuses on disk geometry parameters like sectors per track and number of heads, ensuring compatibility without altering the core EBPB footprint. The structure's extensions, including the volume serial and label, facilitate redundancy through the dual FATs (or equivalent in HPFS for fault tolerance), allowing recovery from primary FAT corruption by referencing the backup.[25][26] The DOS 4.0 EBPB enables dual-boot configurations on the same disk by standardizing boot sector metadata, permitting seamless switching between FAT and HPFS partitions without geometry conflicts. This compatibility allows a single disk to host both file systems, with the EBPB's drive number and serial fields aiding the bootloader in identifying and mounting the appropriate volume during OS/2 or DOS startup.[25]FAT32 EBPB (DOS 7.10)
The FAT32 Extended BIOS Parameter Block (EBPB) was introduced in MS-DOS 7.10 in 1996 alongside Windows 95 OEM Service Release 2, enabling support for volumes exceeding the 2 GB limit imposed by FAT16 through 32-bit cluster addressing and enhanced metadata structures.[27] This expansion addressed the growing capacity of hard drives in the mid-1990s, allowing more efficient space utilization with smaller cluster sizes while maintaining backward compatibility with core FAT principles. The structure builds upon the DOS 4.0 EBPB by extending fields for larger-scale operations, without altering the fundamental boot sector layout. The FAT32 EBPB comprises 90 bytes, spanning offsets 11 through 100 in the 512-byte boot sector, and includes all preceding BPB fields up to BPB_TotSec32 at offset 32–35, followed by FAT32-specific extensions starting at offset 36. These additions facilitate management of massive file allocation tables and dynamic directory handling essential for terabyte-scale storage. The file system type is identified by the string "FAT32 " at offset 82–89, distinguishing it from earlier variants. Key extensions in the FAT32 EBPB include the 32-bit sectors per FAT count (BPB_FATSz32) at offset 36–39, which supersedes the 16-bit BPB_FATSz16 (set to 0) and removes size restrictions on FAT tables, enabling volumes with millions of clusters.[1] The extended flags (BPB_ExtFlags) at offset 40–41 allow configuration of FAT mirroring: bit 7 set to 1 disables mirroring for single-FAT use to conserve space, while bits 0–3 select the active FAT when disabled; bit 7 set to 0 maintains traditional mirroring across copies.[1] Further enhancements specify the root directory's starting cluster (BPB_RootClus) at offset 44–47, defaulting to 2, which treats the root as a regular cluster chain rather than a fixed pre-allocated region, thus eliminating the 32 MB root limit of FAT16 and supporting unlimited subdirectory nesting.[1] The FSInfo sector location (BPB_FSInfo) at offset 48–49 points to a dedicated structure—typically sector 1—storing the free cluster count and next available cluster number for optimized allocation during file operations.[1] The backup boot sector offset (BPB_BkBootSec) at offset 50–51, usually 6, ensures redundancy by duplicating the boot sector, BPB, and FSInfo for recovery from corruption.[1]| Offset | Field Name | Size (bytes) | Description |
|---|---|---|---|
| 36–39 | BPB_FATSz32 | 4 | 32-bit sectors occupied by each FAT (BPB_FATSz16 = 0). |
| 40–41 | BPB_ExtFlags | 2 | FAT control flags: bit 7 (mirroring disable), bits 0–3 (active FAT). |
| 44–47 | BPB_RootClus | 4 | First cluster of root directory (default: 2). |
| 48–49 | BPB_FSInfo | 2 | Sector number of FSInfo structure (default: 1). |
| 50–51 | BPB_BkBootSec | 2 | Sector number of backup boot sector (default: 6). |