GRUB boot menu The default location is in /boot/grub/menu.lst. The .lst suffix stands for menu list,
not menu first. The file contains configuration options (like default boot entry,
(http://grub.enbug.org/ChangeDefaultBootEntry) (grub.enbug.org) color,
timeout and password settings) and a list of menu entries. The file is often
managed by some tool from the distribution itself, so when kernels are installed
or removed the boot menu list gets automatically updated. Another common
location is /etc/grub.conf but this is often a link file to the /boot/grub file.
Manual configuration
To configure grub, find out your distribution. SUSE uses /boot/grub/menu.lst,
Red Hat and Ubuntu use /boot/grub/grub.cfg. Full documentation of the format
of the file can be found in the GRUB info pages. But for a quick start, here are a
couple of example entries to get you going.
Basic entry to boot a linux kernel located on the first disk:
title Linux kernel 2.6.4
root (hd0,0)
kernel /boot/vmlinuz-2.6.4 root=/dev/hda1 ro 3
initrd /boot/initrd.img
denotes the selectable boot-menu title;
title
says /boot partition is on the first partition first drive or that the
root (hd0,0)
SUB-folder /boot to the / partition refers to same structure;
kernel tells grub where to find the linux kernel. The "root" mentioned after
vmlinuz refers to the / entry in your /etc/fstab file. Kernel parameters such
as desired runlevel (3) may be presented at the end of the kernel-line;
initrd describes the use and location of a preconfigured ramdisk.
Note that grub starts counting disks from 0, while skipping other IDE devices.
Thus /dev/hda1=(hd0,0) and /dev/hdc1=(hd1,0) when a cdrom-drive is attached as slave
on the first IDE-channel. When adding drives to an existing configuration,
drives.map may need to be refreshed from within grub, especially when more than
one drive/partition is bootable.
Debian Debian manages the menu file with update-grub. This script checks which
kernels are located in /boot/ and generates a menu entry for them. It adds its
own configuration options to the menu.lst file. These concern the options that
are given to the generated menu entries. Usually, update-grub is automatically
run after kernel packages have been installed or removed (at least it's the default
configuration for the sarge/testing disribution). If not, update-grub can be added
as a postinst_hook and a postrm_hook in the /etc/kernel-img.conf file.
Red Hat
Red Hat also manages the menu.lst file itself. It should be updated automatically
when a kernel rpm is installed or removed
SuSE SuSE manages the menu.lst of GRUB using YAST.
Booting Windows/DOS title Win
rootnoverify (hd0,0)
makeactive
chainloader +1
If you where to have dual-booting with Linux on the first disk and Windows on
the 2nd or some other disk you will run into a common trouble: WARNING
Windows only wants to boot from partitions on first disk in the system. But GRUB
can trick Windows with the map command, an example entry to correct this
problem would look like:
title Win
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader +1