bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fallback for SATA and IDE drives when booting from a CD?


From: adrian15
Subject: Re: Fallback for SATA and IDE drives when booting from a CD?
Date: Thu, 01 Feb 2007 18:52:09 +0100
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

Russel Hill escribió:
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?

Well... you can modify the grub source code... make him search the first
/etc/fstab file in every hard disk (I have the code) and then, this is
the difficult part you have to parse fstab file in order to search "/"
and extract sda2, hda2, sda5 or whatever so that you can use it later.

All of this means C coding and for me it is not a priority for my Super
Grub Disk.



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

Does not work?

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?

Does the Boot & Tools -> Boot Hard Disk  option from Super Grub Disk
cdrom (Available at http://supergrub.forjamari.linex.org ) NOT boot your
first hard disk ?

Maybe you have not anything installed on the MBR... maybe an easiest
solution if the filesystem is ext3 would be to install grub into the
linux partition boot sector,...

why do you use a cdrom to boot ?

adrian15





reply via email to

[Prev in Thread] Current Thread [Next in Thread]