Take Back the GRUB!

Situation
I have 4 operating systems on my main drive: One unused, one for everyday use, and two for testing.

  • Windows XP
  • Kubuntu 7.04 Feisty Fawn
  • Kubuntu latest release, testing
  • Mepis

The Feisty Fawn is my preferred OS. I want it to control GRUB. A problem arises when I install a new Linux distribution in one of my testing partitions. If I let the new distribution take over GRUB then it fails to incorporate any future updates to my Feisty.

Solutions

The most commonly cited solution is to reinstall GRUB from an install disk. I hesitate to do so as my install disk is old, from Breezy Badger. (note: most Linux install disks will work)

The next solution is to boot with Super GRUB Disk. Fine, this would be great if I could not get into the partition. Many usable tools for booting however I want. Overcomplicated though, as I can already boot into my preferred partition.

Another solution, the one I used for the past several months, is to mount all partitions and copy updated boot parameters to the controlling /boot/grub/menu.lst This works and could be made easy with the aid of a script but leaves the testing OS in control of GRUB.

A similar solution is to have a separate partition for /boot/grub and map it to each OS. This may not be workable due to the automagic kernel features of GRUB.

An obvious solution is to not install GRUB during my test installs and instead write a new entry for my existing GRUB. One day the distributions will do this for me automatically.

The preferred solution is simply to reconfigure grub following the directions available at ubuntuguide.org  I intend to keep these instructions handy.

  • As root (or with sudo), type grub
  • When at the grub prompt, type find /boot/grub/stage2
  • This will return something like (hd0,2)
  • To setup the boot partition boot type root (hd0,2). This is the harddrive and the partition your linux is installed on…
  • And then to configure grub type setup (hd0)
  • Now you’re done, so exit with quit

Outcome
My production desktop is back in control of GRUB. When Feisty updates, so will my boot menu.

This entry was posted in Linux. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>