FAT32 File System
Overview
FAT32 (File Allocation Table 32) is a legacy file system introduced with Windows 95 OSR2. It extends the original FAT12/FAT16 design to support larger volumes, larger files, and improved reliability while maintaining compatibility with a wide range of operating systems and devices.
Key Features
- Maximum partition size: 2 TB (with 512‑byte sectors)
- Maximum file size: 4 GB – 1 byte
- Support for up to 65 536 root directory entries
- Case‑insensitive file names (up to 255 Unicode characters)
- Efficient space utilization for small‑to‑medium storage devices
- Compatibility with Windows, macOS, Linux, and many embedded devices
Limitations
| Aspect | Limit |
|---|---|
| Maximum volume size | 2 TB (with 512‑byte sectors) |
| Maximum file size | 4 GB – 1 byte |
| Maximum number of files in root | 65 536 entries |
| Security features | No built‑in ACLs or encryption |
| Fragmentation tolerance | Higher than NTFS, leading to performance degradation on heavily used volumes |
On‑Disk Structure
The FAT32 volume is composed of several logical regions:
- Reserved Region – Contains the BIOS Parameter Block (BPB) and the boot sector.
- File Allocation Tables (FATs) – Typically two copies for redundancy.
- Root Directory – Unlike FAT12/16, the root directory is a regular cluster chain.
- Data Area – Stores file and directory contents.
+-------------------+-------------------+-------------------+-------------------+
| Reserved Region | FAT #1 | FAT #2 | Data Area |
+-------------------+-------------------+-------------------+-------------------+
| Boot sector, BPB | Redundant copy of | Redundant copy of | Clusters (files/ |
| | FAT entries | FAT entries | directories) |
+-------------------+-------------------+-------------------+-------------------+
Usage & Best Practices
- Use FAT32 for removable media (USB flash drives, SD cards) where cross‑platform compatibility is required.
- Avoid storing files larger than 4 GB on a FAT32 volume.
- Regularly run
chkdsk /fto maintain file‑system integrity. - When formatting, choose a cluster size appropriate to the volume size to balance space efficiency and performance.
- Consider migrating to NTFS or exFAT for large internal drives that require security, compression, or larger file support.
Windows API Support
All standard Windows file I/O APIs operate on FAT32 volumes. Specific functions of interest:
CreateFile()
ReadFile()
WriteFile()
GetVolumeInformation()
SetFileAttributes()
For low‑level operations, the DeviceIoControl function can be used with the IOCTL_DISK_GET_DRIVE_LAYOUT_EX control code to retrieve FAT32-specific layout details.