Editing the GRUB menu

From MEPIS Documentation Wiki

Jump to: navigation, search

To edit the GRUB menu you have to edit the "/boot/grub/menu.lst" file.

Note that the name of this file was obtained by removing the letter 'i' from 'menu.list'. I mention this because in many fonts it can be hard to tell the letter 'l' (which we want here) from the digit '1' (which we do not want).

You have to be root to edit the file.

The "/boot/grub/menu.lst" file should contain something like this:

title MEPIS kernel 2.6.15-586tsc
kernel (hd#,#)/boot/vmlinuz-2.6.15-586tsc root=/dev/hd## 

The numbers represented here by # sign should point to the appropriate drive and partition. One way to find these numbers:

  1. At boot, when you get the Grub menu, press "Esc" to get out of the graphical interface and then press "c" to get the Grub command prompt.
  2. Type: "find /vmlinuz" and you'll get the (hd#,#) of the boot partition. Alternatively if that doesn't work you can search for a specific kernel location with "find /boot/vmlinuz-2.6.7"
  3. Edit /boot/grub/menu.lst to reflect these findings.

Note: The information in the (hd#,#) field is for GRUB and must conform to GRUB's (0-up) numbering system, but the info in the /dev/hd## field is passed to the kernel and therefore must conform to the Linux numbering system.
For example:
If the /boot and the /root directories are both in the first primary partition of the first hard drive, the kernel command will read:

   kernel (hd0,0)/boot/vmlinuz-2.6.15-586tsc root=/dev/hda1 

If both directories are in the first extended partition of the second drive the commands will read:

   kernel (hd1,4)/boot/vmlinuz-2.6.15-586tsc root=/dev/hdb5 

and so forth.

See also GRUB.

Alternative boot methods | FAQ | Main Page

Personal tools
In other languages