Multiple instances of OpenSuse 12.2 in Ubuntu 12.4 multi-boot menu

I am getting multiple instances of OpenSuse 12.2 in my Ubuntu multi-boot menu.

My setup is two hard disks - Ubuntu on the first disk and OpenSuse 12.1, OpenSuse 12.2 and MintLinux Maya on the second disk.

I installed on the second disk the three OSs in the order above while my Ubuntu disk was not connected. OpenSuse 12.2 had no problem dual-booting with OpenSuse 12.1. Then I installed LinuxMint for a triple-boot and had no problem with the Mint triple-boot menu.

I then connected the Ubuntu disk and fired up Ubuntu and did a “update-grub” from Ubuntu. When I rebooted Ubuntu I found one listing for OpenSuse 12.1 and one listing for LinuxMint in addition to the Ubuntu listing, but there were, I believe, eight listed instances for OpenSuse 12.2. All the instances will boot up OpenSuse 12.2. I really only want one.

I have searched for info in the OpenSuse Forum and on the Internet (Herman’s Grub2, etc). Didn’t find anything. I have looked into the OpenSuse 12.2 grub.d files with no satisfaction.

Any suggestions as to where else I can search? Or perhaps someone has an answer?

Boot Ubuntu with all disks connected and post the output of:

$ sudo os-prober

I’ll tell you what to do or where to look next.

Below is what I get from “sudo os-prober” - interestingly Ubuntu does not show up, but that, I assume, is because this command is not the same as “sudo update-grub.”

/dev/sda4:CentOS release 6.3 (Final):RedHat:linux
/dev/sdb2:openSUSE 12.1 (i586):SuSE:linux
/dev/sdb5:openSUSE 12.2 (x86_64):SuSE1:linux
/dev/sdb7:Linux Mint 13 Maya (13):LinuxMint:linux
/dev/sdc1:Windows XP Professional x64 Edition:Windows:chain

os-prober doesn’t scan the runnning OS /boot and / partitions. It is normal that it doesn’t report Ubuntu under Ubuntu. It only looks for foreign OSes - but it would find another Ubuntu installation if you had one.

Now type:

$ sudo linux-boot-prober /dev/sdb2

and

$ sudo linux-boot-prober /dev/sdb5

At the input of the commands you gave me I got the following:

stashu@stashu:~$ sudo linux-boot-prober /dev/sdb2
[sudo] password for stashu:
/dev/sdb2:/dev/sdb2:openSUSE 12.1 - 3.1.10-1.16:/boot/vmlinuz-3.1.10-1.16-default:/boot/initrd-3.1.10-1.16-default:root=/dev/disk/by-id/ata-ST3250620AS_9QE1PVZ6-part2 resume=/dev/disk/by-id/ata-ST3250620AS_9QE1PVZ6-part1 splash=silent quiet showopts vga=0x31a
/dev/sdb2:/dev/sdb2:Failsafe – openSUSE 12.1 - 3.1.10-1.16:/boot/vmlinuz-3.1.10-1.16-default:/boot/initrd-3.1.10-1.16-default:root=/dev/disk/by-id/ata-ST3250620AS_9QE1PVZ6-part2 showopts apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x31a
stashu@stashu:~$ sudo linux-boot-prober /dev/sdb5
/dev/sdb5:/dev/sdb5::/boot/vmlinuz:/boot/initrd:root=/dev/sdb5
/dev/sdb5:/dev/sdb5::/boot/vmlinuz:/boot/initrd-3.4.6-2.10-desktop:root=/dev/sdb5
/dev/sdb5:/dev/sdb5::/boot/vmlinuz:/boot/initrd:root=/dev/sdb5
/dev/sdb5:/dev/sdb5::/boot/vmlinuz:/boot/initrd-3.4.6-2.10-desktop:root=/dev/sdb5
/dev/sdb5:/dev/sdb5::/boot/vmlinuz-3.4.6-2.10-desktop:/boot/initrd-3.4.6-2.10-desktop:root=/dev/sdb5
/dev/sdb5:/dev/sdb5::/boot/vmlinux-3.4.6-2.10-desktop.gz::root=/dev/sdb5

I assumed you meant for me to at least reboot and then do a “sudo update-grub.” Which I did but I still get the same multiple instance boot entries for OpenSuse 12.1.

Or maybe I should not have done the “update-grub” thing. Because there is another step that is necessary. Now as I take time to review the output of those commands you gave me I see something that suggests the reason for the multiple instances.

Please help me with the next step.

The second instance is failsafe boot I assume this comes from the /boot/grub/menu.lst file on the openSUSE partition.

and ditto for the GRUB2 install on /dev/sdb5.

Thanks, gogalthorp, for the reply.

I know that in the list of options on the boot menu screen/window that my OpenSuse 12.1 shows a “failsafe boot” while the menu list for OpenSuse 12.2 (6 repeat instances) does not show a “failsafe boot.” I’m not that experienced in Grub and can only assume you are correct that the /boot/grub/menu.lst generates such an entry on the boot menu screen/window.

But in OpenSuse 12.2 which uses the new grub2 there is no “menu.lst” file. It is an entirely different grub boot loader.

I know that whichever of the 6 instances of OpenSuse 12.2 that is on the boot menu screen/window that I choose for booting I will get to my OpenSuse 12.2 system.

Just got this, Knurpht.

However I must just be thick-headed here because I’m not sure what you mean. Are you suggesting that there is a menu.lst file in my OpenSuse 12.2 /boot folder?

Did I say that? I don’t care about update-grub. update-grub just takes the ouput of linux-boot-prober to write the boot entries.

There is indeed something wrong here. You should take a look at the files /boot/grub2/grub.cfg and /boot/grub/menu.lst in your 12.2 installation on sdb5. Maybe linux-boot-prober is trying to read both, which would be a bug in this case. os-prober is a work in progress, written by several contributors. Ubuntu uses versions 1.51. openSUSE 12.2 uses version 1.49. Version 1.53 is available in my repo. Version 1.55 is out and will be in my repo as soon as I get time to do it. The duplicate entries refer to the same kernel. Thus, it’s probably not your fault.

I suggest you edit /boot/grub/grub.cfg under Ubuntu each time after running update-grub manually or after a kernel update on Ubuntu (which does that automatically) and remove the duplicate entries. It will be the easiest workaround for now.

If the boot entries are also duplicate in openSUSE’s Grub menu, it has nothing to do with Ubuntu’s os-prober. You should find out where you installed the Grub boot loader under openSUSE with findgrub (http://forums.opensuse.org/english/other-forums/development/programming-scripting/447138-looking-grub-windows-bootloader-all-partitions-17.html#post2481798) - latest version is 4.1 ([noparse] http://www.unixversal.com/linux/openSUSE/findgrub-4.1.tgz[/noparse]](http://www.unixversal.com/linux/openSUSE/findgrub-4.1.tgz)). You can use it on Ubuntu -, then create a permanent chainloader entry in /etc/grub.d/40_custom under Ubuntu for openSUSE’s Grub and see if the entries appear duplicate there two. If the Grub boot loader is installed in the root partition under openSUSE (I don’t say it is!), your chainloader entry should look like that:

menuentry "openSUSE Grub" {
set root=(hd1,5)
chainloader +1
}

Adding a chainloader entry really doesn’t hurt and will allow you to boot openSUSE Grub after a kernel update under openSUSE - and before you get to run update-grub under Ubuntu - which you will have to do in such a case anyway.

  • Notice that findgrub doesn’t fully support Grub2 (2.0) yet but the info it provides will still be helpful despite it is incomplete (it detects the boot loader but not the boot partition of openSUSE 12.2).

Ok-a-a-a-y…

Well, I took a look at my OpenSuse 12.2 /boot/grub2/grub.cfg file and it is blank. So I looked in my Ubuntu grub.cfg file because I figured that this is what generates my boot screen. The first thing I noticed there was a statement to the effect: DO NOT EDIT THIS FILE!

Well I got somewhat of a permission from please_try_again (for the OpenSuse 12.2 .cfg file) so I tightened my belt and removed the first 4 entries of OpenSuse 12.2, saved and rebooted.

And it worked! I will settle for the two instances of 12.2 that I left in my grub.cfg file.

Thanks, please_try_again!:slight_smile: