- A Cloud Guru
Modifying GRUB2 Boot Configuration (CentOS)
The GRUB2 bootloader provides many improvements over its predecessor GRUB. This includes support for UUIDs, LVM, and RAID, and a more programmatic approach to configuration. In this hands-on lab, we have been tasked with updating the GRUB configuration and applying these changes.
Table of Contents
Use a text editor to edit
/etc/default/gruband ensure that the following options and values are present:
GRUB_TIMEOUT=45 GRUB_DEFAULT=saved GRUB_SAVEDEFAULT=true
Create a Custom Menu Entry
Copy the menuentry for a line that starts with
menuentry 'CentOS Linux (3.10...)
/boot/grub2/grub.cfgand add it to
Once copied, remove the
quietoptions from the kernel line and change the title to Verbose Output Enabled.
Create a Backup of the Configuration File
cpcommand to create a backup of
cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.bkp
Generate a New Configuration File with the Changes
grub2-mkconfigcommand to generate a new
grub2-mkconfig -o /boot/grub2/grub.cfg
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.