diff --git a/anaconda.spec.in b/anaconda.spec.in index bccdfd41fc2..28847521afc 100644 --- a/anaconda.spec.in +++ b/anaconda.spec.in @@ -143,6 +143,8 @@ Requires: python3-pid Requires: crypto-policies Requires: crypto-policies-scripts +Requires: grub2-common + # required because of the rescue mode and RDP question Requires: anaconda-tui = %{version}-%{release} diff --git a/pyanaconda/modules/storage/bootloader/efi.py b/pyanaconda/modules/storage/bootloader/efi.py index a44ace5d97c..30180f285e4 100644 --- a/pyanaconda/modules/storage/bootloader/efi.py +++ b/pyanaconda/modules/storage/bootloader/efi.py @@ -178,27 +178,7 @@ def efi_config_file(self): return "%s/%s" % (self.efi_config_dir, self._config_file) def write_config(self): - config_path = "%s%s" % (conf.target.system_root, self.efi_config_file) - - with open(config_path, "w") as fd: - grub_dir = self.config_dir - if self.stage2_device.format.type != "btrfs": - fs_uuid = self.stage2_device.format.uuid - else: - fs_uuid = self.stage2_device.format.vol_uuid - - if fs_uuid is None: - raise BootLoaderError("Could not get stage2 filesystem UUID") - - grub_dir = util.execWithCapture("grub2-mkrelpath", [grub_dir], - root=conf.target.system_root) - if not grub_dir: - raise BootLoaderError("Could not get GRUB directory path") - - fd.write("search --no-floppy --fs-uuid --set=dev %s\n" % fs_uuid) - fd.write("set prefix=($dev)%s\n" % grub_dir) - fd.write("export $prefix\n") - fd.write("configfile $prefix/grub.cfg\n") + """ Use the unified GRUB configuration provided by grub2-common. """ super().write_config()