Boot issue on 12.2 with grub - grub2

I just installed 12.2. I encountered an issue: after rebooting the machine the boot procedure stops at the grub prompt. I do not know what am I supposed to do at this prompt. Notice that it is the prompt for the older version of grub which is a bit perplexing because I read somewhere that 12.2 uses grub2. To avoid this issue I have to boot with the boot DVD in the drive and start booting from the DVD. Then the menu appears on which I can chose to boot from the Hard disk. When I chose that option the next boot screen that appears is the one that asks which OS to boot (I have a dual boot with win XP). When I select OpenSUSE the boot procedure proceeds normally.

How do i fix this? Why are both versions of grub installed?

100le wrote:

> How do i fix this? Why are both versions of grub installed?
You probably need to review where you want grub exactly.
Yes grub 2 is default, but you can also use Legacy.

You ought to have described your situation a little more clearly.
Perhaps mentioning how many HD’s are involved
The boot order
Partitioning
And where grub was showing for installation in the install summary

Thanks for the help. Now that you mention it when the installation started booting from the DVD the first thing that appeared was a choice between 1. legacy and 2. (I cant remember). I first tried with option #2 but it immediately said that I need to insert a boot disk. I rebooted and went with option #1.

I have three equal sized disks (300 Gb each). Two of those are in raid mirror mode. The third is single (not in raid configuration). here is an excerpt from fstab so You can see some of the partitions:
/dev/disk/by-id/md-uuid-d15ef0e2:a6bf7891:76b6718d:e5d3c774-part6 swap swap defaults 0 0
/dev/disk/by-id/md-uuid-d15ef0e2:a6bf7891:76b6718d:e5d3c774-part7 / ext4 acl,user_xattr 1 1
/dev/disk/by-id/md-uuid-d15ef0e2:a6bf7891:76b6718d:e5d3c774-part5 /boot ext4 acl,user_xattr 1 2
/dev/disk/by-id/md-uuid-d15ef0e2:a6bf7891:76b6718d:e5d3c774-part9 /data ext4 defaults 1 2
/dev/disk/by-id/md-uuid-d15ef0e2:a6bf7891:76b6718d:e5d3c774-part8 /home ext4 defaults 1 2
/dev/disk/by-id/ata-ST3320620AS_3QF0Z7NF-part1 /windows ntfs-3g users,gid=users,fmask=133,dmask=002,locale=en_US.UTF-8 0 0

The installation formated the “/” and “/boot” partition. The other partitions are used by windows. I am nor sure what you mean by boot order. In the BIOS the DVD is set to be checked first, then the hard drive. I am also not sure what you mean by the last line so please clarify.

Thanks again for your help.

100le wrote:

> not sure what you mean by the last line so please
> clarify.
Look at this under ‘Booting’ https://docs.google.com/open?id=0B3e0lLG3OdqEZ3pkVVV0Q0dYZzA
You need to make sure to write to the MBR of the first HD in your BIOS boot order

>Two of those are in raid
This usually makes things hit and miss and I have never used it myself.

100le](http://forums.opensuse.org/members/100le.html), i experienced the exact same issue as you today. My setup is a little different than yours, i have a grub legacy partition which chain loads all my operating systems, which means my operating systems need there boot loaders on /.
Today i experienced the same issue as you when installing opensuse 12.2. I have had similar issues with opensuse before. Caf4926 is right. Opensuse tries to be helpful during install and tells the mbr to look at the place where you selected the bootloader to be installed, (this is not a desired behavior when chain loading like me). In 12.1, with grub legacy it would boot up straight to the opensuse grub screen, skipping my grub partition. In 12.2 it tries to do the same thing, but grub2 doesn’t work quite as smoothly. I had to boot up a live cd (opensuse 11.4 gnome) and give the commands to tell my mbr to look to my grub partition instead.
Point is, you need to tell your mbr where to look as well, probably through a live cd like i had too. Unfortunately i have little experience with grub2, so can’t help you further. The first step you’ll want to take is find out where you installed grub2.

Hi knightron.
I’m not sure what you mean by “The first step you’ll want to take is find out where you installed grub2.” When I look at the grub2 filelist in Yast I can see files all over the place. some of them are in the “/boot/grub2” directory some are in “/usr/bin”, some are in “/etc/grub.d” and so on. Which files should I look for? How do I tell my mbr where to look?
Thanks for the help.

I have opensuse installed on a logical partition, and for some reason, the default install wanted to install grub2 to the start of my extended partition, (that doesn’t even make sense to me) i had to change it to install to the root before committing to install.

What i meant when i said, “The first step you’ll want to take is find out where you installed grub2”, is; did you install grub to the mbr, the root; do you have a boot partition you installed it too? Where?

Hi all,

I just updated from open SUSE RC1 to openSUSE 12.2 and before update I had a dual boot system SSD disk as /dev/sda partitioned for W7-64 bits and for linux root partition. After update
I can NOT boot W7 anymore though I am sure window disks have not been touched: I guess this is just a simple matter of GRUB2 configuration because the window7 option does not show up at start time.
ANYONE please help …thanks a lot SH.

Correction to the problem above: I booted LINUX 12.2 and using YAST I installed also 12.2 updates indicated by YAST and that (somehow) corrected the problem i.e. W7 option appears now in the GRUB2 menu and can be booted. I just wonder if I did something wrong in the update process…if by chance anyone can be so nice and take the pain and explain me…it would be awfully nice…thanks a lot SH

sharphawk64, what you are doing is called hijacking a thread. You didn’t start this thread so why ask your question here. I will not answer your question here. Start a new thread of your own and others or my self will help you.

Then just don’t! But how about taking it easy and showing a little bit humility? You don’t look like a Grub guru to me.

@100le, I f you wonder when you installed Grub, just run findgrub.
http://forums.opensuse.org/english/other-forums/development/programming-scripting/447138-looking-grub-windows-bootloader-all-partitions-17.html#post2481971

The info about the core is incomplete for openSUSE 12.2 (sorry but nobody has gotten it yet), but the info about the boot loader will be correct -even if it reports the wrong version (1.99 instead of 2.0).

Sorry guys, I had no intention to disturb, highjack or what ever, but rather I was trying to group topics and things instead of adding threads. friendly yours SH.

Grub guru? i’m not and never claimed to be. You tell me to take it easy. I was just informing sharphawk64 of the standard etiquette within the forums. There’s no point beating around the bush, and i didn’t treat them unfairly. Get the message through to them, then the Ops thread will not be spammed up, and once sharphawk64 makes there own thread to address there issue, it will more like recieve the exposure it deserves.

Thanks please_try_again for the help. I run findgrub and the output is as follows:

Find Grub Version 4.1 - Written for openSUSE Forums

  • reading MBR on disk /dev/sda … → Legacy GRUB found in sda MBR => sda5 0x83 (openSUSE)

  • searching partition /dev/sda1 (NTFS) …ntfs-3g-mount: mount failed: Device or resource busy
    umount: /mnt: not mounted

  • reading bootsector /dev/sda2 * (Extended) …

  • reading bootsector /dev/sda5 (LINUX) … → Grub2 (1.99) found in /dev/sda5 => sdc? 0x?? (openSUSE)

  • skipping partition /dev/sda6 (swap)

  • reading bootsector /dev/sda7 (LINUX) …

  • reading bootsector /dev/sda8 (LINUX) …

  • reading bootsector /dev/sda9 (LINUX) …

  • reading MBR on disk /dev/sdb … → Legacy GRUB found in sdb MBR => sdb5 0x83 (openSUSE)

  • searching partition /dev/sdb1 (NTFS) …ntfs-3g-mount: mount failed: Device or resource busy
    umount: /mnt: not mounted

  • reading bootsector /dev/sdb2 * (Extended) …

  • reading bootsector /dev/sdb5 (LINUX) … → Grub2 (1.99) found in /dev/sdb5 => sdc? 0x?? (openSUSE)

  • skipping partition /dev/sdb6 (swap)

  • reading bootsector /dev/sdb7 (LINUX) …

  • reading bootsector /dev/sdb8 (LINUX) …

  • reading bootsector /dev/sdb9 (LINUX) …

  • reading MBR on disk /dev/sdc … → Grub2 (1.99) found in sdc MBR => sdc? 0x?? (openSUSE)

  • searching partition /dev/sdc1 (NTFS) …


WARNING: /dev/sda is NOT in /boot/grub2/device.map
WARNING: /dev/sdb is NOT in /boot/grub2/device.map
Displayed BIOS device mapping may be incorrect!


Now I believe the problem is that the MBR of the disk /dev/sda and disk /dev/sdb (which are in Raid-0) points to the legacy grub. Any ideas on how to fix it? Also I am not sure about the warning at the end of the findgrub output.
Thanks again for the help.

It looks interesting, but would look better in code tabs though. I don’t know why findgrub could not mount your NTFS partitions. Usually it does that fine. But it’s irrelevant. If you didn’t install Legacy Grub under 12.2 into MBR, this is indeed the problem here.

Boot from live cd or rescue dvd, log in as root and typoe the following:


# mount /dev/sda5 /mnt
# grub2-install --boot-directory=/mnt/boot /dev/sda
# grub2-mkconfig -o /mnt/boot/grub2/grub.cfg

Then reboot and report here! :wink:

This is the output of

fdisk -l

on my system:


Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x51d051d0


   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63    62910539    31455238+   7  HPFS/NTFS/exFAT
/dev/sda2   *    62910540   625137344   281113402+   f  W95 Ext'd (LBA)
/dev/sda5        62910603    63071189       80293+  83  Linux
/dev/sda6        63071253    67280219     2104483+  82  Linux swap / Solaris
/dev/sda7        67280283   109225934    20972826   83  Linux
/dev/sda8       109225998   214098254    52436128+  83  Linux
/dev/sda9       214098318   625137344   205519513+  83  Linux


Disk /dev/sdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x51d051d0


   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63    62910539    31455238+   7  HPFS/NTFS/exFAT
/dev/sdb2   *    62910540   625137344   281113402+   f  W95 Ext'd (LBA)
/dev/sdb5        62910603    63071189       80293+  83  Linux
/dev/sdb6        63071253    67280219     2104483+  82  Linux swap / Solaris
/dev/sdb7        67280283   109225934    20972826   83  Linux
/dev/sdb8       109225998   214098254    52436128+  83  Linux
/dev/sdb9       214098318   625137344   205519513+  83  Linux


Disk /dev/sdc: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x513a513a


   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1              63   625137344   312568641    7  HPFS/NTFS/exFAT


Disk /dev/md126: 320.1 GB, 320070483968 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625137664 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x51d051d0


      Device Boot      Start         End      Blocks   Id  System
/dev/md126p1              63    62910539    31455238+   7  HPFS/NTFS/exFAT
/dev/md126p2   *    62910540   625137344   281113402+   f  W95 Ext'd (LBA)
/dev/md126p5        62910603    63071189       80293+  83  Linux
/dev/md126p6        63071253    67280219     2104483+  82  Linux swap / Solaris
/dev/md126p7        67280283   109225934    20972826   83  Linux
/dev/md126p8       109225998   214098254    52436128+  83  Linux
/dev/md126p9       214098318   625137344   205519513+  83  Linux

I believe that I should use /dev/md126p5 instead of /dev/sda5 and /dev/md126 instead of /dev/sda in your code. If I use /dev/sda directly I am afraid I will mess up my RAID configuration. I believe /dev/md126 points to the RAID array. What do you think?
Thanks for your help.

findgrub doesn’t look into the RAID. On a RAID/LVM machine it shows this:

spock:~ # findgrub -n
Find Grub Version 4.1 - Written for openSUSE Forums

 - reading MBR on disk /dev/sda                       ... --> Legacy GRUB  found in sda MBR     => sda1   0xfd (openSUSE)
 - searching partition /dev/sda1   *  (LINUX RAID AUTO) ...
 - skipping partition  /dev/sda2      (swap)         
 - searching partition /dev/sda3      (LINUX RAID AUTO) ...

 - reading MBR on disk /dev/sdb                       ...
 - searching partition /dev/sdb1   *  (LINUX RAID AUTO) ...
 - skipping partition  /dev/sdb2      (swap)         
 - searching partition /dev/sdb3      (LINUX RAID AUTO) ...

And as you can see, the boot loader is installed on the first HDD only. You can boot only from one disk at a time. But I don’t know what else to say. Your fdisk -l doesn’t look like what I see on RAID systems, but I never use RAID without LVM, and I don’t install the systems on RAID anymore nowadays, only the data.

Is it a hardware RAID (since you have Windows and Linux on it)? I don’t know this. I’m sorry. I’m not sure why you’re doing that … but I won’t ask. Wait for other advice!

It is indeed a hardware RAID. Anyway if I feel adventurous over the weekend I’ll try it and let you know. Thanks for the advice.

Ok, so I tested please_try_again’s suggestion modified with my raid adjustments and it worked. The mount command executed without problem. The grub2-install too. The third command (grub2-mkconfig) however complained that / was not mounted or something like that. however when I checked the grub.cfg file was there probably from the installation a couple of days(or weeks) ago. So I decided to reboot and all went well. Now I can boot normally from the hard disk. Btw, I tried booting from the live cd first but it didn’t recognize my hardware RAID so I tried with the install DVD and upon boot selected rescue (i think) from the boot menu which started the rescue login where I entered the commands.
I would like to thank again everybody who helped. Cheers.