MS-DOS 6.22 FAT Management on 2 GB Volumes

MS-DOS 6.22 manages hard drive volumes reaching 2 GB by utilizing the FAT16 file system at its absolute architectural limits. To address this capacity, the operating system scales the allocation unit—known as a cluster—to its maximum supported size of 32 kilobytes, mapping up to 65,526 individual data clusters across the volume. This article explains how the 16-bit File Allocation Table structures disk space, coordinates cluster chains, and handles physical disks that exceed the 2 GB boundary.

The FAT16 Addressing Boundary

MS-DOS 6.22 relies on the FAT16 file system, which assigns 16-bit values to track disk storage. Under 16-bit addressing, a maximum of 65,536 (\(2^{16}\)) unique cluster numbers are possible. However, the system reserves specific values for internal metadata:

  • 0x0000 indicates a free cluster.
  • 0x0001 is reserved.
  • 0xFFF0 through 0xFFF6 represent reserved values.
  • 0xFFF7 marks a bad cluster.
  • 0xFFF8 through 0xFFFF designate the End-of-File (EOF) marker.

Because of these reserved values, the operating system has a practical limit of 65,526 usable clusters for file storage.

Cluster Sizing and the 2 GB Threshold

Because standard hard drive sectors are 512 bytes, addressing 65,526 individual sectors directly would limit a partition to just under 32 megabytes. To allow larger drive sizes, MS-DOS groups contiguous sectors into clusters.

To reach a 2 GB (2,147,483,648 bytes) volume size, MS-DOS 6.22 assigns 64 sectors per cluster:

\[\text{Cluster Size} = 64 \times 512 \text{ bytes} = 32,768 \text{ bytes (32 KB)}\]

When multiplying this maximum cluster size by the available 16-bit cluster range:

\[\text{Volume Capacity} \approx 65,526 \times 32,768 \text{ bytes} \approx 2.14 \text{ GB}\]

Because 32 KB is the maximum cluster size standard MS-DOS utility drivers and BIOS routines can reliably process without data corruption, 2,048 MB represents the hard ceiling for any single FAT16 partition.

Table Structure and Maintenance

On a 2 GB volume, MS-DOS 6.22 maintains two identical copies of the allocation table directly following the boot sector: FAT1 (the primary table) and FAT2 (a real-time backup).

Each table occupies:

\[\frac{65,536 \text{ entries} \times 2 \text{ bytes per entry}}{1,024} = 128 \text{ KB}\]

When a file is written:

  1. The directory entry stores the file name, attributes, file size, and the index number of the first cluster.
  2. The operating system accesses the FAT at that cluster index.
  3. The value stored in that index points to the next cluster allocated to the file.
  4. When the file ends, MS-DOS writes an EOF marker (0xFFFF) into the final cluster's entry.

Whenever changes are made, MS-DOS mirrors the write operations to both FAT1 and FAT2 to safeguard against sector degradation in the primary table.

Cluster Slack on 2 GB Volumes

The major trade-off of running FAT16 at 2 GB is internal fragmentation, known as "cluster slack." Because MS-DOS allocates space strictly in discrete 32 KB blocks, even a file containing only 10 bytes of data consumes a full 32 KB of physical disk space. Across thousands of small configuration files, batch scripts, and system utilities, slack space can consume a significant portion of the drive's total capacity.

Handling Disks Larger Than 2 GB

MS-DOS 6.22 cannot mount or read a single partition larger than 2 GB. If a physical hard disk exceeds 2 GB, the MS-DOS partitioning tool (FDISK) manages the additional capacity by segmenting the disk:

  1. A Primary DOS Partition is created, capped at 2 GB (assigned drive letter C:).
  2. An Extended DOS Partition is created using the remaining physical disk space.
  3. The Extended Partition is subdivided into one or more Logical DOS Drives (such as D:, E:, and F:), with each individual logical drive formatted with its own independent FAT16 structure limited to a maximum of 2 GB.