Editing the GRUB ~ HowTo

This is about customizing the grub menu which appears at the bootup. The things in this menu contains in a file called ‘menu.lst’ and its located in ‘/boot/grub’ dir. Its not difficult to edit this but bit risky if you don’t do it correctly. So for your safe its better to backup this ‘menu.lst’ file first. Then fire up your terminal/konsole, get root privileges and type,




Now you see ‘menu.lst’ through the terminal/konsole in edit mode. It looks very complex at the very first moment. But if you take a further look, you ll notice that most of the things are just comments. This HowTo explains only 4 useful edits.


  1. Changing The Default Timeout

Fined out the following phrase, then all you have to do is to assign the time for your choice in seconds. At the moment its default value is 10 seconds


Changing The Default Timeout

Changing The Default Timeout

 2.Changing The Titles

This means you can change the titles which appear at the startup. To do this scroll down the menu until you fined “##End Default Options##”,

Changing The Titles

Changing The Titles

Here you can find all the titles/names of Linux and non-Linux operating systems. You can just edit them! Mm.. Well.. I have edit “windows XP as windows sucksp”. Sorry windows folks..  My bad!




    3. Removing Items

There are things that are not useful for some users. Things like ‘recovery mode, memtest and windows divider (if you have windows)’. Erase the titles and their belongings with no fear. But its better if you can leave them by only commenting.

Removing Items

Removing Items


4. Setting up the default OS

This option is at the very top of the file,

 Setting up the default OS

Setting up the default OS

In menu.lst, each ‘title/entry’ has a number starting from 0. So count down the titles from 0 utile you fined the OS which you want to set as the default. Then give the relevant value. Please note that if you have changed any titles into comments, leave them without counting.

            If you are done with editing, finally press Ctrl+x to exit. Then it ll ask to save any changes you made. Reboot the system to check. Then if something goes wrong remember to replace the menu.lst with the file you backup early. You can use a live CD for that. Feel free to experiment further. Happy computing!


Reinstalling the GRUB

      New Linux users like to keep windows in their computers while getting use to Linux. But I don’t recommend that because when they find something hard in Linux or something new to do in Linux, most of them just forget about everything and get it done in windows. So they won’t learn anything new.

             However most new users think whenever they run a new installation of Windows the GRUB gets disappear so they also have to reinstall Linux. But that’s not the way! Oops, I almost forgot to tell what GRUB is. Well GRUB stands for GRand Unified Bootloader. It’s a flexible and a powerful boot loader which comes with Linux. It’s useful when we use more than one operating system in a single PC.

            So the reason for the disappearance of GRUB is when user installs Windows or any other OS after a Linux installation, the newly installed OS rewrites the MBR (Master Boot Record) with its own boot loader. OK then this is the way to re-establish the GRUB.

       0. Boot the machine from your Live CD/DVD.


1.      Open a terminal/konsole and get into root mode by giving

sudo  su


            2.Then type ‘grub’ and press enter. This allows the user to run the grub shell.


3. Setting the root device. Root device means the partition which contains the ‘/boot’ directory. If you’re not sure with that, you can find the corresponding partition by giving,

grub> find  /boot/grub/stage1

                        I have resulted this,


grub> find  /boot/grub/stage1

grub> find /boot/grub/stage1

            This says my hard disk number is 1 and partition number is 3.

            Note: hard disk numbers and partition numbers are starting from 0.

(According to me, this is the 4th partition of my 2nd hard disk)

                        Now, I’m setting it as the root device.

                        grub>root  (hd1,3)


4.After setting the root device correctly run the following command,

 grub>setup  (hd1)

            This tells to install the GRUB to the MBR of the 2nd hard disk.


            5.Now exit from the grub shell



   The missing GRUB is back on business. 

%d bloggers like this: