[opensuse] Grub troubles
![](https://seccdn.libravatar.org/avatar/080c20b8e2988808e40728418eda09ca.jpg?s=120&d=mm&r=g)
I'm pretty sure this is not SuSE specific but I'm sticking with Suse for this machine. (fedora and Ubuntu also failed) The install is to 2 IDE drives with SuSE being on the second drive /dev/sdb1 is mounted on /boot I am using lvm for the other partitions I finish the install and I get a grub error 2 when it reboots (Bad file or directory type) If I tell the BIOS to boot from the other hard drive I get a grub error 17 (Cannot mount selected partition) If I boot from the install CD I get a error 2 again. It does not get far enough to give ne the grub menu or prompt. the output from cat /boot/grub/menu.lst and fdisk -l follow fdisk -l ******** Disk /dev/sda: 20.5 GB, 20560412672 bytes 255 heads, 63 sectors/track, 2499 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x0b0e0b0d Device Boot Start End Blocks Id System /dev/sda1 * 1 1061 8514450 7 HPFS/NTFS /dev/sda2 1062 2499 11550735 c W95 FAT32 (LBA) Disk /dev/sdb: 120.0 GB, 120034123776 bytes 255 heads, 63 sectors/track, 14593 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x0b730b72 Device Boot Start End Blocks Id System /dev/sdb1 2 26 200812+ 83 Linux /dev/sdb2 27 14593 117009427+ 8e Linux LVM Disk /dev/dm-0: 42.9 GB, 42949672960 bytes 255 heads, 63 sectors/track, 5221 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000000 Disk /dev/dm-1: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000000 Disk /dev/dm-2: 1073 MB, 1073741824 bytes 255 heads, 63 sectors/track, 130 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000000 Disk /dev/dm-3: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000000 Disk /dev/dm-4: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000000 cat /boot/grub/menu.lst *************************** # Modified by YaST2. Last modification on Fri Jan 8 17:24:54 UTC 2010 default 0 timeout 8 gfxmenu (hd1,0)/message ##YaST - activate ###Don't change this comment - YaST2 identifier: Original name: linux### title openSUSE 11.1 - 2.6.27.7-9 root (hd1,0) kernel /vmlinuz-2.6.27.7-9-pae root=/dev/SuSE/root resume=/dev/SuSE/swap splash=silent showopts vga=0x31a initrd /initrd-2.6.27.7-9-pae ###Don't change this comment - YaST2 identifier: Original name: failsafe### title Failsafe -- openSUSE 11.1 - 2.6.27.7-9 root (hd1,0) kernel /vmlinuz-2.6.27.7-9-pae root=/dev/SuSE/root showopts ide=nodma apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 x11failsafe vga=0x31a initrd /initrd-2.6.27.7-9-pae ###Don't change this comment - YaST2 identifier: Original name: windows### title Windows rootnoverify (hd0,0) chainloader +1 -- Collector of vintage computers http://www.ncf.ca/~ba600 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/27aacf61a13c66fcc083fcf8a84823bc.jpg?s=120&d=mm&r=g)
On 01/12/2010 08:48 AM, Mike wrote:
I'm pretty sure this is not SuSE specific but I'm sticking with Suse for this machine. (fedora and Ubuntu also failed)
The install is to 2 IDE drives with SuSE being on the second drive /dev/sdb1 is mounted on /boot I am using lvm for the other partitions
I finish the install and I get a grub error 2 when it reboots (Bad file or directory type)
If I tell the BIOS to boot from the other hard drive I get a grub error 17 (Cannot mount selected partition)
If I boot from the install CD I get a error 2 again.
It does not get far enough to give ne the grub menu or prompt.
the output from cat /boot/grub/menu.lst and fdisk -l follow
<snip>
cat /boot/grub/menu.lst ***************************
# Modified by YaST2. Last modification on Fri Jan 8 17:24:54 UTC 2010 default 0 timeout 8 gfxmenu (hd1,0)/message ##YaST - activate
###Don't change this comment - YaST2 identifier: Original name: linux### title openSUSE 11.1 - 2.6.27.7-9 root (hd1,0) kernel /vmlinuz-2.6.27.7-9-pae root=/dev/SuSE/root resume=/dev/SuSE/swap splash=silent showopts vga=0x31a initrd /initrd-2.6.27.7-9-pae
###Don't change this comment - YaST2 identifier: Original name: failsafe### title Failsafe -- openSUSE 11.1 - 2.6.27.7-9 root (hd1,0) kernel /vmlinuz-2.6.27.7-9-pae root=/dev/SuSE/root showopts ide=nodma apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 x11failsafe vga=0x31a initrd /initrd-2.6.27.7-9-pae
###Don't change this comment - YaST2 identifier: Original name: windows### title Windows rootnoverify (hd0,0) chainloader +1
Your grub errors are normal and just reflect an incorrect /boot/grub/menu.lst and/or incorrect /boot/grub/device.map 2 : "Selected disk doesn't exist" This error is returned if the device part of a device- or full filename refers to a disk or BIOS device that is not present or not recognized by the BIOS in the system. 17 : "Invalid device requested" This error is returned if a device string is recognizable but does not fall under the other device errors. Both mean grub can't find the right place to boot from. Also, from your fdisk listing it looks like your are trying to run a dmraid setup -- which is fine, but you just need to get your config right. The setup is the same regardless of whether dmraid or normal disks are used. The first thing you need to get right is your /boot/grub/device.map file. If you are using dmraid, you must define your grub (hd0), (hd1), ... as the "disk arrays" in your system. grub will need to have some way of mapping its hdX setting to your disks. For a dmraid setup, your device.map will look something like this: 02:32 archangel:~> sudo cat /boot/grub/device.map (hd0) /dev/mapper/nvidia_fdaacfde (hd1) /dev/mapper/nvidia_ecaejfdi (fd0) /dev/fd0 You can also use the /dev/dm-X specification instead of the /dev/mapper/... specification. Also, you need to know whether you are using a separate /boot partition or not. You are currently setup to use a separate boot partition with: kernel /vmlinuz-2.6.27.7-9-pae NOTE: there is no path before /vmlinuz-2.6.27.7-9-pae. If you do NOT have a separate boot partition, you will need to add /boot before BOTH the /vmlinuz... and /initrd. Like "/boot/vmlinuz-2.6.27.7-9-pae", etc.. Next go read: http://wiki.archlinux.org/index.php/Installing_with_Fake_RAID, under the section "Install GRUB" it will get you going. (ignore the Arch specific stuff and use the mount commands below instead of those on the arch page). The outline of what you will be doing is to: (1) boot from the suse install disk and then choose "Rescue" and go to the command line; (2) you will chroot your installed system under /mnt (as root) with: # mount /dev/(your root partition) /mnt # mount /dev/(your home partition) /mnt/home # mount /dev/(your boot partition, if any) /mnt/boot # mount -o bind /dev /mnt/dev # mount -o bind /proc /mnt/proc # mount -o bind /sysfs /mnt/sys # cd /mnt # chroot /mnt (3) install grub # grub (just type grub as root) If you are not sure which partition actually holds 'grub root -> boot' directory, use the grub command 'find' to locate it: grub> find /boot/grub/stage1 This will search for the file name '/boot/grub/stage1' and show the device that contains the file. To setup the root device correctly, run the setup command: grub> setup (hd0) Checking if "/boot/grub/stage1" exists....... no Checking if "/grub/stage1" exists....... yes Checking if "/grub/stage2" exists....... yes Checking if "/grub/e2fs_stage1_5" exists....... yes Running "embed /grub/e2fs_stage1_5 (hd0)"....... 15 sectors are embedded succeded Running "install /grub/stage1 (hd0) (hd0) 1+15 p (hd0,2)/grub/stage2 /grub/grub.conf....... succeded Done ** if nothing is found -> you have issues.... NOTE: where grub/stage1 was found! This will help when you setup your menu.lst file. If it is /boot/grub/stage1 then you WILL need the /boot path prefix to the /vmlinuz and /initrd. If it is /grub/stage1 then you will NOT need /boot in front of /vmlinuz and /initrd The setup command will install GRUB in the Master Boot Record (MBR) of the drive. GRUB is now in the MBR, just type quit grub> quit Now just go setup your menu.lst file with the correct information. Here is an example of my device.map and menu.lst for a dmraid setup: device.map: (hd0) /dev/mapper/nvidia_hacfgfda (fd0) /dev/fd0 menu.lst: # Modified by YaST2. Last modification on Tue Aug 25 02:55:10 CDT 2009 default 0 timeout 6 gfxmenu (hd0,4)/message ##YaST - activate ###Don't change this comment - YaST2 identifier: Original name: linux### title openSUSE 10.3 - 2.6.22.19-0.4 root (hd0,4) kernel /vmlinuz-2.6.22.19-0.4-default root=/dev/mapper/nvidia_hacfgfda_part7 vga=0x31a resume=/dev/mapper/nvidia_hacfgfda_part6 splash=0 showopts initrd /initrd-2.6.22.19-0.4-default ###Don't change this comment - YaST2 identifier: Original name: failsafe### title Failsafe -- openSUSE 10.3 - 2.6.22.19-0.4 root (hd0,4) kernel /vmlinuz-2.6.22.19-0.4-default root=/dev/mapper/nvidia_hacfgfda_part7 vga=normal showopts ide=nodma apm=off acpi=off noresume edd=off 3 initrd /initrd-2.6.22.19-0.4-default ###Don't change this comment - YaST2 identifier: Original name: linux### title Memory Test (memtest86+) -- openSUSE 10.3 - Memory Test (memtest86+) kernel (hd0,4)/memtest.bin root=/dev/mapper/nvidia_hacfgfda_part7 vga=0x31a resume=/dev/mapper/nvidia_hacfgfda_part6 splash=0 showopts ###Don't change this comment - YaST2 identifier: Original name: floppy### title Floppy rootnoverify (hd0,4) chainloader (fd0)+1 Here is the same box with a normal sda/sdb setup: device.map: (hd0) /dev/sda (hd1) /dev/sdb (fd0) /dev/fd0 menu.lst # Modified by YaST2. Last modification on Tue Aug 25 02:55:10 CDT 2009 default 0 timeout 6 gfxmenu (hd0,4)/message ##YaST - activate ###Don't change this comment - YaST2 identifier: Original name: linux### title openSUSE 10.3 - 2.6.22.19-0.4 root (hd0,4) kernel /vmlinuz-2.6.22.19-0.4-default root=/dev/sdb7 vga=0x31a resume=/dev/sdb6 splash=0 showopts initrd /initrd-2.6.22.19-0.4-default ###Don't change this comment - YaST2 identifier: Original name: failsafe### title Failsafe -- openSUSE 10.3 - 2.6.22.19-0.4 root (hd0,4) kernel /vmlinuz-2.6.22.19-0.4-default root=/dev/sdb7 vga=normal showopts ide=nodma apm=off acpi=off noresume edd=off 3 initrd /initrd-2.6.22.19-0.4-default ###Don't change this comment - YaST2 identifier: Original name: linux### title Memory Test (memtest86+) -- openSUSE 10.3 - Memory Test (memtest86+) kernel (hd0,4)/memtest.bin root=/dev/sdb7 vga=0x31a resume=/dev/sdb6 splash=0 showopts ###Don't change this comment - YaST2 identifier: Original name: floppy### title Floppy rootnoverify (hd0,4) chainloader (fd0)+1 If you are still stuck, then post back here and we'll get you going. (P.S. - these damn things always turn out longer than you expect them to going in...) -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/080c20b8e2988808e40728418eda09ca.jpg?s=120&d=mm&r=g)
I'm pretty sure this is not SuSE specific but I'm sticking with Suse for
On 01/12/2010 08:48 AM, Mike wrote: this
machine. (fedora and Ubuntu also failed)
The install is to 2 IDE drives with SuSE being on the second drive /dev/sdb1 is mounted on /boot I am using lvm for the other partitions
I finish the install and I get a grub error 2 when it reboots (Bad file or directory type)
If I tell the BIOS to boot from the other hard drive I get a grub error 17 (Cannot mount selected partition)
If I boot from the install CD I get a error 2 again.
It does not get far enough to give me the grub menu or prompt.
the output from cat /boot/grub/menu.lst and fdisk -l follow
<snip>
Your grub errors are normal and just reflect an incorrect /boot/grub/menu.lst and/or incorrect /boot/grub/device.map
My big surprise was that installers for SuSE, Fedora and Ubuntu couldn't handle this configuration during the install
Also, from your fdisk listing it looks like your are trying to run a dmraid setup -- which is fine, but you just need to get your config right.
I just chose to use LVM for all the partitions other than /boot which I kept as a separate partition After the automatic repair failed to fix it My initial resolution was to just pull the XP drive. Once that was working I was able to add it back into the mix. I suspect that I now have grub on the MBR of both drives, but it is working and the machine will be reformatted soon enough since it is a lab machine. -- Collector of vintage computers http://www.ncf.ca/~ba600 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (2)
-
David C. Rankin
-
Mike