Please see the article “Build a Linux-based Infrastructure Solution Demonstration Series” (http://blogs.czapski.id.au/2016/10/build-a-linux-based-infrastructure-solution-demonstration-series) for rationale, introduction and links to articles in this series.
In this article I am configuring CentOS 6.8 Grub boot loader so that it shows detailed feedback at boot rather than the “progress bar” that is shows by default.
This article assumes that
- The work is done in the Virtual Box Machine Image created in accordance with the instructions in the blog article to be found at http://blogs.czapski.id.au/2016/10/configure-virtual-box-virtual-machine-and-install-centos-6-8-base-image.
- The user “demo” has sudo access without a password. If this is not the case use the command “su -” and provide the password instead of saying “sudo -i” in the set of commands below
The instructions should work in other RedHat 6-like OS’ and OS versions.
Show Detailed Boot Feedback
Fix /boot/grub/grub.conf so that the detailed boot feedback is shown at boot instead of a “progress bar”
Remember that all this can be done using the relevant UIs, like a text editor in this case, but my objective is to create configuration scripts which I can execute and have the demo image configured without having to tediously manipulate various UIs.
Append commands to the fix grub script
mkdir -p /media/sf_distros/scripts cat <<-'EODECK' > /media/sf_distros/scripts/001_fix_grub_boot_loader_configuration.sh # save a backup of the grub boot loader configuration file and change it so detailed feedback is shown cp /boot/grub/grub.conf /boot/grub/grub.conf_orig sed -i 's/rhgb quiet//' /boot/grub/grub.conf EODECK chmod ug+x /media/sf_distros/scripts/001_fix_grub_boot_loader_configuration.sh
Execute the commands as root
Append “fix grub” script execution commands to the initial bulk configuration script. This script is intended to collect all automated configuration commands and scripts so that they can be all executed in one go on a brand new image if one gets to do this the second and subsequent times.
Don’t actually execute this script while you are building the first image.
cat <<-'EODECK' >> /media/sf_distros/scripts/000_initial_bulk_configuration.sh # set grub boot loader to be verbose /media/sf_distros/scripts/001_fix_grub_boot_loader_configuration.sh EODECK chmod ug+x /media/sf_distros/scripts/000_initial_bulk_configuration.sh
Reboot to verify the change
If you don’t do this but still want to occasionally see the details use Alt+E key combination when the progress bar is showing at boot – it works as a toggle