Change how efibootmgr is installed
Make changes suggested by Torxed
This commit is contained in:
parent
4ce97aaa8c
commit
e488ad8ec4
|
|
@ -51,10 +51,6 @@ class Installer():
|
||||||
self.base_packages = base_packages.split(' ') if type(base_packages) is str else base_packages
|
self.base_packages = base_packages.split(' ') if type(base_packages) is str else base_packages
|
||||||
for kernel in kernels:
|
for kernel in kernels:
|
||||||
self.base_packages.append(kernel)
|
self.base_packages.append(kernel)
|
||||||
if hasUEFI():
|
|
||||||
self.base_packages.append("efibootmgr")
|
|
||||||
else:
|
|
||||||
self.base_packages.append("grub")
|
|
||||||
|
|
||||||
self.post_base_install = []
|
self.post_base_install = []
|
||||||
|
|
||||||
|
|
@ -370,6 +366,7 @@ class Installer():
|
||||||
self.log(f'Adding bootloader {bootloader} to {boot_partition if boot_partition else root_partition}', level=logging.INFO)
|
self.log(f'Adding bootloader {bootloader} to {boot_partition if boot_partition else root_partition}', level=logging.INFO)
|
||||||
|
|
||||||
if bootloader == 'systemd-bootctl':
|
if bootloader == 'systemd-bootctl':
|
||||||
|
self.pacstrap('efibootmgr')
|
||||||
|
|
||||||
if not hasUEFI():
|
if not hasUEFI():
|
||||||
raise HardwareIncompatibilityError
|
raise HardwareIncompatibilityError
|
||||||
|
|
@ -433,8 +430,10 @@ class Installer():
|
||||||
|
|
||||||
raise RequirementError(f"Could not identify the UUID of {self.partition}, there for {self.target}/boot/loader/entries/arch.conf will be broken until fixed.")
|
raise RequirementError(f"Could not identify the UUID of {self.partition}, there for {self.target}/boot/loader/entries/arch.conf will be broken until fixed.")
|
||||||
elif bootloader == "grub-install":
|
elif bootloader == "grub-install":
|
||||||
|
self.pacstrap('grub')
|
||||||
|
|
||||||
if hasUEFI():
|
if hasUEFI():
|
||||||
|
self.pacstrap('efibootmgr')`
|
||||||
o = b''.join(sys_command(f'/usr/bin/arch-chroot {self.target} grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB'))
|
o = b''.join(sys_command(f'/usr/bin/arch-chroot {self.target} grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB'))
|
||||||
sys_command('/usr/bin/arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg')
|
sys_command('/usr/bin/arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg')
|
||||||
return True
|
return True
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue