Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archinstall/lib/installer.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py
index f0df7322..e7895a1a 100644
--- a/archinstall/lib/installer.py
+++ b/archinstall/lib/installer.py
@@ -889,6 +889,13 @@ class Installer:
info(f"GRUB boot partition: {boot_partition.dev_path}")
+ if boot_partition == root_partition and root_partition.mountpoint:
+ boot_dir = root_partition.mountpoint / 'boot'
+ elif boot_partition.mountpoint:
+ boot_dir = boot_partition.mountpoint
+ else:
+ raise ValueError('Could not detect boot directory')
+
command = [
'/usr/bin/arch-chroot',
str(self.target),
@@ -904,7 +911,7 @@ class Installer:
add_options = [
'--target=x86_64-efi',
f'--efi-directory={efi_partition.mountpoint}',
- f'--boot-directory={boot_partition.mountpoint if boot_partition else "/boot"}',
+ f'--boot-directory={boot_dir}',
'--bootloader-id=GRUB',
'--removable'
]
@@ -937,7 +944,7 @@ class Installer:
try:
SysCommand(
f'/usr/bin/arch-chroot {self.target} '
- f'grub-mkconfig -o {boot_partition.mountpoint if boot_partition else "/boot"}/grub/grub.cfg'
+ f'grub-mkconfig -o {boot_dir}/grub/grub.cfg'
)
except SysCallError as err:
raise DiskError(f"Could not configure GRUB: {err}")