[Previous] - [Main menu] - [Next]
Specifications
FAT16 File System
Used: On machines with small harddrives running MS-DOS, Windows 95/98
Introduction
This is the 16-bit version of the FAT file system. The 16-bit part describes the way units are allocated on the drive. The FAT16 file system
uses a 16-bit number to identify each allocation unit (called cluster), and this gives it a total of 65.536 clusters. The size of each cluster is
defined in the boot sector of the volume (volume = partition). The File System ID number usually associated with FAT16 volumes are 04h
and 06h. The first is used on volumes with less than 65536 sectors (typical this is on drives less than 32 Mb in size), and the latter one is
used on volumes with more than 65536 sectors. There is also another variant which is used with the LBA address mode, that variant has a
File System ID of 0Eh. I do not know if the LBA variant is different from the CHS type. So far I don't se why anything should be changed to
support LBA addresses.
Basic Structure
The FAT16 file system structure contains the following regions:
The first sector (boot sector) contain information which is used to calculate the sizes and locations of the other regions. The boot sector
also contain code to boot the operating system installed on the volume. The data region is split up into logical blocks called clusters. Each of
these clusters has an accompanying entry in the FAT region. The cluster specific entry can either contain a value of the next cluster which
contain data from the file, or a so called End-of-file value which means that there are no more clusters which contain data from the file. The
root directory and its sub-directories contain filename, dates, attribute flags and starting cluster information about the filesystem objects.
Boot Sector
The first sector in the reserved region is the boot sector. Though this sector is typical 512 bytes in can be longer depending on the media.
The boot sector typical start with a 3 byte jump instruction to where the bootstrap code is stored, followed by an 8 byte long string set by
the creating operating system. This is followed by the BIOS Parameter Block, and then by an Extended BIOS Parameter Block. Finally the
boot sector contain boot code and a signature.
FAT16 File System Structure
Region
Reserved Region (incl. Boot Sector)
File Allocation Table (FAT)
Root Directory
Data Region
Structure of the FAT16 Boot sector
Part Offset Size Description
Code 0000h 3 bytes Code to jump to the bootstrap code.
OS Name 0003h 8 bytes Oem ID - Name of the formatting OS
BIOS Para-
meter Block
000Bh 2 bytes Bytes per Sector
000Dh 1 bytes Sectors per Cluster - Usual there is 512 bytes per sector.
000Eh 2 bytes Reserved sectors from the start of the volume.
0010h 1 bytes Number of FAT copies - Usual 2 copies are used to prevent data loss.
0011h 2 bytes Number of possible root entries - 512 entries are recommended.
0013h 2 bytes Small number of sectors - Used when volume size is less than 32 Mb.
0015h 1 bytes Media Descriptor
0016h 2 bytes Sectors per FAT
0018h 2 bytes Sectors per Track
001Ah 2 bytes Number of Heads
Page 1 of 7Maverick - The Operating System
os.dk/FileSystemFormats/FAT16_FileSystem.html
评论2