The GRUB Configuration File
GRUB uses a configuration file that sets up the menu interface. The configuration file is called menu.lst and is found with the other GRUB files in the /boot/grub directory. In some distributions (e.g., Fedora and Red Hat) the configuration file is called grub.conf, which is a symbolic link to menu.lst.
The configuration file begins with a section containing global commands that apply to all boot entries, followed by an entry for each Linux image or other operating system that you want to be able to boot. Here is an example of a global section (a hash sign, #, begins a comment):
default=0 # default to the first entry timeout=20 # set the timeout to 20 seconds splashimage=(hd0,0)/grub/splash.xpm.gz # the splash image displayed with # the menu
Certain GRUB commands are available only in the global section of the configuration file, for use with the GRUB menu. These commands are described in the following list. All other commands can be used either in the configuration file or on the command line and are described later in GRUB Commands in GRUB Commands.
- default num
Set the default menu entry to num. The default entry is started if the user does not make a selection before the timeout time. Menu entries are numbered from 0. If no default is specified, the first entry (0) is used as the default.
- fallback num
Specify the entry to be used if for any reason the default entry has errors. If this command is specified and the default doesn’t work, GRUB boots the fallback ...
Get Linux in a Nutshell, 6th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.