How MS-DOS 6.22 Handles a Corrupted FAT
When MS-DOS 6.22 encounters a corrupted File Allocation Table (FAT), its behavior depends directly on whether the corruption is a physical read error or a logical data inconsistency. Because the operating system lacks modern self-healing file system features, it does not automatically repair broken allocation tables during normal operations. Instead, MS-DOS 6.22 responds by halting execution with critical system interrupt errors, silently misinterpreting file structures (leading to cross-linked files or truncation), or relying on external utilities like ScanDisk to resolve differences between the primary and backup FAT copies.
The Role of FAT Mirroring in DOS 6.22
FAT12 and FAT16 disks maintain two identical copies of the allocation
table: FAT1 (primary) and FAT2 (backup). While MS-DOS 6.22 updates both
tables whenever a file is written, the MS-DOS kernel
(MSDOS.SYS) reads exclusively from FAT1 during standard
read operations.
If FAT1 suffers from logical corruption (such as corrupted cluster values or broken chains), MS-DOS 6.22 will not automatically switch to FAT2 or compare the two tables. The operating system blindly executes read requests using the corrupted data in FAT1, propagating errors into running programs unless the failure causes a physical input/output (I/O) fault.
Hardware and Sector-Level Read Failures
If the sectors storing the FAT become physically unreadable due to media degradation or bad sectors, the lower-level BIOS disk routines return an error to MS-DOS. The operating system then reacts with immediate, blocking alerts:
- "File Allocation Table bad, drive [X]": This message appears during boot or disk initialization when DOS detects an invalid media descriptor byte in the first cluster of the FAT.
- Critical Error Handler (
INT 24h): If a sector containing the FAT cannot be read, DOS halts system processes and outputs the standard prompt:
Data error reading drive [X] - Abort, Retry, Fail?
Under this condition, the operating system stops navigating the directory or loading files, as it cannot determine which clusters correspond to the requested data.
Logical Data Corruption Symptoms
When the FAT remains readable at the hardware level but contains corrupted pointers, MS-DOS 6.22 does not crash immediately. Instead, it processes the corrupted entries as valid cluster addresses, causing several distinct behavioral anomalies:
- File Truncation: If a cluster entry contains an
unexpected End-of-File (EOF) marker (such as
FFFFhin FAT16), DOS stops reading the file prematurely, reporting it as complete despite missing data. - Cross-Linked Files: If corruption alters a pointer so that two different directory entries point to the same starting or intermediate cluster, DOS allows both files to claim the same disk space. Writing to one file will irreversibly overwrite data in the other.
- Infinite Read Loops: If corrupted cluster pointers point backward into their own chain, DOS enters an infinite loop while trying to read the file, causing the system or application to hang indefinitely.
- Allocation Errors: If a pointer references a cluster number higher than the maximum capacity of the disk, DOS terminates the read attempt with an internal disk error or displays a corrupted, unreadable file size.
Resolution via MS-DOS ScanDisk
MS-DOS 6.22 introduced an upgraded version of Microsoft ScanDisk
(SCANDISK.EXE) to replace the more basic
CHKDSK.EXE. ScanDisk is the operating system's designated
mechanism for handling FAT corruption.
When invoked manually or during an interrupted boot cycle, ScanDisk
compares FAT1 and FAT2. If it detects that FAT1 is damaged while FAT2
remains intact, it prompts the user to overwrite the damaged primary
table with the mirror copy. If both copies are logically damaged,
ScanDisk traverses the entire directory tree, reconstructs broken
allocation chains into .CHK files in the root directory,
clears invalid cluster marks, and resolves cross-linked files.