[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
1.1 Overview | What exactly GRUB is and how to use it | |
1.2 History of GRUB | From maggot to house fly | |
1.3 GRUB features | ||
1.4 The role of a boot loader |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Briefly, a boot loader is the first software program that runs when a computer starts. It is responsible for loading and transferring control to an operating system kernel software (such as Linux or GNU Mach). The kernel, in turn, initializes the rest of the operating system (e.g. a GNU system).
GNU GRUB is a very powerful boot loader, which can load a wide variety of free operating systems, as well as proprietary operating systems with chain-loading(1). GRUB is designed to address the complexity of booting a personal computer; both the program and this manual are tightly bound to that computer platform, although porting to other platforms may be addressed in the future.
One of the important features in GRUB is flexibility; GRUB understands filesystems and kernel executable formats, so you can load an arbitrary operating system the way you like, without recording the physical position of your kernel on the disk. Thus you can load the kernel just by specifying its file name and the drive and partition where the kernel resides.
When booting with GRUB, you can use either a command-line interface (see section 12.1 The flexible command-line interface), or a menu interface (see section 12.2 The simple menu interface). Using the command-line interface, you type the drive specification and file name of the kernel manually. In the menu interface, you just select an OS using the arrow keys. The menu is based on a configuration file which you prepare beforehand (see section 5. Configuration). While in the menu, you can switch to the command-line mode, and vice-versa. You can even edit menu entries before using them.
In the following chapters, you will learn how to specify a drive, a partition, and a file name (see section 2. Naming convention) to GRUB, how to install GRUB on your drive (see section 3. Installation), and how to boot your OSes (see section 4. Booting), step by step.
Besides the GRUB boot loader itself, there is a grub shell
grub
(see section 15. Invoking the grub shell) which can be run when
you are in your operating system. It emulates the boot loader and can
be used for installing the boot loader.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
GRUB originated in 1995 when Erich Boleyn was trying to boot the GNU Hurd with the University of Utah's Mach 4 microkernel (now known as GNU Mach). Erich and Brian Ford designed the Multiboot Specification (see section `Motivation' in The Multiboot Specification), because they were determined not to add to the large number of mutually-incompatible PC boot methods.
Erich then began modifying the FreeBSD boot loader so that it would understand Multiboot. He soon realized that it would be a lot easier to write his own boot loader from scratch than to keep working on the FreeBSD boot loader, and so GRUB was born.
Erich added many features to GRUB, but other priorities prevented him from keeping up with the demands of its quickly-expanding user base. In 1999, Gordon Matzigkeit and Yoshinori K. Okuji adopted GRUB as an official GNU package, and opened its development by making the latest sources available via anonymous CVS. See section A. How to obtain and build GRUB, for more information.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The primary requirement for GRUB is that it be compliant with the Multiboot Specification, which is described in section `Motivation' in The Multiboot Specification.
The other goals, listed in approximate order of importance, are:
Except for specific compatibility modes (chain-loading and the Linux piggyback format), all kernels will be started in much the same state as in the Multiboot Specification. Only kernels loaded at 1 megabyte or above are presently supported. Any attempt to load below that boundary will simply result in immediate failure and an error message reporting the problem.
In addition to the requirements above, GRUB has the following features (note that the Multiboot Specification doesn't require all the features that GRUB supports):
The list of commands (see section 13. The list of available commands) are a subset of those supported for configuration files. Editing commands closely resembles the Bash command-line (see section `Command Line Editing' in Bash Features), with TAB-completion of commands, devices, partitions, and files in a directory depending on context.
gzip
. This
function is both automatic and transparent to the user (i.e. all
functions operate upon the uncompressed contents of the specified
files). This greatly reduces a file size and loading time, a
particularly great benefit for floppies.(2)
It is conceivable that some kernel modules should be loaded in a compressed state, so a different module-loading command can be specified to avoid uncompressing the modules.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The following is a quotation from Gordon Matzigkeit, a GRUB fanatic:
Some people like to acknowledge both the operating system and kernel when they talk about their computers, so they might say they use "GNU/Linux" or "GNU/Hurd". Other people seem to think that the kernel is the most important part of the system, so they like to call their GNU operating systems "Linux systems."I, personally, believe that this is a grave injustice, because the boot loader is the most important software of all. I used to refer to the above systems as either "LILO"(3) or "GRUB" systems.
Unfortunately, nobody ever understood what I was talking about; now I just use the word "GNU" as a pseudonym for GRUB.
So, if you ever hear people talking about their alleged "GNU" systems, remember that they are actually paying homage to the best boot loader around... GRUB!
We, the GRUB maintainers, do not (usually) encourage Gordon's level of fanaticism, but it helps to remember that boot loaders deserve recognition. We hope that you enjoy using GNU GRUB as much as we did writing it.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |