Convert FAT12 to FAT16 in MS-DOS 6.22

This article explains how MS-DOS 6.22 handles the transition from a FAT12 to a FAT16 file allocation structure. Because MS-DOS 6.22 lacks a native utility for in-place, non-destructive file system conversions, upgrading from FAT12 to FAT16 requires a destructive reformatting or repartitioning process. During this process, MS-DOS evaluates the volume size, alters the BIOS Parameter Block (BPB), and expands the File Allocation Table (FAT) entry addressing width from 12 bits to 16 bits.

The Dynamic FAT Type Determination

MS-DOS 6.22 does not allow users to explicitly specify the FAT type using command-line flags. Instead, the operating system determines whether to use FAT12 or FAT16 automatically during formatting based on the total number of clusters calculated for the partition.

The threshold is strictly defined by the cluster count:

  • FAT12: Any volume containing fewer than 4,085 clusters.
  • FAT16: Any volume containing between 4,085 and 65,524 clusters.

To convert a FAT12 structure to FAT16, the underlying partition geometry must be enlarged to exceed the 4,084-cluster threshold, or the sector allocation per cluster must be adjusted so that the resulting count forces the system into the FAT16 range.

Structural Changes from FAT12 to FAT16

When MS-DOS 6.22 formats a disk to FAT16, it restructures several critical disk components:

  1. BIOS Parameter Block (BPB): Located in the volume boot record (Sector 0), the BPB is updated with new geometry descriptors. The Sectors Per Cluster value is recalculated, and the file system identification string is changed from FAT12 to FAT16 .
  2. Cluster Entry Width: In FAT12, entries are packed so that two cluster references occupy 3 bytes (12 bits each). FAT16 eliminates this packing complexity by dedicating a full 2 bytes (16 bits) to each cluster entry, significantly altering how the file system maps and reads contiguous or fragmented data chains.
  3. Reserved Cluster Markers: The special allocation markers in the first two entries of the FAT table are expanded:
    • FAT12: Entry 0 holds the media descriptor byte followed by FF, and Entry 1 holds FFF.
    • FAT16: Entry 0 holds the media descriptor byte followed by FF, and Entry 1 holds FFFF.
  4. FAT Table Size: Because each cluster entry requires more storage (16 bits instead of 12) and the volume supports a higher overall cluster count, the Sectors Per FAT value in the BPB increases.
  5. Root Directory Location: Because the FAT tables consume more sectors, the physical starting sector of the Root Directory is shifted further down the disk.

The Conversion Process in MS-DOS 6.22

Because MS-DOS 6.22 does not support native live conversion, the transition follows a structural rebuild:

  1. Data Backup: All files must be copied off the volume, as rewriting the allocation tables destroys existing file pointers.
  2. Partition Expansion (FDISK): If the volume is a hard disk partition smaller than 16 MB formatted as FAT12, use FDISK to delete the partition and recreate a primary DOS partition larger than 16 MB. Partitions between 16 MB and 2,048 MB automatically qualify for FAT16.
  3. Structure Initialization (FORMAT): Running FORMAT C: instructs MS-DOS to recalculate the volume geometry. Detecting a cluster count of 4,085 or greater, FORMAT.EXE writes the expanded 16-bit FAT tables, initializes the updated BPB, clears the root directory table, and marks all clusters as free.
  4. Data Restoration: Data is copied back onto the newly created FAT16 volume. MS-DOS now addresses files using 16-bit cluster pointers instead of the 12-bit packed format.