Skip to contentSkip to conversation

Which device did I boot from?

DISCUSSION Andrey Borzenkov 2 participants 3 messages Apr 15, 2006

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 7 lines
Quoted 3 lines

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 am sorry but it does not tell about boot device. It contains all hard disks enumerated via EDD interface. I do not see any information
under /sys/firmware/edd that would have allowed to guess boot device.

- -andrey

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEQJnjR6LMutpd94wRAqIDAJ9fSZYjCXsecWXbuuC+rehMU/FL7ACfSmug +OKNYJORExMX7oMrdjgIc+4=
=SDfj
-----END PGP SIGNATURE-----

#1 lore raw
Quoted 5 lines · Andrey Borzenkov
Quoted 3 lines

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 am sorry but it does not tell about boot device. It contains all hard disks enumerated via EDD interface. I do not see any information under /sys/firmware/edd that would have allowed to guess boot device.

int13_dev80 is the bootdevice. Or that used to be the case with things such as booting from SCSI at least. Don't know about booting from, say, USB.

Rene.

#2 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 5 lines · Rene Herman
Quoted 4 lines · Andrey Borzenkov
Quoted 3 lines

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:

Quoted 8 lines
Quoted 3 lines

I am sorry but it does not tell about boot device. It contains all hard disks enumerated via EDD interface. I do not see any information under /sys/firmware/edd that would have allowed to guess boot device.

int13_dev80 is the bootdevice. Or that used to be the case with things such as booting from SCSI at least. Don't know about booting from, say, USB.

OK. In this case udev creates links based on MBR signature; it can be used to infer real device:

{pts/0}% LC_ALL=C ll /dev/disk/by-id

lrwxrwxrwx  1 root root  9 Apr 12 21:36 edd-int13_dev80 -> ../../hda
lrwxrwxrwx  1 root root 10 Apr 12 21:36 edd-int13_dev80-part1 -> ../../hda1
lrwxrwxrwx  1 root root 10 Apr 12 21:36 edd-int13_dev80-part2 -> ../../hda2

Not sure about USB either.

- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEQMtSR6LMutpd94wRAsFkAJsFOkTxa9DWphkiZ/eomAKl6rbHMgCeIlZL DkkNhTvgK0USRRyiMeqdtLY=
=yCYm
-----END PGP SIGNATURE-----