GRand+Unified+Bootloader

=GRUB -- [|GRand Unified Bootloader]=

Master Contents
Some of these contents are included in other pages.


 * [|Introduction]
 * [|Thanks To]
 * [|Distribution and Status]
 * [|Using GRUB]
 * [|Installation]
 * [|GRUB Error Messages]
 * [|Technical Info]
 * [|GRUB FAQ]


 * NOTE**: Up-to-date versions of this documentation directory can be found at []. The specifics might be for a newer version of the program, so check the [|online NEWS file] for details about the differences.

Introduction
Original GRUB was an attempt to produce a bootloader for IBM PC-compatible machines that has both the capability to be friendly to beginning or otherwise non-technically interested users and the flexibility to help experts in diverse environments. It is currently most useful for users of at least one of the various free UNIX-like operating systems, though it can be used with most any PC operating system.

This project actually started because we wanted to boot the [|GNU HURD] operating system on top of [| Mach4] on an IBM PC-compatible system in a manner compliant with the Multiboot Standard, which was put together as a general solution to the problem of the different boot formats and the functionality they need. I then tried to add support for the extra functionality to the standard bootloader used for FreeBSD. The number of things I had to do to get it all to work multiplied until it was obviously necessary to start from scratch with something different.

GRUB has evolved a long way from it's beginnings as a multi-module bootloader. Several of the techniques used have no analogue in the rest of the free software world, and a few are apparently superior to most proprietary OSes as well. The documentation here and in the multiboot proposal should be very useful to prospective OS and bootloader writers for PCs.

The name comes from the acronym, but also from the realization that although a grub is one of the smaller (and less interesting) critters - barely worthy of notice - it is nearly ubiquitous and vital to the order of things.

=Using GRUB=

Contents
GRUB has both a simple menu interface for preset options from a configuration file, and a highly flexible command-line for performing any desired combination of boot commands. The first action GRUB takes after it is loaded is to look for it's configuration file. If one is not found, then it drops into the command-line interface (and stays there). If one is found, the full menu interface is activated containing whatever entries were found in the file (the command-line is still available via a command from the menu interface).
 * [|Command-Line Interface]
 * [|Menu Interface]
 * [|Menu Entry Editor]

Command-Line Interface
The command-line interface provides a prompt and after it an editable text area much like a command-line in DOS or UNIX. Each command is immediately executed after it is entered. The [|list of 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 forward, C-b backward, C-a beginning of line, C-e end of line, C-k delete to end, C-u delete to beginning; the PC left and right arrow keys, HOME, DELETE, and END work as well). When typing commands interactively, if the cursor is before the "=" character in a command being typed, pressing the TAB key will display a listing of the available commands, and if the cursor is after the "=" character, the TAB will provide a completion listing of disks, partitions, and filenames depending on the context.

Menu Interface
The menu interface is quite easy to use. It's commands are both reasonably intuitive and described onscreen. Basically, the menu interface provides a list of "boot configurations" to the user to choose from. Use the arrow keys to select the entry of choice, then press ENTER 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 (operating exactly like the non-config-file version of GRUB, but allowing one to return to the menu if desired) or to edit any of the "boot configurations".

Menu Entry Editor
This looks much like the main menu interface, but with the lines in the menu being individual commands of the selected configuration instead of configuration names. If an ESC is pressed in the editor, it aborts all the changes made to the configuration entry and goes back to the main menu interface. When a particular line is selected, then it places the user in a special version of the command-line for editing that line. When the user is finished, GRUB replaces the line in question in the "boot configuration" with the changes (unless it was aborted via ESC, and in that case the changes are thrown away).

//erich@uruk.org//