FAT32 Drive Layout |
Offset |
Description |
Start of Partition |
Boot Sector |
Start of Partition + Number of Reserved Sectors |
FAT Tables |
Start of Partition + Number of Reserved Sector + (Number of Sectors Per FAT * 2)
[Assuming that FAT Mirroring is Enabled, this is almost always true] |
Root Directory |
Start of Partition + Number of Reserved Sectors + (Number of Sectors Per FAT * 2) + Number of Sectors in root directory |
Data Area |
FAT entries can contain values that indicate:
- The next cluster in a FAT chain for a given file
- The Free clusters i.e., the clusters which are not in use by any file
- The information of Bad Sectors i.e., the cluster containing one or more sectors that are physically damaged & should not be used.
- The final cluster of a file
Entries of FAT Table |
Number (Hex.) |
Description |
0 |
Free cluster |
???? |
Cluster in use, next cluster in chain |
FF0-FF6 / FFF0-FFF6 |
Cluster is reserved |
FF7 /FFF7 |
Cluster contains bad sectors |
FF8-FFF / FFF8-FFFF |
End of file |
Each FAT entry represents a cluster address and contains a pointer to the next cluster address (FAT entry) for the file. The last FAT entry for a file contains the final cluster value instead of a pointer. The first two entries in a FAT contain information about the FAT. These Bytes of the FAT contain a media descriptor byte. This byte can be used to find the type of the disk media of which this FAT entry is.
The third and subsequent entries in the FAT are assigned to clusters of disk space, starting with the first cluster available for use by files. A FAT entry can have any of the values given in the above table, based on the information it wants to convey.
A 000H in 12–Bit FAT or 0000H in 16–Bit FAT indicates that the cluster corresponding to this FAT location is unallocated or is empty. Any value from FF8H to FFFH in 12–Bit FAT or FFF8H to FFFFH in 16 – Bit FAT indicates that this cluster is the last cluster in a chain of clusters of a file.
Value from FF0H to FF7H in 12 – Bit FAT indicates reserved clusters. An FF7H in a 12–Bit FAT or FFF7H in 16–Bit FAT indicates that the cluster corresponding to the location of the FAT is a bad cluster i.e. this is basically a cluster containing bad sectors. This cluster is not used for data storage.
Any other value in the FAT table is a pointer to the next cluster in the file allocation chain.
|