Configuring the GRUB Bootloader
GRUB is a powerful bootloader that can be used to boot Linux, Windows, DOS, and other operating systems as well as the Xen virtualization system. By mastering its configuration file and command-line options, you can configure GRUB to boot exactly the way you want.
How Do I Do That?
GRUB is configured through the file /boot/grub/grub.conf; typical contents of this file look like this:
# grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a /boot partition. This means that # all kernel and initrd paths are relative to /boot/, eg. # root (hd0,0) # kernel /vmlinuz-version ro root=/dev/main/root # initrd /initrd-version.img #boot=/dev/hda default=0timeout=5splashimage=(hd0,1)/grub/splash.xpm.gzhiddenmenu titleFedora Core (2.6.31-1.3420_fc6)root(hd0,1)kernel/vmlinuz-2.6.31-1.3420_fc6 ro root=/dev/main/root rhgb quietinitrd/initrd-2.6.31-1.3420_fc6.imgtitle Other rootnoverify(hd0,0)chainloader+1
This configuration file specifies two menu options, identified by the title keywords: Fedora Core and Windows (which Anaconda labels Other by default). Lines that start with a pound sign are comments. The first lines after the initial comments set up the appearance of the bootloader at startup time:
-
default=0 Configures the first
titleentry as the default entry (they are numbered starting at0)—in this case, Fedora Core.-
timeout=5 Sets the delay in seconds before the default ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access