Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-26840

Old kernel cmdline args after installing a new kernel on system upgraded by leapp

    • leapp-repository-0.20.0-4.el7_9
    • None
    • None
    • 1
    • sst_upgrades
    • 20
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • Leapp: 9.5 & 10.0 public beta
    • All
    • None

      What were you trying to do that didn't work?

      During the IPU of RHEL X systems, it's common that kernel cmdline parameters needs to be updated for the RHEL X+1 kernels. Some typical changes happening during the upgrade:

      • IPU 7 -> 8, sometimes requires adding `net.ifnames=0` kernel cmdline to keep eth0 NIC name on VM with only this one network interface. Dropping this argument on RHEL 8+ kernel means my NIC will be renamed e.g. to enc0.
      • IPU 8 -> 9 requires updated value of crashkernel parameter when kdump is used

      When installing another kernel on the system upgraded by leapp, in some cases the newly installed kernel has old kernel cmdline which leads to inconsistent behaviour
      when booting into such a kernel.

      How reproducible:

      On some upgraded system. We see different behaviour based on architecture, original RHEL release, upgraded RHEL release, and possibly also on the bootloader configuration. Cannot say for sure what are all differences.

      Steps to reproduce

      1. leapp upgrade
      2. dnf update # or just install whatever different kernel version from the upgraded system if no newer kernel is present

      Expected results

      Newly installed kernels have up-to-date kernel cmdline

      Actual results

      Updating kernel packages using `dnf update` creates new boot entries with obsoleted kernel cmdline parameters.

      Workarounds:

      • After the upgrade, on RHEL 9 (all architectures) or RHEL 8 for IBM Z:
        # BOOT_OPTIONS="$(tr -s "$IFS" '\n' </proc/cmdline | grep -ve '^BOOT_IMAGE=' -e '^initrd=' | tr '\n' ' ')"
        # echo $BOOT_OPTIONS > /etc/kernel/cmdline
        
      • After the upgrade, on RHEL 8 all architectures but IBM Z:
        # BOOT_OPTIONS="$(tr -s "$IFS" '\n' </proc/cmdline | grep -ve '^BOOT_IMAGE=' -e '^initrd=' | tr '\n' ' ')"
        # grub2-editenv - set "kernelopts=$BOOT_OPTIONS"
        

            leapp-notifications leapp-notifications
            pstodulk@redhat.com Petr Stodulka
            Toshio Kuratomi Toshio Kuratomi
            RHEL Upgrades QE Team RHEL Upgrades QE Team
            Miriam Portman Miriam Portman
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: