[syslinux] Determine from which device syslinux booted from

H. Peter Anvin hpa at zytor.com
Fri Oct 3 09:20:32 PDT 2014


On 09/26/2014 09:16 AM, Renato wrote:
> Hi,
> 
> Is it possible to know (and pass it as a kernel argument) from which device
> syslinux booted from?
> 
> My case is:
> 
> I have a USB stick with a custom linux installation. Syslinux boots from
> it, load kernel and initrd. My initrd scans all blocks devices looking for
> a valid root device and use it when it is found.
> 
> The problem is that sometimes I have another USB stick on the same computer
> wich has too a valid root device, but I don't want to boot from it, I want
> to boot from the root device of the USB stick used to boot.
> 
> Is it possible to do this?
> 

The problem is that mapping from BIOS drives to something like USB
sticks is pretty much arbitrary, and isn't helpful once the operating
system boots.

What we might be able to do is to extract the filesystem identifier for
the filesystems which have them; this requires changes to each
filesystem of course.  This is in addition to the option of using GPT
and UUIDs.

	-hpa



More information about the Syslinux mailing list