Interfaces

GRUB features three powerful interfaces that provide different levels of functionality. Each of these interfaces allow you to boot operating systems, and you can even move between interfaces within the GRUB environment.

Menu Interface

If GRUB was automatically configured for you by the Red Hat Linux installation program, this is the interface you already know. A menu of operating systems or kernels preconfigured with their own boot commands exists in this interface as a list, by name, after the system first starts. You can use the arrow keys to select an option other than the default selection and press the [Enter] key to boot it. Alternatively, a timeout period may have been set, so that GRUB will start loading the default option.

From the menu interface, you can also press the [e] key to edit the highlighted menu entry's commands or the [c] key to move to a command line interface.

Menu Entry Editor Interface

To get to this interface, you must press the [e] key from the menu interface. The GRUB commands for that entry are displayed here, and you can alter these command lines before booting the operating system by adding ([o] after the current line; [O] before it), editing ([e]), or deleting ([d]) them.

After you have made your changes and the lines look like you want, you can hit the [b] key to execute them and boot the operating system. The [Esc] key forgets your changes and takes you to the standard menu interface. The [c] key will take you to the command line interface.

Command Line Interface

This is the most basic GRUB interface, but it is also the one that gives you the most control. You can type any relevant GRUB commands here followed by the [Enter] key to execute them. This interface features some advanced shell-like features, including [Tab] key completion, based on context, and [Ctrl] key combinations when typing commands, such as [Ctrl]-[a] to move to the beginning of a line, and [Ctrl]-[e] to move to the end of a line. In addition, the arrow, [Home], [End], and [Delete] keys work as they do in the bash shell.

Order of Interface Use

When the GRUB environment starts upon loading the second stage boot loader, it looks for its configuration file. When found, it uses the configuration file to build the menu list of operating systems to load and moves you into the menu interface.

If the configuration file cannot be found, or if the configuration file is unreadable, GRUB will take you to the command line interface to allow you to manually type the commands necessary to boot an operating system.

If the configuration file is not valid, GRUB will print out the error and ask for input. This can be very helpful, because you will be able to see precisely where the problem occurred and fix it in the file. Pressing any key will take you back to the menu interface, where you can edit that menu option and correct the problem based on the error reported by GRUB. If your correction fails, the error is reported and you are allowed to start again.