Analyze boot problems

ucs-4
grub
console
installation
serial

#1

Problem:

A system does not boot and seems to freeze at bootsplash.

Solution:

It is possbile to edit the boot options for the UCS system within GRUB. You can disable the splashscreen and raise the loglevel - by that you can see what happens when the system freezes:

  1. Press button “e” in GRUB bootloader
  2. Find the follwing line:
    linux ... /vmlinuz-... ... ro quiet loglevel=0 rootdelay=5 splash
  3. Edit the line: Remove quiet and change slpash to nosplash - also set loglevel to 5
    the line should now look like this:
    linux ... /vmlinuz-... ... ro loglevel=5 nosplash
  4. Boot by pressing F10

These changes are temporaliy and are re-set at next boot. You can make that change permanent by booting into the working UCS system, logging in as root, and setting the following UCR variables:

ucr set grub/bootsplash=nosplash grub/quiet=no grub/loglevel=5

Advanced options:

The default text console only has 80 columns and 25 rows, so some important output might scroll of. You can configure a serial console to capture that output.

  • Many USB serial converters don’t work reliably.

  • Many high-end servers support serial console re-direction over network, for example over IPMI. See How to do remote server administration over IPMI

  • Many virtual machines provide virtual serial interfaces, which can also be used:

  • For Qemu/KVM/Xen-HVM
    adding a <console/> or <serial/> element to the VM definition and use ttyS0

  • Xen-PV
    Use hvc0 as the serial device name .

The console can be accessed by running

virsh console "\$VM"

As an alternative the output can be logged into a file on the host by using something like

<serial type='file'>source path='/tmp/$VM.log' append='on'/></serial>

in the VM definition. The virsh conole-command must be kept running as otherwise all output is lost.

  1. Configuring the boot-loader GRUB to use a serial console is described in How to configure grub serial access.
  2. The Linux kernel can also be instructed to redirect its output to a serial console:
    ucr set grub/append='console=tty0 console=ttyS0,115200,8,N,1'
    This makes the serial console the default console (/dev/console), as ttyS0 is given last. By moving console=tty0 to the end, the VGA console will remain the main console.
  3. Start a login getty on the serial console:
  • Before UCS-4.2 with SysV-init
    sed -i -re '/^#?T0:/s/#//' /etc/inittab;telinit Q
  • Since UCS-4.2 with systemd
    systemctl enable getty@ttyS0.service;systemctl start getty@ttyS0.service

Univention Corporate server startet unter proxmox nicht mehr
Capture Linux kernel crash information
How to do remote server administration over IPMI?