Understanding the FAT File Systems

The FAT file system was initially introduced with the MS-DOS operating system (OS) when hard disks were generally much smaller, and the structure of folders was not as intricate as it is in networks today. The FAT file system continues to be supported by each Microsoft OS since its advent. The initial FAT file system could only support a maximum partition size of 2GB. What this meant was that where a computer’s hard disk drive was greater than 2GB, you had to partition the drive into a number of smaller partitions, with each partition size not exceeding 2GB.

The FAT file system protects files by storing two copies of the file allocation table on the FAT volume. In cases where one copy of the file allocation table is corrupt, the other copy of the file allocation table is utilized. The file allocation table’s location is specified in the BIOS Parameter Block (BPB) of the FAT boot sector. It is also stored on the volume in a specified byte offset. This ensures that any files necessary to start the system can be found.

The actual numbers in the names of the different FAT file systems are associated with the number of bits utilized for a file allocation table entry. For instance, FAT12 utilizes a 12-bit file allocation table entry, FAT16 utilizes a 16-bit file allocation table entry, and FAT32 utilizes a 32-bit file allocation table entry. FAT16 works effectively on small disks and uncomplicated folder structures, while FAT32 works effectively on large disks that have intricate folder structures. FAT16 in MS-DOS, Windows 3.x, Windows 95, Windows 98 and Windows 2000 operates in the identical manner with each OS. FAT32 was introduced with Windows 95 (OSR2). FAT32 operates the same in the Windows 98 OSR2 and Windows 2000.

The FAT16 File System

The FAT16 file system is compatible with the majority of operating systems. This is evident by MS DOS, Windows 95, Windows 98, Windows Me, Windows NT, Windows 2000 and Windows XP being able to utilize the FAT16 file system. FAT16 generally works well in managing disk space when the size of the volume is less than 256MB. You should refrain from using FAT16 on volumes that are larger than 512MB. FAT16 cannot be utilized on volumes that exceed 2 GB.

FAT16 maps clusters on the FAT partition. A cluster is the smallest unit that the OS operating system utilizes when it assigns space on the partition. A cluster is also at times referred to as an allocation unit.

The file allocation table identifies a cluster in the FAT partition as either:

  • Unused
  • Cluster in use by a file
  • Bad cluster
  • Last cluster in a file

The FAT16 volume is structured as follows:

  • Boot sector on the system partition
  • The primary file allocation table
  • The copy or duplicate file allocation table
  • A root folder
  • Other folders and all files

The root folder holds an entry for each file and folder stored on the FAT16 volume and has its maximum number of table entries set at 512 for each disk drive. A file’s or folder’s entry contains the information listed below:

  • Name: This is in 8.3 format
  • Attribute: 8 bits
  • Create time: 24 bits
  • Create date: 16 bits
  • Last access date: 16 bits
  • Last modified time: 16 bits
  • Last modified date: 16 bits
  • Starting cluster number in the file allocation table: 16 bits
  • File size: 32 bits

The Attribute byte in a folder indicates what kind of entry it is and is generally controlled by the OS. Four bits of the attribute byte can be enabled or disabled by the user. These are:

  • Archive, System, Hidden, Read-only

Files are allocated the first available location on the FAT16 volume. The first cluster’s address utilized by the file i the starting cluster number in the file allocation table. Clusters also have a pointer to the next cluster in the file. The cluster at the end of the file however contains a hex indicator which indicates that this particular cluster is the end of the file.

A few disadvantages associated with the FAT16 file system are summarized below:

  • The FAT16 file system has no local security for the file system or compression features.
  • The boot sector is not backed up.
  • The root folder can only have a maximum of 512 entries which means that files which have long names can greatly decrease the number of entries available.
  • FAT16 does not work well with volume sizes that are large.

The FAT32 File System

The FAT32 file system can handle larger partitions than what the FAT16 file system can handle. FAT32 can support partitions up to 2047 GB in size compared to FAT16’s 2 GB. With FAT32, there is no restriction on the number of entries that the root folder can contain. With FAT16, the root folder could only contain a maximum of 512 entries. The boot sector is also backed up on FAT32 volumes. A FAT32 volume must however have a minimum of 65,527 clusters.

The FAT32 architecture is very much like the architecture of the FAT16 file system. FAT32 was designed with little architectural changes to ensure compatibility with existing programs and device drivers. What this means is that device drivers and FAT tools used for FAT16 partitions would continue to work for FAT32 partitions.

FAT32 does however need 4 bytes in the file allocation table to store cluster values. This has led to the revision or expansion of internal data structures,  on-disk data structures and published APIs.

A few disadvantages associated with the FAT32 file system are summarized below:

  • Like the FAT16 file system, the FAT32 file system includes no local security for the files system or compression features.
  • The MS-DOS, Windows 95 (ORS1), and Windows NT 4.0 OSs are unable to access or read FAT32 partitions.
  • Both FAT16 and FAT32 partitions do not scale well – the file allocation table increases in size as the volume grows.