[syslinux] Structure of VBR in FAT32?

Avi Deitcher avi at deitcher.net
Mon Jan 1 08:06:23 PST 2018

Hi Syslinuxers,

I am trying to understand the basic load chain in fat32 and ext4. I dug
into the assembly for MBR, which is pretty straightforward:

1. Find boot partition (or use the pre-defined one at byte 440 for
2. Load the first 512-byte sector of the partition (VBR for fat32, Block
Group 0 padding for ext).
3. Execute that code

The code that is loaded, however, has to be too small (even if using entire
1024 bytes of padding in ext4) to understand ext4 and/or fat32, let alone
find and read the syslinux.cfg file, present menu, and eventually execute a
linux kernel. I assume that is the job of ldlinux.sys and the various .c32

1. Where is the code that goes in the VBR or Block Group 0 padding?
2. What does it execute? Does it just find the ldlinux.sys and execute it?
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 copy
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?

Thanks in advance.

Avi Deitcher
avi at deitcher.net
Follow me http://twitter.com/avideitcher
Read me http://blog.atomicinc.com

More information about the Syslinux mailing list