Help - Search - Members - Calendar
Full Version: Grub Not Working W/redhat 9
Linuxhelp > Support > Technical Support
jumpyg
Hi,

I just upgraded to RedHat 9 from version 7.

The problem is that grub does not start correctly when I boot the computer. I have WinXP and RedHat on different partitions. I can get to both WinXP and the RedHat using my boot floppies, so I know there's nothing wrong there.

When I boot up, the words "GRUB loading stage2..."
appear and then nothing happens. The grub screen to choose which partition to boot from never appears. I looked at grub.conf, and it looks the same as before the upgrade.

Any ideas?
Thanks a lot!
Joey
There's no error codes after the "loading stage 2.." part?
jumpyg
No error codes at all. I just tried it again and the only message after 10 minutes was still the same as before.
hughesjr
When in linux go to a terminal. cd to the /boot/grub directory then type:

grub

After hardware detection, you will be at the grub prompt. You need to know which drive and partition is the boot partition (not the root partition). Grub uses a different structure than you are used to in linux ... hda is hd0, hdb is hd1, hdc is hd2, hdd is hd3 and partitions are different as well ... hda1 is (hd0,0), hda2 is (hd0,1), hdb1 is (hd1,0) hdb3 is (hd1,2), etc. ... so if your boot partition (not your root partition) is hda1 (mine always is...) then that is (hd0,0).

Now, type the following command (substitute the correct boot partition for (hd0,0) if necessary):

root (hd0,0) (then press enter)

Now you need to tell grub where the boot record needs to be installed ... if you want MBR, issue this command:

setup (hd0) (then press enter)

If your boot partition was on hda3 and you didn't want to update the MBR, but wanted the boot record only on the partition, you would issue the command setup (hd0,2) instead...

now type quit (then press enter) and reboot...
jumpyg
hughesjr, thanks for the response, but that was a little over my head. I assume that if I put the setup (hd0) on the wrong partition I may really mess things up. Can you tell me how to find out which partition is which? Unfortunately, I originally set all of this up over a year ago, so I don't remember how it is partitioned.

Here is the old grub.conf file (which I copied down before the upgrade), which may help:
#boot=/dev/hda
default=1
timeout=30
title Red Hat Linux (2.4.9-31)
root (hd0,4)
kernel /boot/vmlinux-2.4.9-31 ro root=/dev/hda5 hdd=ide-scsi
initrd /boot/initrd-2.4.20-8.img
title Windows XP
rootnoverify(hd0,0)
chainloader +1

Thanks for the help!
hughesjr
the setup (hd0) writes the boot record to the master boot record (looking at the grub.conf ... that seems to be what you want, it looks like XP is accessed through grub...) based on your grub.conf, this is what you want to do:

grub
root (hd0,4)
setup (hd0)


The chainloader to (hd0,0) should pass to WinXP OK...

The new grub.conf should be the same ... except the kernel file and the initrd file names will be new ... all the rest should be the same.
jumpyg
hughesjr, I tried making those changes and rebooting, and now the screen reads:
GRUB loading stage 1.5
GRUB loading, please wait....

and then nothing. Any idea what I'm missing here?

Thanks again.
hughesjr
post the output to the command:

fdisk -l /dev/hda

do you have more than one physical hard drive?
jumpyg
Nope, only one hard drive.

Here's the output:

Disk /dev/hda : 80.0 GB
.... lots of statistics
Device Boot Start End Blocks ID System
/dev/hda1 * 1 8951 71898876 7 HPFS/NTFS
/dev/hda2 8952 9729 6249285 f Win95 Ext'd (LBA)
/dev/hda5 8952 9633 5478133+ 83 Linux
/dev/hda6 9634 9729 771088+ 82 Linux swap
hughesjr
I don't see anything wrong .... issue this command from inside /boot/grub

if the file device.map exists, do this:

cp device.map device.map.old

then do this

grub --device-map=/boot/grub/device.map

There is no number printed on the stage line when it hangs?

See this list of possible errors
-------------------------------
what does your new grub.conf look like
jumpyg
hughesjr, I did what you asked. FWIW, this is what device.map.old contains:
(fd0) /dev/fd0
(hd0) /dev/hda

Here is the new grub.conf:
#boot=/dev/hda
default=1
timeout=30
title Red Hat Linux (2.4.20-8)
root (hd0,4)
kernel /boot/vmlinux-2.4.20-8 ro root=/dev/hda5 hdd=ide-scsi
initrd /boot/initrd-2.4.20-8.img
title Windows XP
rootnoverify (hd0,0)
chainloader +1

I tried rebooting again, and I still don't get an error number. All it says is:
GRUB loading stage 1.5.
GRUB loading, please wait....
hughesjr
try this in your grub.conf

replace:

[quote]title Red Hat Linux (2.4.20-8)
    root (hd0,4)
    kernel /boot/vmlinux-2.4.20-8 ro root=/dev/hda5 hdd=ide-scsi
    initrd /boot/initrd-2.4.20-8.img [/quote]

with this

[quote]title Red Hat Linux (2.4.20-8)
    kernel (hd0,4)/boot/vmlinux-2.4.20-8 ro root=/dev/hda5 hdd=ide-scsi
    initrd (hd0,4)/boot/initrd-2.4.20-8.img [/quote]

Also try this in grub.conf:
[quote]title Red Hat Linux (2.4.20-8)
    root (hd0,4)/boot
    kernel /boot/vmlinux-2.4.20-8 ro root=/dev/hda5 hdd=ide-scsi
    initrd /boot/initrd-2.4.20-8.img [/quote]
------------------------
If all that fails go back into the grub prompt (type the command grub from within the /boot/grub directory) and try this:

root (hd0,4)/boot

then

setup (hd0)

then

quit
-------------------------
If still a no-go reinstall grub...

if you have done updates fom up2date, use this grub with the command:

rpm -Uvh --force grub-0.93-4.i386.rpm
jumpyg
I tried those three different changes, but still no luck. It keeps hanging at the same spot during the boot phase.

I couldn't download the grub rpm. The system reported: "temporary failure in name resolution" when I tried to ftp the file.

Is there another boot program I can try?

Thanks!
hughesjr
Go to the RedHat Mirrors page and select any distrubution link ... then go to linux/9/en/os/i386/RedHat/RPMS and pick grub-0.93-4.i386.rpm...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.