[syslinux] Installing syslinux on a purely virtual disk

Ady Ady ady-sf at hotmail.com
Thu Apr 18 13:56:22 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.
 
 
Under Linux, SYSLINUX (for BIOS) can be installed by means of alternative 
official installers:

_ extlinux acts on a mounted filesystem;

_ syslinux-nomtools requires root privileges;

_ syslinux (using mtools) depends on mtools (which also means it depends on its 
quirks too) but it doesn't require root privileges.

See www.syslinux.org/wiki/index.php/Install .

Alternatively, SYSLINUX could be installed be means of unofficial methods.

One example is RUFUS; although it is a program working under Windows (not 
Linux), it is open source and it uses its own way of installing SYSLINUX 
(different than the way the upstream official installers do it, and 
independently of the specific version of SYSLINUX).

One potentially-relevant note: the Linux-based tool "ms-sys" (version 2.6.0 
recently released, https://sf.net/p/ms-sys ) can be used to install SYSLINUX 
boot code (among several others).

Whether any of the above is of any actual help for your case/conditions, I 
don't know, but perhaps they might be some kind of starting point for your own 
method. If you come up with some alternative way, please let us (members of the 
Syslinux mailing list) know.

HTH,
Ady.



More information about the Syslinux mailing list