The following topics describe the FAT32 file system.
Boot Sector and Bootstrap Modifications
||FAT32 drives contain more reserved sectors than FAT16 or FAT12 drives. The number of reserved sectors is usually 32, but can vary.
|Boot Sector Modifications
||Because a FAT32 BIOS Parameter Block (BPB), represented by the BPB structure, is larger than a standard BPB, the boot record on FAT32 drives is greater than 1 sector.
In addition, there is a sector in the reserved area on FAT32 drives that contains values for the count of free clusters and the cluster number of the most recently allocated cluster.
These values are members of the BIGFATBOOTFSINFO structure which is contained within this sector. These additional fields allow the system to initialize the values without having to read the entire file allocation table.
||The root directory on a FAT32 drive is not stored in a fixed location as it is on FAT16 and FAT12 drives. On FAT32 drives, the root directory is an ordinary cluster chain. The A_BF_BPB_RootDirStrtClus member in the BPB structure contains the number of the first cluster in the root directory. This allows the root directory to grow as needed. In addition, the BPB_RootEntries member of BPB is ignored on a FAT32 drive.
|Sectors Per FAT
||The A_BF_BPB_SectorsPerFAT member of BPB is always zero on a FAT32 drive. Additionally, the A_BF_BPB_BigSectorsPerFat and A_BF_BPB_BigSectorsPerFatHi members of the updated BPB provide equivalent information for FAT32 media.
The BPB for FAT32 drives is an extended version of the FAT16/FAT12 BPB. It contains identical information to a standard BPB, but also includes several extra fields for FAT32 specific information.
This structure is implemented in Windows OEM Service Release 2 and later.
- A_BF_BPB STRUC
- A_BF_BPB_BytesPerSector DW ?
- A_BF_BPB_SectorsPerCluster DB ?
- A_BF_BPB_ReservedSectors DW ?
- A_BF_BPB_NumberOfFATs DB ?
- A_BF_BPB_RootEntries DW ?
- A_BF_BPB_TotalSectors DW ?
- A_BF_BPB_MediaDescriptor DB ?
- A_BF_BPB_SectorsPerFAT DW ?
- A_BF_BPB_SectorsPerTrack DW ?
- A_BF_BPB_Heads DW ?
- A_BF_BPB_HiddenSectors DW ?
- A_BF_BPB_HiddenSectorsHigh DW ?
- A_BF_BPB_BigTotalSectors DW ?
- A_BF_BPB_BigTotalSectorsHigh DW ?
- A_BF_BPB_BigSectorsPerFat DW ?
- A_BF_BPB_BigSectorsPerFatHi DW ?
- A_BF_BPB_ExtFlags DW ?
- A_BF_BPB_FS_Version DW ?
- A_BF_BPB_RootDirStrtClus DW ?
- A_BF_BPB_RootDirStrtClusHi DW ?
- A_BF_BPB_FSInfoSec DW ?
- A_BF_BPB_BkUpBootSec DW ?
- A_BF_BPB_Reserved DW 6 DUP (?)
- A_BF_BPB ENDS
- The number of bytes per sector.
- The number of sectors per cluster.
- The number of reserved sectors, beginning with sector 0.
- The number of File Allocation Tables.
- This member is ignored on FAT32 drives.
- The size of the partition, in sectors.
- The media descriptor. Values in this member are identical to standard BPB.
- The number of sectors per FAT.
This member will always be zero in a FAT32 BPB. Use the values from A_BF_BPB_BigSectorsPerFat and A_BF_BPB_BigSectorsPerFatHi for FAT32 media.
- The number of sectors per track.
- The number of read/write heads on the drive.
- The number of hidden sectors on the drive.
- The high word of the hidden sectors value.
- The total number of sectors on the FAT32 drive.
- The high word of the FAT32 total sectors value.
- The number of sectors per FAT on the FAT32 drive.
- The high word of the FAT32 sectors per FAT value.
- Flags describing the drive. Bit 8 of this value indicates whether or not information written to the active FAT will be written to all copies of the FAT. The low 4 bits of this value contain the 0-based FAT number of the Active FAT, but are only meaningful if bit 8 is set. This member can contain a combination of the following values.
||Mask for low four bits.
||Mask indicating FAT mirroring state.
If set, FAT mirroring is disabled. If clear, FAT mirroring is enabled.
*Bits 4-6 and 8-15 are reserved.
- The file system version number of the FAT32 drive. The high byte represents the major version, and the low byte represents the minor version.
- The cluster number of the first cluster in the FAT32 drive's root directory.
- The high word of the FAT32 starting cluster number.
- The sector number of the file system information sector. The file system info sector contains a BIGFATBOOTFSINFO structure. This member is set to 0FFFFh if there is no FSINFO sector. Otherwise, this value must be non-zero and less than the reserved sector count.
- The sector number of the backup boot sector. This member is set to 0FFFFh if there is no backup boot sector. Otherwise, this value must be non-zero and less than the reserved sector count.
- Reserved member.
Contains information about the file system on a FAT32 volume. This structure is implemented in Windows OEM Service Release 2 and later.
- bBIGFATBOOTFSINFO STRUC
- bfFSInf_Sig DD ?
- bfFSInf_free_clus_cnt DD ?
- bfFSInf_next_free_clus DD ?
- bfFSInf_resvd DD 3 DUP (?)
- BIGFATBOOTFSINFO ENDS
- The signature of the file system information sector. The value in this member is FSINFOSIG (0x61417272L).
- The count of free clusters on the drive. Set to -1 when the count is unknown.
- The cluster number of the cluster that was most recently allocated.
- Reserved member.