Working With The GRUB Menu

This tutorial describes how to edit the GRUB menu. It will also show how to add operating systems and how to add splash screens.

What everything means

To start off I will go over why you would use GRUB and what it all means.

The reason anyone would use the GRUB menu is to dual-boot two different operating systems. All it is is a simple DOS menu that you select which operating system you want to load during boot-up.

To open it type -

gksudo gedit /boot/grub/menu.lst

This will open up the menu.lst (the file in which you edit the GRUB Menu) in a simple text editor while giving you the ability to make changes and save them.

You will see a bunch of lines at first that all begin with "#". That tells the file to skip over these lines when reading the file. Scroll down into you stop seeing them.

Title - This is what is shown when the menu loads at boot up. Editing this will only change what is written on the screen.

Root - You likely have something along these lines "(hd0,1)". "hd0" refers to the your hard drive while 1 points to the partition. Note that for GRUB, partitions start at 0 and not 1. for example 0=Partition 1, 1=Partition 2 and so on.

Kernel -Pretty self-explanatory. This just is to ask what kernel version you would like to boot with.

Initrd - This is simple a temporary file system used by the kernel during a boot till the real file system can be mounted.

That is the basics of what all those lines mean.

Adding an OS

Adding an operating system to your grub menu is by no means difficult. Just fill in a few lines and you are done!

1. Open up Terminal (Applications>Accessories>Terminal) and run -

gksudo gedit /boot/grub/menu.lst

Once menu.lst opens up, scroll down to the button of the page. For this example I will be adding "Windows XP".

First add the title, which should look like what is shown bellow -

title        Microsoft Windows XP

Now to add the root for the OS. For me it is on the 1st disk and the third partition so I will put the following -

root        (hd0,2)

To finish it off add the following lines -

chainloader    +1

Definitions -

The final product should look something like this (with your options of course) -

title        Microsoft Windows XP
root        (hd0,2)
chainloader    +1

Save and reboot to make sure it worked correctly

Installing a Splash Screen

As you have probably noticed, the default look of GRUB is nothing too exciting. But fear not, you can install splash screens to spice it up a bit!

To start off find a image that pleases you (9 beautiful screens). Make sure it meets the requirements though -

  • .xpm file
  • 640x480
  • 14 colors only

1. Download an image and add it to a directory.

2. Open up your GRUB file again -

gksudo gedit /boot/grub/menu.lst

3. To keep it organized, add the following line under "Pretty colours" -


Remember to change the above line accordingly and reboot to test.

Share this page:

Suggested articles

10 Comment(s)

Add comment



This howto describes the path to the grub configuration file as:


 In other distros (CentOS 5 in my case) the filename may be different:



The way you have Explained it is Clear and Simple!

Great work Cargoship..


What I could really use however is some sort of tutorial on how to migrate an existing installation from LILO to GRUB (safely!).  Until I find such a thing, I'll stick with LILO.


Grub has as far as I know nothing to do with DOS. Why not just call it a "text menu"?

By: Ivor

most people in the know use the term DOS to refer to any command line OS (where the specific OS is not germain to the point being made)  not just MS-DOS. We knew what he meant.

By: Anonymous

The term DOS menu used here is for a non graphical menu i.e it looks a lot like the menus seen in the old days before GUIs.

By: ales_t

Exactly, this has absolutely nothing to do with DOS and it's a complete nonsense to call it that way.

Thanks for the article though, helped me because I couldn't remember the name of the menu file

By: Anonymous

This needs lots of cleanup.  E.g.:

Scroll down into you stop seeing them.    ? ? 

That tells the file to skip over these lines  ? ?   file reading itself ?  ?

Anyway - I wanted dto know where this thing is stored, how the boot up finds this, and how to use it in win.

This tells me the obvious, but nothing more.

By: Joe

If you actually were following what it said, the article would make much more sense, im totally new at this, but somehow (thanks to this great article) now understand grub.


Ubuntu 8.04 Jaunty

By: anlogtek

This tutor is for grub 1.Not current for grub 2 the current one in use by the majority.