I posted the following on grub-devel before I realized that this was
the better list for it...

We are booting from a CD which needs to forward to a bootable hard
drive (if possible). The hard drive might be SATA, might be IDE.

My current menu.lst looks something like this:

#########################################
timeout 10
default 0
fallback 1 2

title boot from SATA drive
root (hd0,0)
kernel /vmlinuz root=/dev/sda2 panic=5
boot

title boot from IDE drive
root (hd0,0)
kernel /vmlinuz root=/dev/hda2 panic=5
boot

title Boot from CD
root (cd)
kernel /boot/vmlinuz root=/dev/ram0 init=/linuxrc
initrd /boot/initrd.img
boot
#########################################

The only difference between entries 0 and 1 is in the
"root=/dev/?da2".  If we were booting from writable media, we could
use "default savedefault" and "savedefault fallback" commands to chain
from one entry to the other after a kernel panic. Unfortunately,
that's not the situation. As it is this menu.lst works with SATA
drives but not with PATA or IDE drives. I can switch this around by
reordering the entries (or modifying default and fallback) but I can't
seem to get

Is there a way for grub to substitute the correct /dev/* depending on
whether the drive is SATA or not?

Even better would be a way to make this work when booting from a CD:

#########################################
timeout 10
default 0
fallback 1

title boot from hard drive
rootnoverify (hd0)
chainloader +1

title Boot from CD
root (cd)
kernel /boot/vmlinuz root=/dev/ram0 init=/linuxrc
initrd /boot/initrd.img
boot
#########################################

Can this be made to work? If so, what am I missing?

Thanks,
Russel Hill


_______________________________________________
Bug-grub mailing list
Bug-grub@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-grub

Reply via email to