raise error if systemd-boot is used on a BIOS system
This commit is contained in:
parent
850fd2efa8
commit
ceadb59b26
|
|
@ -313,6 +313,7 @@ class Installer():
|
|||
self.log(f'Adding bootloader {bootloader} to {self.boot_partition}', level=LOG_LEVELS.Info)
|
||||
|
||||
if bootloader == 'systemd-bootctl':
|
||||
if hasUEFI():
|
||||
o = b''.join(sys_command(f'/usr/bin/arch-chroot {self.mountpoint} bootctl --no-variables --path=/boot install'))
|
||||
with open(f'{self.mountpoint}/boot/loader/loader.conf', 'w') as loader:
|
||||
loader.write('default arch\n')
|
||||
|
|
@ -356,6 +357,8 @@ class Installer():
|
|||
return True
|
||||
break
|
||||
raise RequirementError(f"Could not identify the UUID of {self.partition}, there for {self.mountpoint}/boot/loader/entries/arch.conf will be broken until fixed.")
|
||||
else:
|
||||
raise RequirementError("Systemd boot is UEFI only it can not be installed or used on bios")
|
||||
elif bootloader == 'grub-install':
|
||||
if hasUEFI():
|
||||
o = b''.join(sys_command(f'/usr/bin/arch-chroot {self.mountpoint} grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB'))
|
||||
|
|
|
|||
Loading…
Reference in New Issue