GRUB (GRand Unified Bootloader) is an operating system bootloader used in most Linux distributions, capable of launching multiple OSes on the same computer. Essentially, it is a program that sits between the BIOS/UEFI and the operating system itself.
When you power on your computer, the firmware (BIOS or UEFI) runs first, initializing the hardware. Then, control is passed to the bootloader — this is where GRUB comes into play. It displays a menu to select the OS (if there are several), loads the Linux kernel or another system, and passes control to it.
Why do you need GRUB?
- Choosing the system at startup If you have multiple OSes installed (for example, Windows and Linux), GRUB lets you select which one to boot.
- Flexible boot configuration You can pass parameters directly to the Linux kernel at startup (for example, enable nomodeset, disable microcode checks, or boot into recovery mode).
- Support for multiple file systems GRUB can read partitions with ext4, btrfs, xfs, and many other file systems, so it can load a kernel from almost any disk.
- Compatibility with modern hardware GRUB supports both legacy BIOS systems and modern UEFI-based computers.
How does GRUB work?
GRUB consists of several parts:
- Stage 1 - a small bootloader in the MBR (or ESP partition in UEFI) that runs first.
- Stage 1.5 / Stage 2 - the main code that can work with file systems and load configuration files.
- Configuration file (/boot/grub/grub.cfg) - contains the definitions of available kernels, parameters, and OS entries.
Main features
- Booting Linux, Windows, BSD, and other systems.
- A system selection menu with a timer.
- Ability to edit boot parameters “on the fly.”
- Support for themes and customization.
- Network boot support (PXE).
Where is it used?
GRUB is the default bootloader in almost all popular Linux distributions: Ubuntu, Debian, Fedora, Arch Linux, Linux Mint, and many others. Even if you only use one OS, chances are that GRUB is working “behind the scenes” to start it.
FAQ: Frequently Asked Questions about GRUB
- Can I remove GRUB? Yes, but only if you have a single OS. If you remove GRUB without replacing it with another bootloader (such as Windows Boot Manager), your computer will not boot.
- What should I do if GRUB breaks?Most often, you can fix it by booting from a Linux Live USB and using the commands grub-install or update-grub to restore it.
- Where are GRUB settings stored?The main configuration file is /boot/grub/grub.cfg. However, it’s usually not edited directly — instead, changes are made in /etc/default/grub and applied with update-grub.
- Can I change the appearance of the GRUB menu?Yes. Themes are available, and you can customize the background, fonts, and timers.
- How is GRUB different from LILO?LILO is an older Linux bootloader with fewer features (for example, it couldn’t dynamically load kernels from file systems). Today, LILO is rarely used, while GRUB has become the standard.
- Does GRUB support UEFI?Yes, modern versions of GRUB work on both legacy BIOS systems and UEFI-based computers.
- Is it possible to boot without GRUB?Technically, yes: you could use the Windows bootloader or systemd-boot instead. However, for Linux, GRUB is the most convenient and versatile option.
Conclusion
GRUB is a universal bootloader without which most Linux systems simply wouldn’t start. It performs a crucial role: bridging the computer’s hardware with the operating system and giving the user control over the boot process. With it, you can run multiple OSes on the same computer, set kernel parameters, recover the system in case of failures, and even customize the look of the boot menu.
Its flexibility and universality have made GRUB the de facto standard in the Linux community. For beginners, it provides a simple way to choose an OS at startup, while for advanced users, it offers extensive customization and troubleshooting options. That’s why, when learning Linux, it’s worth understanding at least the basics of how GRUB works and how to restore it — this knowledge may one day save your computer from a “black screen.”
Serverspace Knowledge Base
Serverspace Knowledge Base is a convenient and constantly updated resource that brings together practical materials for developers, system administrators, and anyone working with infrastructure. Here you can find detailed server setup guides, step-by-step instructions for working with virtual machines, configuration examples for popular services, and optimization tips. Special attention is given to Linux: articles cover network service configuration, file system management, package managers, security settings, and monitoring. You’ll also find resources on SSH, Docker, virtualization systems, cloud technologies, and DevOps tools. With its structured search and clear explanations, the knowledge base is suitable for both beginners and experienced specialists. If you’re looking for practical examples or ready-made solutions to common Linux tasks, the Serverspace Knowledge Base will be a reliable source of information and help you quickly find your way in any situation.