From b6c1663986621a7080914891eb4cd30ed55076f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 20 May 2025 15:38:57 +0200 Subject: [PATCH] systemd-boot: improve error message if no previous systemd boot is found. --- .../system/boot/loader/systemd-boot/systemd-boot-builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py index 380ac69bdf7e..bd2a6d43301d 100644 --- a/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py +++ b/nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py @@ -335,7 +335,7 @@ def install_bootloader(args: argparse.Namespace) -> None: available_match = re.search(r"^\((.*)\)$", available_out) if installed_match is None: - raise Exception("could not find any previously installed systemd-boot") + raise Exception("Could not find any previously installed systemd-boot. If you are switching to systemd-boot from a different bootloader, you need to run `nixos-rebuild switch --install-bootloader`") if available_match is None: raise Exception("could not determine systemd-boot version")