FAT32 on Preinstalled Systems

Updated: December 4, 2001

FAT32 is an enhancement of the file allocation table (FAT) file system that supports large drives in a single volume--that is, it appears as a single drive letter rather than multiple drive letters to the user--with improved disk space efficiency. FAT32 is part of the Microsoft Windows 98 and Windows 95 OSR 2 operating systems.

This article provides information to encourage OEMs to provide FAT32 by default when preinstalling Windows 95 OSR 2 or Windows 98 on new PCs.

On This Page
FAT32 on Preinstalled SystemsFAT32 on Preinstalled Systems
FAT32 ConversionFAT32 Conversion
FAT32 Technical ImplementationFAT32 Technical Implementation
FAT32 CompatibilityFAT32 Compatibility
*

FAT32 on Preinstalled Systems

It has previously been written that FAT32 is not faster than FAT16 in the OSR 2 beta release notes, early Windows 98 beta release notes, and Introduction to Windows 98 from Microsoft Press. This is no longer true. In fact, the largest application-launch performance gains are associated with FAT32.

FAT32 provides the following enhancements over earlier implementations of the FAT file system:

Support for drives up to 2 Terabytes in size without using multiple partitions.

Use of smaller clusters (for example, 4K clusters for drives below 8 GB), resulting in 20-30 percent more efficient use of disk space relative to large FAT16 drives.

Improved flexibility--the root directory on FAT32 drives is now an ordinary cluster chain, so it can be arbitrarily large and located anywhere on the drive.

Improved robustness--the ability to relocate the root directory and disable FAT mirroring, combined with the fact that the boot record on FAT32 drives has been expanded to include a backup of critical data structures, means that FAT32 drives are less susceptible to a single point of failure than FAT16 volumes.

FAT32 uses the disk cache (Vcache) more efficiently by allowing the memory manager to map directly into memory portions of an application that is in the disk cache. This process eliminates an additional memory copy of the mapped portions of the application. This feature is only available only on FAT32 volumes.

FAT32 allows the memory manager to write pageable data very efficiently to the swap file while a system is idle. This feature is only available on FAT32 volumes and volumes with cluster sizes greater than 4K.

Various system features work more efficiently when a volume has 4K clusters--in other words, a cluster size that matches the page size in Windows 95 and Windows 98. FAT32 enables very large volumes to have smaller clusters than FAT16 volumes. The smaller cluster size results in both more efficient use of free disk space and better overall system performance. The FAT32 converter chooses the optimal size for a cluster on a FAT32 volume based on volume size and system performance characteristics.

In addition, FAT32 provides these additional benefits related to other performance enhancements that are built into Windows 98:

Cluster reordering for application launch performance improvements--this feature provides much better results on 4K cluster drives available with FAT32 than it does with 16K or 32K cluster partitions.

Real-mode ScanDisk on a FAT32 system is 50 to 60 percent faster in Windows 98 than it was in Windows 95 OSR 2, which speeds up boot after improper system shut down.

Top of pageTop of page

FAT32 Conversion

Windows 98 includes a converter that will convert a FAT16 volume to FAT32. The conversion process leverages features of the FAT32 file system specifically designed to allow for safe conversions from a FAT16 volume. These features include the ability to specify which of multiple FAT tables is active and the ability to relocate the root directory table.

The basic algorithm of the FAT32 converter is to construct a mirror file system that shares the same data space as the original file system. The FAT16 file system remains fully intact and usable while the new FAT32 file system is constructed. At no point during the building of the FAT32 file system would a power failure or unexpected reboot result in data loss. Once the FAT32 file system is constructed, it is "instantly" enabled with a single-sector write to the boot sector. That is, the transition from a fully functional FAT16 file system to a fully functional FAT32 file system comes down to a single sector write.

The nine phases of the conversion process are the following:

Phase 1:

Runs ScanDisk to verify that the drive's file system structure is valid

Refuses to run if there are any clusters that have previously been marked as being bad

Watches for compression

Watches for incompatible BIOS versions

Watches for anti-virus software that will get in the way

Watches for drives that are not supported by interrupt 13 (Int 13)

Watches for drivers that do not support FAT32

Phase 2: Converts the directories. CVT (the conversion utility) makes a copy of the entire volume's directory structure to an unused portion of the disk. The conversion is performed entirely on this copy. Any failure or power loss during this phase leaves the volume in its original state.

Phase 3: Makes room for the 32-bit FAT. CVT makes room for the new 32-bit FAT by moving files and directories out of the way using the same method as Defrag. Any failure or power loss during this phase might leave minor problems in the form of lost clusters (the same as Defrag.) No user data is lost, and ScanDisk can easily throw away the lost clusters.

Phase 4: Converts the 16-bit FAT to a 32-bit FAT. CVT converts as it copies the 16-bit FAT to the new unused location for the 32-bit FAT. Any failure or power loss during this phase leaves the volume in its original state, except that a few files have been moved.

Phase 5: Frees unneeded clusters. CVT frees clusters marked as used in the 32-bit FAT that will no longer be needed because of the smaller FAT32 clusters. Any failure or power loss during this phase leaves the volume in its original state, except that a few files have been moved.

Phase 6: Updates the master boot record. CVT updates the master boot record with a new signature indicating that the volume is either a FAT32 volume or a FAT16 volume. Any failure or power loss during this phase leaves the volume as a FAT16 volume with all files intact.

Phase 7: Updates the boot record. CVT updates the boot record to the FAT32 boot record. Any failure or power loss during this phase leaves the volume as a FAT16 volume with all files intact.

Phase 8: Creates a second copy of the FAT. CVT creates a second copy of the 32-bit FAT and then enables it. Any failure or power loss during this phase leaves the volume as a FAT32 volume with all files intact. The volume will only have one FAT, but it will function properly.

Phase 9: Moves the root directory. CVT relocates the root directory to the front of the disk. Any failure or power loss during this phase leaves the volume as a FAT32 volume with all files intact, but it might leave minor problems in the form of lost clusters (the same as Defrag). No user data is lost, and ScanDisk can easily throw away the lost clusters.

Top of pageTop of page

FAT32 Technical Implementation

The major differences between FAT32 and earlier implementations of FAT are as follows:

Two new partition types are defined: 0xB and 0xC. Both indicate FAT32 volumes; type 0xC indicates a FAT32 partition that requires Extended Int 13h support--that is, logical block addressing (LBA).

The boot record on FAT32 drives requires three sectors because of expansion and addition of fields within the BIOS Parameter Block (BPB). As a result, the number of reserved sectors on FAT32 drives is higher than on FAT16--typically 32 sectors. This expanded reserved area allows two complete copies of the boot record to be stored there, as well as a sector in which the free space count and other file system information is stored.

The FAT is now larger, because each entry now takes up 4 bytes, and there are typically many more clusters than on FAT16 drives.

The root directory is no longer stored in a fixed location. A pointer to the starting cluster of the root directory is stored in the extended BPB.

The on-disk format for directory entries is unchanged, except that the two bytes previously reserved for Extended Attributes now contain the high-order word of the starting cluster number.

MS-DOS APIs that rely on intimate knowledge of the file system layout generally fail on FAT32 drives. For example, GetDPB (Int 21h, function 32h), Int 25/26h Absolute Disk Read/Write, and most of the Int 21h, function 440Dh IOCTLs will fail on FAT32 drives. New forms of these APIs are provided in Windows 95 OSR 2 that work on all FAT drives.

Win32 APIs are not affected by FAT32.

Top of pageTop of page

FAT32 Compatibility

There are no known user applications that are incompatible with FAT32. Most applications, except the disk utility class of applications, should function as well or better on FAT32 as they previously performed on FAT16 drives.

All Microsoft-bundled disk utilities have been revised to work with FAT32, including Format, FDISK, Defrag, MS-DOS ScanDisk and Windows ScanDisk. Most vendors of disk utilities have revised their utility programs, and have versions readily available in the retail channel that work with FAT32.

Call to action for FAT32 on preinstalled PCs: OEMs should prepare now to implement FAT32 by default on all preinstalled PCs that will run Windows 95 OSR 2 or Windows 98.


Top of pageTop of page