Skip to content
Home

GNU GRUB — the GNU boot loader for multi-OS systems

GNU GRUB is a flexible boot loader from the GNU Project that locates and loads operating systems and kernels, supports BIOS and UEFI, multiboot, chainloading, modules, and interactive recovery modes.

Overview

GNU GRUB (Grand Unified Bootloader) is the standard boot loader used by many Unix-like systems. It presents a menu at system start that lets users choose among installed operating systems or kernel versions, passes boot-time parameters to kernels, and can invoke an interactive command line for advanced tasks. GRUB implements the Multiboot Specification and can therefore work with multiboot-compliant kernels and OS loaders (Multiboot-compliant OSes).

Image gallery

6 Images

Design and components

Modern GRUB (commonly called GRUB 2) is modular: a small first-stage component is installed in firmware-controlled areas (BIOS boot sectors or an EFI executable), which then loads a larger core with filesystem drivers, device access, and modules. Core components include the configuration file (typically grub.cfg), modules for filesystems (ext4, btrfs, xfs, ntfs read-only), device drivers, and a command interpreter. GRUB can directly read kernel images, initramfs files and pass parameters to them; it also supports chainloading other boot loaders such as the Windows boot manager. For convenience, many distributions provide helper scripts like grub-install and grub-mkconfig or wrappers such as update-grub.

History and development

GRUB originated within the GNU Project as a flexible replacement for simple, single-OS boot loaders. Over time it evolved from the older GRUB Legacy architecture to GRUB 2, a complete redesign that added modularity, richer scripting in configuration, UEFI support, and improved device and filesystem handling. The project is maintained as free software under the GNU General Public License and receives contributions that expand hardware and format support.

Common uses and examples

Typical tasks performed with GRUB include selecting kernels at boot, recovering a system from a broken configuration, and setting up dual-boot systems. Common interactive commands are set, linux, initrd, boot and chainloader. Administrators often regenerate a configuration file rather than editing grub.cfg by hand; for example, grub-mkconfig scans installed kernels and writes a new config that the core loader will use. GRUB can also boot images provided over a network (PXE) or from different partitions and devices, and it can directly load a kernel image stored as a file (kernel images).

Security and recovery

GRUB supports password protection for menu entries and the command line, which helps prevent unauthorized boot-time changes. However, because the boot loader runs before the operating system, physical access to the machine or firmware settings can often bypass protections; secure boot and firmware passwords provide extra safeguards. GRUB includes a rescue mode for recovering from corrupted boot sectors or configuration files; typical recovery steps include setting the root device, loading a kernel and initrd, and issuing the boot command.

Notable distinctions

  • GRUB Legacy vs GRUB 2: GRUB 2 is the actively maintained, modular successor with UEFI support and more features.
  • BIOS vs UEFI: installation and image layout differ—UEFI uses EFI binaries while BIOS uses staged boot sectors and core images.
  • Multiboot: GRUB is a primary implementation of the Multiboot Specification, enabling it to start a variety of kernels and operating systems directly.

Because GRUB controls the earliest stage of system startup, understanding its configuration and recovery procedures is essential for system administrators and users who run multiple operating systems or maintain custom kernel configurations.

Questions and answers

Q: What is GNU GRUB?

A: GNU GRUB is a boot loader package from the GNU Project.

Q: What does GRUB stand for?

A: GRUB stands for "GNU GRUB".

Q: What does the Multiboot Specification allow a user to do?

A: The Multiboot Specification allows a user to have more than one operating system on their computer at once, and to choose which one to run when the computer starts.

Q: What can GRUB be used for?

A: 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.

Q: Is GRUB the only boot loader package available?

A: No, there are other boot loader packages available.

Q: Can GRUB be used with only one operating system on a computer?

A: Yes, GRUB can be used with only one operating system on a computer.

Q: What is the main advantage of using GRUB?

A: The main advantage of using GRUB is that it allows a user to have multiple operating systems on their computer and to choose which one to run when the computer starts.

Related articles

Author

AlegsaOnline.com GNU GRUB — the GNU boot loader for multi-OS systems

URL: https://en.alegsaonline.com/art/39335

Share