From 9f5c2bb70b0a4551eaa871164a3c9d71c1e65086 Mon Sep 17 00:00:00 2001 From: codefiles <11915375+codefiles@users.noreply.github.com> Date: Fri, 29 Sep 2023 10:09:28 -0400 Subject: Add support for ESP partition flag (#2133) --- archinstall/lib/installer.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'archinstall/lib/installer.py') diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index e7895a1a..585389ed 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -903,15 +903,22 @@ class Installer: '--debug' ] - if SysInfo.has_uefi() and efi_partition is not None: + if SysInfo.has_uefi(): + if not efi_partition: + raise ValueError('Could not detect efi partition') + info(f"GRUB EFI partition: {efi_partition.dev_path}") self.pacman.strap('efibootmgr') # TODO: Do we need? Yes, but remove from minimal_installation() instead? + boot_dir_arg = [] + if boot_partition != efi_partition: + boot_dir_arg.append(f'--boot-directory={boot_dir}') + add_options = [ '--target=x86_64-efi', f'--efi-directory={efi_partition.mountpoint}', - f'--boot-directory={boot_dir}', + *boot_dir_arg, '--bootloader-id=GRUB', '--removable' ] -- cgit v1.2.3-54-g00ecf