I am bootsraping (for fun and to understand FAT32 format) my own disk image creation tools. Basically, create an empty file of 34MiB, create one partition from sector 2048 until end of image file, format it, and add some directories and files.
I am using as reference an example created using the commands below, and the documention on osdev, wikipedia, and the Microsoft specs documentation (two documents with different publishing date I found online):
Code: Select all
parted "$IMG_NAME" --script mklabel msdos
parted "$IMG_NAME" --script mkpart primary fat32 1MiB 100%
mformat -i hd34mbfat32.img@@1048576 -F ::I see the tools above creates these entries the MBR, and VBR respectively:
00 00 01 10 0C 03 A0 1F 00 08 00 00 00 08 01 00 (33 MiB FAT32-LBA partition starting at LBA 2048. 67,584 Sectors)
80 00 01 00 0C 0F 3F 43 00 00 00 00 C0 0B 01 00 (bootable FAT32 partition allegedly starting at LBA 0. 68,544 Sectors)
* Why there is a partition entry on the VBR? I thought the MBR only contains the partition table.
* Why the MBR entry indicate non-bootable and then in the VBR the entry is bootable
* How the partition entry on the VBR has more sectors available than what is indicated on the MBR partition entry?
I have the impression I am missing something about how the partition tables work, but after carefully reviewing all documentation I am not able to guess it.
Thanks in advance!


