Skip to contentSkip to conversation

Which device did I boot from?

DISCUSSION William Estrada 4 participants 4 messages Apr 14, 2006 – Apr 16, 2006

lore
Share & tools
lore
#0 lore raw

Hi group,

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.

Please respond directly to [email protected] as I am not subscribed
to this mailing list.

Thanks for your time.

Signature · 4 lines
 William Estrada 
<HTTP://www.Mt-Umunhum-Wireless.net/resume/william_estrada.html>    --  MrUmunhum at popdial dot com <mailto:[email protected]>  --   408-997-0743
 Skype ID: MrUmunhum
 HTTP://Mt-Umunhum-Wireless.net
#1 lore raw
Quoted 3 lines · William Estrada

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.

#2 lore raw
Quoted 9 lines · Rene Herman
Quoted 3 lines · William Estrada

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:

I suppose I should un-mark this as experimental. It's been in the kernel for a couple years, and shipping enabled in RHEL4 for over a year with no problems (a recent buggy BIOS workaround the one exception).

Signature · 4 lines
Matt Domsch
Software Architect
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com
#3 lore raw
In reply to William Estrada
Quoted 3 lines · William Estrada

Hi group,

Is there a way to determine which device I have booted from?

that may be really hard; EDD can tell you what disk your bios will try, but remember that you may have booted from USB (not covered by EDD) or even ethernet (using PXE). The kernel doesn't know... since all it knows is that the bootloader put it into memory somewhere