UCS 4.4-9 extended - Kernel update version 4.19.316-1~deb9u1

Description

A new Linux kernel of the 4.19 series has been released for UCS 4.4-9 Extended Maintenance Support customers. Because the new naming scheme for the Debian packages changes lexical ordering (for example 4.19.0-0.deb9.27-amd64 vs 4.19.0-22-amd64), the new kernel may not be selected by default by GRUB or other tools.

This article explains a short, safe process to install the new kernel, boot it for verification and then prune old kernels once the new kernel is confirmed working. This keeps old kernels available as a fallback until verification is complete.

Requirements

  • This guide assumes an amd64 system. Adjust package names for other architectures.
  • Do not purge old kernels until the new kernel is verified running.

Steps

  1. Upgrade to latest errata

    univention-upgrade
    

    After the upgrade to the following errata erratum=4.4x1801 and erratum=4.4x1802 you should get the following packages:

    # example output of dpkg -l
    +ii  linux-image-4.19.0-0.deb9.27-amd64                  4.19.316-1~deb9u1
    +ii  univention-kernel-image                             12.0.0-15
    
  2. This new kernel will not be loaded automatically due to the new naming scheme (e.g. 4.19.0-0.deb9.27-amd64 vs 4.19.0-22-amd64), which causes it to appear lower in the lexical ordering used by GRUB and some tools. To boot the new kernel the first time, you need to select it manually. There are two options to do that:

    • Option A: (Set the new kernel as default in GRUB)
      • Run the following commands to set the new kernel as default for the next boot:
      grub-set-default "Advanced options for Univention Corporate Server>Univention Corporate Server, with Linux 4.19.0-0.deb9.27-amd64"
      ucr set grub/default=saved
      ucr set grub/savedefault=true
      
      • After running the above commands reboot the system and it should boot with the new kernel by default, now you can unset the ucr variables:
      ucr unset grub/default
      ucr unset grub/savedefault
      
    • Option B: (Manually select the new kernel during boot)
      • Reboot
      • In the GRUB menu choose Advanced options for Univention Corporate Server and then select the new kernel entry (e.g. Univention Corporate Server, with Linux 4.19.0-0.deb9.27-amd64).
  3. Verify the system booted with the new kernel

    uname -r
    # Expected output:
    # 4.19.0-0.deb9.27-amd64
    
    # Check dmesg output for any errors or warnings after boot
    dmesg -H | head -n 50
    
  4. Remove old kernels with univention-prune-kernels

    # list installed kernels first
    dpkg -l 'linux-image*' | awk '$1=="ii"{print $2, $3}'
    # Expected output should show the new kernel and older kernels, e.g.:
    # linux-image-4.19.0-0.deb9.27-amd64 4.19.316-1~deb9u1
    # linux-image-4.19.0-20-amd64 4.19.235-1
    # linux-image-4.19.0-20-amd64-signed 5.0.0-21A~4.4.0.202203281002
    # linux-image-4.19.0-22-amd64 4.19.260-1
    # linux-image-4.19.0-22-amd64-signed 5.0.0-23A~4.4.0.202210200957
    
    # then prune old kernels, this will keep the running kernel and the previous/latest one
    univention-prune-kernels
    
  5. Confirm no unwanted kernels remain and update GRUB

    dpkg -l 'linux-image*' | awk '$1=="ii"{print $2, $3}'
    
    # Expected output should show the new kernel (and possibly one older kernel), e.g.:
    # linux-image-4.19.0-0.deb9.27-amd64 4.19.316-1~deb9u1
    
    # if the previous command still shows old kernels, you can remove them manually (replace with actual package names):
    apt purge <package>
    
    # Update GRUB to reflect the changes
    update-grub
    
    # verify new kernel present in grub.cfg (prints menuentry titles)
    awk -F"'" '/menuentry / {print $2}' /boot/grub/grub.cfg
    # Expected output should include the new kernel entry, e.g.:
    # Univention Corporate Server
    # Univention Corporate Server, with Linux 4.19.0-0.deb9.27-amd64
    # Univention Corporate Server, with Linux 4.19.0-0.deb9.27-amd64 (recovery mode)
    

Recovery (if something goes wrong)

  • At boot, choose the previous kernel from the GRUB menu to recover.
  • Collect these outputs for support: uname -a, dmesg, journalctl -b, and dpkg -l 'linux-image*'.