The current logic of deciding if systemd-boot was manually setup by
the user (without proxmox-boot-tool), by checking
`bootctl is-installed` yields a false-positive after upgrading:
* systems which have the package installed (e.g. from our isos after
  8.0), but do not use proxmox-boot-tool (LVM installs) will get
  systemd-boot installed to /boot/efi upon upgrade
* after upgrading the check says that it's been explicitly setup.

Rather warn if the package is installed (unless proxmox-boot-tool is
used and the upgrade is still not done) in any case - as the number
of systems which have it setup manually are probably far lower than
those that upgrade without explicitly checking pve8to9.

Reported-by: Daniel Herzig <d.her...@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.iva...@proxmox.com>
---
 PVE/CLI/pve8to9.pm | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/PVE/CLI/pve8to9.pm b/PVE/CLI/pve8to9.pm
index 994189f1..f6600d98 100644
--- a/PVE/CLI/pve8to9.pm
+++ b/PVE/CLI/pve8to9.pm
@@ -1624,18 +1624,11 @@ sub check_bootloader {
         }
     } else {
         if (-f "/usr/share/doc/systemd-boot/changelog.Debian.gz") {
-            my $exit_code = eval {
-                run_command(['bootctl', 'is-installed', '--quiet', 
'--graceful'], noerr => 1);
-            };
-            if ($exit_code != 0) {
-                log_warn(
-                    "systemd-boot meta-package installed but the system does 
not seem to use it"
-                        . " for booting. This can cause problems on upgrades 
of other boot-related packages."
-                        . " Consider removing 'systemd-boot'");
-            } else {
-                log_info("systemd-boot used as bootloader and fitting 
meta-package installed.");
-                return;
-            }
+            log_warn(
+                "systemd-boot meta-package installed. This can cause problems 
on upgrades of other"
+                ." boot-related packages. Unless you manually setup the system 
to use"
+                ." systemd-boot remove 'systemd-boot'");
+            return;
         }
         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,"
-- 
2.39.5



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

Reply via email to