Whole document tree
    

Whole document tree

GRUB Manual: Interface
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

12. GRUB's user interface

GRUB has both a simple menu interface for choosing preset entries from a configuration file, and a highly flexible command-line for performing any desired combination of boot commands.

GRUB looks for its configuration file as soon as it is loaded. If one is found, then the full menu interface is activated using whatever entries were found in the file. If you choose the command-line menu option, or if the configuration file was not found, then GRUB drops to the command-line interface.

12.1 The flexible command-line interface  
12.2 The simple menu interface  
12.3 Editing a menu entry  
12.4 The hidden menu interface  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

12.1 The flexible command-line interface

The command-line interface provides a prompt and after it an editable text area much like a command-line in Unix or DOS. Each command is immediately executed after it is entered(7). The commands (see section 13.3 The list of command-line and menu entry commands) are a subset of those available in the configuration file, used with exactly the same syntax.

Cursor movement and editing of the text on the line can be done via a subset of the functions available in the Bash shell:

C-f
PC right key
Move forward one character.

C-b
PC left key
Move back one character.

C-a
HOME
Move to the start of the line.

C-e
END
Move the the end of the line.

C-d
DEL
Delete the character underneath the cursor.

C-h
BS
Delete the character to the left of the cursor.

C-k
Kill the text from the current cursor position to the end of the line.

C-u
Kill backward from the cursor to the beginning of the line.

C-y
Yank the killed text back into the buffer at the cursor.

C-p
PC up key
Move up through the history list.

C-n
PC down key
Move down through the history list.

When typing commands interactively, if the cursor is within or before the first word in the command-line, pressing the TAB key (or C-i) will display a listing of the available commands, and if the cursor is after the first word, the TAB will provide a completion listing of disks, partitions, and file names depending on the context.

Note that you cannot use the completion functionality in the TFTP filesystem. This is because TFTP doesn't support file name listing for the security.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

12.2 The simple menu interface

The menu interface is quite easy to use. Its commands are both reasonably intuitive and described on screen.

Basically, the menu interface provides a list of boot entries to the user to choose from. Use the arrow keys to select the entry of choice, then press RET to run it. An optional timeout is available to boot the default entry (the first one if not set), which is aborted by pressing any key.

Commands are available to enter a bare command-line by pressing c (which operates exactly like the non-config-file version of GRUB, but allows one to return to the menu if desired by pressing ESC) or to edit any of the boot entries by pressing e.

If you protect the menu interface with a password (see section 9. Protecting your computer from cracking), all you can do is choose an entry by pressing RET, or press p to enter the password.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

12.3 Editing a menu entry

The menu entry editor looks much like the main menu interface, but the lines in the menu are individual commands in the selected entry instead of entry names.

If an ESC is pressed in the editor, it aborts all the changes made to the configuration entry and returns to the main menu interface.

When a particular line is selected, the editor places the user at a special version of the GRUB command-line to edit that line. When the user hits RET, GRUB replaces the line in question in the boot entry with the changes (unless it was aborted via ESC, in which case the changes are thrown away).

If you want to add a new line to the menu entry, press o if adding a line after the current line or press O if before the current line.

To delete a line, hit the key d. Although GRUB does not support undo unfortunately, you can do almost the same thing by just returning to the main menu.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

12.4 The hidden menu interface

When your terminal is dumb or you request GRUB of hiding the menu interface explicitly with the command hiddenmenu (see section 13.1.3 hiddenmenu), GRUB doesn't show the menu interface (see section 12.2 The simple menu interface) and automatically boots the default entry, unless interrupted by pressing ESC.

When you interrupt the timeout and your terminal is dumb, GRUB falls back to the command-line interface (see section 12.1 The flexible command-line interface).


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Jason Thomas on February, 4 2002 using texi2html