Unfortunately, I'm trying to determine the boot device from within initramfs. None of the devices have been mounted yet.
I'm wanting to do this from an init/installation script that will install Linux on any device other than the boot device. Obviously, I don't want to install over the top of my boot device. Hence, wanting to figure out which is the boot device. Thanks for the help. -Dallas On Fri, 2007-06-22 at 18:03 +0200, Benoit Donnette wrote: > Well, I can suggest a fairly indirect method : > > cat /proc/mounts indicates which filesystems are mounted > look for '/' mountpoint. > > (I assume that your kernel lies in Linux' /boot/kernel/bzImage). > > BenoƮt. > > > 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? > > > > Thanks! > > > > > > > > _______________________________________________ > > Bug-grub mailing list > > [email protected] > > http://lists.gnu.org/mailman/listinfo/bug-grub > > > > _______________________________________________ Bug-grub mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-grub
