Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2021-09-13 14:56:03 +0000
committerAnton Hvornum <anton.feeds@gmail.com>2021-09-13 14:56:03 +0000
commite0f00ad1feb2956cf70d1eb46d8be2b58017cd16 (patch)
tree9698fb8705a4c685a774bf1d04326b9785b4892e
parent168379d43dce60e71e999722aa6a49fd5679891f (diff)
parent995edaf316ab42cec5adbc50b32c133ae2ec77b6 (diff)
Merging latest changes
-rw-r--r--archinstall/lib/installer.py13
-rw-r--r--examples/guided.py2
2 files changed, 8 insertions, 7 deletions
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py
index cb5b24a0..1ade75b3 100644
--- a/archinstall/lib/installer.py
+++ b/archinstall/lib/installer.py
@@ -431,7 +431,7 @@ class Installer:
return True
- def add_bootloader(self, _device, bootloader='systemd-bootctl'):
+ def add_bootloader(self, bootloader='systemd-bootctl'):
for plugin in plugins.values():
if hasattr(plugin, 'on_add_bootloader'):
# Allow plugins to override the boot-loader handling.
@@ -537,14 +537,15 @@ class Installer:
SysCommand(f"/usr/bin/arch-chroot {self.target} {enable_CRYPTODISK} {_file}")
if has_uefi():
- self.pacstrap('efibootmgr')
- o = b''.join(SysCommand(f'/usr/bin/arch-chroot {self.target} grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB'))
- SysCommand('/usr/bin/arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg')
+ self.pacstrap('efibootmgr') # TODO: Do we need?
+ SysCommand(f'/usr/bin/arch-chroot {self.target} grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB')
+ SysCommand(f'/usr/bin/arch-chroot {self.target} grub-mkconfig -o /boot/grub/grub.cfg')
self.helper_flags['bootloader'] = True
return True
else:
- o = b''.join(SysCommand(f'/usr/bin/arch-chroot {self.target} grub-install --target=i386-pc --recheck {_device.path}'))
- SysCommand('/usr/bin/arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg')
+ boot_partition = filesystem.find_partition(mountpoint=f"{self.target}/boot")
+ SysCommand(f'/usr/bin/arch-chroot {self.target} grub-install --target=i386-pc --recheck {boot_partition.path}')
+ SysCommand(f'/usr/bin/arch-chroot {self.target} grub-mkconfig -o /boot/grub/grub.cfg')
self.helper_flags['bootloader'] = True
else:
raise RequirementError(f"Unknown (or not yet implemented) bootloader requested: {bootloader}")
diff --git a/examples/guided.py b/examples/guided.py
index 4e6d1bc5..3dd30875 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -269,7 +269,7 @@ def perform_installation(mountpoint):
installation.set_mirrors(archinstall.arguments['mirror-region']) # Set the mirrors in the installation medium
if archinstall.arguments["bootloader"] == "grub-install" and has_uefi():
installation.add_additional_packages("grub")
- installation.add_bootloader(archinstall.arguments["harddrive"], archinstall.arguments["bootloader"])
+ installation.add_bootloader(archinstall.arguments["bootloader"])
# If user selected to copy the current ISO network configuration
# Perform a copy of the config