public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager] pve8to9: rework systemd-boot checks
Date: Thu, 21 Aug 2025 19:00:07 +0200	[thread overview]
Message-ID: <20250821170007.148854-1-s.ivanov@proxmox.com> (raw)

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@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



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


             reply	other threads:[~2025-08-21 17:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-21 17:00 Stoiko Ivanov [this message]
2025-08-26  6:55 ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250821170007.148854-1-s.ivanov@proxmox.com \
    --to=s.ivanov@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal