GRUB problems

I multi-boot my system, the latest OS I installed was OpenSUSE, mainly because every distro picket I tried recommended either that or Ubuntu, and I wanted to try both.

However, despite OpenSUSE’s installer finding my grub config files on the Ubuntu partition and me telling it not to mess with it… it went ahead and installed it’s own version of GRUB anyway… with Ubuntu and Windows options that do not work… (which worked perfectly with the version of Grub that Ubuntu configured)

The graphical one is nice… but im sure if I cared I could install a graphical version of GRUB on my own.

Now… I already know how to reinstall GRUB for Ubuntu as i’ve done it before several times when another os messes up or writes it’s own bootloader… but I don’t know how to add an option to make it successfully boot OpenSUSE if I pick it.

I tried to open the menu.lst file in the OpenSUSE partition to see what the GRUB commands were, but it refused to allow me to open it even with root permissions.

And this brings me to another problem… if there any way to make this file auto-update if openSUSE updates something that mandates a change in GRUB? (Like how Ubuntu updates it when it updates the kernel)

… and is there any way to even make Ubuntu auto-update it when the kernel is updated? Since I had to manually edit it to add some of my other OSes as well as layout the menu the way I prefer Ubuntu can no longer auto-update it’s own menu.lst file for GRUB, its annoying to manually update it every time the kernel is changed.

Well, I was able to get everything working again through Ubuntu’s grub, but I would still like to know about auto-updating the config file.

It depends how grub works from ubuntu.

Ideally, it should point to suse’s menu.lst rather than directly to a specific kernel.
Whenever the kernel is updated in suse it writes a new menu.lst that points to the new kernel.

Most distros should get this right for you. And if you had taken time to see, you would have found suse had done this with the grub it installed. The reason it failed is more likely it had the partitions incorrect in the menu.

Ubuntu uses the “grub-install” script to maintain its menu.lst; that is what’s called with each kernel update. It is parameter driven, as defined within its menu.lst (you should read this if you haven’t already, if you’re going to use this method for multi-booting). It will merge boot stanzas from other menu.lst’s it finds.

openSUSE also regenerates menu.lst when it updates the kernel. IIRC all you need to do is to re-run the Ubuntu script and it will merge the changed openSUSE stanza. But be careful, it may not delete the previous stanza, i.e., it may just add the new one.

Having said all that, IMO there are two better alternatives. The first is to install openSUSE’s grub to its root partition boot sector and then set up a chainloading boot stanza in the Ubuntu menu.lst; once done, you won’t need to change it again. The second is to use the openSUSE /boot symlink names (“vmlinuz” and “initrd”) instead of the fully qualified file names on the kernel and initrd lines for its stanza in the Ubuntu menu.lst; once you’ve edited these lines you won’t have to update again as openSUSE recreates the symlinks with every new kernel/initrd.