File Allocation Table (FAT)

J

Jarret W. Buse

Guest
File Allocation Table (FAT)

FAT is a file system produced by Microsoft, Seattle Computer Products (SCP), Novell, Digital Research, Compaq and IBM.

There are a few types of FAT, each being supported or not supported by Linux.

Type Release Date Company/OS Linux Support
FAT12 August 1980 SCP-QDOS Yes
FAT16 August 1984 IBM PC-DOS 3.0 Yes
FAT16B November 1987 COMPAQ MS-DOS 3.31 Yes
FAT16X August 1995 Microsoft Windows 95 Yes
FAT32 August 1996 Microsoft Windows 95B OSR2 Yes
FAT32X August 1996 Microsoft Windows 95C OSR2.5 Yes
FAT64 November 2006 Microsoft Windows Embedded CE 6 No

NOTE: Linux refers to the various FAT types as “VFAT” which is a "Variant of FAT". VFAT can be any supported FAT type.

Disk or partition information is stored in the Master Boot Record (MBR), similar to a Superblock. In 1986, with release of PC DOS 3.2, a new partition table was used. The newer partition table is the Extended Boot Record (EBR). The EBR allowed for setup of logical partitions. Generically, the various FAT systems are usually referred to as using an MBR.

The numbers associated with each FAT type refers to the number of bits used for addressing. The more address bits available, the greater the address limits. This means that with more addresses, there is access to more sectors on a disk. With access to more sectors, the file system supports larger hard disks. The following shows the limits:

Type Address Size Limitations
FAT12 12-bit 32 MB (256 MB with 64 KB clusters)
FAT16 16-bit 32 MB
FAT16B 32-bit 2 GB
FAT16X 32-bit (LBA) 4 GB
FAT32 28-bit 8.4 GB
FAT32X 32-bit (LBA) 2 TB

NOTE: The addresses listed with LBA – Logical Block Addressing uses block addressing instead of being limited to the CHS (Cylinder-Head-Sector) addressing scheme. For larger hard disks, the number of sectors could be beyond the 65,536 range. Sector addresses past 65,536 could not properly be addressed. The addressing scheme was changed to Logical Block Addressing to allow for block addressing for all blocks on the hard disk.

The ‘X’ types of FAT, the FAT16X and FAT32X, use LBA addressing instead of CHS. In this addressing scheme, the numbers are given for each, such as Cylinder 128, Head 2 and Sector 199 would be 128 2 199. In this case, we can convert the CHS address to a Logical Block Address of 967. The equation is as follows:

LBA = (c * NumberOfHeads + h) * Number of Sectors + (s – 1)

The values for c, h and s are from our original CHS values of 128 2 199. The NumberOfHeads and NumberOfSectors are from you physical drive parameters.

For FAT32, only 28 bits of the 32 are used for cluster addressing. FAT32 also introduced the use of Long File Names (LFNs). File names could now be 255 characters and not limited to eight characters for the file name and three for the extension.

Maximum file sizes are different on the various types of FAT as shown:

TYPE Max File Size Max Number of Files
FAT12 16 MB 4,068
FAT16 2 GB 65,460
FAT16B 4 GB
FAT16X 4 GB
FAT32 4 GB 268,173,300
FAT32X 256 GB

The FAT file systems store directory information in a table. The table is similar in style to a spreadsheet. There are typically three columns. The first column is the Directory Name which can include a full path. The second column is for the Parent Directory. If the Parent Directory is null, then that directory is the root. The final column stores the Default Directory Name. This is the name of the directory under the parent folder.

The date ranges for FAT12 to FAT32 are January 1, 1980 to December 31, 2107.

The FAT file systems do not support encryption natively. Third party utilities must be installed to support encryption.

FAT does not support native compression. Third party utilities can be used to enable compression on FAT drives. You should note that adding third party compression ability to removable drives can make them unreadable by other systems. If the other system does not have the necessary third party drivers, the compressed data will be inaccessible.

NOTE: Some operating systems may incorporate a built-in compression system which will enable compression on local FAT32 drives. These utilities should not enable compression on removable drives. It should be noted that enabling compression with a third party utility can work in a similar fashion to encryption. Since other systems may not have the compression driver, the files will be similar to encryption.

The FAT file system is one of the most widely used file systems. USB thumb drives and Secure Digital (SD) cards usually come preformatted as FAT32 or FAT32X. There are no real built-in features. The popularity of FAT lends itself to be widely supported by numerous systems.
 

Attachments

  • slide.jpg
    slide.jpg
    19.1 KB · Views: 79,508


Thanks J for this overview.
I've been looking for some for practical info on Hard Drive File Allocation Table Recovery etc.
Preferably a step by step approach.
I've found a lot of theory online, but not practical info.
Can you suggest any books or online info?
Many thanks
 

Members online


Latest posts

Top