From 010deba8daea262d0ffb000f4d8bf96e6b4ddd82 Mon Sep 17 00:00:00 2001 From: Hongxu Jia Date: Sat, 29 Jun 2019 11:17:49 +0800 Subject: [PATCH] support UEFI boot - tweak grub efi package name based on oe-core - tweak efi_dir according to oe-core's EFI layout Upstream-Status: Inappropriate [oe specific] Signed-off-by: Hongxu Jia Refactor for anaconda 34. Function config_file() is removed since it is not used. Signed-off-by: Kai Kang Rebased for fedora 39 on 20240403. Signed-off-by: Kai Kang --- pyanaconda/modules/storage/bootloader/efi.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pyanaconda/modules/storage/bootloader/efi.py b/pyanaconda/modules/storage/bootloader/efi.py index d4c0fb60e8..707d729d2c 100644 --- a/pyanaconda/modules/storage/bootloader/efi.py +++ b/pyanaconda/modules/storage/bootloader/efi.py @@ -43,7 +43,7 @@ class EFIBase(object): @property def _efi_config_dir(self): - return "efi/EFI/{}".format(conf.bootloader.efi_dir) + return "efi/EFI/BOOT" def get_fw_platform_size(self): try: @@ -146,8 +146,8 @@ class EFIBase(object): class EFIGRUB(EFIBase, GRUB2): """EFI GRUBv2""" - _packages32 = [ "grub2-efi-ia32", "shim-ia32" ] - _packages_common = ["efibootmgr", "grub2-tools", "grub2-tools-extra", "grubby" ] + _packages32 = [ "grub-efi" ] + _packages_common = [ "efibootmgr" ] stage2_is_valid_stage1 = False stage2_bootable = False @@ -155,7 +155,7 @@ class EFIGRUB(EFIBase, GRUB2): def __init__(self): super().__init__() - self._packages64 = [ "grub2-efi-x64", "shim-x64" ] + self._packages64 = [ "grub-efi" ] if self.get_fw_platform_size() == '32': self._is_32bit_firmware = True @@ -163,8 +163,8 @@ class EFIGRUB(EFIBase, GRUB2): @property def _efi_binary(self): if self._is_32bit_firmware: - return "\\shimia32.efi" - return "\\shimx64.efi" + return "\\bootia32.efi" + return "\\bootx64.efi" @property def packages(self): @@ -190,7 +190,7 @@ class EFIGRUB(EFIBase, GRUB2): if fs_uuid is None: raise BootLoaderError("Could not get stage2 filesystem UUID") - grub_dir = util.execWithCapture("grub2-mkrelpath", [grub_dir], + grub_dir = util.execWithCapture("grub-mkrelpath", [grub_dir], root=conf.target.system_root) if not grub_dir: raise BootLoaderError("Could not get GRUB directory path") -- 2.7.4