PDA

View Full Version : grub and secondary hdd



vhradice
29th October 2007, 09:57 PM
I am having a problem with a PCI IDE controller and grub. During hardware boot, both drives are listed as being on the controller. I was able to get Fedora 7 to recognize the secondary drive by adding an option to the initrd file (see bugzilla ticket 344231). I am trying to get grub to allow me to boot WIN ME from the secondary hdd, but I get ' drive not found' errors when I try to reference the secondary hdd (which is where WIN ME) is installed. I can boot ME but I have to physically switch the cables (both drives are plugged as Cable Select). Is there a way to pass parms to grub like pata_it821x_noraid=1?
Thanks

Seve
29th October 2007, 10:10 PM
Hello:
If you provide the following information, folks will be able to assist you.

su -

cat /boot/grub/grub.conf
and
fdisk -l

Seve

vhradice
29th October 2007, 10:40 PM
# 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 (hd0,1)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=2
timeout=15
splashimage=(hd0,1)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.22.9-91.fc7)
root (hd0,1)
kernel /vmlinuz-2.6.22.9-91.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.22.9-91.fc7.img
title Fedora (2.6.21-1.3194.fc7)
root (hd0,1)
kernel /vmlinuz-2.6.21-1.3194.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.21-1.3194.fc7.img
title Fedora VHR
root (hd0,1)
kernel /vmlinuz-2.6.22.9-91.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-vhr.img
title WIN ME
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd0,1)
chainloader +1
makeactive
boot

Note: The WINME configuration does not work. I guessed at it and tried things during the boot process but nothing I tried worked.


fdisk -l

Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1913 15366141 c W95 FAT32 (LBA)
/dev/sda2 1914 1926 104422+ 83 Linux
/dev/sda3 1927 24321 179887837+ 8e Linux LVM

Disk /dev/sdb: 40.0 GB, 40020664320 bytes
240 heads, 63 sectors/track, 5169 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 2574 19459408+ c W95 FAT32 (LBA)
/dev/sdb2 2575 5169 19618200 f W95 Ext'd (LBA)
/dev/sdb5 2575 5169 19618168+ b W95 FAT32

Also, when I try to reference the disk, I get the message
Error 21 Selected disk does not exist


Thanks.

stoat
29th October 2007, 11:52 PM
title WIN ME
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd0,1)
chainloader +1
makeactive
bootHello vhradice,

I can't tell from what you have said so far exactly which partition contains the Windows system, but it can't be what you have in the grub.conf now. The partition (hd0,1) is the partition the grub.conf is using for the Fedora boot partition. So from your fdisk, the Windows system is one of the following: (hd0,0), (hd1,0), or (hd1,4). It does no harm to just try each one.

P.S.: The makeactive line in your grub.conf is not needed for most modern operating systems. You can probably get rid of it. The boot line is never needed in the grub.conf for any OS. You can definitely remove it. And regarding the map lines, you only need them if the Windows system turns out to be on the second drive. If Windows is in (hd0,0), you should remove the two map lines.

P.P.S: I read where you said Windows is on the second drive. I'm guessing that Windows is in the active partition (hd1,0) and the Fedora grub.conf section for it could be...
title WIN ME
map (hd1) (hd0)
map (hd0) (hd1)
rootnoverify (hd1,0)
chainloader +1

vhradice
30th October 2007, 03:25 AM
Please ignore what is under the WINME title. It does not work. The problem I am having is that grub does not recognize the secondary hdd as being present. Please read this bugzilla ticket for Fedora -

https://bugzilla.redhat.com/show_bug.cgi?id=344231

This explains how I was able to get Fedora to recognize the secondary hdd. WIN ME is in the first partition on the secondary hdd. A command like (hd1,0) to grub should work. When I try it, I get an Error 21 selected disk does not exist. I was able to get Fedora to recognize the drive by recreating the initrd img file with the following line added

options pata_it821x noraid=1

Is there a way to modify grub stage 1.5 or 2 to add a parm like this?

vhradice
7th November 2007, 04:01 PM
Is grub unique to Fedora or is the same version used with other distros? I am asking this to see if using a different distro would treat the IDE controller differently and I could boot WIN ME and that distro using a bootloader program. Thanks

btw - there was an update to this thread that does not show up. It was from leigh123@linux. It suggested a different set of commands for WIN ME. It failed in the same way.

Error 21 the selected device does not exist

It is referring to hd1.

stoat
7th November 2007, 10:04 PM
GRUB (http://www.gnu.org/software/grub/) is not unique to Fedora. But there are other boot loaders for Linux such as LILO (http://www.tldp.org/HOWTO/LILO.html). You can also search this forum for "lilo", and you will find threads where other people who for some reason could not boot with GRUB, gave up, and used LILO. And since Windows ME is the last DOS-based Windows, maybe you could use loadlin (http://en.wikipedia.org/wiki/Loadlin). I used LILO a long time ago. I never have used loadlin.


I can boot ME but I have to physically switch the cables (both drives are plugged as Cable Select).Do you have to use cable select? Why not try setting the two drives as master and slave on a single cable, or two masters on two cables?

I'm just trying to think of things that may help. You can just ignore me if it's easier.

vhradice
7th November 2007, 10:22 PM
I need to have them on the same IDE channel. I have a cd and a dvd on the other channel. Also, the ITE controller says it won't handle optical drives.

I have been looking for other bootloaders ans it looks like there in a version 2 of grub available. I could not find an executable for it. So I may have to compile the code and see how that works. I was also looking at gujin, but it seems to have a similar problem.

I'll post here what I finally wind up doing.

Seve
7th November 2007, 11:00 PM
Hello:
Just wondering if you have tried to re-install grub with the --recheck option. This should do a probe for all the devices and may pick up the drive ?
It may be worth a whirl if you haven't already tried it.
http://www.gnu.org/software/grub/manual/grub.html#Invoking-grub_002dinstall

Seve

vhradice
8th November 2007, 03:15 AM
I'll try the reinstall with recheck.

Has anyone tried the new grub? It looks like it is version 1.95.

http://www.gnu.org/software/grub/grub-2.en.html