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

RHEL-9: Anaconda creates its own version of EFI/redhat/grub.cfg wrapper

    • None
    • Impediment
    • Moderate
    • rhel-sst-installer
    • ssg_front_door
    • None
    • None
    • Unspecified Release Note Type - Unknown
    • x86_64
    • None

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

      I just found out through debugging RHEL-36186 that Anaconda was implementing the stub file /boot/efi/EFI/redhat/grub.cfg by itself (pyanaconda/modules/storage/bootloader/efi.py):

      172     def write_config(self):
      173         config_path = "%s%s" % (conf.target.system_root, self.efi_config_file)
       :
      190             fd.write("search --no-floppy --fs-uuid --set=dev %s\n" % fs_uuid)
      191             fd.write("set prefix=($dev)%s\n" % grub_dir)
      192             fd.write("export $prefix\n")
      193             fd.write("configfile $prefix/grub.cfg\n")
      

      IMHO this is a bug, it should let grub2-common generate the stub file, because this file may evolve.
      For example, it will evolve because of RHEL-4388.
      Additionally without this reimplementation we would have hit RHEL-36186 earlier before RHEL9 was even released.

      Please provide the package NVR for which bug is seen:

      Anaconda RHEL9

      How reproducible:

      N/A

            [RHEL-36187] RHEL-9: Anaconda creates its own version of EFI/redhat/grub.cfg wrapper

            When we started to work on this upstream we discovered a bug (RHEL-69944) which needs to be resolved first. Because it is not clear if the RHEL-69944 issue will be resolved during this RHEL minor, we have decided to postpone this issue for next RHEL minor.

            Jiri Konecny added a comment - When we started to work on this upstream we discovered a bug (RHEL-69944) which needs to be resolved first. Because it is not clear if the RHEL-69944 issue will be resolved during this RHEL minor, we have decided to postpone this issue for next RHEL minor.

            IMPORTANT NOTE - This is issue was marked BLOCKED. DO NOT MERGE CODE CHANGES related to this ticket until the blocking reasons are resolved.

            RHEL Jira bot added a comment - IMPORTANT NOTE - This is issue was marked BLOCKED. DO NOT MERGE CODE CHANGES related to this ticket until the blocking reasons are resolved.

            I removed the whole write_config definition, as specified in the bug description and rebuilt the updates.img (thank you, jstodola@redhat.com) in order to test the fix for RHEL-36186 during installation, and it works as expected: grub creates the stub config for itself with --root-dev-only.

            Marta Lewandowska added a comment - I removed the whole write_config definition, as specified in the bug description and rebuilt the updates.img (thank you, jstodola@redhat.com ) in order to test the fix for RHEL-36186 during installation, and it works as expected: grub creates the stub config for itself with --root-dev-only.

            IMO, this bit of anaconda code should not be necessary, since, as Renaud points out, grub2-common generates the stub config, among other things, in its posttrans.

            Marta Lewandowska added a comment - IMO, this bit of anaconda code should not be necessary, since, as Renaud points out, grub2-common generates the stub config, among other things, in its posttrans.

            I'm always happy if we can move our logic elsewhere . However, I need to know what bootloader team thinks about this first.

            Could please bootloader team wrote here if they agree about the proposed approach?

            Jiri Konecny added a comment - I'm always happy if we can move our logic elsewhere . However, I need to know what bootloader team thinks about this first. Could please bootloader team wrote here if they agree about the proposed approach?

              kkoukiou Katerina Koukiou
              rhn-support-rmetrich Renaud Métrich
              anaconda-maint-list anaconda-maint-list
              Release Test Team Release Test Team
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: