GRUB’s user interface
Welcome to the tutorial guide. The guide will proivde a user with guidance and instructions on users interface.
A user will note that 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 a user chooses the command-line menu option, or if the configuration file was not found, then GRUB drops to the command-line interface.
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. A user will note that the 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:
Move forward one character.
Move back one character.
Move to the start of the line.
Move the the end of the line.
Delete the character underneath the cursor.
Delete the character to the left of the cursor.
Kill the text from the current cursor position to the end of the line.
Kill backward from the cursor to the beginning of the line.
Yank the killed text back into the buffer at the cursor.
Move up through the history list.
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 key (or ) will display a listing of the available commands, and if the cursor is after the first word, the will provide a completion listing of disks, partitions, and file names depending on the context. Note that to obtain a list of drives, one must open a parenthesis, as root (.
Please note that a user cannot use the completion functionality in the TFTP filesystem. This is because TFTP doesn’t support file name listing for the security.
The simple menu interface
The menu interface is quite easy to use. Its commands are both reasonably intuitive.
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 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 (which operates exactly like the non-config-file version of GRUB, but allows one to return to the menu if desired by pressing ) or to edit any of the boot entries by pressing .
If a user wants to protect the menu interface with a password, all a user can do is choose an entry by pressing , or press
to enter the password.
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 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 in a special version of the GRUB command-line to edit that line. When the user hits , GRUB replaces the line in question in the boot entry with the changes (unless it was aborted via , in which case the changes are thrown away).
If a user wants to add a new line to the menu entry, press if adding a line after the current line or press if before the current line.
To delete a line, hit the key . Although GRUB unfortunately does not support undo, a user can do almost the same thing by just returning to the main menu.
The hidden menu interface
When the terminal is dumb or a user has requested GRUB to hide the menu interface explicitly with the command hiddenmenu, GRUB doesn’t show the menu interface and automatically boots the default entry, unless interrupted by pressing .
When a user interrupts the timeout and the terminal is dumb, GRUB falls back to the command-line interface.
If a user followed the tutorial guide then he/she would have learnt about GRUB’s user interface.













