I just finished rearranging my disk drives so I could get my machine to boot after an upgrade to FC5t2, but my efforts to avoid doing it led me to some questions that I thought would be good discussion.

The history is, I bought this Dell server with dual 80GB drives, which I originally installed under RH9 with hda1 being /boot, hda2 and hdc3 as swap, then hda3 and hdc3 in an md RAID 0 configuration (striped). This configuration survived 3 upgrades to FC1, then 2, then 3. The last time I upgraded I decided to throw a 3rd drive in (hdd) and installed FC4 into hdd3 (/) and hdd1 (/boot) with hdd2 as swap and then just made the md device my home directory. This worked fine, I remember having to play a little bit to get the booting to work, but nothing too dramatic.

Well, I ended up doing a fresh install on hdd but I could never get GRUB to boot. Anaconda asked whether I wanted to install GRUB on the MBR of hda or on hdd1. I chose hdd1 (I'm pretty sure) and it booted once, but a yum install of a bunch of stuff including a new kernel and Xen resulted in simply the GRUB message and nothing further. I played with the rescue disk and tried grub-install on hda, hdd, hdd1 and every other combination I could think of. I also tried putting /boot on hda1 and relabeling it /boot. At one point I got the grub prompt, not the boot menu, but the interactive grub menu than I can almost never figure out what to do with. ;-)

It's odd to me that FC4 booted fine, but I could never figure out the proper incantation to get that config to work after I reinstalled. This morning I rearranged the disks to make hdd hda, so now everything is working, but there's clearly something I'm missing in my understanding of how GRUB works.

I found a post on Google that said if I'm only booting linux to *not* install on the MBR, but if it was on the MBR of hda and I wanted to install it on hdd1, then how would I erase GRUB from hda? Also, does the bootable flag on the partition have anything to do with where the BIOS will boot from? Can the BIOS actually find GRUB outside the MBR, and if so, how does it decide where to look? If GRUB is in the MBR, but there are multiple ext2 filesystems with a grub.conf, how does it decide which one to use?

I'd love to hear some discussion of this from anyone that's more experienced with GRUB than I am.

I've had similar problems with a multidisk SCSI and IDE system, almost every time I've installed FC.

For some reason, the installation process didn't store the location of the /boot filesystem (i.e. which disk, which partition) correctly. There are two stages to grub booting, and it would choke after the second (as I recall). The parameters to the root command in GRUB told it to look on the wrong hard disk drive. I don't know my system by heart (and I'm not near it), but there is an IDE DVD burner, an ATA drive used only for backup, and a LS-120 drive connected to the mobo. The basic linux filesystems are divided over three SCSI disks and connected by a SCSI card. I don't think Grub differenticates between the SCSI and IDE drives, so the ordering is more complicated. I'm not sure that that is why this happened, but I do wonder.

I was able to boot from the DVD in rescue mode to get the output of mount and look at fstab and then from the grub prompt was able to use the find command to locate the /boot filesystem. Then I used the root command to grub to change where it was looking to boot from and then once I had this right, I could change grub.conf to get it to boot correctly every time. I had been pretty careful to backup grub.conf to make it easy to figure this out on subsequent installs, but recently had to figure it all out again after I managed to wreck this particular box and found I had forgotten to backup grub.conf (long story...).

You can figure all this out with some Googling, but it somehow isn't too straightforward. I think the documentation could be tweaked and maybe some utility that spat out the grub numbering for the disks and partitions along with their names according to fstab wouldn't hurt either.

Without /etc/fstab or the output of mount, I'm having a little trouble grokking your setup, but then again, you have it all working now...
-al

You are correct, that was wrong. I was trying to recreate the original config that I was having trouble with, but missed editting that.

I ended up reading the grub manual for about an hour yesterday and I figured out what I think I was doing wrong. I should have been running grub-install with the --root argument to tell it to read /dev/hdd1 for the grub.conf. Once I had the time to read it for education rather than just trying to figure out the solution to my problem, things started clicking. The right method would have been (after chroot /mnt/sysimage) "grub-install --root (hd2,0) (hd2,0)".

The thing that is still bothering me, though, is even in the grub FAQ it says you don't uninstall grub from the MBR, because that would leave your system unbootable, but I wanted it installed on the boot sector of /dev/hdd1, i.e. (hd2,0), but would installing it there cause grub to remove it from the MBR? That wouldn't make sense if it did, but if it didn't you'd have a grub bootloader on the MBR pointing to the wrong root.

Also, say I did remove GRUB from the MBR and got it installed on (hd2,0), are the modern BIOSes intelligent enought to scan all the boot sectors on all partitions looking for a bootloader? And does it only scan partitions that are marked bootable? Does it search them in order and take the first one, because if it does, then you'd definitely need to be able to remove grub from any given boot sector, or would you just remove the bootable flag from the partition?

I think if someone explained those things to me I'd have it all straight in my head. Thanks for the input!

Installing grub anywhere different from the MBR only makes sense if you have another bootloader pointint to it.
Maybe you want to have several distros installed and instead of overwriting your present nbootloader (grub, lilo, gag, you name it) you wish to do a less dangerous install. You then install grub somewhere else and tell your main bootloader where to look for it.

Installing grub anywhere does not remove it from another place it was instalkled to before though. The only way to remove grub is to overwrite it with another bootloader (either another grub or any other).

__________________You can find out what book a person needs by asking the question, "Do you want to be a Muggle or a Wizard?"

(1) If they answer "Wizard", then you give them RUTE.
(2) If they answer "Muggle", then you give them "Linux for Dummies."
(3) If they answer "What's a Muggle?", then you give them "Harry Potter".

I thought I'd resurrect this thread because I think I have a similar problem, but I'm just not sure. I have a system that has a Maxtor 70gig IDE and a Fujitsu 73gig SCSI drive along with a IDE DVD writer. Windows XP is installed on the IDE drive and Fedora 8 on the SCSI drive. The SCSI runs off of an Adaptec 2940UW PCI card.

Now, all this was running fine with GRUB bootloader, but I recently upgraded my system hardward. New motherboard, Core2 Duo chip, memory (4gigs) and an new video card (nvidia 8800GT). Great. I put it all together and tried a first boot. Things spun up fine and the motherboard did the post test then found the IDE drive and the DVD Writer without a problem (the IDE hard drive is plugged into the first IDE socket; IDE1, and the DVD Writer is plugged into IDE2. Both are set to "master" - this is the way it was before). It then ran an array scan and found the Adaptec card and ran the SCSISelect program and found the SCSI hard drive fine. GRUB is installed on the first sector of the SCSI drive, not in MBR.

Once all this happens the screen blanks and all I get is a blinking cursor at the top left of the screen. It appears to be frozen hard. Non-reactive to CTRL-ALT-DEL. I've let it perseverate for several minutes this way, but it seem unable to do anything else. Hard reset is all that gets you out.

If I unplug the SCSI drive and try it again, I get the same process except after it scans the SCSI bus (and comments no drives found), I get a message saying GRUB loading, but that's it and of course, it can't find GRUB because it's installed on the unplugged drive. Interestingly, if I have hit the DEL key at the appropriate time during the post test, it will go from there to the BIOS. It won't do that if the SCSI drive is plugged in.

I can get it to boot from CD and have been able to get a command line through the rescue disk, but I'm wondering if this is, in fact, a GRUB problem (now that things like drive assignments are scrambled due to the system upgrade) or some other, unknown hardware issue. I'm thinking it's a GRUB problem and that perhaps I just need to re-install GRUB or reconfigure GRUB.conf or the system map.

Any thoughts?

Thanks for any help.

__________________
__________________________________________________ _______________________________________
Some days it seems like a coin toss between George Orwell and Monty Python...

I think I follow you, correct me if I'm wrong. So you have grub installed on the MBR of the IDE drive, and also on the boot partition (not the mbr) of the scsi drive. If this is the case, it sounds like your system is choosing to boot from the scsi drive first when both are plugged in. Since there is nothing in the mbr, it's got nothing to boot into so you get a blank, unresponsive screen. When you remove the scsi drive, it's forced to boot from the ide drive which has grub installed. It tries to load the boot partition from your scsi drive which isn't there (unplugged) so it errors out. If this is actually whats happening, you would either need to

a) boot from the ide drive with both connected
b) install grub on the mbr of the scsi drive and boot from it

I could be way off here, but thats just my guess. Hope this helps.

__________________
"Ooh, they have the internet on computers now" -Homer

No, grub is only installed (as far as I know) on the first sector of the SCSI drive. I assume it put something on the IDE drive since when the SCSI is not plugged in, it says it's running GRUB, but nothing happens. Could be that it installed something in the MBR of the IDE, but I didn't tell it to do that. <grin>

The big difference is, with SCSI drive plugged in, after the post and drive checks, it freezes up hard. No message about GRUB or anything, the screen just blanks and that's it. With the SCSI unplugged, it says it's running GRUB, but nothing happens. It doesn't lock up and is responsive to the three finger salute or whatever. I am able to get into the BIOS with the SCSI unplugged. And the system will boot from CD. So I assume from all this that the hardware is fine and this is an issue of the GRUB system map being scrambled or a (now) bad grub.conf.

__________________
__________________________________________________ _______________________________________
Some days it seems like a coin toss between George Orwell and Monty Python...

Ok, I get home and start working on it and suddenly grub is working. The computer won't boot in windows or linux (fails during boot at some point), but it seems that it can now find grub.

Now a new problem has come up. If the SCSI drive is plugged in, the mother board won't boot off of the DVD drive. If I unplug the SCSI drive, then it seems it can find the DVD drive. this is pretty weird. I had tell the motherboard to go to the boot menu at the post test and it does. Asks if I want to boot from network, hard drive or CDROM. I select CDROM and it shows a menu with no drives to select. If I unplug the SCSI drive, then it works fine, but sort of misses the point if I want to fix linux.

Selecting Windows from the grub menu seems to work fine, but soon after the boot screen comes up, it resets and start again with the post test.

This is a frustrating Catch 22

__________________
__________________________________________________ _______________________________________
Some days it seems like a coin toss between George Orwell and Monty Python...

If you see the windows boot screen long enough to hit a key, you might be able to get into safe mode (F7 or F8 I think). From there you may be able to troubleshoot why its crashing/restarting during bootup.

__________________
"Ooh, they have the internet on computers now" -Homer