FatFuse

FatFuse is a linux fuse implementation capable of reading FAT16 and FAT32 filesytems. It is written in python, and uses the bdec binary decoding library to decode the on-disk filesystem. The actual code dealing with the conversion of the decoded structures is only a few hundred lines long, and the fuse filesystem code only a few hundred more (much of which is placeholder code).

Capabilities

Usage

Run
mount.fat /path/of/mount/point /path/of/block/device [options]

where the block device could be, for example, /dev/sda1/.

Performance

The directory structure and cluster chain lists are cached in memory; this can lead to excessive memory consumption when a large amount of the filesystem is traversed.

Copying a 20MB file from a fatfuse mount takes 1.3 seconds; copying the same file using the in-kernel fat driver takes 0.2 seconds.

Questions

  1. When every operating system under the sun already implements a FAT filesystem driver, why create another?
  1. One of my USB disks became corrupted, and I wanted to recover the data. The bootsector and the first allocation table got wiped, while the second allocations table got corrupted. Neither the Windows chkdisk nor the linux fsck.vfat utilties were able to recover the data. From the development of this program I was able to recover most of the data from the disk.

    That, and the geek cred :-).

Download