MS-DOS 6.22 System File Fragmentation Explained
MS-DOS 6.22 handles the fragmentation of IO.SYS and
MSDOS.SYS much more flexibly than early DOS iterations,
allowing the operating system to boot even if these core system files
are not completely contiguous. While older versions of DOS demanded
strict contiguous placement at the very beginning of the disk's data
area, MS-DOS 6.22 relies on an improved boot sector loader and built-in
FAT navigation routines that permit MSDOS.SYS to be
entirely fragmented and IO.SYS to be partially fragmented
without causing boot failure.
The Role of the Partition Boot Record
When a computer boots an MS-DOS 6.22 volume, the Partition Boot
Record (PBR) is executed first. The code within the PBR is extremely
compact—limited to less than 512 bytes—which limits its ability to
navigate complex File Allocation Table (FAT) chains. The PBR inspects
the root directory to ensure IO.SYS is the first entry and
loads the file's initial cluster into memory.
Because the PBR assumes the starting cluster of IO.SYS
can be read directly into memory without parsing the broader FAT chain,
this initial portion of IO.SYS must reside sequentially on
the disk.
How IO.SYS Handles Fragmentation
IO.SYS contains the hardware-level interface routines
and the secondary bootstrap logic. In MS-DOS 6.22, IO.SYS
is split conceptually into two functional parts: the initialization code
loaded by the PBR and the main DOS BIOS routines.
If IO.SYS becomes fragmented across multiple
clusters:
- The First Cluster: Must remain intact and
contiguous. If the first cluster cannot be read sequentially by the
simple boot code, the boot process halts immediately, typically
producing the error message:
Non-System disk or disk error. Replace and press any key when ready. - Subsequent Clusters: Once the initial cluster of
IO.SYSis loaded into memory, its internal routines take over. These routines contain full FAT-traversal logic. As a result, any remaining clusters ofIO.SYScan be scattered across the drive without halting the system. The file will assemble in memory sequentially via the cluster links found in the FAT.
How MSDOS.SYS Handles Fragmentation
In MS-DOS 6.22, MSDOS.SYS contains the core operating
system kernel. Unlike earlier DOS versions where the bootloader or early
IO.SYS assumed MSDOS.SYS immediately followed
IO.SYS in physical storage, MS-DOS 6.22 delegates the
loading of MSDOS.SYS entirely to IO.SYS.
Because IO.SYS possesses full FAT awareness by the time
it loads the kernel, MSDOS.SYS can be completely
fragmented. Its clusters do not need to be contiguous, nor do they need
to be located at the physical beginning of the disk. IO.SYS
reads the directory entry for MSDOS.SYS, follows the
cluster chain through the FAT, and loads the kernel into memory
seamlessly.
Practical Implications and Disk Utilities
Although MS-DOS 6.22 can boot successfully with fragmented system files, fragmentation incurs a slight performance penalty during startup due to additional disk head movement.
When running the native MS-DOS 6.22 defragmentation utility
(DEFRAG), the tool actively identifies IO.SYS
and MSDOS.SYS. DEFRAG moves them to the
physical beginning of the disk and restructures them to be entirely
contiguous. Similarly, running the SYS command reallocates
directory entries and attempts to write contiguous blocks to maintain
standard backward-compatible disk geometry.