public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] pve8to9: rework systemd-boot checks
@ 2025-08-21 17:00 Stoiko Ivanov
  2025-08-26  6:55 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Stoiko Ivanov @ 2025-08-21 17:00 UTC (permalink / raw)
  To: pve-devel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH manager] pve8to9: rework systemd-boot checks
  2025-08-21 17:00 [pve-devel] [PATCH manager] pve8to9: rework systemd-boot checks Stoiko Ivanov
@ 2025-08-26  6:55 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-08-26  6:55 UTC (permalink / raw)
  To: pve-devel, Stoiko Ivanov

On Thu, 21 Aug 2025 19:00:07 +0200, Stoiko Ivanov wrote:
> 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.
> 
> [...]

Applied, thanks!

[1/1] pve8to9: rework systemd-boot checks
      commit: 14879e4138941105345fa036f74d955759657738


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-08-26  6:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-21 17:00 [pve-devel] [PATCH manager] pve8to9: rework systemd-boot checks Stoiko Ivanov
2025-08-26  6:55 ` [pve-devel] applied: " Thomas Lamprecht

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