From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 9811D1FF170 for ; Thu, 7 Aug 2025 22:29:35 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id AC7A7373A6; Thu, 7 Aug 2025 22:31:05 +0200 (CEST) From: Stoiko Ivanov To: pve-devel@lists.proxmox.com Date: Thu, 7 Aug 2025 22:30:03 +0200 Message-Id: <20250807203004.336616-2-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250807203004.336616-1-s.ivanov@proxmox.com> References: <20250807203004.336616-1-s.ivanov@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1754598608021 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.064 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH manager v3 1/2] 8 to 9 checks: do not ask bootctl if systemd-boot is used. X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "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. Additionally increase the log from a warn to a fail, as issues with boot-loaders yield unbootable systems, and move the (probably rare) case of manual systemd-boot setups to the upgrade-guide in our wiki, which is also linked in the output. Finally fix a typo (s/remoing/removing/). Reported-by: Daniel Herzig Signed-off-by: Stoiko Ivanov --- PVE/CLI/pve8to9.pm | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/PVE/CLI/pve8to9.pm b/PVE/CLI/pve8to9.pm index d2a7346c..6381e62f 100644 --- a/PVE/CLI/pve8to9.pm +++ b/PVE/CLI/pve8to9.pm @@ -1561,7 +1561,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" + "systemd-boot package installed on legacy-boot system is not necessary, consider removing it" ); return; } @@ -1575,25 +1575,18 @@ sub check_bootloader { return; } if (-f "/usr/share/doc/systemd-boot/changelog.Debian.gz") { - log_warn("systemd-boot meta-package installed this will cause issues on upgrades of" + 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; } } 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_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." + ); } 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