Enable verbose boot on RHEL-like distros

Author: | Posted in howto No comments

This might be a non-issue for most desktop users and also for some system administrators who don’t mind hitting the ESC key to exit the graphical boot when doing maintenance tasks remotely, but it is certainly annoying when having to do it over KVM sessions repeatedly. For some reason the two boot parameters rhgb (Red Hat Graphical Boot) and quiet (used to suppress descriptive boot messages) are always enabled by default with both EL6 and EL7.

I remember these 2 arguments had to be specifically added to the boot loader configuration in Kickstart installations of older RHEL releases, but that doesn’t seem to be the case any more as they are added automatically by anaconda to all non-s390 and non-serial installs:

grep -A1 rhgb /usr/lib/anaconda/packages.py
# Only add "rhgb quiet" on non-s390, non-serial installs
if iutil.isConsoleOnVirtualTerminal() and \
(ts.dbMatch('provides', 'rhgb').count() or \
ts.dbMatch('provides', 'plymouth').count()):

Remove these arguments to enable verbose text boot

During OS installation using kickstart

Since there is no kickstart option to disable these boot options, we have to do it in the post install section:

  • RHEL6 (grub)
%post --log=/root/postinstall.log
sed -i 's/rhgb\|quiet//g' /boot/grub/grub.conf
  • RHEL7 (grub2)
%post --log=/root/postinstall.log
sed -i 's/rhgb\|quiet//g' /etc/default/grub
grub2-mkconfig -o /boot/grub2/grub.cfg

After OS installation

When the OS is already installed, the same sed commands from above can be executed. If this boot configuration change needs to be applied to multiple servers, one can make use of a for / while loop (especially useful when dealing with hundreds of servers) e.g.

  • grub
   ssh $SERVER 'sed -i 's/rhgb\|quiet//g' /boot/grub/grub.conf'
  • grub2
cat $LIST_OF_SERVERS | while read SERVER;
   ssh $SERVER 'sed -i 's/rhgb\|quiet//g' /etc/default/grub ; grub2-mkconfig -o /boot/grub2/grub.cfg'

Hope this helps.

Add Your Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.