A bootloader is the first software that runs after BIOS/UEFI.
It loads and transfers control to the operating system kernel.
GRUB (GRand Unified Bootloader) is the default bootloader for most Linux distributions.
grub.cfg)| System Type | Location |
|---|---|
| BIOS | /boot/grub + MBR (first 512 bytes) |
| UEFI | /boot/efi/EFI/<distro>/grubx64.efi |
Main config file:
/boot/grub/grub.cfg
# Update GRUB config (Debian/Ubuntu)
sudo update-grub
# Reinstall GRUB to MBR
sudo grub-install /dev/sda
# Regenerate GRUB on RHEL/Fedora
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
π§ Use Boot-Repair (GUI tool for Ubuntu)
π οΈ Chroot into system from Live CD and run grub-install + update-grub
π Always keep a Live Linux USB for recovery
π GRUB password protection for editing entries
π Disable OS recovery or single-user mode in production
β Use encrypted disks for extra security
| Bootloader | Used In | GUI Menu | Multiboot Support | UEFI Support |
|---|---|---|---|---|
| GRUB | Most Linux distros | β | β | β |
| systemd-boot | Arch, systemd-based | β (text) | β οΈ Limited | β |
| LILO | Legacy Linux systems | β | β οΈ Limited | β |
MBR vs GPT β Disk partitioning schemes
UEFI vs BIOS β Firmware interfaces
initrd/initramfs β Initial RAM disk for early boot
chroot β Change root directory for recovery or repair