Show HN: Understanding FAT16 – an interactive filesystem explainer
An interactive web-based explainer details the inner workings of the FAT16 filesystem, featuring hands-on demos for formatting, cluster tracking, and defragmentation.
read it It offers a uniquely visual and interactive deep dive into low-level filesystem mechanics that rewards a thorough walkthrough.
summary
The article breaks down the FAT16 filesystem from historical context to structural anatomy, covering boot sectors, the File Allocation Table, root directories, and file operations. Interactive browser-based demos let readers format a toy disk, follow cluster chains, delete files, and manually run a defragmentation game. It highlights how design constraints from the floppy disk era shaped the filesystem's simplicity and vulnerability to fragmentation.
key points
- The FAT16 architecture splits storage into a boot sector, a File Allocation Table mapping cluster chains, a fixed root directory, and a data area.
- File deletion is a lightweight operation that writes an 0xE5 marker to the directory entry and frees corresponding FAT clusters without clearing actual data.
- Simple sequential cluster allocation makes FAT16 heavily prone to fragmentation, creating historical demand for dedicated defragmentation utilities.
who should read it
Software engineers, computer science students, and retro-computing enthusiasts interested in low-level storage mechanics.
discussion warm
consensus
Commenters enthusiastically praised the craftsmanship and nostalgic value, while lamenting that modern high-level abstractions make it harder for newcomers to learn first principles.
pushback
A commenter pointed out a historical inaccuracy regarding the original boot sector's available space and how early DOS bootloaders interacted with FAT.
I enjoyed this article, but I have a comment.
> So it's safe to say that the FAT filesystem was originally designed to be so simple that a 448-byte program can at least read it.
I take issue with this statement. The 448 byte count is what's available in the very last version of the FAT 12/16 boot code. There was for more space available for code in the original version, but the original version used far less code.
On a very early original FAT 12/16 boot sector, only 28 bytes are taken up by boot sector data at the beginning, including the BPB, and 2 more by the signature at the end so you …
It provides valuable historical nuance correcting the article's claim about original boot sector constraints and early DOS bootloader design.
Generated by an LLM from the article and thread. Check the sources before relying on it.