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:
grubbyis 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:
grubbyoperates on individual boot entries within the existing GRUB2 configuration.
grub2-mkconfig
- Function:
grub2-mkconfig(or sometimes shortened toupdate-grubon 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.ddirectory. - Focus:
grub2-mkconfigfocuses on rebuilding the entire GRUB2 configuration file based on the defined scripts. This ensures thegrub.cfgfile reflects any changes made to the configuration scripts in/etc/grub.d.
====================================================================================