PDA

View Full Version : Grub won't load after 3rd hard drive installed



optV
27th June 2006, 04:08 AM
Heres my delimma:

I've currently got a perfectly working FC5/winXP dual boot machine (on two separate SATA drives). After installing a 3rd Hard Drive (The third is IDE) the computer freezes just before loading grub. The word GRUB is displayed after POST indefinately. If I disconnect the IDE Drive after shutting it down, then everything loads fine.

Heres some more details:

C: (SATA-windowsXP) Grub is loaded into MBR
D: (SATA- 1st partition is NTFS/ 2nd partition is FC5)

Primary IDE (dvd burner)
Secondary IDE (this is where I would like the new HD)


How can I get grub to load with the new HD installed. I'm planning on doing a triple boot system. Thanks -Dan

Seve
27th June 2006, 04:21 AM
Hello:
Check your BIOS to make sure that the drive order in the Boot process has not changed.
Seve

optV
27th June 2006, 05:36 AM
Thanks, that was the first thing I checked. Any other suggestions?

BTW Here's some more details:

MB chipset: Nforce4

boot order: SATA1-->SATA2-->IDE2-->Removable device


The word grub just comes up with a flashing curser after POST.

Omega Blue
27th June 2006, 05:54 AM
Check the settings on your HDD.

It could be a problem with your mobo.

optV
27th June 2006, 07:37 AM
Check the settings on your HDD.

It could be a problem with your mobo.

Thanks for the suggestion,

I tried both cable select as well as master. The IDE port seems to work fine, my cdrom drive works fine on both IDE ports. Before I installed linux and grub, i could use IDE hard drives with no problem. I've tried two separate IDE hard drives now and same problem with both.

I'm not sure what could be wrong with the MB, I was just thinking that grub might be confused by the new HD.

Any other suggestions?

Jongi
27th June 2006, 09:30 AM
How big is this new HD? I once had a grub issue when I installed a 250GB HD. What I had to do was to change the section in the BIOS that has the options (Auto, LBA, CHS and Large) from Auto to Large. I can't remember whether I was using the 250GB as the boot drive at the time so this solution might not be helpful to you.

Seve
27th June 2006, 09:33 AM
Hello:
A couple of thoughts :)
I doubt it is your mother board (IMO) what you could do is check to make sure you have the latest BIOS.

It could be as simple as checking the configuration of your new HD to make sure it is set to the same DMA level as your optical drive. Likely level 11? Since they are both on the same controller FC5 or grub may not like it for whatever reason..dunno for sure, but worth a shot? I guess you could test it by disconnecting the optical drive and try booting to see what if anything changes?

Is it possible to only have one drive set to boot from and disable the rest (from the boot order section of your BIOS only) and see if that helps?
If not, I would think booting from your FC5 disc and doing the linux rescue .. chroot /mnt/sysimage thing and type fdisk -l and have a look at what FC5 sees in relation to what your /etc/grub.conf contains. Perhaps, the addition of a new drive has changed the order (i.e hdX,X) in relation to what your grub.conf contains?

If that doesn't work or leads nowhere, you could always re-install grub with the new drive attached?
Seve

optV
27th June 2006, 09:53 AM
Jongi: My drive is 160GB, but I also tested a 30GB, both formatted. Changing mode to LARGE did not work.

Seve: I disconnected my optical drive and tried both IDE connections, nada :(

I was considering booting to my linux drive with the IDE connected, but I was concerned about messing up the drive order and have grub not match up when I reconnect the drive with grub.

I guess I'm just paranoid, but Grub seems so sensitive and I really wish it wasn't installed on my XP drive, I've heard many stories of people losing their windows installation because of grub.

Seve
27th June 2006, 10:04 AM
Hello:
I understand your concern but I don't think grub will ruin your windows installation. Usually it's just user error (me included).
I would connect your hardware the way you want and then boot from the FC5 disc and have a look-see at what fdisk -l is?
BTW do you have SELinux enabled?
Seve

Omega Blue
27th June 2006, 10:19 AM
Don't forget to set your 3rd HDD to slave...

optV
27th June 2006, 05:04 PM
Seve: SELinux is disabled (I was having issues with the ati driver for my x850 until I turned it off)

Omega Blue The IDE Hard drive has its own IDE channel (the secondary one) so why should it be slave? Either way its worth a try. I'll get back to you guys

Thanks again for the replies.

optV
28th June 2006, 04:01 AM
ok here's my fdisk -l in linux rescue with all 3 drives attached:


Disk /dev/hdc: 120GB (this is the IDE drive)
/dev/hdc1 w95 fat32 (this partition was an HP rescue partition)
/dev/hdc2 HPFS/NTFS (this was an old winXP installation)

Disk /dev/sda: 80GB (this is my XP hard drive on SATA1)
/dev/sda1 HPFS/NTFS

Disk /dev/sdb: 320GB (heres my sata2 with some room for XP and my fc5 installation)
/dev/sdb1 HPFS/NTFS (some room for XP)
/dev/sdb2 w95 Ext'd (LBA)
/dev/sdb5 Linux
/dev/sdb6 Linux swap

and here's my grub.conf:


default=1
timeout=5
splashimage=(hd1,4)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.16-1.2122_FC5)
root (hd1,4)
kernel /boot/vmlinuz-2.6.16-1.2122_FC5 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.16-1.2122_FC5.img
title XP
rootnoverify (hd0,0)
chainloader +1


I'm fairly new to linux, but correct me if im wrong: is the IDE drive is assuming the place of the SATA2 drive as the second drive and pushing the linux drive to 3?

Seve
28th June 2006, 04:51 AM
Hello:
Based on what you have posted FC5 is seeing all your discs just fine.

title Fedora Core (2.6.16-1.2122_FC5)
root (hd1,4)
kernel /boot/vmlinuz-2.6.16-1.2122_FC5 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.16-1.2122_FC5.img
Should not your root (hd1,4) actually be root (hd1,2)

/dev/sdb1 HPFS/NTFS (some room for XP) =(hd1,0)
/dev/sdb2 w95 Ext'd (LBA) = (hd1,1)
/dev/sdb5 Linux = (hd1,2)
/dev/sdb6 Linux swap = (hd1,3)

You might want to change it and see if it works? It should unless, I am mis-reading something (which is quite possible)
If that does not help, then assuming that you are still booting from your /dev/sda [Win] as your Number 1 Boot Device, you should be able to boot into linux rescue and chroot /mnt/sysimage and re-install grub.
grub-install --recheck /dev/sda
exit and reboot and you should be go to go.
Seve

optV
28th June 2006, 05:25 AM
Thanks for the suggestion. I tried changing both 1,4s to 1,2s and same thing, the word grub frozen.

Out of curiosity I rechecked fdisk -l in linux rescue without the IDE drive plugged in everything is the same. 1,4 boots linux perfectly and grub comes up every time.

After reading the redhat docs on grub:

Suppose a system has more than one hard drive. The first hard drive of the system is called (hd0) by GRUB. The first partition on that drive is called (hd0,0), and the fifth partition on the second hard drive is called (hd1,4). In general, the naming convention for file systems when using GRUB breaks down in this way:

So would I be correct in assuming the following:

Disk /dev/hdc: 120GB (this is the IDE drive)
/dev/hdc1 (freshly fdisked to 1 partition)=(?,0)

Disk /dev/sda: 80GB (this is my XP hard drive on SATA1)
/dev/sda1 HPFS/NTFS=(0,0)

Disk /dev/sdb: 320GB (heres my sata2 with some room for XP and my fc5 installation)
/dev/sdb1 HPFS/NTFS (some room for XP)=(1,0)
/dev/sdb2 w95 Ext'd (LBA)=(1,1)
(/dev/sdb2 and 3 are missing??? perhaps CDROM drive?)(1,2 and 1,3)
/dev/sdb5 Linux==(1,4)
/dev/sdb6 Linux swap=(1,5)

Perhaps the /dev/hdc is (3,0) or maby it assumed the drive (0,0) spot and moved everything down a drive. Any ideas?

Seve
28th June 2006, 07:58 AM
Thanks for the suggestion. I tried changing both 1,4s to 1,2s and same thing, the word grub frozen.

Out of curiosity I rechecked fdisk -l in linux rescue without the IDE drive plugged in everything is the same. 1,4 boots linux perfectly and grub comes up every time.

After reading the redhat docs on grub:


So would I be correct in assuming the following:

Disk /dev/hdc: 120GB (this is the IDE drive)
/dev/hdc1 (freshly fdisked to 1 partition)=(?,0)

Disk /dev/sda: 80GB (this is my XP hard drive on SATA1)
/dev/sda1 HPFS/NTFS=(0,0)

Disk /dev/sdb: 320GB (heres my sata2 with some room for XP and my fc5 installation)
/dev/sdb1 HPFS/NTFS (some room for XP)=(1,0)
/dev/sdb2 w95 Ext'd (LBA)=(1,1)
(/dev/sdb2 and 3 are missing??? perhaps CDROM drive?)(1,2 and 1,3)
/dev/sdb5 Linux==(1,4)
/dev/sdb6 Linux swap=(1,5)

Perhaps the /dev/hdc is (3,0) or maby it assumed the drive (0,0) spot and moved everything down a drive. Any ideas?
Hello;
You could be correct in your logic. If you do the grub-install --recheck /dev/sda
part of the output will list the order and which drive is (hd,0) etc. [see below ..]
Or you can try changing the

title Fedora Core (2.6.16-1.2122_FC5)
root (hd1,4)
kernel /boot/vmlinuz-2.6.16-1.2122_FC5 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.16-1.2122_FC5.img to
(hd2,4) and give it a try if your don't want to re-install grub right away.
Just make sure the default boot disc is set correctly in your BIOS
Just realized that I forgot to add something that may help you sort this out. If you open a terminal and login as root then type cat /boot/grub/device.map
The output will something like this:

# cat /boot/grub/device.map
(fd0) /dev/fd0
(hd0) /dev/hdc
(hd1) /dev/sda
(hd2) /dev/sdb
(hd3) /dev/sdc
This will directly correspond to what you have in your grub.conf and you can compare it to your fdisk -l output.
You could also do this from the linux rescue mode with all your drives attached so you will be able to sort out how things have changed. Likely, as you said everything has move by one.
hth

Seve

optV
28th June 2006, 08:53 AM
Seve

I'm very grateful that you are putting so much time into my problem. Its people like you that show the true power of linux: community. However, I'm still stuck. Here's what I've tried:

1. Changed from (1,4) to (2,4) in grub.conf (including the splash reference)
2. Also tried (1,2)
3. Did the cat /boot/grub/device.map and got the following:


hd0 /dev/sda
hd1 /dev/sdb
(No mention of hdc)

Here are two observations that may be helpful:
1. In fdisk -l there is an asterick checked in the Boot section for the IDE drive as well as my default (0,0) windows XP drive. I'm not exactly sure why this would be, but maybe there is a conflict there. The IDE drive has been freshly formatted to a single partition fat32 drive

2. the IDE drive is recognized as Hdc instead of Sdc. I'm not sure why, and searching only seemed to turn up people having issues with SATA drives being recognized as hda instead of sda. The problem with the sata drives were eityher bios problems or dma conflicts.

I have triple checked the bios settings: removable--->cdrom--->harddrive
there is also a hard drive subsection: Sata0 (win xp)---->sata1 (storage/linux)---->IDE2 (problem drive)--->removable

I'm pretty stumped but not ready to give up. I really would like to save the grub reinstall for a last resort in case I ever need to remove this IDE drive.

Any other ideas :)

Seve
28th June 2006, 09:35 AM
Hello:
The IDE drive is /dev/hdc [h=ATA drive] /dev/sda [s=SATA or SCSi]
Is this with or with-out all your drives attached?

hd0 /dev/sda
hd1 /dev/sdb
(No mention of hdc)
Did you check that you have the latest BIOS for your motherboard?
If you already have then I am out of ideas at the moment...should be sleeping. :)
IMO I would just re-install grub as described above. Unless someone else can chime in with some other ideas?

Seve

optV
28th June 2006, 09:37 AM
that cat result is WITH all my drives attached oddly enough. I will check my bios version and also get some sleep. Thanks for the help -Dan

jim
28th June 2006, 10:01 AM
maybe a oddball thing here butt did you try running kudzu to have it detect the new hardware ?


or setting the new drive to CS cable select ?

Seve
28th June 2006, 06:24 PM
that cat result is WITH all my drives attached oddly enough. I will check my bios version and also get some sleep. Thanks for the help -Dan
Hello:
Just a thought, from linux rescue why don't your edit your /boot/grub/device.map
and add the new drive.

(hd0) /dev/hdc
(hd1) /dev/sda
(hd2) /dev/sdb

reboot with all your hardware attached and see what happens?
On the other hand
maybe a oddball thing here butt did you try running kudzu to have it detect the new hardware ?


or setting the new drive to CS cable select ? may have the ticket as well?
Give both a whirl and see what happens. :)
Seve

optV
29th June 2006, 01:30 AM
Ok, still stuck here's what I've tried:

With the IDE drive connected:

Changed the /boot/grub/device.map to the example above, then changed the grub.conf to (2,4) and same problem.

I ran kudzu and rechecked the device.map and no change.

I've been using cable select, I've also tried master and slave for kicks. Nada. :(

optV
13th July 2006, 07:05 AM
It's been about 20 days now so I figured I'd --BUMP--

please let me know if you have any suggestions. I've updated my bios to the latest BTW and same deal.

Omega Blue
14th July 2006, 05:00 AM
Could the BIOS see your new HDD? Try going into BIOS and take a look.

optV
14th July 2006, 09:25 AM
Yes the bios recognizes the drive just fine, I've tried large, lba and auto also and nada.

I've also recently tried grub --device-map=/boot/grub/device.map to reconfigure the device map and it detected the new drive and changed the device map. However I've tried every combiniation with grub.conf and even tried to manually alter the device.map many times with no luck.

Omega Blue
14th July 2006, 11:02 AM
Okay, try boot from the disc 1 and reinstall GRUB...