Skip to main content

GRUB - Grand Unified Boot Loader

====================================================================================

GRUBs responsibility in the boot process

====================================================================================

GRUB Configuration Options

There are 2 directories to note when talking about GRUB;

/etc/grub - This directory stores configuration scripts that define boot entries for GRUB2.

/boot/grub - This directory stores the actual GRUB2 configuration files used during boot.

There are also 2 commands to note for GRUB configuration:

grubby

  • Function: grubby is a command-line tool that allows you to directly manipulate individual GRUB2 menu entries on your system. It provides functionalities for:

    • Setting the default boot entry
    • Adding, removing, or modifying existing entries
    • Changing boot order
    • Viewing information about current entries
  • Focus: grubby operates on individual boot entries within the existing GRUB2 configuration.

     

grub2-mkconfig

  • Function: grub2-mkconfig (or sometimes shortened to update-grub on some systems) is a utility used to regenerate the GRUB2 configuration file (grub.cfg) located in /boot/grub. It reads configuration scripts from the /etc/grub.d directory.
  • Focus: grub2-mkconfig focuses on rebuilding the entire GRUB2 configuration file based on the defined scripts. This ensures the grub.cfg file reflects any changes made to the configuration scripts in /etc/grub.d.

====================================================================================