[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Which device did I boot from?
From: |
Dallas Clement |
Subject: |
Re: Which device did I boot from? |
Date: |
Fri, 22 Jun 2007 10:51:28 -0500 |
Is it possible to use grub-probe or grub-mkdevicemap to determine the
boot drive? I can run these from initramfs and hopefully it will
produce a mapping of (hd0,0) to /dev/hdx or /dev/sdx.
Is this an accurate way to do it?
Thanks,
Dallas
On Fri, 2007-06-22 at 19:15 +0200, Benoit Donnette wrote:
> OK, what about something like :
>
> cat /proc/mounts
>
> which will tell you which devices are mounted ? unless you have a /boot
> artition that you won't mount (possible), but in this case the kernel
> would lie in /kernels/bzImage.
>
> However you need to know that you actually booted from (hd0,0).
>
> Benoit.
>
>
> > On 2007/06/22 05:41 (GMT-0500) Dallas Clement apparently typed:
> >
> >> Can anyone tell me how to determine which device Linux booted from. I
> >> am using GRUB to boot Linux. My menu.lst config is this:
> >
> >> title GNU/Linux, kernel 2.6.21.1
> >> root (hd0,0)
> >> kernel /boot/kernels/bzImage
> >
> >> Once booted from Linux, I would like to be able to tell which Linux
> >> device, i.e. /dev/hdx or /dev/sdx corresponds to hd0.
> >
> >> Is there a way to determine this?
> >
> > Interesting. I'd like to know if this is actually possible too. Maybe what
> > you actually need would come from:
> >
> > cat /boot/grub/device.map
> >
> > Related:
> > cat /etc/fstab | grep /boot ; nothing if no separate /boot partition
> > mount | grep " / "
> > cat /proc/cmdline
> > --
> > "Respect everyone." I Peter 2:17 NIV
> >
> > Team OS/2 ** Reg. Linux User #211409
> >
> > Felix Miata *** http://mrmazda.no-ip.com/
> >
> >
> > _______________________________________________
> > Bug-grub mailing list
> > address@hidden
> > http://lists.gnu.org/mailman/listinfo/bug-grub
> >
>
>
>
>
> _______________________________________________
> Bug-grub mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-grub