From 208ed68a4185d70603bf2bf9738929a5a0b9afaf Mon Sep 17 00:00:00 2001 From: rrossi Date: Mon, 7 Sep 2026 22:45:30 +0200 Subject: [PATCH] fix: always use /boot as GRUB boot directory on UEFI Fix GRUB installation placing configuration files on the ESP (FAT32) instead of /boot/grub/ when a custom ESP mount point is specified. Previously, when boot_partition.mountpoint differed from /boot (e.g., /efi or /boot/efi), the code would override boot_dir to point to the ESP, causing grub-install to use --boot-directory=/efi. This resulted in grub.cfg being written to the FAT32 ESP partition instead of the BTRFS root, breaking BTRFS snapshot workflows. The fix ensures --boot-directory always points to /boot, while --efi-directory correctly points to the ESP for EFI binaries. Closes BTRFS snapshot restore issues with grub-btrfs integration. --- archinstall/lib/installer.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index 8c6bee22e5..bfa0b201fb 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -1356,10 +1356,7 @@ def _add_grub_bootloader( self.pacman.strap('efibootmgr') # TODO: Do we need? Yes, but remove from minimal_installation() instead? - boot_dir_arg = [] - if boot_partition.mountpoint and boot_partition.mountpoint != boot_dir: - boot_dir_arg.append(f'--boot-directory={boot_partition.mountpoint}') - boot_dir = boot_partition.mountpoint + boot_dir_arg = [f'--boot-directory={boot_dir}'] add_options = [ f'--target={"arm64" if platform.machine() == "aarch64" else platform.machine()}-efi',