Directory file
. (root) | 02 |
MFile | 03 |
OFile | 09 |
YFile | 12 |
|
|
|
FAT
00
| 01
| 02
|
03
| 04
| 05
|
06
| 07
| 08
|
09
| 10
| 11
|
12
| 13
| 14
|
15
|
RESV
| RESV
|
FFF9
| 05
|
FFFF
| 08
|
00
| FFF7
|
04
| 10
|
FFFF
| 00
|
FFFF
| 00
|
00
| 00
|
Disk Cluster storage
00
| 01
| 02
|
03
| 04
| 05
|
06
| 07
| 08
|
09
| 10
| 11
|
12
| 13
| 14
|
15
|
Rsv
| Rsv
|
Root-1
| MFile-1
|
MFile-4
| MFile-2
|
____
| BAD
|
MFile-3
| OFile-1
|
OFile-2_
| ____
|
YFile
| ____
|
____
| ____
|
32 bit fat, Remember upper 4 bits reserved and ignored, most likely 0 but
could be other values.
Values in fat table :
0h - free cluster flag.
Clusters 0 and 1 on reserved (0 - mbr and/or vbr anyways)
2h-?FFFFFEFh - cluster in use.
Location of first data cluster starts at 3nd cluster. Sectors before this
used for MBR, FAT itself, other reserved uses.
?FFFFFF7h - cluster marked bad.
?FFFFFF0-?FFFFFF6h - sometimes used by special versions of DOS.
?FFFFFF8h-?FFFFFFFh - end of cluster chain. Actual value most likely
?FFFFFFFh but ?FFFFFF8 or other value sometimes used on non-boot partitions.
On FAT < 32 bit, Root directory treated as special file/cluster. Has limited
number of entries.
FAT32, Root directory a regular directory file that can grow in size.
Starts at 1st available cluster and initialized at creation of filesystem.
All versions of FAT know the starting location of the root directory.
OS must scan FAT table to locate free clusters for new file storage. This
tends to slow writing.
Some systems keep a separate table of simple flags to represent free and
used clusters. HPFS, exFAT
Or keep one or more linked lists of avaliable clusters (Unix)
Newer OSes may read FAT into RAM memory to improve access performance.
Information kept in directory entry.
Filename
Starting cluster id of the cluster chain.
Attributes
readonly
hidden
- not listed by dir command (Windows can be configured to ignore)
system
- file used by system. Won't be moved during defragmenting in case it
is referenced by chs or lba address directly.
volume record flag
- does filename represent the volume name of the partition
sub-directory flag
- filename represent another directory file
archive
- used by backup software to id changed files since last backup
FAT 32 has a 2GB file limit and a 1TB drive limit but is useful for devices
accessed by different OSes.