Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Grub Not Working W/redhat 9
jumpyg
post Dec 1 2003, 04:39 PM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 7
Joined: 1-December 03
Member No.: 1,886



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!
Go to the top of the page
 
+Quote Post
Joey
post Dec 1 2003, 06:16 PM
Post #2


LinuxHelp Admin
*******

Group: Admin
Posts: 1,096
Joined: 18-September 02
Member No.: 1



There's no error codes after the "loading stage 2.." part?
Go to the top of the page
 
+Quote Post
jumpyg
post Dec 1 2003, 08:00 PM
Post #3


Whats this Lie-nix Thing?
*

Group: Members
Posts: 7
Joined: 1-December 03
Member No.: 1,886



No error codes at all. I just tried it again and the only message after 10 minutes was still the same as before.
Go to the top of the page
 
+Quote Post
hughesjr
post Dec 1 2003, 08:25 PM
Post #4


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



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...


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
jumpyg
post Dec 1 2003, 08:56 PM
Post #5


Whats this Lie-nix Thing?
*

Group: Members
Posts: 7
Joined: 1-December 03
Member No.: 1,886



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!
Go to the top of the page
 
+Quote Post
hughesjr
post Dec 1 2003, 09:05 PM
Post #6


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



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.


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
jumpyg
post Dec 1 2003, 10:10 PM
Post #7


Whats this Lie-nix Thing?
*

Group: Members
Posts: 7
Joined: 1-December 03
Member No.: 1,886



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.
Go to the top of the page
 
+Quote Post
hughesjr
post Dec 1 2003, 10:46 PM
Post #8


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



post the output to the command:

fdisk -l /dev/hda

do you have more than one physical hard drive?


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
jumpyg
post Dec 1 2003, 11:35 PM
Post #9


Whats this Lie-nix Thing?
*

Group: Members
Posts: 7
Joined: 1-December 03
Member No.: 1,886



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
Go to the top of the page
 
+Quote Post
hughesjr
post Dec 2 2003, 12:10 AM
Post #10


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



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


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
jumpyg
post Dec 2 2003, 07:53 AM
Post #11


Whats this Lie-nix Thing?
*

Group: Members
Posts: 7
Joined: 1-December 03
Member No.: 1,886



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....
Go to the top of the page
 
+Quote Post
hughesjr
post Dec 2 2003, 08:17 AM
Post #12


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



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


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
jumpyg
post Dec 2 2003, 09:16 AM
Post #13


Whats this Lie-nix Thing?
*

Group: Members
Posts: 7
Joined: 1-December 03
Member No.: 1,886



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!
Go to the top of the page
 
+Quote Post
hughesjr
post Dec 2 2003, 03:21 PM
Post #14


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



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...


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 11th December 2017 - 05:44 PM