LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Get grub to boot from no raid SATA controller pci card (https://www.linuxquestions.org/questions/linux-software-2/get-grub-to-boot-from-no-raid-sata-controller-pci-card-501367/)

sparkbot 11-13-2006 11:46 PM

Get grub to boot from no raid SATA controller pci card
 
Hi-
I'm on SUSE 10.1 and I can't get grub to boot the HDD (/ = sda2(to suse--to grub sda1?)

Impossible to get back in (almost) after a boot. I have to boot to the 10.1 CD, abort install ,hammer the keyboard to produce error install screen that gives options to "boot installed system, choose /dev/sda2/--all is good). I have tried the repair options instead of the install with the 10.1 DVD in, changed grub options a million ways and usually after grub fails wwith:
grub>setup--stage 2(hd2,1) (hd2,1) device does not exist--Error 21"
Here is my fstab:
/dev/sda2 / reiserfs acl,user_xattr 1 1
/dev/sda3 /home reiserfs acl,user_xattr 1 2
/dev/sdd2 /windows/C vfat users,gid=users,umask=0002,utf8=true 0 0
/dev/hdb5 /windows/D vfat users,gid=users,umask=0002,utf8=true 0 0
/dev/hdb6 /windows/E ntfs ro,users,gid=users,umask=0002,nls=utf8 0 0
/dev/hde5 /windows/F vfat users,gid=users,umask=0002,utf8=true 0 0
/dev/hde6 /windows/G vfat users,gid=users,umask=0002,utf8=true 0 0
/dev/hda1 swap swap defaults 0 0
/dev/hdb2 swap swap defaults 0 0
/dev/sda1 swap swap defaults 0 0
/dev/sdb1 swap swap defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
/dev/fd0 /media/floppy auto noauto,user,sync 0 0
/dev/hda2 /data1 auto noauto,user 0 0
/dev/hda3 /data1 auto noauto,user 0 0
/dev/sdb2 /data1 auto noauto,user 0 0
-------------------------------------------------
and devicce map from Grub:
(hd5) /dev/sdd
(hd1) /dev/hdb
(fd0) /dev/fd0
(hd2) /dev/sda
(hd4) /dev/hde
(hd3) /dev/sdb
(hd0) /dev/hda
------------------------------------------------------------
The windows partitions are just data,and an ipod is detcted (sdd2 --windows/C) this is a single boot to suse. Here is the Grub menu:
# Modifie
root (hd1,1)
kernel /boot/vmlinuz root=/dev/sda2 vga=normal showopts ide=nodma apm=off acpi=off noresume nosmp noapic maxcpus=0 edd=off 3
initrd /boot/initrd
d by YaST2. Last modification on Wed Nov 8 17:25:19 MST 2006
color white/blue black/light-gray
default 0
timeout 8
gfxmenu (hd1,1)/boot/message

###Don't change this comment - YaST2 identifier: Original name: linux###
title SUSE Linux 10.1
root (hd1,1)
kernel /boot/vmlinuz root=/dev/sda2 vga=0x317 resume=/dev/sda1 splash=silent showopts
initrd /boot/initrd

###Don't change this comment - YaST2 identifier: Original name: floppy###
title Floppy
chainloader (fd0)+1

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- SUSE Linux 10.1
-----------------------------------------------------------------------------
Any help is really appreciated. I tried the reboot after I did an install of ATI drivers. The boot probleem has been ongoing since initial install -- (grub failed on first boot after install with the "device not found" Error 17)

geoff_f 11-15-2006 11:11 PM

Your grub menu.lst file seems to have been corrupted. The second, third and fourth lines seem to have been transposed from where they should exist under the 'Failsafe' menu option. Another error exists in your menu.lst listing, where it says:
root (hd1,1)
This is telling grub where to find the /boot/grub directory, whose files it needs for the boot process. In your case, (hd1,1) is pointing to hdb2, which, from your fstab file, is a swap partition. Grub is not able to find its files, so the boot fails. Change the lines using that setting to:
root (hd2,1)
and grub should find its files on /dev/sda2, and the boot should succeed. This assumes that you don't have a separate boot partition, and /boot/grub is part of your / partition on sda2 (your fstab file suggests that this is the case). You shouldn't need to worry about using the 'grub' command line, just edit /boot/grub/menu.lst in a text editor, save it, then reboot.

This is how your menu.lst should look after you fix the transposed lines and edit the boot directory location:

------------------------------
# Modified by YaST2. Last modification on Wed Nov 8 17:25:19 MST 2006

color white/blue black/light-gray
default 0
timeout 8
gfxmenu (hd2,1)/boot/message

###Don't change this comment - YaST2 identifier: Original name: linux###
title SUSE Linux 10.1
root (hd2,1)
kernel /boot/vmlinuz root=/dev/sda2 vga=0x317 resume=/dev/sda1 splash=silent showopts
initrd /boot/initrd

###Don't change this comment - YaST2 identifier: Original name: floppy###
title Floppy
chainloader (fd0)+1

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- SUSE Linux 10.1
root (hd2,1)
kernel /boot/vmlinuz root=/dev/sda2 vga=normal showopts ide=nodma apm=off acpi=off noresume nosmp noapic maxcpus=0 edd=off 3
initrd /boot/initrd
------------------------------

Also, may I congratulate you on a very good post - all relevant information was included, which made troubleshooting much easier!

sparkbot 11-16-2006 01:23 AM

Thank you. I will make the corrections to the menu and see what happens. I previously had no way back into suse if grub failed, even the repair option from the DVD install just kept failing, over and over--each time waiting to get to the screen to invoke the repair taking forever, only to have grub fail. I have a way back in now without using the grub loader using a "super grub" boot cd that seems to find things ( grub on / ) quickly and boot, but i won't be happy till I get grub to work properly. Thanks again.

sparkbot 11-16-2006 11:57 PM

Well, no go after the suggested changes. Grub gave the same old Error 17 ( which I looked up and is the "device not found--device does not exist" error that alot of posts on fake raid in linux mention).

I have no option on the motherboard to boot from this sata card. It is the 3rd disk ( 2 IDE disk come first in the bios. I have a bios option to "boot from scsi" which it did when I had the drives set up in fake raid for windows. When I switched to suse 10, it was a problem as fake raid, so before I went to suse 10.1, I got rid of the raid volumes, turned the controller to set the drives as JBOD so I could use them easily. Or so I thought.

So i use the super grub boot disk program to boot, and it has no problems finding the grub install on the root of the 3rd disk and booting it. The installed grub doesn't though.

When i am inside the grub program on cd, it has an option to boot first partition of the disk grub is installed on, if grub is installed on root and not a seperate partition. In that program (hd2,1) is listed as: HDC2 sdc2 hd2s2. If I tell the grub disk to boot there--boom,suse 10.1 starts right up. So I thought try changing the menu from sda2 to sdc2(didn't make that change is fstab though). I got the same error 17 I got after I changed it to sda2. I went to the install dvd, got into the repair consol, tried to change to LILO and entered sda2 as location for root--LILIO also said device does not exist and wondn't install.

So to make it short, I still have no working boot loader.

geoff_f 11-17-2006 01:56 AM

Sorry, I missed the fact that your SATA drive is attached to a PCI card. Both grub and lilo are absolutely correct that the device does not exist, or at least, not at that point in the boot process. Let me explain. At the time of the BIOS handing the boot process to grub, the only disk devices known to it are the ones directly connected to the motherboard. Those plugged in to the SATA PCI card won't be seen, as the driver for the PCI card hasn't yet been loaded; this comes later in the boot process. So your only option is to install grub to one of the IDE-connected drives, either hda or hdb. From your statement:
Quote:

The windows partitions are just data
I will presume that you are not dual-booting with Windows. That being the case, it should be safe to install grub on hda. To do this, use the YaST2 Control Center (Menu-> System-> Control Center (YaST)). In the Control Center, select System-> Boot Loader. Go to the Boot Loader Installation tab. In the Boot Loader Location box, select Master Boot Record of /dev/hda, then click the Finish button at the bottom right of the window. This should configure grub correctly on a device that the BIOS can see at boot time, and your newly configured menu.lst file should work.

If you do use Windows in a dual-boot situation, you would need to include these lines in your menu.lst file, between the SUSE Linux 10.1 and Floppy entries:
###Don't change this comment - YaST2 identifier: Original name: windows###
title Windows
chainloader (hd0,0)+1
(presuming Windows is installed to hda). Do this before making the changes in YaST2 Control Center. Once these changes have been made, reboot, and you should be greeted with the SUSE boot screen.

sparkbot 11-17-2006 04:46 PM

Thank you. You explained why it wasn't working perfectly. For some reason yast was taking forever to open up the system, boot loader consol--so I booted to the repair consol on the 10.1 DVD and made the changes from there.

I installed grub to the MBR of hda (yes this is a single boot--no windows OS -- only storage on the ntfs and fat partitions} -- and it booted right into suse.

All is well--I will back up my system now that it is right. Thank you again for your time.

geoff_f 11-17-2006 05:40 PM

You're welcome - I'm glad to be of help.


All times are GMT -5. The time now is 06:57 PM.