Web page hosting, cheap domain name & website promotion services
  

 Home

Red Hat Linux 7.2: The Official Red Hat Linux Reference Guide
PrevChapter 5. GRUBNext

The Menu Configuration File

The configuration file, which is used to create the list in GRUB's menu interface of operating systems to boot, essentially allows the user to select a pre-set group of commands to execute. The commands given in the section called Commands can used, as well as some special commands that may only be used in the configuration file.

Special Configuration File Commands

The following commands can only be used in the GRUB menu configuration file:

  • color <normal-color> <selected-color> — Allows you to set up specific colors to be used in the menu, where two colors are configured as the foreground and background. You can just use the color names, such as red/black. An example line might look like this:

    color red/black green/blue
  • default <title-name> — The default entry title name that will be loaded if the menu interface times out.

  • fallback <title-name> — If used, the entry title name to try if first attempt failed.

  • hiddenmenu — If used, it prevents the GRUB menu interface from being displayed, loading the default entry when the timeout period expires. The user can see the standard GRUB menu by pressing the [Esc] key.

  • password <password> — If used, it prevents the user who does not know the password from editing the entries for this menu option.

    Optionally, you can specify an alternate menu configuration file after the <password>, so that, if the password is know, GRUB will restart the second stage of the boot loader and use this alternate configuration file to build the menu. If this alternate file is left out of the command, then a user who knows the password is able to edit the current configuration file.

  • timeout — If used, sets the amount of time, in seconds, before GRUB loads the entry designated by the default command.

  • splashimage — Specifies the location of the splash screen image to be used when GRUB boots.

  • title — Sets a title to be used with a particular group of commands used to load an operating system.

The # character can be used to place comments in the menu configuration file.

Configuration File Structure

The commands to set the global preferences for the GRUB menu interface are placed at the top of the file, followed by the different entries for each of the operating systems to boot.

A very basic GRUB menu configuration file designed to boot either Red Hat Linux or Microsoft Windows 2000 might look like this:

default linux
timeout 10
color green/black light-gray/blue

# section to load linux
title linux
root (hd0,1)
kernel /vmlinuz root=/dev/hda5
boot

# section to load Window 2000
title windows
rootnoverify (hd0,0)
chainloader +1

This file would tell GRUB to build a menu with Red Hat Linux as the default operating system, set to autoboot it after 10 seconds. Two sections are given, one for each operating system entry, with commands specific to this system's partition table.

Actually configuring a GRUB menu configuration file to boot multiple operating systems is beyond the scope of this chapter. Please consult the section called Additional Resources for the detailed information required to boot the various operating systems possible with GRUB.


PrevHomeNext
CommandsUpAdditional Resources
 

 

 

 

Buy Cheap domains and domain register |  Cheap domain registration and transfer 

Disclaimer: For authoritative source or latest update to this documentation, please refer to http://www.redhat.com/docs/manuals/linux/

 

 
Quotes: Every normal man must be tempted at times to spit upon his hands, hoist the black flag and begin slitting throats.It's a funny thing about life; if you refuse to accept anything but the best, you very often get it.