* Which device did I boot from?
@ 2006-04-14 21:13 William Estrada
2006-04-14 21:52 ` Rene Herman
2006-04-16 17:49 ` Arjan van de Ven
0 siblings, 2 replies; 7+ messages in thread
From: William Estrada @ 2006-04-14 21:13 UTC (permalink / raw)
To: linux-kernel
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 MrUmunhum@popdial.com as I am not subscribed
to this mailing list.
Thanks for your time.
--
William Estrada
<HTTP://www.Mt-Umunhum-Wireless.net/resume/william_estrada.html> --
MrUmunhum at popdial dot com <mailto:MrUmunhum@popdial.com> --
408-997-0743
Skype ID: MrUmunhum
HTTP://Mt-Umunhum-Wireless.net
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Which device did I boot from?
2006-04-14 21:13 Which device did I boot from? William Estrada
@ 2006-04-14 21:52 ` Rene Herman
2006-04-15 4:25 ` Matt Domsch
2006-04-16 17:49 ` Arjan van de Ven
1 sibling, 1 reply; 7+ messages in thread
From: Rene Herman @ 2006-04-14 21:52 UTC (permalink / raw)
To: MrUmunhum; +Cc: linux-kernel
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.
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Which device did I boot from?
2006-04-14 21:52 ` Rene Herman
@ 2006-04-15 4:25 ` Matt Domsch
0 siblings, 0 replies; 7+ messages in thread
From: Matt Domsch @ 2006-04-15 4:25 UTC (permalink / raw)
To: Rene Herman; +Cc: MrUmunhum, linux-kernel
On Fri, Apr 14, 2006 at 11:52:17PM +0200, Rene Herman wrote:
> 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:
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).
--
Matt Domsch
Software Architect
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Which device did I boot from?
2006-04-14 21:13 Which device did I boot from? William Estrada
2006-04-14 21:52 ` Rene Herman
@ 2006-04-16 17:49 ` Arjan van de Ven
1 sibling, 0 replies; 7+ messages in thread
From: Arjan van de Ven @ 2006-04-16 17:49 UTC (permalink / raw)
To: MrUmunhum; +Cc: linux-kernel
On Fri, 2006-04-14 at 14:13 -0700, William Estrada wrote:
> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Which device did I boot from?
@ 2006-04-15 6:59 Andrey Borzenkov
2006-04-15 9:43 ` Rene Herman
0 siblings, 1 reply; 7+ messages in thread
From: Andrey Borzenkov @ 2006-04-15 6:59 UTC (permalink / raw)
To: Rene Herman; +Cc: linux-kernel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> > 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-----
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Which device did I boot from?
2006-04-15 6:59 Andrey Borzenkov
@ 2006-04-15 9:43 ` Rene Herman
2006-04-15 10:30 ` Andrey Borzenkov
0 siblings, 1 reply; 7+ messages in thread
From: Rene Herman @ 2006-04-15 9:43 UTC (permalink / raw)
To: Andrey Borzenkov; +Cc: linux-kernel, Matt_Domsch
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.
Rene.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Which device did I boot from?
2006-04-15 9:43 ` Rene Herman
@ 2006-04-15 10:30 ` Andrey Borzenkov
0 siblings, 0 replies; 7+ messages in thread
From: Andrey Borzenkov @ 2006-04-15 10:30 UTC (permalink / raw)
To: Rene Herman; +Cc: linux-kernel, Matt_Domsch
-----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-----
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-04-16 17:49 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-14 21:13 Which device did I boot from? William Estrada
2006-04-14 21:52 ` Rene Herman
2006-04-15 4:25 ` Matt Domsch
2006-04-16 17:49 ` Arjan van de Ven
-- strict thread matches above, loose matches on Subject: below --
2006-04-15 6:59 Andrey Borzenkov
2006-04-15 9:43 ` Rene Herman
2006-04-15 10:30 ` Andrey Borzenkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox