Go to the first, previous, next, last section, table of contents.
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.
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 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:
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.
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 Protecting your computer from cracking), all you can do is choose an entry by pressing RET, or press p to enter the password.
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.
When your terminal is dumb or you request GRUB of hiding the menu interface explicitly with the command @command{hiddenmenu} (see section hiddenmenu), GRUB doesn't show the menu interface (see section 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 The flexible command-line interface).
Go to the first, previous, next, last section, table of contents.