Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
authorcodefiles <11915375+codefiles@users.noreply.github.com>2023-09-29 01:11:30 -0400
committerGitHub <noreply@github.com>2023-09-29 07:11:30 +0200
commit5f5b95f24515de0d265a96e6919622d185f10fa3 (patch)
tree30d259d2562ea011b511c05b3f8c8c350e641616 /archinstall/lib
parent7a9a934ae38324f11d7d3be580a3ec329a73f96f (diff)
Fix GRUB boot directory (#2130)
Diffstat (limited to 'archinstall/lib')
-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}")