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

Updating the kernel on leapp'ed systems doesn't create the initramfs depending on Grub BLS state

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • rhel-7.9.z
    • leapp-repository
    • None
    • Important
    • rhel-upgrades
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None
    • 57,005

      Description of problem:

      When upgrading a system to RHEL8 using leapp, a *kernel-workaround* package is installed that ships an empty /usr/sbin/new-kernel-pkg script.
      If the customer is not* using BLS (by not adding GRUB_ENABLE_BLSCFG=true in /etc/default/grub, likely because the customer uses Puppet with outdated templates from RHEL7), this ends up not generating the initramfs when updating kernels.

      Exact reason is on line 80 in /usr/lib/kernel/install.d/20-grub.install:
      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
      80 if [[ "x${GRUB_ENABLE_BLSCFG}" = "xtrue" ]] || [[ ! -f /sbin/new-kernel-pkg ]]; then
      81 eval "$(grub2-get-kernel-settings)" || true
      82 [[ -d "$BLS_DIR" ]] || mkdir -m 0700 -p "$BLS_DIR"
      :
      138 /sbin/new-kernel-pkg --package "kernel${flavor}" --install "$KERNEL_VERSION" || exit $?
      139 /sbin/new-kernel-pkg --package "kernel${flavor}" --mkinitrd --dracut --depmod --update "$KERNEL_VERSION" | | exit $?
      140 /sbin/new-kernel-pkg --package "kernel${flavor}" --rpmposttrans "$KERNEL_VERSION" || exit $?
      141 # If grubby is used there's no need to run other installation plugins
      142 exit 77
      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

      Above, the code block on lines 81+ is not entered because of the lack of "GRUB_ENABLE_BLSCFG" in /etc/default/grub and the presence of /sbin/new-kernel-pkg shipped by *kernel-workaround*.

      It then goes to line 138-140 which do nothing since the script is an empty script.

      Version-Release number of selected component (if applicable):

      leapp-repository-0.13.0-2.el7_9.noarch

              leapp-notifications leapp-notifications
              rhn-support-rmetrich Renaud Métrich
              RHEL Upgrades QE Team RHEL Upgrades QE Team
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: