Re: Which device did I boot from?

From: Rene Herman
Date: Fri Apr 14 2006 - 17:50:29 EST


William Estrada wrote:

Is there a way to determine which device I have booted from? For
example, say I booted from a USB device, can I tell which one? I did
not find anything in /proc FS other than the cmdline options.

If you choose the (experimental) CONFIG_EDD option in your kernel then, with cooperation of your BIOS, you'll have a /sys/firmware/edd with at least some info about the BIOS boot device. For me:

/sys/firmware/edd/
`-- int13_dev80
|-- extensions
|-- info_flags
|-- legacy_max_cylinder
|-- legacy_max_head
|-- legacy_sectors_per_track
|-- mbr_signature
|-- raw_data
|-- sectors
`-- version

I do not appear to have enough information there to be able to translate back to the linux device but drivers/firmware/edd.c seems to imply there might be for others. As far as I'm aware, it's the best that's available at least.

Rene.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/