whatupmiked intersection between networking, not working, and software

RSS

Adding Grub Menu and Boot Logs to KVM Console for Centos 7.0

In preparation for my RHCE exam I’ve been setting up local testbeds for training purposes. The default Centos 7.0 installation for a “Server with GUI” does not send the boot output to console and also does not present the GRUB menu used for interrupting the boot sequence to go into the rescue target.

To sort that out:

  • Update the kernel command-line console parameters for using the default KVM serial console speed setting of 115200 and enable the kernel log messages during boot. grubby --update-kernel=ALL --args="console=tty0 console=ttyS0,115200" --remove-args="rhgb quiet"
  • Modify the grub file (/etc/default/grub) to add similar command-line options, but also generate the grub menu output on serial console by adding ‘serial’ to the GRUB_TERMINAL_OUTPUT setting. GRUB_TIMEOUT=10 GRUB_HIDDEN_TIMEOUT_QUIET=false GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console serial" GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1" #GRUB_CMDLINE_LINUX_DEFAULT="splash quiet" GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos/root crashkernel=auto console=tty0 console=ttyS0,115200 vconsole.keymap=us " GRUB_DISABLE_RECOVERY="true"
  • Rebuild and apply the grub.cfg file with grub2-mkconfig grub2-mkconfig -o /boot/grub2/grub.cfg

For more details about grub check out: https://wiki.centos.org/HowTos/Grub2