bug-grub
[Top][All Lists]
Advanced

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

Booting GRUB on a drive other than (hd0)


From: Derek Scherger
Subject: Booting GRUB on a drive other than (hd0)
Date: Tue, 30 Dec 2003 11:03:01 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312

Hi folks, I have a question relating to the following line in the GRUB manual from the Installing GRUB Natively section:

        If you install GRUB into a partition or a drive other than the first 
one, you must
        chain-load GRUB from another boot loader. Refer to the manual for the 
boot loader       
        to know how to chain-load GRUB.

Does this simply mean that I need something in the MBR that will look for the active partition where I have GRUB installed so that it is loaded and executed? Some clarification in the manual would be most helpful here.

I've been trying to get GRUB installed on my second drive (hd1) and it's very close to working but it seems that the BIOS tells GRUB that it is starting from (hd0) even though it's jumpered to be the primary slave device. This leaves GRUB thinking that the root device is (hd0) when it really should be (hd1).

I've tried a couple of different things like map (hd0) (hd1) and map (hd1) (hd0) to see if I can fix the problem but one of two things happens. Either GRUB can't find files because they're on (hd1) which it thinks is (hd0) or it hands off some bad info to the linux kernel which panics when it tries to mount the root filesystem, presumably because it's looking on the wrong device. This is late enough in the linux boot process that it has reported about drives and partitions and it still sees hda as the primary master and hdb as the primary slave.

What I'm wondering is the following:

(1) Is it possible to get this to work with GRUB on the primary slave with the BIOS configured to boot from that device first and if so what is required?

(2) Would GRUB be better off looking at the hardware more like the linux kernel does to determine the real identity of the drives so that it gets (hd0) and (hd1) right? I don't know how the kernel does this but it's clearly possible to do. Once GRUB stage1 is running does it really care which device it was booted from since this seems like it may almost always be (hd0) even when it shouldn't be? It seems to me (without knowing much about the internals of the kernel or GRUB) that what's really needed at this point is knowledge about the actual drive configuration and where the kernel to be booted lives, i.e. (hd1) in my case. As a follow on to this I'm also wondering whether the real root device is identifed or coded into the GRUB boot record or whether GRUB simply uses whatever device the BIOS has told it to use. Would this be possible to add as a configuration option, to hard code the root device, rather than relying on the BIOS to determine it?

Thanks for any info...

Cheers,
Derek







reply via email to

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