Fedora Linux Support Community & Resources Center
  #1  
Old 16th February 2006, 06:57 PM
brunson Offline
Registered User
 
Join Date: Jun 2005
Location: Westminster, Colorado
Posts: 2,306
GRUB Discussion

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.

Thanks,
e.
__________________
Registered Linux User #4837
411th in line to get sued by Micro$oft
Quote:
Basically, to learn Unix you learn to understand and apply a small set of key ideas and achieve expertise by expanding both the set of ideas and your ability to apply them - Paul Murphy
Reply With Quote
  #2  
Old 16th February 2006, 08:31 PM
linmix Offline
Registered User
 
Join Date: Jan 2005
Posts: 626
post your grub.conf and the output of fdsik -l (you'll need to be root and may have to tell it where fdisk is:/sbin/fdisk) and I'll see if I can help.
__________________
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".
Reply With Quote
  #3  
Old 17th February 2006, 04:59 PM
brunson Offline
Registered User
 
Join Date: Jun 2005
Location: Westminster, Colorado
Posts: 2,306
Well, like I said, it's already fixed, but here's what it was:

Code:
Disk /dev/hda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1          34      369463+  83  Linux
/dev/hda2              34        9713    77754600   fd  Linux raid autodetect
Code:
Disk /dev/hdc: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1   *           1          46      369463+  83  Linux
/dev/hdc3              47        9726    77754600   fd  Linux raid autodetect
Code:
Disk /dev/hdd: 17.3 GB, 17360093184 bytes
255 heads, 63 sectors/track, 2110 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdd1   *           1          13      104391   83  Linux
/dev/hdd2              14        2110    16844152+  8e  Linux LVM
grub.conf:
Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd2,0)
#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
#          initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd2,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.15-1.1826.2.10_FC5)
        root (hd2,0)
        kernel /vmlinuz-2.6.15-1.1826.2.10_FC5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.15-1.1826.2.10_FC5.img
__________________
Registered Linux User #4837
411th in line to get sued by Micro$oft
Quote:
Basically, to learn Unix you learn to understand and apply a small set of key ideas and achieve expertise by expanding both the set of ideas and your ability to apply them - Paul Murphy

Last edited by brunson; 18th February 2006 at 05:06 PM. Reason: Fixed output of fdisk for /dev/hda: hdc1 -> hda1
Reply With Quote
  #4  
Old 18th February 2006, 01:29 AM
pacifico Offline
Registered User
 
Join Date: Nov 2004
Posts: 49
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
Reply With Quote
  #5  
Old 18th February 2006, 03:08 PM
linmix Offline
Registered User
 
Join Date: Jan 2005
Posts: 626
It looks like fedora might be confusing hda and hdc. If you simly copied and pasted the output of fdisk -l then it sure is strange that the active partition of hda should be hdc1 !?

APart from that I have nothing much to add to what pacifico has already said.
__________________
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".
Reply With Quote
  #6  
Old 18th February 2006, 05:18 PM
brunson Offline
Registered User
 
Join Date: Jun 2005
Location: Westminster, Colorado
Posts: 2,306
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!
__________________
Registered Linux User #4837
411th in line to get sued by Micro$oft
Quote:
Basically, to learn Unix you learn to understand and apply a small set of key ideas and achieve expertise by expanding both the set of ideas and your ability to apply them - Paul Murphy
Reply With Quote
  #7  
Old 19th February 2006, 07:20 PM
linmix Offline
Registered User
 
Join Date: Jan 2005
Posts: 626
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".
Reply With Quote
  #8  
Old 4th January 2008, 10:40 PM
stunter Offline
Registered User
 
Join Date: Jul 2005
Location: Western Washington
Posts: 180
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...
Reply With Quote
  #9  
Old 4th January 2008, 10:52 PM
jrummy27 Offline
Registered User
 
Join Date: May 2007
Location: Raleigh, NC
Age: 30
Posts: 304
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
Reply With Quote
  #10  
Old 4th January 2008, 10:59 PM
stunter Offline
Registered User
 
Join Date: Jul 2005
Location: Western Washington
Posts: 180
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...
Reply With Quote
  #11  
Old 5th January 2008, 02:51 AM
stunter Offline
Registered User
 
Join Date: Jul 2005
Location: Western Washington
Posts: 180
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...
Reply With Quote
  #12  
Old 7th January 2008, 07:10 PM
jrummy27 Offline
Registered User
 
Join Date: May 2007
Location: Raleigh, NC
Age: 30
Posts: 304
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
Reply With Quote
  #13  
Old 7th January 2008, 07:34 PM
stunter Offline
Registered User
 
Join Date: Jul 2005
Location: Western Washington
Posts: 180
Yea, the ultimate conflict was that the mother board apparently does not have the capability of using an init18 based boot source. So plugging in the SCSI card only caused problems.

The answer is clearly to just dump the SCSI drives and card and go with a SATA setup or something. I'm considering how best to proceed now.

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

Tags
discussion, grub

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A discussion about RAM kona0197 Wibble 84 20th July 2009 04:32 PM
MP3 discussion, right here!! FedoraTomorrow[deleted] Fedora Focus 1 6th July 2005 10:50 AM
Partitoning Discussion SlowJet Fedora Focus 2 7th June 2005 06:42 PM


Current GMT-time: 11:15 (Sunday, 20-04-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat