From 53398c5c9288056d0ddb6afccceb70bd0ce0f5d8 Mon Sep 17 00:00:00 2001 From: Stoiko Ivanov Date: Wed, 21 Jun 2023 16:32:26 +0200 Subject: [PATCH 1/1] proxmox-boot: warn on missing systemd-boot package With the shipping of systemd-boot as separate package, we cannot rely on `bootctl` being present in all systems (e.g. currently all systems upgraded from PVE 7 will not automatically pull systemd-boot in. This patch adds a check for existence + warning with an explanation to the only invocation of bootctl in the boot-tool codebase Signed-off-by: Stoiko Ivanov Signed-off-by: Thomas Lamprecht --- src/bin/proxmox-boot-tool | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/bin/proxmox-boot-tool b/src/bin/proxmox-boot-tool index d41f921..913b0f6 100755 --- a/src/bin/proxmox-boot-tool +++ b/src/bin/proxmox-boot-tool @@ -153,6 +153,12 @@ init_bootloader() { if [ -d /sys/firmware/efi ]; then echo "Installing systemd-boot.." mkdir -p "$esp_mp/$PMX_ESP_DIR" + if ! command -V bootctl >/dev/null 2>&1 ; + then + warn "E: bootctl is not available - make sure systemd-boot is installed" + exit 1 + fi + bootctl --graceful --path "$esp_mp" install echo "Configuring systemd-boot.." -- 2.39.2