Can't get Grub working openSUSE 11.3 64-bit with Windows 7 Ultimate 64-bit

First and foremost, I’ve been an avid Windows user my entire life and know very little to nothing about Linux, hence the reason for the install. I was told by a bud that openSUSE would be a good start, so I decided to just jump right in. Downloaded and got the .iso loaded up on my thumb drive without a problem. Ran through the install without, what I thought, a hitch. Rebooted and the computer booted straight into Windows. I read through a few articles about trying to repair Grub using GParted and I gave it a shot. First went through (what I believe) is the process of reinstalling Grub and then tried changing the boot flags around to (again, what I thought) was the right order, all to no avail. I managed to get the boot flags straightened back out and booted back into Windows, but I’m pretty much at square one.

For the background on my setup. I’ve got two 500 Gb Western Digital drive’s installed, one with Windows and the other as a media drive. I added a 150 Gb Samsung drive to be dedicated to the Linux install. I did a fresh format to NTFS from within Windows after slapping the drive in and left it for a few days. Tonight I tried out the install and selected the option that allowed me to use the entire Samsung drive without messing with the two 500 Gb drives with the Windows partitions; it did say during the install that it was setting the mount on the three Windows partitions (System Reserved, main OS drive, and media).

I’m pretty much lost. I can usually work my way through with a little push in the right way. If someone could add in and explain some of the stuff I’ll be asked to do that would really help. I’ve figured out through the years that knowing what to do and knowing why you do it are two very different things. Unfortunately, as I said before, I’m a complete noob at this so I wouldn’t even know what other information to provide up-front other than what I’ve already given. Thanks for everyone’s time that decides to give me a hand and hope to repay the favor in some way down the road.

Regards.

If you’re not able to boot Linux installed on your hard disk yet, please boot from live CD, open a terminal, type
fdisk -l
and post the ouput here.

  • it is a lowercase l

Here we go:

root@PartedMagic:~# fdisk -l

Disk /dev/hdd: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x7e077e07

   Device Boot      Start         End      Blocks   Id  System
/dev/hdd1               1         262     2103296   82  Linux swap
Partition 1 does not end on cylinder boundary.
/dev/hdd2             262        2873    20972544   83  Linux
/dev/hdd3            2873       19458   133213184   83  Linux

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd108b089

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       60801   488382464    7  HPFS/NTFS

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x5d0d0c5a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          13      102400    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sdb2              13       60802   488282112    7  HPFS/NTFS

Disk /dev/sdd: 7998 MB, 7998537728 bytes
64 heads, 32 sectors/track, 7628 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0xd1476021

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *           1         681      697344   83  Linux
/dev/sdd2             682        7628     7113728   83  Linux

Disk /dev/sdd1: 714 MB, 714080256 bytes
64 heads, 32 sectors/track, 681 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0xd1476021

     Device Boot      Start         End      Blocks   Id  System
/dev/sdd1p1   *           1         681      697344   83  Linux
/dev/sdd1p2             682        7628     7113728   83  Linux
Partition 2 has different physical/logical endings:
     phys=(1023, 63, 32) logical=(7627, 63, 32)

Forgot to add that sdd is my thumb drive.

OK. I see 3 harddisks. Right?
It is unclear to me why your 160.0 GB is called hdd. Or more exactly why it is using the old pata driver (which gives it the name hdX rather than sdX). Anyway it is obviously an IDE disk. If you want to boot from this hard disk you have to change the boot priority in your BIOS setup and - in this particular case - swich the boot order between SATA and IDE devices if that possibility exists. As you don’t have any partition set active on that disk, I assume the Grub bootloader was installed in MBR. Otherwise it won’t boot at all even if it has boot priority in the BIOS. If you installed Grub in the Linux root partition (probably hdd2), you have to set the bootflag on this partition. It can be done with fdisk from the live CD.

Yep. It was obvious enough according to its size.

Set the old Samsung hdd as the first hd to boot in BIOS
put the boot flag on hdd2

Use this version of parted Magic
http://dl.dropbox.com/u/10573557/pmagic-4.5.iso

Then follow
Re-Install Grub Quickly with Parted Magic

Be sure to understand how your hd’s are seen with fdisk -l

I didn’t even notice that the Samsung drive was being listed as an hdd. It’s definitely a SATA drive. I also had it selected as my primary HDD via BIOS during the install and through the rest of my trouble-shooting. I changed it back after I couldn’t get anything to work so that my computer would boot back into Windows without having to manually select the drive everytime. After the install process and I couldn’t get Grub to come up, I did try using GParted to remove the boot flags from the Windows partitions and setting the boot flag to the second partition on the Samsung (which I gathered is the actualy system partition). I used your guide caf4926 to get my copy of GParted, boot into it, tried moving around the flags, and then tried re-installing Grub using your provided steps, all to no avail. I also read through your article in the Wiki about how Grub works and how to fix it, but didn’t progress any farther.

When you use parted magic

Show me the fdisk -l info and:
when you start grub
what do you get at this step

find /boot/grub/menu.lst

Also unplug any USB drive before booting please!

root@PartedMagic:~# fdisk -l

Disk /dev/hdd: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x7e077e07

   Device Boot      Start         End      Blocks   Id  System
/dev/hdd1               1         262     2103296   82  Linux swap
Partition 1 does not end on cylinder boundary.
/dev/hdd2             262        2873    20972544   83  Linux
/dev/hdd3            2873       19458   133213184   83  Linux

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd108b089

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       60801   488382464    7  HPFS/NTFS

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x5d0d0c5a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          13      102400    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sdb2              13       60802   488282112    7  HPFS/NTFS

Looks the same as before, just minus the info for the thumb drive. When I do the find grub command I get this:

grub> find /boot/grub/menu.lst
 (hd0,1)

Your Samsung drive is not the first BIOS device.
Please type:
hwinfo --disk | grep -i -e Model -e 'BIOS id’
and post the ouput here.

  • assuming hwinfo is on the live CD. But we’ll see soon.

I guess I used all my edit’s cause the button disappeared. Figured I’d also add the contents of /boot/grub/menu.lst as I see you asked for it from someone with a similar issue.

# Modified by YaST2. Last modification on Tue Nov 16 16:58:35 EST 2010
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader

default 0
timeout 8
gfxmenu (hd2,1)/boot/message

###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.3
    root (hd2,1)
    kernel /boot/vmlinuz-2.6.34-12-desktop root=/dev/sdc2 resume=/dev/sdc1 splash=silent quiet showopts vga=0x345
    initrd /boot/initrd-2.6.34-12-desktop

###Don't change this comment - YaST2 identifier: Original name: windows 1###
title windows 1
    rootnoverify (hd0,0)
    chainloader +1

###Don't change this comment - YaST2 identifier: Original name: windows 2###
title windows 2
    map (hd1) (hd0)
    map (hd0) (hd1)
    rootnoverify (hd1,0)
    makeactive
    chainloader +1

###Don't change this comment - YaST2 identifier: Original name: windows 3###
title windows 3
    map (hd1) (hd0)
    map (hd0) (hd1)
    rootnoverify (hd1,1)
    makeactive
    chainloader +1

###Don't change this comment - YaST2 identifier: Original name: Linux other###
title Linux other
    rootnoverify (hd3,0)
    chainloader +1

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 11.3
    root (hd2,1)
    kernel /boot/vmlinuz-2.6.34-12-desktop root=/dev/sdc2 showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x345
    initrd /boot/initrd-2.6.34-12-desktop

Guess it’s not, got a command not found. I’m using ROXTerm btw. If your looking for my boot order, it’s currently:

WD 500 Gb - sdb1 (Windows System Reserved)/sdb2 (Main Windows partition)
WD 500 Gb - sda1 (Media drive partition)
Samsung 150 Gb - hdd1/hdd2/hdd3 (Linux drive)

I originally had the Samsung set to the first boot device during installation and during trouble-shooting. I didn’t change it back until right before I went to bed last night.

That looks logical. Unfortunately it won’t work for two reasons:

  • you’re not booting from that drive. So you don’t get to see that menu. And if you would change the BIOS order, you should replace root(hd2,1) with root(hd0,1)
  • your Linux drive should indeed be sdc
    . But it is hdd. The reason why is beyond my understanding. It might be informativ though to have a look at /boot/grub/device.map.
(hd3)	/dev/disk/by-id/usb-_USB_Flash_Memory_0014222838E6BA60D63B0298-0:0
(hd2)	/dev/disk/by-id/ata-SAMSUNG_SP1614C_S01XJ10Y278738
(hd0)	/dev/disk/by-id/ata-WDC_WD5000AACS-00G8B1_WD-WCAUK0126015
(hd1)	/dev/disk/by-id/ata-WDC_WD5001AALS-00E3A0_WD-WCATR1678057

That was what’s in /boot/grub/device.map. There’s also a device.map.old, dunno what for. So if I’m understanding everything right, it looks like grub was installed to the MBR on my Media drive (WD5000AACS), but it’s not working. I’ve tried booting from that drive using the boot option menu in BIOS and I just got the MBR missing.

I was actually expecting something like that (example) :

 Model: "WDC WD5000AAKS-0"
 BIOS id: 0x80
 Model: "WDC WD5000AAKS-0"
 BIOS id: 0x81

0x80 is the first BIOS device (the one which will be booted first), 0x81 the second one, etc.

May I ask why? Be aware that the first boot device will be booted first! So you’re not going to see the Grub menu if the preceding devices have a valid bootcode and your Samsung drive is not listed as boot device (which is not obvious at all for the third drive).

If your asking why I changed it back, it was because I was having no luck being able to boot into my openSUSE install and my wife uses this computer while I’m at work. Let me change back to setting the Samsung drive as the first boot device and see what happens.

I don’t think YaST would do that unless explicitely told to. But it’s easy to check:

file -s /dev/sda
file -s /dev/sdb
file -s /dev/hdd

No. That’s not all. It won’t work. Please wait! There are a couple things to change first …
And could you also type and post output of blkid ?

OK, I set the Samsung drive as the first boot device and it loaded into Grub, but a very basic looking one. When I tried to select the Linux OS option I got the following error

Booting 'openSUSE 11.3'

root (hd2,1)
  Filesystem type unknown, partition type 0x7
kernel /boot/vmlinuz-2.6.34-12-desktop root=/dev/sdc2 resume=/dev/sdc1 splash=s
ilent quiet showopts vga=0x345

Error 17: Cannot mount selected partition

I’m booting back into GParted now to run the above commands.