O'Reilly logo

Linux in a Nutshell, 6th Edition by Robert Love, Stephen Figgins, Ellen Siever, Arnold Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required