Skip to main content
When a Linux system powers on, the very first program it executes is the bootloader. Its primary role is to initialize hardware and load the Linux kernel—the core of your operating system. GRUB (Grand Unified Bootloader) is the most widely used bootloader in Linux environments. In this guide, we’ll walk through installing, configuring, and troubleshooting GRUB on CentOS Stream systems.
  • A CentOS installation ISO on USB, CD, or DVD
  • Familiarity with basic Linux commands and partitioning
  • Backup of important data before making bootloader changes

1. Boot into Rescue Mode

  1. Insert your CentOS installation media and boot from it.
  2. At the menu, select Troubleshooting.
  3. Choose Rescue a CentOS Stream System.
Once the rescue image loads, you’ll see service stop messages:
When prompted, select option 1 to auto-detect and mount your system under /mnt/sysroot:
After mounting completes, switch into your installed system’s root:

2. Generate a New GRUB Configuration

Inside the chroot, generate a fresh GRUB config file: Example for BIOS:

3. Install GRUB to the Disk

First, identify your boot disk:
Install GRUB onto /dev/sda (or your boot disk):
On EFI systems, reinstall the GRUB EFI packages instead of grub2-install:

4. Exit Rescue and Reboot

Leave the chroot and reboot into your system’s internal disk:

5. Edit GRUB Defaults

After a successful reboot, open /etc/default/grub to adjust boot settings. For example, to set the GRUB menu timeout:
Locate and edit:
Change the timeout value as needed (e.g., GRUB_TIMEOUT=1), then save and exit (:wq).

6. Regenerate and Apply the GRUB Configuration

After editing defaults, regenerate the config: Example for BIOS:

7. Final Reboot and Verification

Reboot one last time to confirm your changes:
Watch for your updated GRUB menu and timeout.

References

Watch Video

Practice Lab