FAT - Nepetalactone/LightOS GitHub Wiki

Helpful links

Maverick OS

#Definitionen

  • Sector = specified number of bits/bytes
  • Cluster = Collection of sectors

A cluster is the smallest logical amount of disk space that can be allocated to hold a file. Storing small files on a filesystem with large clusters will therefore waste disk space; such wasted disk space is called slack space. For cluster sizes which are small versus the average file size, the wasted space per file will be statistically about half of the cluster size; for large cluster sizes, the wasted space will become greater. However, a larger cluster size reduces bookkeeping overhead and fragmentation, which may improve reading and writing speed overall. Typical cluster sizes range from 1 sector (512 B) to 128 sectors (64 KiB)

FAT Struktur:

  • little endian (Beagleboard kann über Projekt -> Properties -> Device Endianness konfiguriert werden)

BPB (BIOS Parameter block)

  • located in the first sector of the volume in the reserved region

#FAT Data Structure

  • defines a singly linked list of the "extents" (clusters) of a file
  • directory/file container = file with special attribute indicating it is a directory
    • data/contents of the "file" (directory) is a series of 32 byte directory entries
  • FAT maps data region of the volume by cluster number, first data cluster is cluster 2

#Directory Structure

#File flags

#Example https://github.com/ryansturmer/thinfat32

FAT32: http://staff.washington.edu/dittrich/misc/fatgen103.pdf