[syslinux] Structure of VBR in FAT32?
ady-sf at hotmail.com
Fri Jan 5 02:32:12 PST 2018
> > Although "ldlinux.sys" contains boot(able) code, it is still a file,
> > and as such, in FAT12/16/32 it resides within the data area.
> That is what I was asking. ldlinux.sys is handled entirely as a file in the
> filesystem, then? Except for a few hundred bytes that know how to find and
> load the exact sectors that contain that file on the filesystem (Gene had
> started to explain)?
A simple test would suffice: execute the official installer and compare
the "new" ldlinux.sys file (that the installer just put there) with the
original one included in the official archive. This simple test could
be performed on an empty, FAT12-formatted 1440KiB floppy image.
> 1. diskboot.inc - which is the VBR assembly code
People interested in boot code and low-level languages should take a
look at Daniel Sedory's The Starman's Realm - I know, I know... I
already mentioned it.
> 2. source to ldlinux.sys - which is what the VBR code loads - where in the
> source do I look?
What about "core/ldlinux*.*"?
Perhaps Gene might suggest others.
> 3. "install" command code from syslinux - which is what embeds the VBR but
> also, install-time, tells it the list of blocks for ldlinux.sys - where in
> the source do I look?
Please go to the Syslinux wiki and look for the "Install" wiki page.
Based on a/the specific installer, you will find different locations
under the "bios" subdirectory. With that location and filename in mind,
search for the equivalent (or very similar) path under the root
directory of the official archives (or browse the official git
Once again, perhaps Gene might suggest others.
> Don't I know it! Been reading and re-reading and re-evaluating, etc. those
> articles for months. Challenged myself by writing a golang driver for
> fat32. ext4 is next on the list (some very odd design stuff in there,
> mostly because of ext2-3 legacy, I suppose).
This is the reason I also suggested taking a look at the "ms-sys"
source code. It's not "perfect", but it might help.
More information about the Syslinux