Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
documentation.suse.com / SUSE Linux Enterprise Server Documentation / Administration Guide / System / Installing multiple kernel versions
Applies to SUSE Linux Enterprise Server 15 SP4

27 Installing multiple kernel versions

SUSE Linux Enterprise Server supports the parallel installation of multiple kernel versions. When installing a second kernel, a boot entry and an initrd are automatically created, so no further manual configuration is needed. When rebooting the machine, the newly added kernel is available as an additional boot parameter.

Using this functionality, you can safely test kernel updates while being able to always fall back to the proven former kernel. To do this, do not use the update tools (such as the YaST Online Update or the updater applet), but instead follow the process described in this chapter.

Warning
Warning: Support entitlement

Be aware that you lose your entire support entitlement for the machine when installing a self-compiled or a third-party kernel. Only kernels shipped with SUSE Linux Enterprise Server and kernels delivered via the official update channels for SUSE Linux Enterprise Server are supported.

Tip
Tip: Check your boot loader configuration kernel

It is recommended to check your boot loader configuration after having installed another kernel to set the default boot entry of your choice. See Section 18.3, “Configuring the boot loader with YaST” for more information.

27.1 Enabling and configuring multiversion support

Installing multiple versions of a software package (multiversion support) is enabled by default from SUSE Linux Enterprise Server 12. To verify this setting, proceed as follows:

  1. Open /etc/zypp/zypp.conf with the editor of your choice as root.

  2. Search for the string multiversion. If multiversion is enabled for all kernel packages capable of this feature, the following line appears uncommented:

    multiversion = provides:multiversion(kernel)
  3. To restrict multiversion support to certain kernel flavors, add the package names as a comma-separated list to the multiversion option in /etc/zypp/zypp.conf—for example

    multiversion = kernel-default,kernel-default-base,kernel-source
  4. Save your changes.

Warning
Warning: Kernel Module Packages (KMP)

Make sure that required vendor-provided kernel modules (Kernel Module Packages) are also installed for the new updated kernel. The kernel update process will not warn about eventually missing kernel modules because package requirements are still fulfilled by the old kernel that is kept on the system.

27.1.1 Automatically deleting unused kernels

When frequently testing new kernels with multiversion support enabled, the boot menu quickly becomes confusing. Since a /boot partition usually has limited space you also might run into trouble with /boot overflowing. While you can delete unused kernel versions manually with YaST or Zypper (as described below), you can also configure libzypp to automatically delete kernels no longer used. By default no kernels are deleted.

  1. Open /etc/zypp/zypp.conf with the editor of your choice as root.

  2. Search for the string multiversion.kernels and activate this option by uncommenting the line. This option takes a comma-separated list of the following values:

    5.3.18-53.3: keep the kernel with the specified version number

    latest: keep the kernel with the highest version number

    latest-N: keep the kernel with the Nth highest version number

    running: keep the running kernel

    oldest: keep the kernel with the lowest version number (the one that was originally shipped with SUSE Linux Enterprise Server)

    oldest+N keep the kernel with the Nth lowest version number

    Here are some examples

    multiversion.kernels = latest,running

    Keep the latest kernel and the one currently running. This is similar to not enabling the multiversion feature, except that the old kernel is removed after the next reboot and not immediately after the installation.

    multiversion.kernels = latest,latest-1,running

    Keep the last two kernels and the one currently running.

    multiversion.kernels = latest,running,5.3.18-53.3

    Keep the latest kernel, the one currently running, and 5.3.18-53.3.

    Tip
    Tip: Keep the running kernel

    Unless you are using a special setup, always keep the kernel marked running.

    If you do not keep the running kernel, it will be deleted when updating the kernel. In turn, this means that all of the running kernel's modules are also deleted and cannot be loaded anymore.

    If you decide not to keep the running kernel, always reboot immediately after a kernel upgrade to avoid issues with modules.

27.1.2 Use case: Deleting an old kernel after reboot only

You want to make sure that an old kernel will only be deleted after the system has rebooted successfully with the new kernel.

Change the following line in /etc/zypp/zypp.conf:

multiversion.kernels = latest,running

The previous parameters tell the system to keep the latest kernel and the running one only if they differ.

27.1.3 Use case: Keeping older kernels as fallback

You want to keep one or more kernel versions to have one or more spare kernels.

This can be useful if you need kernels for testing. If something goes wrong (for example, your machine does not boot), you still can use one or more kernel versions which are known to be good.

Change the following line in /etc/zypp/zypp.conf:

multiversion.kernels = latest,latest-1,latest-2,running

When you reboot your system after the installation of a new kernel, the system will keep three kernels: the current kernel (configured as latest,running) and its two immediate predecessors (configured as latest-1 and latest-2).

27.1.4 Use case: Keeping a specific kernel version

You make regular system updates and install new kernel versions. However, you are also compiling your own kernel version and want to make sure that the system will keep them.

Change the following line in /etc/zypp/zypp.conf:

multiversion.kernels = latest,5.3.18-53.3,running

When you reboot your system after the installation of a new kernel, the system will keep two kernels: the new and running kernel (configured as latest,running) and your self-compiled kernel (configured as 5.3.18-53.3).

27.2 Installing/removing multiple kernel versions with YaST

You can install or remove multiple kernels with YaST:

  1. Start YaST and open the software manager via Software › Software Management.

  2. List all packages capable of providing multiple versions by choosing View › Package Classification › Multiversion Packages.

    The YaST software manager: multiversion view
    Figure 27.1: The YaST software manager: multiversion view
  3. Select a package and open its Version tab in the bottom pane on the left.

  4. To install a package, click the check box next to it. A green check mark indicates it is selected for installation.

    To remove an already installed package (marked with a white check mark), click the check box next to it until a red X indicates it is selected for removal.

  5. Click Accept to start the installation.

27.3 Installing/removing multiple kernel versions with Zypper

You can install or remove multiple kernels with zypper:

  1. Use the command zypper se -s 'kernel*' to display a list of all kernel packages available:

    S  | Name                 | Type    | Version           | Arch   | Repository
    ---+----------------------+---------+-------------------+--------+------------------------------------------------------
    i+ | kernel-default              | package | 5.14.21-150400.6.3              | x86_64 | SLE-Module-Basesystem15-SP4-Pool
       | kernel-default-base         | package | 5.14.21-150400.6.3.150400.22.27 | x86_64 | SLE-Module-Basesystem15-SP4-Pool
       | kernel-default-devel        | package | 5.14.21-150400.6.3              | x86_64 | SLE-Module-Basesystem15-SP4-Pool
       | kernel-devel                | package | 5.14.21-150400.6.4              | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-all         | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-amdgpu      | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-ath10k      | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-ath11k      | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-atheros     | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-bluetooth   | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-bnx2        | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-brcm        | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-chelsio     | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-dpaa2       | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-i915        | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-intel       | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-iwlwifi     | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-liquidio    | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-marvell     | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-media       | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-mediatek    | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-mellanox    | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-mwifiex     | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-network     | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-nfp         | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-nvidia      | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-platform    | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-prestera    | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-qcom        | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-qlogic      | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-radeon      | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-realtek     | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-serial      | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-sound       | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-ti          | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-ueagle      | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
    i  | kernel-firmware-usb-network | package | 20220119-150400.1.1             | noarch | SLE-Module-Basesystem15-SP4-Pool
       | kernel-macros               | package | 5.14.21-150400.6.4              | noarch | SLE-Module-Basesystem15-SP4-Pool
  2. Specify the exact version when installing:

    > sudo zypper in kernel-default-5.3.18-53.3
  3. When uninstalling a kernel, use the commands zypper se -si 'kernel*' to list all kernels installed and zypper rm PACKAGENAME-VERSION to remove the package.