all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager v2] 8 to 9 checks: do not ask bootctl if systemd-boot is used.
@ 2025-08-06 11:02 Stoiko Ivanov
  2025-08-07 12:29 ` Fiona Ebner
  0 siblings, 1 reply; 3+ messages in thread
From: Stoiko Ivanov @ 2025-08-06 11:02 UTC (permalink / raw)
  To: pve-devel

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.herzig@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
v1->v2:
* fix a typo I overlooked before.
 PVE/CLI/pve8to9.pm | 19 ++++++-------------
 1 file changed, 6 insertions(+), 13 deletions(-)

diff --git a/PVE/CLI/pve8to9.pm b/PVE/CLI/pve8to9.pm
index 994189f1..084452fd 100644
--- a/PVE/CLI/pve8to9.pm
+++ b/PVE/CLI/pve8to9.pm
@@ -1604,7 +1604,7 @@ sub check_bootloader {
 
     if (!-d '/sys/firmware/efi') {
         if (-f "/usr/share/doc/systemd-boot/changelog.Debian.gz") {
-            log_info("systemd-boot package installed on legacy-boot system is not necessary, consider remoing it");
+            log_info("systemd-boot package installed on legacy-boot system is not necessary, consider removing it");
             return;
         }
         log_skip("System booted in legacy-mode - no need for additional packages");
@@ -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


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

* Re: [pve-devel] [PATCH manager v2] 8 to 9 checks: do not ask bootctl if systemd-boot is used.
  2025-08-06 11:02 [pve-devel] [PATCH manager v2] 8 to 9 checks: do not ask bootctl if systemd-boot is used Stoiko Ivanov
@ 2025-08-07 12:29 ` Fiona Ebner
  2025-08-07 20:31   ` [pve-devel] superseded: " Stoiko Ivanov
  0 siblings, 1 reply; 3+ messages in thread
From: Fiona Ebner @ 2025-08-07 12:29 UTC (permalink / raw)
  To: Proxmox VE development discussion, Stoiko Ivanov

Am 06.08.25 um 1:03 PM schrieb Stoiko Ivanov:
>   get systemd-boot installed to /boot/efi upon upgrade

What problems does this cause (except for the false positive)? Can/do
users need to do something to recover? If yes, I think we should have
the script output more information.

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

Note that we did not return in the 'if' branch previously, which means
the next check below won't be done anymore. Is that intentional? It
seems like it should be done.

>          }
>          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,"



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


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

* [pve-devel] superseded: [PATCH manager v2] 8 to 9 checks: do not ask bootctl if systemd-boot is used.
  2025-08-07 12:29 ` Fiona Ebner
@ 2025-08-07 20:31   ` Stoiko Ivanov
  0 siblings, 0 replies; 3+ messages in thread
From: Stoiko Ivanov @ 2025-08-07 20:31 UTC (permalink / raw)
  To: Fiona Ebner; +Cc: Proxmox VE development discussion

Thanks big-time for the feedback on- and off-list!
sent an updated v3:
https://lore.proxmox.com/pve-devel/20250807203004.336616-1-s.ivanov@proxmox.com/T/#t

On Thu, 7 Aug 2025 14:29:34 +0200
Fiona Ebner <f.ebner@proxmox.com> wrote:

> Am 06.08.25 um 1:03 PM schrieb Stoiko Ivanov:
> >   get systemd-boot installed to /boot/efi upon upgrade  
> 
> What problems does this cause (except for the false positive)? Can/do
> users need to do something to recover? If yes, I think we should have
> the script output more information.
> 
> > @@ -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;  
> 
> Note that we did not return in the 'if' branch previously, which means
> the next check below won't be done anymore. Is that intentional? It
> seems like it should be done.
> 
> >          }
> >          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,"  
> 



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


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

end of thread, other threads:[~2025-08-07 20:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-06 11:02 [pve-devel] [PATCH manager v2] 8 to 9 checks: do not ask bootctl if systemd-boot is used Stoiko Ivanov
2025-08-07 12:29 ` Fiona Ebner
2025-08-07 20:31   ` [pve-devel] superseded: " Stoiko Ivanov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal