[pve-devel] [PATCH manager] pve8to9: rework systemd-boot checks
Stoiko Ivanov
s.ivanov at proxmox.com
Thu Aug 21 19:00:07 CEST 2025
This patch replicates the changes done in pbs3to4 from:
https://lore.proxmox.com/pbs-devel/20250821141719.4130062-4-s.ivanov@proxmox.com/T/#u
The check if systemd-boot presence is not problematic (before
upgrade for systems that actually use it) is left in place with a
log_skip,, all other situations where systemd-boot is installed are
marked as failure and point to the upgrade guide in the pve-wiki.
Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
PVE/CLI/pve8to9.pm | 34 +++++++++++++++-------------------
1 file changed, 15 insertions(+), 19 deletions(-)
diff --git a/PVE/CLI/pve8to9.pm b/PVE/CLI/pve8to9.pm
index 218ba3f5..70b67f86 100644
--- a/PVE/CLI/pve8to9.pm
+++ b/PVE/CLI/pve8to9.pm
@@ -1558,8 +1558,10 @@ sub check_time_sync {
sub check_bootloader {
log_info("Checking bootloader configuration...");
+ my $sd_boot_installed = -f "/usr/share/doc/systemd-boot/changelog.Debian.gz";
+
if (!-d '/sys/firmware/efi') {
- if (-f "/usr/share/doc/systemd-boot/changelog.Debian.gz") {
+ if ($sd_boot_installed) {
log_warn(
"systemd-boot package installed on legacy-boot system is not necessary, consider removing it"
);
@@ -1592,22 +1594,7 @@ sub check_bootloader {
return;
}
}
- if (-f "/usr/share/doc/systemd-boot/changelog.Debian.gz") {
- log_fail("systemd-boot meta-package installed this will cause issues on upgrades of"
- . " boot-related packages. Install 'systemd-boot-efi' and 'systemd-boot-tools' explicitly"
- . " and remove 'systemd-boot'");
- return;
- }
- log_pass("bootloader packages installed correctly");
} else {
- if (-f "/usr/share/doc/systemd-boot/changelog.Debian.gz") {
- log_fail(
- "systemd-boot meta-package installed. This will cause problems on upgrades of other"
- . " boot-related packages. Remove 'systemd-boot' See"
- . " https://pve.proxmox.com/wiki/Upgrade_from_8_to_9#sd-boot-warning for more information."
- );
- $boot_ok = 0;
- }
if (!-f "/usr/share/doc/grub-efi-amd64/changelog.Debian.gz") {
log_warn("System booted in uefi mode but grub-efi-amd64 meta-package not installed,"
. " new grub versions will not be installed to /boot/efi! Install grub-efi-amd64."
@@ -1637,9 +1624,18 @@ sub check_bootloader {
$boot_ok = 0;
}
}
- if ($boot_ok) {
- log_pass("bootloader packages installed correctly");
- }
+ }
+ if ($sd_boot_installed) {
+ log_fail(
+ "systemd-boot meta-package installed. This will cause problems on upgrades of other"
+ . " boot-related packages. Remove 'systemd-boot' See"
+ . " https://pve.proxmox.com/wiki/Upgrade_from_8_to_9#sd-boot-warning for more information."
+ );
+ $boot_ok = 0;
+ }
+ if ($boot_ok) {
+ log_pass("bootloader packages installed correctly");
+ return;
}
}
--
2.39.5
More information about the pve-devel
mailing list