Re: Which device did I boot from?

From: Andrey Borzenkov
Date: Sat Apr 15 2006 - 06:34:52 EST


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

On Saturday 15 April 2006 13:43, Rene Herman wrote:
> Andrey Borzenkov wrote:
> >> 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.
>

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-----
-
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/