Skip to content

Commit 2ac2d75

Browse files
committed
Validate UKI and removable options in installer
1 parent 7a6b40b commit 2ac2d75

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

archinstall/lib/installer.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1635,6 +1635,20 @@ def add_bootloader(self, bootloader: Bootloader, uki_enabled: bool = False, boot
16351635

16361636
info(f'Adding bootloader {bootloader.value} to {boot_partition.dev_path}')
16371637

1638+
# validate UKI support
1639+
if uki_enabled and not bootloader.has_uki_support():
1640+
warn(f'Bootloader {bootloader.value} does not support UKI; disabling.')
1641+
uki_enabled = False
1642+
1643+
# validate removable bootloader option
1644+
if bootloader_removable:
1645+
if not SysInfo.has_uefi():
1646+
warn('Removable install requested but system is not UEFI; disabling.')
1647+
bootloader_removable = False
1648+
elif not bootloader.has_removable_support():
1649+
warn(f'Bootloader {bootloader.value} lacks removable support; disabling.')
1650+
bootloader_removable = False
1651+
16381652
if uki_enabled:
16391653
self._config_uki(root, efi_partition)
16401654

0 commit comments

Comments
 (0)