I was experimenting around with filesystems in linux. I want to understand a few issues. Here are the commands that I have used:
truncate disk.img -s 1M
mkfs.vfat -F12 -S512 -s1 disk.img
#I have made a FAT12 filesystem on a simple 1 MB file in my home directory
Now I can mount my file with:
sudo mount disk.img /mnt
Why do we use sudo here?? I cannot mount without sudo
Now I copy a file spanning 2 clusters to the mountpoint:
sudo cp file.bin /mnt
Then I umount the disk:
sudo umount /mnt
I use a hex editor like ghex to view what exactly has happened after all this:
ghex disk.img
In the FAT, I see the following (RAW format):
(Beginning from byte 0x200, after the bootsector)
f8ff ff00 4000 ff0f 0000 0000 ..........
Here's my main question: I thought that FAT12 used 1.5 bytes per cluster in the FAT, but it seems to be using 2? (I'm not sure about this, maybe I don't understand FAT12 that well)