Introduction
As a system administrator, you may need to modify the system bootloader to customize the boot process or troubleshoot boot-related issues. In this challenge, you will learn how to modify the GRUB bootloader configuration on a Red Hat Enterprise Linux (RHEL) system.
Modify the GRUB Bootloader Configuration
Your task is to modify the main GRUB configuration file to change the default kernel that the system boots into. This involves editing a configuration file and then running a command to apply the changes to the bootloader menu.
Tasks
- Modify the
/etc/default/grubfile to set a new default kernel. - Regenerate the GRUB configuration file to apply the change.
Requirements
- Edit the
/etc/default/grubfile using a text editor likenano. - Locate the
GRUB_DEFAULTparameter and change its value to2. - After modifying the file, regenerate the GRUB configuration file by running
sudo grub2-mkconfig -o /boot/grub2/grub.cfg.
Hints
- You will need
sudoprivileges to edit/etc/default/gruband to rungrub2-mkconfig. - The
grub2-mkconfigcommand reads settings from/etc/default/grubto generate the main configuration file, which is located at/boot/grub2/grub.cfg.
Note: A system reboot is normally required to boot with the new default kernel. However, in this lab environment, you should NOT reboot the system. LabEx VMs are one-time use, and a reboot will cause loss of challenge progress.
Summary
In this challenge, you learned how to modify the system bootloader (GRUB) configuration to change the default kernel option. This involved editing the /etc/default/grub file and regenerating the configuration with grub2-mkconfig. This skill is essential for system administrators who need to customize the boot process or troubleshoot boot-related issues on a RHEL system.



