Page 1 of 1
FAT16 question
Posted: Thu Mar 30, 2023 5:36 pm
by Bas
I'm still slowly plodding away at a disk image generator and now at the point where it spits out FAT16 formatted partitions that I could start writing files to.
My question, as I use MS-DOS 6.22 for reference. I generate a 50MB disk and partition that. I format it from DOS using FORMAT /S to get a minimal bootable reference disk.
The FAT is weird though. Clusters 0 and 1 are reserved as expected but I expect cluster 2 to be the start of IO.SYS. it's not, though. Instead IO.SYS starts at cluster 0x44.
What causes this gap? And how is it calculated? I can't find it in any docs.
Re: FAT16 question
Posted: Sat Apr 01, 2023 7:35 am
by Bas
A theory: clusters are counted from the start of a volume. A FAT volume contains a BPB/VBR, usually 2 copies of the allocation table and the root directory. These structures are large-ish. After all these structures, the first available data cluster is quite a way into the volume, or the metadata structures would get nuked, so 0x44 doesn't sound all that odd anymore.
I have yet to check this.. but hoping it rings a bell for anyone. Are clusters actually counted from the start of the volume, or do they start at the first sector of the data area?? Docs are still inconclusive.