Skip to content
FreeDOSDeep Dive Published Updated 4 min readViews unavailable

FAT32 on FreeDOS: Cluster Addressing, Compatibility, and Practical Limits

How FreeDOS reads and writes FAT32 volumes, including BPB fields, 28-bit cluster chains, root-directory changes, FSInfo hints, size limits, and repair.

FAT32 extends the FAT family so a DOS-compatible system can use far more clusters than FAT12 or FAT16. FreeDOS implements FAT32 in its kernel and tools, but a volume’s practical compatibility still depends on BIOS access, partitioning, formatter choices, cluster size, and the limits of individual applications.

“32” does not mean every bit is a cluster number

A FAT32 table entry occupies 32 bits, but the upper four are reserved; the usable cluster value is 28 bits. Values near the top of that range represent end-of-chain, bad, or reserved markers. File data is stored in cluster chains just as in earlier FAT, with a larger namespace of possible clusters.

The BIOS Parameter Block in the boot sector describes bytes per sector, sectors per cluster, reserved sectors, FAT count and size, root-directory start cluster, FSInfo sector, backup boot sector, and total sectors. Tools must validate those fields against the actual device rather than trust one corrupted value.

The root directory became an ordinary chain

FAT12/16 reserve a fixed root-directory region with a fixed entry count. FAT32 stores the root directory in a normal cluster chain whose first cluster is recorded in the BPB. It can therefore grow, but corruption in its chain behaves more like corruption in any other directory.

Long filenames remain a VFAT directory-entry convention layered around the short 8.3 entry. FreeDOS kernel and application support varies; DOSLFN can add long-filename APIs for compatible programs. The ability to mount FAT32 does not guarantee every old utility understands its BPB or long-name records.

FSInfo is a performance hint

FAT32 can maintain an FSInfo sector containing a free-cluster count and a suggested next free cluster. Those values may be unknown or stale after an interrupted write. A correct implementation can rescan the FAT rather than treating FSInfo as authoritative.

If reported free space conflicts with a full filesystem check, stop writes and image the media. Repeatedly “fixing” only FSInfo can hide a damaged FAT or mismatched mirror.

Volume limits span several layers

The on-disk format, FreeDOS kernel, BIOS INT 13h services, partition table, formatter, and application each have limits. Legacy CHS BIOS calls cannot address a modern large disk reliably; Extended INT 13h/LBA support or an appropriate driver is required. MBR partition sizes and sector-size assumptions add their own ceiling.

FAT’s 32-bit file-size field caps a single file below 4 GiB regardless of a much larger volume. Backup images, videos, and archives can hit that limit while the drive still has abundant free space.

Choose a cluster size supported by the target systems. Very small clusters on a huge volume enlarge the FAT and scanning cost; very large clusters waste space for small files and can exceed an old utility’s assumptions. Use FreeDOS FDISK and FORMAT versions documented for FAT32 rather than an MS-DOS-era formatter that predates it.

Mirrored FATs require careful interpretation

The volume normally stores multiple FAT copies. FAT32 BPB flags can indicate mirroring or select an active FAT. Copies can diverge after media error or interrupted writes. A repair program must decide which information is credible using filesystem structure and evidence—not automatically copy “FAT 1” over “FAT 2.”

Before repair, create a sector-level image and checksum it. Preserve the partition table, boot sector, backup boot sector, FATs, root chain, and directory entries. Work on a duplicate image first.

Bootability is separate from mountability

A FAT32 partition can be readable yet fail to boot because BIOS geometry, active partition, MBR/VBR code, KERNEL.SYS placement, or boot-sector BPB is wrong. SYS installs FreeDOS boot code and system files on a correctly formatted target; it is not a general data-repair command.

Validate with the intended BIOS or emulator, not just a host OS mount. Test cold boot, directory traversal, files spanning many clusters, near-4-GiB behavior, long names where required, full-volume allocation, unclean shutdown in a disposable image, and checks by the shipped FreeDOS tools.

FAT32 gives FreeDOS useful large-volume support while retaining FAT’s simple linked-allocation design. Reliability comes from respecting every layer around the format and imaging before repair.

Related:

Sources:

Comments