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

RHEL 9 grubby Unable to Update kernel commandline arguments for non-BLS xen systems

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-9.4
    • grubby
    • None
    • None
    • None
    • rhel-sst-desktop-firmware-bootloaders
    • ssg_display
    • 2
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None

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

      AWS uses Xen hypervisor for its backend, so when customers attempt to update kernel commandline arguments via grubby it updates BLS configuration instead of the grub.cfg file.

      Checking the grubby source code I see that there is logic for checking for opal but it does not check for xen.

      update_grubcfg()
      {
          # Older ppc64le OPAL firmware (petitboot version < 1.8.0) don't have BLS support
          # so grub2-mkconfig has to be run to generate a config with menuentry commands.
          if [ "${arch}" = "ppc64le" ] && [ -d /sys/firmware/opal ]; then
              RUN_MKCONFIG="true"
              petitboot_path="/sys/firmware/devicetree/base/ibm,firmware-versions/petitboot"
              if test -e ${petitboot_path}; then
                  read -r -d '' petitboot_version < ${petitboot_path}
                  petitboot_version="$(echo ${petitboot_version//v})"
                  if test -n ${petitboot_version}; then
                      major_version="$(echo ${petitboot_version} | cut -d . -f1)"
                      minor_version="$(echo ${petitboot_version} | cut -d . -f2)"
                      re='^[0-9]+$'
                      if [[ $major_version =~ $re ]] && [[ $minor_version =~ $re ]] &&
                             ([[ ${major_version} -gt 1 ]] ||
                                  [[ ${major_version} -eq 1 &&
                                       ${minor_version} -ge 8  ]]); then
                          RUN_MKCONFIG="false"
                      fi
                  fi
              fi
          fi
          if [[ $RUN_MKCONFIG = "true" ]]; then
              grub2-mkconfig --no-grubenv-update -o "${grub_config}" >& /dev/null
          fi
      }
      

       

       

      I think it also need to account for xen here similar to how the following script does:

      /usr/lib/kernel/install.d/99-grub-mkconfig.install

            7 # PV and PVH Xen DomU guests boot with pygrub that doesn't have BLS support,
            8 # also Xen Dom0 use the menuentries from 20_linux_xen and not the ones from
            9 # 10_linux. So BLS support needs to be disabled for both Xen Dom0 and DomU.
           10 if [[ -e /sys/hypervisor/type ]] && grep -q "^xen$" /sys/hypervisor/type; then
           11     RUN_MKCONFIG=true
           12     DISABLE_BLS=true
           13 fi
      

      Please provide the package NVR for which bug is seen:

      1. rpm -q grubby
        grubby-8.40-64.el9.x86_64

        How reproducible: Reproducible on AWS RHEL 9 instances

        Steps to reproduce

      2.   Attempt adding an argument via grubby:
        # grubby --update-kernel=ALL --args="ipv6.disable=1"
      1.   Check /boot/loader/entries and /boot/grub2/grub.cfg

      Expected results

      /boot/grub2/grub.cfg is updated with new kernel arguments

      Actual results

      bls configuration files in /boot/loader/entries are updated with kernel arguments (which xen is unable to use from what I understand)

              bootloader-eng-team bootloader -eng-team
              rhn-support-ckrell Charlie Krell
              bootloader -eng-team bootloader -eng-team
              Release Test Team Release Test Team
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: