Information Technology Reference
In-Depth Information
Table 8-2: Recommended and required values for fields in a FAT16 boot sector.
Byte
Description
Recommended Value
3
Identifying string
“MSWin4.1”
11
Bytes per sector
512
14
Number of reserved sectors
1 (required)
16
FAT copies
2
17
Maximum root directory entries
512
volume. Files that require multiple clusters use the FAT to maintain a record
of the clusters used by each file. Later in this chapter, I explain how program
code can use the FAT to locate the clusters used by a file. The second FAT is
a backup for use in repairing a damaged first copy.
Root Directory Region
In a FAT16 volume, the sectors following the FATs contain the root direc-
tory. The root directory typically can store up to 512 entries of 32 bytes
each. If the sector size is 512, the root directory requires 32 sectors. The root
directory contains information about the files and subfolders in the device's
top-level directory. Note that the size of the root directory region limits the
number of entries a FAT16 root directory can store. As Chapter 9 explains,
files with long file names reduce the number of file entries the directory can
store.
File and Directory Data Region
The sectors after the root directory are grouped into data clusters. A data
cluster can consist of one or more sectors. Because the FAT has an entry for
each cluster and reserves the first two entries for other purposes, the first
data cluster is called cluster 2, with the rest following in sequence. Files and
subdirectories are stored in the clusters.
Each subdirectory is a directory much like the root directory and can con-
tain entries for files and additional subdirectories immediately below the
subdirectory. An embedded-system host might support only the root direc-
tory, ignoring any entries for subdirectories.
 
Search WWH ::




Custom Search