diff --git a/webinstaller/app.py b/webinstaller/app.py index fd35a31..306ecfe 100644 --- a/webinstaller/app.py +++ b/webinstaller/app.py @@ -450,12 +450,18 @@ def _post_install_commands(hostname): ] +def _detect_bootloader(): + # systemd-boot is UEFI-only; on BIOS/legacy it trips HardwareIncompatibilityError + # inside archinstall. /sys/firmware/efi exists iff we were booted via UEFI. + return "Systemd-boot" if Path("/sys/firmware/efi").exists() else "Grub" + + def build_archinstall_config(s): return { "archinstall-language": "English", "timezone": "Europe/Berlin", "ntp": True, - "bootloader": "Systemd-boot", + "bootloader": _detect_bootloader(), "disk_config": build_disk_config(s["boot_drive"]), "hostname": s["hostname"], "kernels": ["linux"],