• Main Menu
  • The File Allocation Table (FAT) File Systems


    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.

     

    Got Something To Say:

    Your email address will not be published. Required fields are marked *

    5 comments
    1. Mike

      28 May, 2011 at 6:00 pm

      Hello.
      What can you make out of this? I’m stuck :s
      I think the name is FTK-ACE
      46 54 4B 2D 41 43 45 20 20 20 20 10 00 38 F8 5B 50 3E 89 3E 00 00 F8 5B 50 3E 34 00 00 00 00 00

      Reply
    2. joe

      20 May, 2011 at 1:09 pm

      Hi!
      please can you provide me with a methode  of calculating the size of the File allocation table
      what i’m doing is reading the first sector of my USB and i retreive from it the number of sectors per FAT and i have found that there are two copies so to get full size in bytes what i do is
      NoSectorsPerFAT * 2 * 512
      is that right ? it seems to me ok,No ?

      Reply
    3. qwertz

      21 December, 2010 at 1:57 pm

      How large can FAT32 table can be?
      Assuming 16 KB cluster size and 4 GB volume size, if I am not mistaken there should be one entry in FAT32 table for each cluster, so with numbers given above there should be 262144 (4GB / 16 KB) entries in FAT32 table.
      Each entry occupies 4 B of memory, so FAT region needs to be 262144*4 B = 1048576 B = 1MB long.
      If each sector is 512 B in size FAT table should then occupy 2048 disc sectors to store whole FAT32 table.
      Isn’t this too large?
      Does FAT32 table reserve some enteries for 2-level or 3-level pointers?

      Reply
      • Mr.Anderson

        13 February, 2011 at 11:08 pm

        Well, since the maximum size of sectors is 512kb and you have 2^32-1 sectors. You have room for 2 TB on a FAT32 HDD (assuming it’s that big).
         
        FAT32 uses bits:
         
        0 to 7 for filename
        8 to 10 for extention
        11 for attributes (read-only, hidden etc etc)
        12 reserved
        13 to 15 for time written
        16 to 17 for date written
        18 to 19 for last access
        20 to 21 for EA-Index
        22 to 23 for last modified time
        24 to 25 for last modified date
        26 to 27 for starting cluster
        28 to 31 for file size
         
        I hope that either answers the question or gets you further in your calculations.

        Reply
        • qwertz

          8 April, 2011 at 7:25 am

          Thanks, I did some reverse engineering on FAT32 and actually what I’ve calculated in first post is approximately true. One FAT32 table occupies that much space and contains link list of clusters. Fat32 doesn’t support features like indexing, security,…

          Reply
    Microsoft Filesystems
    } 141 queries in 0.441 seconds.