[syslinux] Structure of VBR in FAT32?
avi at deitcher.net
Tue Jan 2 10:03:54 PST 2018
Thanks for the response, Gene. Much appreciated. I didn't get all of it;
mind if I follow on below?
ldlinux.sys is ldlinux.bin without the VBR (Volume Boot Record) code.
> > 1. Where is the code that goes in the VBR or Block Group 0 padding?
which appears to be included in diskstart.inc. I will have to dig in and
see how this all gets compiled (pointers always appreciated :-) ).
An install on Linux (before I run "syslinux --install") actually doesn't
have ldlinux.sys or ldlinux.bin anywhere. Are they embedded into the
syslinux binary and it installs bytes, vs copying from the local filesystem?
> > 2. What does it execute? Does it just find the ldlinux.sys and execute
> Set up the basic environment, load blocks of ldlinux.sys, check
> integrity (weakly but works well enough) and jump to a further point.
> The installer patches in a block map of ldlinux.sys into the VBR plus
A blockmap into the VBR and ldlinux.sys into the VBR?
> At least one record stating N sectors at volume offset M
> needs to live in the VBR. Often, only 1 record is needed.
I didn't get this part. Record?
> > 3. How does it know to find the ldlinux.sys (and, at the least,
> > ldlinux.c32) if it cannot read the filesystem? Does syslinux --install
> > them over and then read the filesystem to know precisely what blocks they
> > are in and then embed the precise block number in the VBR? Where? And if
> > so, does it not leave it vulnerable to the files being moved around?
> Files moving from directories shouldn't be an issue (unless it's a
> copy/delete). It certainly is vulnerable to moving the underlying
> blocks hence why ldlinux.sys resides in the special reserved space in
But wouldn't work in FAT32 (VBR = 512 bytes) or ext4 (1024 bytes in Block
Thanks again for the explanation.
More information about the Syslinux