[syslinux] Installing syslinux on a purely virtual disk

Richard W.M. Jones rjones at redhat.com
Thu Apr 18 13:07:54 PDT 2019


I'm trying to add boot support to
https://github.com/libguestfs/nbdkit/tree/master/plugins/floppy

This NBD server plugin generates a completely virtual FAT filesystem
and partition table.  Nothing is ever written to a file, and it must
run without anything needing to be root, loop mounting etc.  Running
"syslinux --install <something>" is a non-starter.

So I've looked at how syslinux works and I see that it adds the files
LDLINUX.SYS and LDLINUX.C32 to the FAT filesystem -- I can easily
emulate this bit in the plugin since we are already creating a full
FAT32 filesystem on the fly.

However the problem is that syslinux also creates a boot sector [ie.
core/bios/diskboot.inc in the syslinux source] and I suppose it must
encode the offset of the LDLINUX.SYS file.  I haven't quite worked out
the details.

The question, is there a way to simulate the work that syslinux does
in a reasonably supportable way that won't break on future updates of
syslinux?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/


More information about the Syslinux mailing list