[syslinux] Structure of VBR in FAT32?

Ady Ady ady-sf at hotmail.com
Thu Jan 4 09:22:16 PST 2018


> > FWIW, the VBR in FAT32 doesn't have to be 512 bytes; FAT32 has the
> > possibility to use more than one sector for boot purposes. In fact,
> > Microsoft's FAT32 VBR uses at least 3 sectors (IIRC, typically, 32
> > sectors)
> 
> I did not know that. I just finished writing a go-lang library 
> implementation of fat32 (mainly to manipulate image files), I missed 
> that. How do you tell if it is the "usual" single sector of 512 bytes 
> or more? Wouldn't there need to be some flag at some location? Or is 
> the assumption that fat32 can skip any number of sectors until it 
> reaches one with the magic signature 0x55AA and it takes all sectors 
> from 0 until that one as the VBR?
 
 
I'm not sure I understand the question, but I'll try to give you some 
generic answer. Perhaps by chance, it will be relevant to your 
thoughts/doubts/question.

The possibility of using multiple sectors as VBR in FAT32 volumes is 
originated in the filesystem structure itself (i.e. when the "format" 
command is executed).

JFYI:

_ In dosfstools' mkdosfs, see parameters:
 -R number-of-reserved-sectors 
 -b sector-of-backup 

If the (boot) code in the first sector of the VBR includes some 
instruction to continue reading/executing (boot) code located in a 
certain (reserved) sector, that's what the boot process will do.

You might want to read Wikipedia's articles about "FAT32" and "Design 
of the FAT file system", and/or the FAT32 VBR page in "The Starman's 
Realm" of Daniel Sedory.


> 
> > moving ldlinux.sys within a FAT32 boot volume could
> > potentially affect the boot process when using SYSLINUX. In such 
> case,
> > executing the command line installer would be the simplest/quickest
> > solution.
> 
> But even so, it installs the first 512 bytes in the VBR, then those 
> bytes need to find the next bytes (ldlinux.sys). Even if I use the 
> installer, and then move the files, unless the actual blocks remain the 
> same, it will be lost, right?

What happens when you try to do that?

Regards,
Ady.



More information about the Syslinux mailing list