GNU GRUB
From Wikipedia, the free encyclopedia
- "GRUB" redirects here. For other uses, see grub (disambiguation).
| GNU GRUB | |
|
<tr><td colspan="2" style="text-align: center;">Image:Grub2.png | |
| Use: | Bootloader
<tr><th>License:</th><td>GNU General Public License</td></tr> |
|---|---|
| Website: | http://www.gnu.org/software/grub/ |
GNU GRUB ("GRUB" for short) is a boot loader package from the GNU Project. GRUB is the reference implementation of the Multiboot Specification, which allows a user to have several different operating systems on their computer at once, and to choose which one to run when the computer starts. GRUB can be used to select from different kernel images available on a particular operating system's partitions, as well as to pass boot-time parameters to such kernels.
GNU GRUB developed from a previous package called the GRand Unified Bootloader (a play on grand unified theory). GRUB can run on any operating system with a Multiboot kernel. It is predominantly used on Unix-like systems; the GNU operating system uses GNU GRUB as its boot loader, as do most general-purpose Linux distributions. Solaris has been able to boot using GRUB since version 10 1/06.
Contents |
[edit] Features
GRUB is dynamically configurable; it loads its configuration at startup, allowing boot-time changes such as selecting different kernels or Initial RAM disks. To this end, GRUB provides a simple, bash-like command line interface, which lets users write new boot sequences.
GRUB is highly portable. It supports multiple executable formats, and is geometry translation independent; while Multiboot compliant, it supports non-multiboot operating systems such as Microsoft Windows and OS/2 via a chain loading function. GRUB supports all commonly-used Unix file systems as well as VFAT and NTFS as used by Windows, and supports Logical Block Address (LBA) mode. GRUB allows users to view the contents of files on any supported file systems.
GRUB can be used with a variety of different user interfaces. Most Linux distributions take advantage of GRUB's support for a graphical interface to provide a customized boot menu with a background image, and occasionally mouse support. GRUB's text interface can be set to use a serial link to provide a remote terminal boot loader access.
GRUB can download operating system images from a network, and can thus support diskless systems. GRUB supports automatic decompression of OS images prior to booting from them.
[edit] GRUB boot process
When a computer is turned on, the computer's BIOS finds a bootable device (hard disk) and transfers control to the master boot record (MBR), the first 512 bytes of the hard disk.
The MBR contains GRUB stage 1. Given the small size of the MBR, Stage 1 does little more than load the next stage of GRUB (which may reside physically elsewhere on the disk). Stage 1 can either load Stage 2 directly, or it can load stage 1.5: GRUB Stage 1.5 is located in the first 30 kilobytes of hard disk immediately following the MBR. Stage 1.5 loads Stage 2.
When GRUB Stage 2 receives control, it presents an interface to the user in order to select which operating system to boot. This normally takes the form of a graphical menu, although if this is not available or the user wishes further control, GRUB has its own command prompt, where the user can manually specify the boot parameters. GRUB can also be set to automatically load a particular kernel after a timeout period.
Once boot options have been selected, GRUB loads the selected kernel into memory and passes control on to the kernel. At this stage GRUB can pass control of the boot process to another loader using chain loading if required by the operating system.
[edit] Installation
Unlike LILO, there is no need to reinstall GRUB to the MBR or a partition after a change to the configuration file.
In Linux, the "grub-install" command is used to install stage1 to either the MBR or a partition. GRUB's configuration file, stage2 (usually), and other files must be in a usable partition. If these files or the partition become unavailable stage1 will drop the user to the command line interface.
The name and disk location of the GRUB configuration file varies from system to system; for example, in Debian GNU/Linux the file is stored in /boot/grub/menu.lst while Fedora Core uses /boot/grub/grub.conf. Fedora also provides a symbolic link from /etc/grub.conf to /boot/grub/grub.conf<code> for compatibility reasons.
Instead of being installed on the system's hard disk, GRUB can be installed on removable media such as a floppy disk or USB flash drive in order to bring up a system which cannot boot from its own disk.
[edit] Development
The most used version of GRUB is referred to as "GRUB Legacy". This version is still receiving bug fixes but no new features are being added. The GRUB developers have switched their focus to GRUB 2, a complete rewrite whose most important goal is to make GNU GRUB cleaner, safer, more robust, more portable and more powerful. GRUB 2 started under the name PUPA. PUPA was supported by the Information-Technology Promotion Agency in Japan. PUPA was integrated into GRUB 2 development around 2002, when the GRUB version 0.9x was renamed GRUB Legacy. When GRUB 2 is released it will bear the name GNU GRUB. As of November 2006, GRUB 2 is still in development and not ready for production usage.
Some of the goals of the project included support for non-x86 platforms, international localization, non-ASCII characters, dynamic modules, memory management, a scripting mini-language, migrating platform specific (x86) code to platform specific modules, and an object-oriented framework.
[edit] References
- Brady, Pádraig. Details of GRUB on the PC. pixelbeat.org. Retrieved on 2006-11-22.
[edit] See also
[edit] External links
</div>
History: GNU Manifesto • GNU Project • Free Software Foundation (FSF)
GNU licenses: GNU General Public License (GPL) • GNU Lesser General Public License (LGPL) • GNU Free Documentation License (FDL)
Software: GNU operating system • bash • GNU Compiler Collection • GNU Emacs • Ghostscript • other GNU packages and programs
Advocates and activists: Richard Stallman (RMS) • Robert J. Chassell • Prof. Masayuki Ida • Geoffery Knauth • Lawrence Lessig • Eben Moglen • Henri Poole • Peter Salus • Gerald Sussman • FSF's Past Directors • other FSF's Staff and Employees
Software developers: Richard Stallman (RMS) • Jim Blandy • Michael (now Thomas) Bushnell • Ulrich Drepper • Brian Fox • Tom Lord • Roland McGrath • other FSF's Programmers
Software documentors: Richard Stallman (RMS) • Robert J. Chassell • Roland McGrath • other FSF's Documentors
de:GRUB es:Grub fr:GRand Unified Bootloader ko:GRUB it:GRUB he:GRUB ja:GRUB no:GNU Grand Unified Boot loader pl:GRUB pt:GRUB fi:GNU GRUB sv:GRUB

