HowTo Boot / Multiboot openSUSE from the Grub Bootloader in Ubuntu
Versions: I used Ubuntu 9.04, Kubuntu 9.04 and openSUSE 11.1 for tests but the principle is a general one.
Scenario: You have Ubuntu and openSUSE (and perhaps other distros) on your drives. You boot using the Grub loader in Ubuntu. After an online update of either Ubuntu or openSUSE, you can no longer boot openSUSE from Ubuntu, or perhaps you couldn't boot openSUSE from Ubuntu's bootloader menu from the very beginning. This tutorial takes you through replacing the default entry that the Debain installer makes in Ubuntu's boot menu with a better or repaired entry.
Locate openSUSE's entry in Ubuntu's Grub menu
In this tutorial I use an example where openSUSE is installed on partition sda5. In Grub parlance that's (hd0,4). Be sure to adjust any code you take from here so that it reflects the partitioning on your computer.
You should find an entry for openSUSE in Ubuntu's Grub menu file (menu.lst). You can use this command to view it in your console window: cat /boot/grub/menu.lst. Here's the entry in Ubuntu's menu.lst for openSUSE:
The reason this entry failed in real life was that the openSUSE kernel was upgraded by an online update. It was no longer version 2.6.27.21-0.1-pae, and so the entry became obsolete. If I was to edit the entry to the correct kernel version, eventually it would become obsolete again.
Of course, you might find some other entry style for openSUSE, or simply find that there is no entry at all for openSUSE in menu.lst. Don't be fazed. Just edit in the recommended entry that I discuss in the next section.
Replace/fix the entry for openSUSE in Ubuntu's Grub menu
First I'll show you the entry to use in Ubuntu's menu.lst instead of the one in the code box above. Then I'll explain it and its advantages. Here's the new entry for openSUSE:
OpenSUSE has symlinks vmlinuz and initrd in the /boot directory that point to the current real vmlinuz and initrd. The boot entries call these symlinks (/boot/vmlinuz and /boot/initrd) which call the correct contemporary values in the /boot directory. When an online update replaces the real vmlinuz and initrd in the /boot directory, the symlinks are updated to point to the new files. Thus the bootloader entry in the second code box is never obsoleted by the online update process, unlike the bootloader entry in the first code box.
So the point of the tutorial is this: If you have an entry in your Ubuntu menu.lst that is like the first code box and it fails, then replace it with the entry in the second code box and booting should be restored.
You can open the file menu.lst for editing with either of these console commands:
That's all folks.
Swerdna, July 02 2009
Articles Index