Some days ago my Update Manager prompted saying it had some updates for my system. I allowed the updates to be installed and among them was an update for the Linux image. Everything went fine and I ended up with an updated system. It asked for reboot and reboot it had.
On booting, the GRUB had changed and had more options to choose from: kernel 2.6.28-13-generic, kernel 2.6.28-14-generic and their respective (recovery mode). This wanted to say that the GRUB menu needed editing, a little complex, yet easy operation. Complex because if anything goes wrong you might end up with a broken system and easy because all you have to do is to remove some text lines from a text file.
Before getting our hands inside the /boot/grub/menu.lst, which is the file we are going to edit, we should read first what GRUB is.
Well, GRUB (GRand Unified Bootloader) is a boot loader package developed to support multiple operating systems and allow the user to select among them during boot-up. GRUB was created by Erich Stefan Boleyn and has been further developed under the GNU project as GNU GRUB.

Ubuntu installs a menu giving users a choice of which operating system to boot, if you have more than one. Typically, the choice is between Microsoft Windows and Ubuntu. GRUB (Grand Unified Boot-loader) drives this menu. The menu displays for 10 seconds. If no choice is selected, Grub starts the first (default) OS, which by default is Ubuntu.

After this short information, I think it’s the time to deal with the editing which I am going to write it in some easy-to-follow steps.

First of all you need to be inside your Ubuntu, if dual or multiple booting, and start the Terminal.

Applications -> Accessories -> Terminal

Once in Terminal write this command which makes a backup of the menu.lst.

cp /boot/grub/menu.lst /boot/grub/menu.lst_BU

In case anything goes wrong, use this backup file to restore menu.lst.

Without closing th Terminal, after we successfully made the backup of menu.lst file, we are going to edit it. Write in the Terminal or copy/paste this command:

sudo gedit /boot/grub/menu.lst

A text file in Gedit will prompt, listing all the alternatives GRUB menu offers you to choose from, as you see in the picture below, as well as the time GRUB menu displays before starting the default OS.

GRUB

Once open, the menu.lst file, select and remove the lines with the old options GRUB offers to boot from, which in my case are, Ubuntu 9.04, kernel 2.6.28-13-generic and Ubuntu 9.04, kernel 2.6.28-13-generic (recovery mode), as you see in the picture.

Grub1

After this operation make sure you save the changes (Ctrl+S) before closing the file and you are done.

Reboot to see the changes and give us your opinions regarding this tutorial or just share your experience with us.

Tags: