- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud
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.
Lab Info
Table of Contents
-
Challenge
Update /etc/default/grub
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 -
Challenge
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/etc/grub.d/40_custom.Once copied, remove the
rhgbandquietoptions from the kernel line and change the title to Verbose Output Enabled. -
Challenge
Create a Backup of the Configuration File
Use the
cpcommand to create a backup ofgrub.cfg.cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.bkp -
Challenge
Generate a New Configuration File with the Changes
Use the
grub2-mkconfigcommand to generate a newgrub.cfgfile.grub2-mkconfig -o /boot/grub2/grub.cfg
About the author
Real skill practice before real-world application
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.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.