[syslinux] Knowing your boot disk
H. Peter Anvin
hpa at zytor.com
Wed Jan 24 14:47:07 PST 2007
Ram Yalamanchili wrote:
> If you boot from syslinux based USB/harddisk, is there a way to know the
> partition or disk you booted from? I'm using the mboot module, so if the
> info is availble to thru the COM api, i can get it and append it to cmdline.
The BIOS disk number and partition information are available to COM32
via INT 22h, AX=000Ah, but the question is exactly how much that would
buy you, since the mapping between BIOS disk numbers and Linux device
names isn't really all that well-defined.
It's probably more useful for EXTLINUX where you, with that information,
could go in and read the UUID from the filesystem superblock -- I
probably should add an API function to read partition-relative disk
blocks rather than relying on each COM32 program to deal with all the
rigamarole of EBIOS, CBIOS, partition layout, etc, itself.
More information about the Syslinux