Making up a chatty console screen on oracle enterprise linux 7


A lot of people, including me obviously, prefer to follow down the details of a boot process on a text console of oe linux. Unfortunaltely, populating such a detailed output is not the default setting after a fresh install of the operating system. You usually get a graphical boot progress animation, hiding most iff not all of the detail output, based on plymouth (rhgb). The boot screen dimension is another problem here, because following output on a 80×30 resolution is not fun kicking in. So where to start off? grub2, namely /etc/default/grub, GRUB_GFXMODE, GRUB_GFXPAYLOAD_LINUX, GRUB_CMDLINE_LINUX and some sort of update-grub I would think… but that’s wrong and even counter-productive for rh based distributions, really.

In fact, the integration of grub2 into oe linux is kind of different from the supposed picture given in https://www.gnu.org/software/grub/manual/html_node/index.html. That is, oe linux does not honour the variables being set with /etc/default/grub at all, GRUB_TIMEOUT being an exception on test, when recreating /boot/grub2/grub.cfg. There is no update-grub, like on debian likes, and moreover, do not use grub2-mkconfig -o /boot/grub2/grub.cfg, as recommended all around the net, on oe linux, because grub2-mkconfig may rewrite your kernel boot menue titles such that your default kernel setting may become stale (http://brainpan.io/wiki/Grub_2_Tips_%26_Tricks). Use grubby, see below.

Ok, instead of separating the grub2 boot variables in /etc/default/grub, oe linux derives any boot settings to be applied to a current kernel for reboot or most importantly for a new kernel on install from what is already present in /boot/grub2/grub.cfg for the running kernel. Its another approach, for whatever reason, like it or not. Changing the boot settings for the current kernel involves a script called grubby (https://www.mankier.com/8/grubby). Going for a kernel on install with yum executes the script new-kernel-package (https://www.mankier.com/8/new-kernel-pkg), which in turn again uses grubby under the covers. So what you need to make shure is that anything envisioned for modification or installation will already be present in /boot/grub2/grub.cfg. Check!

What boot settings do I need to set? Since there is no GRUB_GFXMODE, GRUB_CMDLINE_LINUX applyable, I resort to the vga= kernel parameter that fits the 16-bit boot protocol still used with oe linux 7 (http://www.systutorials.com/38942/configuration-of-linux-kernel-video-mode). You may go and test boot your machine, especially with regard to your graphics environment, vmware here, with vga=ask, to get a list of available video modes and identifiers (given in hex, used in dec!). In addition, I’m about to get rid of the quiet kernel parameter to see all of the early boot console output before plymouth hooks in.

The following commands unset and set, respectively, quiet and vga= for all kernels being present in /boot/grub2/grub.cfg (within /boot/grub2/grub.cfg :], great to have a backup, huuhhh).

[root@abc ~]# grubby --update-kernel=ALL --remove-args='quiet'
[root@abc ~]# grubby --update-kernel=ALL --args='vga=791'

So far, I have a 1024x768x16 VESA resolution and the early boot messages, but still the plymouth graphical boot progress animation. The prefered way to switch it off employes a script plymouth-set-default-theme (https://www.centos.org/forums/viewtopic.php?f=47&t=48019) with the details theme. Note that you do need to use the -R option to ship this setting into initrd. Note also, that only the current kernel initrd will benefit from the change as well as any future kernels, since the current theme setting will be written to /etc/plymouth/plymouthd.conf.

[root@abc ~]# plymouth-set-default-theme -l
[root@abc ~]# plymouth-set-default-theme -R details
[root@abc ~]# less /etc/plymouth/plymouthd.conf

Done, reboot.

Ps. Iff, for whatever reason, you executed grub2-mkconfig -o /boot/grub2/grub.cfg, the original:

[root@abc ~]# grep -P "^menuentry" /boot/grub2/grub.cfg | cut -d "'" -f2
Oracle Linux Server 7.2, with Unbreakable Enterprise Kernel 4.1.12-32.2.3.el7uek.x86_64 with debugging
Oracle Linux Server 7.2, with Unbreakable Enterprise Kernel 4.1.12-32.2.3.el7uek.x86_64
Oracle Linux Server 7.2, with Linux 3.10.0-327.13.1.el7.x86_64 with debugging
Oracle Linux Server 7.2, with Linux 3.10.0-327.13.1.el7.x86_64
Oracle Linux Server 7.2, with Unbreakable Enterprise Kernel 3.8.13-118.4.2.el7uek.x86_64 with debugging
Oracle Linux Server 7.2, with Unbreakable Enterprise Kernel 3.8.13-118.4.2.el7uek.x86_64
Oracle Linux Server (3.10.0-327.4.5.el7.x86_64 with Linux) 7.2
Oracle Linux Server (3.10.0-229.11.1.el7.x86_64 with Linux) 7.2
Oracle Linux Server (3.8.13-118.3.1.el7uek.x86_64 with Unbreakable Enterprise Kernel) 7.2
Oracle Linux Server (0-rescue-8b25f96f8d6a44309d66d320c072a090 with Linux) 7.2

has become (changed title, no debug entries anymore):

[root@abc ~]# grep -P "^menuentry" /boot/grub2/grub.cfg | cut -d "'" -f2
Oracle Linux Server (4.1.12-32.2.3.el7uek.x86_64 with Unbreakable Enterprise Kernel) 7.2
Oracle Linux Server (3.10.0-327.13.1.el7.x86_64 with Linux) 7.2
Oracle Linux Server (3.10.0-327.4.5.el7.x86_64 with Linux) 7.2
Oracle Linux Server (3.10.0-229.11.1.el7.x86_64 with Linux) 7.2
Oracle Linux Server (3.8.13-118.4.2.el7uek.x86_64 with Unbreakable Enterprise Kernel) 7.2
Oracle Linux Server (3.8.13-118.3.1.el7uek.x86_64 with Unbreakable Enterprise Kernel) 7.2
Oracle Linux Server (0-rescue-8b25f96f8d6a44309d66d320c072a090 with Linux) 7.2

do check and repair your grub2 menue default kernel setting along like this.

# check the current setting (also /boot/grub2/grubenv)
[root@abc ~]# grub2-editenv list
saved_entry=Oracle Linux Server 7.2, with Unbreakable Enterprise Kernel 4.1.12-32.2.3.el7uek.x86_64 with debugging

# reset
[root@abc ~]# grub2-set-default "Oracle Linux Server 7.2, with Unbreakable Enterprise Kernel 4.1.12-32.2.3.el7uek.x86_64"

# check again (using a grep with the ouput of grub2-editenv)
[root@abc ~]# grep -F "'`grub2-editenv list | cut -d "=" -f2`'" /boot/grub2/grub.cfg
menuentry 'Oracle Linux Server 7.2, with Unbreakable Enterprise Kernel 4.1.12-32.2.3.el7uek.x86_64' --class ol --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.8.13-55.1.6.el7uek.x86_64-advanced-b22c4f34-87cb-4d8d-84b7-c71f28fea78c' {

Have fun, Peter

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s