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

"Weak" grub2.cfg file generated on PPC64LE platform

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Normal Normal
    • rhel-8.10
    • rhel-8.5.0
    • grub2
    • grub2-2.02-151.el8
    • None
    • Moderate
    • rhel-sst-cs-bootloaders
    • None
    • False
    • Hide

      None

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

      Description of problem:

      On PPC64LE platforms we disable GRUB_ENABLE_BLSCFG=true to force having a completely hardcoded grub2.cfg file with "menuentry" items.

      This works fine except the $kernelopts variable is not designed as fallback in case grubenv is broken.

      Following snippet is missing:
      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

      1. The kernelopts variable should be defined in the grubenv file. But to ensure that menu
      2. entries populated from BootLoaderSpec files that use this variable work correctly even
      3. without a grubenv file, define a fallback kernelopts variable if this has not been set.
        #
      4. The kernelopts variable in the grubenv file can be modified using the grubby tool or by
      5. executing the grub2-mkconfig tool. For the latter, the values of the GRUB_CMDLINE_LINUX
      6. and GRUB_CMDLINE_LINUX_DEFAULT options from /etc/default/grub file are used to set both
      7. the kernelopts variable in the grubenv file and the fallback kernelopts variable.
        if [ -z "${kernelopts}" ]; then
        set kernelopts="..."
        fi
                    • 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

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

      grub2-2.02-106.el8

      How reproducible:

      Always

      Steps to Reproduce:
      1. Generate the file on PPC64le

      1. grub2-mkconfig -o /tmp/foo

      2. Check content

      1. grep kernelopts /tmp/foo
        linux /vmlinuz-4.18.0-147.el8.ppc64le $kernelopts $tuned_params
        linux /vmlinuz-0-rescue-3199ef9eefd840ffb6e94a87b592a6ea $kernelopts

      Actual results:

      No fallback "if [ -z "${kernelopts}" ]; then ... fi" code

      Expected results:

      Fallback snippet from /etc/grub.d/10_linux found on x86_64 systems

              bootloader-eng-team bootloader -eng-team
              rhn-support-rmetrich Renaud Métrich
              Release Test Team Release Test Team
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: