Red Hat Certified System Administrator RHCSA · Free Practice Question Easy
Question 33
On ServerA, ensure that boot messages are displayed, not silenced, to aid in troubleshooting.
-
A
Pass
-
B
Fail
Reveal correct answer
Correct answer: A
Explanation
Solution
Method 1: Modify the GRUB Configuration File
Edit the GRUB Configuration:
Command:
- $ sudo vim /etc/default/grub
Explanation: Open the GRUB configuration file, which contains boot parameters controlling how the system boots.
Modify Boot Parameters:
Locate the line beginning with
GRUB_CMDLINE_LINUXand removerhgb quiet.Explanation:
rhgb(Red Hat Graphical Boot): Provides a graphical boot screen, hiding detailed boot messages.quiet: Suppresses most boot messages, creating a cleaner appearance.Removing both options enables detailed, text-based boot messages, which are useful for troubleshooting.
Save and Exit:
Press
Esc, type:wq, and pressEnterto save and close the file.
Generate an Updated GRUB Configuration:
Command:
- $ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
Explanation: This command regenerates the GRUB configuration, applying the changes to the bootloader.
Reboot the System:
Command:
- $ sudo reboot
Explanation: Restarting the system applies the updated GRUB configuration. Upon boot, detailed boot messages will display, providing visibility into each step of the startup process.
Method 2: Update the Kernel Command Line Directly (For Current Boot)
Modify the Kernel Command Line:
Command:
- $ sudo grubby --update-kernel=/boot/vmlinuz-$(uname -r) --remove-args="rhgb quiet"
Explanation: The
grubbycommand updates boot parameters for the current kernel without modifying/etc/default/grub. This change applies to the next reboot.Details:
--update-kernel=/boot/vmlinuz-$(uname -r): Specifies the current kernel version.--remove-args="rhgb quiet": Removesrhgbandquietarguments, enabling verbose boot messages.
Reboot the System:
Command:
- $ sudo reboot
Explanation: After rebooting, ServerA will display detailed boot messages, aiding in diagnostic tasks during system startup.
Key Points and Best Practices:
GRUB Configuration:
/etc/default/grubcontrols boot parameters for GRUB, the bootloader responsible for loading the Linux kernel.Effect of
rhgbandquiet:rhgb(Red Hat Graphical Boot): Hides boot messages with a graphical loading screen.quiet: Suppresses most kernel and system messages, resulting in a cleaner boot display.Removing both provides a verbose, text-based boot, useful for monitoring and diagnosing potential issues.
Persisting Changes: Method 1 permanently changes GRUB settings, while Method 2 only affects the current kernel, providing flexibility based on immediate needs.
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
