Edit menu lst

From Super Grub Disk Wiki
Jump to: navigation, search

Contents

Introduction

Super Grub Disk is not perfect and sometimes you must edit your menu.lst so that your system can finally boot. It might be because you changed a hard disk, because you moved a partition, because there was a strange kernel update, because you have various distributions together. Because you need to change linux kernel boot parametres.

Advice

When you have to edit menu.lst I always say the same thing. Try to edit it on the fly and once in your system try to make changes permanent with the other methods. This will avoid you a lot of headaches with not knowing how to mount and edit a partition from a live cd.


Edit on the fly

When we boot if we see:

Press ESC to see the menu and a countdown we must press ESC key.

If we already see Grub menu we should choose with arrow keys our Linux usual boot entry and press 'e' key. We will see some lines that will begin with kernel, initrd, boot, etc. We will choose the root line and we will press 'e' key again. Now we will edit the presented partition value to meet our needs.

We will press ENTER and then press 'b' key. Our Linux should boot but with this new option.

Let's remember that these are volatile changes, next time we will reboot this root option will not be there and you will have to re-enter them (if you want it back again, of course  ; ) ).

Linux Kernel Boot Parametres

If you need to change Linux Kernel Boot parametres, because, for example Linux root device is not the same one please check: Linux Kernel Boot Parametres Howto

Edit the grub root variable

When you move a partition or, I do not know, your disk has been recognised as the second one but it was the first one you will need to edit each one of the root (hdX,Y) lines of your menu.

You can avoid this step by finding this line:

# groot=(hd1,4)

and writing there the news values.

We save the file and as a root user we run:

update-grub.

In Ubuntu we run:

sudo update-grub.

After running update-grub all the root entries will be update automatically.

How to edit as a root or superuser

In order to edit menu.lst and save it sucessfully you will need root privilegies.

In Ubuntu or sudo base distributions you can use:

gksudo gedit /boot/grub/menu.lst

In normal distributions you can use:

gksu gedit /boot/grub/menu.lst

from a terminal.