I am using openSUSE 12.2 (x64) KDE on a laptop that has installations of Windows 7 and two other distros. I had a nice openSUSE 12.2 grub menu, but it got messed up in a recent update and I ended up using a Mint disk to restore the boot menu. The grub menu is now the Mint version, and I can’t figure out how to get the openSUSE grub menu to be the one it boots from. I tried reinstalling grub2, and also playing with the parameters in east for the boot loader, but to no avail. Furthermore, when I now boot openSUSE from the Mint grub menu, I get a display of text until the KDE box is displayed instead of the very attractive openSUSE graphical display (with the moving circles). How can I get back my openSUSE menu and the full graphical display when it loads? If it helps, I still have the live distro (KDE version) on a usb.
Could you tell in more details what you did (used YaST2, command line - exact command invocation, etc)?
Sorry; I tried reinstalling grub2 through YaST2 software install (graphical display), first removing it and then reinstalling it.
So where did you install it? YaST2 offers MBR, root partition, /boot partition, extended partition or explicit partition selection. If you install in MBR and still have old bootloader, something is seriously broken.
You really need to provide more information. Try using findgrub script (search forums) which could show what and where is currently installed.
I just went back to YaST2 and checked installation to MBR, but the Ubuntu bootloader still comes up.
And yes, I wonder if something is seriously broken because my grub menu has five openSUSE 12.2 entries. I checked them with the edit command, and they aren’t different kernels. Some are exact duplicates of the other. This is not a Ubuntu-grub problem; at least I don’t think it is. When openSUSE grub first went bad, I tried getting a working grub menu back with a Mint live disk. It restored the Mint grub menu, and it had the multiple openSUSE entries as well. Is all this suggesting that I should just wipe my openSUSE partition and start over?
Did you try “findgrub” script?
I did. Here is the output:
Find Grub Version 3.0.1 - Written for openSUSE Forums
- reading MBR on disk /dev/sda …
- searching partition /dev/sda1 (NTFS) … → Windows7/Vista Loader found in /dev/sda1
You can add the following entry to /boot/grub/menu.lst :
###Don't change this comment - YaST2 identifier: Original name: WindowsBootLoader###
title Windows on /dev/sda1
rootnoverify (hd0,0)
chainloader +1
- searching partition /dev/sda2 (NTFS) … → Windows7/Vista Loader found in /dev/sda2
You can add the following entry to /boot/grub/menu.lst :
###Don't change this comment - YaST2 identifier: Original name: WindowsBootLoader###
title Windows on /dev/sda2
rootnoverify (hd0,1)
chainloader +1
- reading bootsector /dev/sda4 (Extended) … → found in /dev/sda4 => 0x (Debian)
- skipping partition /dev/sda5 (swap)
- reading bootsector /dev/sda6 (LINUX) … → found in /dev/sda6 => => 0x => ( => )
- skipping partition /dev/sda7 (swap)
- reading bootsector /dev/sda8 (LINUX) …
- searching partition /dev/sda9 (FAT32) …
- reading bootsector /dev/sda10 (LINUX) …
I should mention that because of the multiple openSUSE entries on the Ubuntu and Mint grub menus, I ended up first deleting my openSUSE partition, which solved the grub menu problems on the other distros, and then reinstalling openSUSE 12.2, which restored its graphical boot and made the nice openSUSE grub menu the default. This time I checked the location of the boot loader, and it indicated it’s on the extended partition. But the findgrub output shows a debian grub in the extended partition and shows nothing about the openSUSE grub. So in the future, how do I interpret the findgrub output? (By the way /dev/sda6 is the Ubuntu partition and /sda10 is openSUSE.)
It’s a very old version. The latest version is 4.2. Get that one: http://forums.opensuse.org/english/other-forums/development/programming-scripting/447138-looking-grub-windows-bootloader-all-partitions-17.html#post2493514
- and please use CODE tags.
Thanks. Here is the output for findgrub 4.2:
Find Grub Version 4.2 - Written for openSUSE Forums
- reading MBR on disk /dev/sda … → SUSE Generic MBR (Sig: 0x249c249d)
- searching partition /dev/sda1 (NTFS) … → Windows7/Vista Loader found in /dev/sda1
You can add the following entry to /boot/grub/menu.lst :
###Don’t change this comment - YaST2 identifier: Original name: WindowsBootLoader###
title Windows on /dev/sda1
rootnoverify (hd0,0)
chainloader +1
- searching partition /dev/sda2 (NTFS) … → Windows7/Vista Loader found in /dev/sda2
You can add the following entry to /boot/grub/menu.lst :
###Don’t change this comment - YaST2 identifier: Original name: WindowsBootLoader###
title Windows on /dev/sda2
rootnoverify (hd0,1)
chainloader +1- reading bootsector /dev/sda4 * (Extended) ... --> Grub2 (2.00) found in /dev/sda4 => sda? 0x?? (openSUSE) - skipping partition /dev/sda5 (swap) - reading bootsector /dev/sda6 (LINUX) ... --> Grub2 (1.99) found in /dev/sda6 => sda6 0x83 (Ubuntu) - skipping partition /dev/sda7 (swap) - reading bootsector /dev/sda8 (LINUX) ... - searching partition /dev/sda9 (FAT32) ... - reading bootsector /dev/sda10 (LINUX) ...
This seems more interpretable, that the openSUSE grub is in the extended partition (that was the default upon installation). There also appears to be a SUSE generic grub in the MBR. What exactly is a generic grub?
It is not “grub”, it is code that simply loads first sector of active partition and executes it. This is the default bootloader behavior on BIOS systems.
Don’t worry about this! It is not an error but a limitation in findgrub, not able to determine the boot partition from the uncompressed Grub2 v 2.0 core (yet). It should be sda8 or sda10 in your case… probably sda8, I would guess. It’s easy to find out if you mount the partition (or if you run os-prober in Ubuntu).
Great; thanks to both of you. I have one further question. If I’m using the openSUSE grub2 and I do a kernel update on another distro on my drive, will the openSUSE grub2 automatically update to reflect this? I’m guessing not, because in other distros you have to run the update-grub command to get it to do so. But this command doesn’t work in openSUSE. Is there an equivalent or some other easy way of getting the openSUSE grub2 to recognize the updated kernel of another distro?
I wrote a script which does the same (and more). It is included in package updategrub available in my repo. Notice that this package includes findgrub as well:
software.opensuse.org: updategrub
under 12.2, updategrub should be a symlink to updateGrub2. Make sure it is the case.
- You’ll use “updategrub” - without the hyphen.
It is put in core.img as pseudo-module with type OBJ_TYPE_PREFIX (3). So to find it one needs to traverse module list. Each module has header with 32 bit type and 32 bit size which includes header. Unfortunately, on i386-pc architecture it is put after kern.img, so one need to parse ELF to find out size. Or try heuristic and search for pre-modules header with GRUB_MODULE_MAGIC (0x676d696d). It seems grub-mkimage always puts PREFIX as the last one, so even more brute force would be simply parse ‘(…)’ backwards from the end of core.img.
You have the code. Your help is greatly appreciated!!!
I have soooooooooo many things to do… I’m afraid I can not do very much without having installed Fedora17 - and I might end up skipping this version after all if I continue to work around various- totally unrelated and mostly minor - bugs in openSUSE. I haven’t done anything but openSUSE since 12.2 has been released.
The latest git submission to the bootinfo script might help. They seem to have got it done for Fedora*. I was able to find openSUSE signature so far …
- AFAIK Fedora 17 uses Grub2 v 2.00 as well.
It does exactly that - it searches for GRUB_MODULE_MAGIC (which is effectively “mimg” string) and starts walking module list.
I am always impressed to which extent reverse engineering can go