Uploaded image for project: 'RHEL Conversions'
  1. RHEL Conversions
  2. RHELC-1780

GRUB2 config file generation fails on EL9 UEFI

    • False
    • False
    • Hide

      None

      Show
      None
    • 2
    • Testable

      In the latest phase of the conversion process, we try to update the GRUB2 configuration.
      On UEFI machines we call the grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg, which has the call failing and yields the following output:

      [2024-11-29T11:02:51+0000] TASK - [Convert: Update GRUB2 configuration] ******************************
      Backing up /boot/grub2/grub.cfg.
      [2024-11-29T11:02:51+0000] DEBUG - Copied /boot/grub2/grub.cfg to /var/lib/convert2rhel/backup/0894275faee72b8009228fe8fa32f6fe/grub.cfg.
      Backing up /boot/grub2/grubenv.
      [2024-11-29T11:02:51+0000] DEBUG - Copied /boot/grub2/grubenv to /var/lib/convert2rhel/backup/0894275faee72b8009228fe8fa32f6fe/grubenv.
      [2024-11-29T11:02:51+0000] DEBUG - Calling command '/usr/sbin/grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg'
      [2024-11-29T11:02:51+0000] DEBUG - Output of the grub2-mkconfig call:
      Running `grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg' will overwrite the GRUB wrapper.
      Please run `grub2-mkconfig -o /boot/grub2/grub.cfg' instead to update grub.cfg.
      GRUB configuration file was not updated.
      
      WARNING - GRUB2 config file generation failed.
      
      UPDATE_GRUB has succeeded
      

      Moreover, the post-conversion report message (particularly the Remediation) gets confusing as it's suggesting to do the exact thing which caused the warning.
      The Warning message is also weirdly formatted (weird quotes/backticks)

      (WARNING) UPDATE_GRUB::GRUB2_CONFIG_CREATION_FAILED - The grub2-mkconfig call
          failed to complete
           Description: The grub2-mkconfig call failed with output: 'Running
      `grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg' will overwrite the GRUB
      wrapper.
          Please run `grub2-mkconfig -o /boot/grub2/grub.cfg' instead to update
      grub.cfg.
          GRUB configuration file was not updated.
          '. The conversion will continue but there may be issues with the current
      grub2 config and image formats.
           Diagnosis: N/A
           Remediations: If there are issues with the current grub2 config and image
      we recommend manually re-generating them with 'grub2-mkconfig -o 
      /boot/efi/EFI/redhat/grub.cfg' and'grub2-install [block device, e.g. /dev/sda]'.
      

      Overall, the conversion finishes successfully, and the system is bootable without any apparent problems.

       

      Full log available here

       

              ddiblik@redhat.com Daniel Diblik
              ddiblik@redhat.com Daniel Diblik
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: