From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 444C11FF15C for ; Fri, 8 Aug 2025 14:44:33 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E3D4D17B90; Fri, 8 Aug 2025 14:45:59 +0200 (CEST) From: Stoiko Ivanov To: pve-devel@lists.proxmox.com Date: Fri, 8 Aug 2025 14:45:40 +0200 Message-Id: <20250808124540.1490294-3-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250808124540.1490294-1-s.ivanov@proxmox.com> References: <20250808124540.1490294-1-s.ivanov@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1754657130594 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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [pve8to9.pm, proxmox.com] Subject: [pve-devel] [PATCH manager v4 2/2] 8 to 9 checks: check for removable grub-install 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" some upgrades result in unbootable systems, which can be traced back to grub being installed in BOOTX64.efi, but not being upgraded by grub-install. Refer the cases to the output of `proxmox-boot-tool refresh` as it has a sensible check logic for those cases. Some affected systems printed the warning of proxmox-boot-tool, but it was lost in the large output of the dist-upgrade. Signed-off-by: Stoiko Ivanov --- PVE/CLI/pve8to9.pm | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/PVE/CLI/pve8to9.pm b/PVE/CLI/pve8to9.pm index db155184..a8b4c718 100644 --- a/PVE/CLI/pve8to9.pm +++ b/PVE/CLI/pve8to9.pm @@ -1569,6 +1569,7 @@ sub check_bootloader { return; } + my $boot_ok = 1; if (-f "/etc/kernel/proxmox-boot-uuids") { if (!$upgraded) { log_skip("not yet upgraded, systemd-boot still needed for bootctl"); @@ -1587,13 +1588,37 @@ sub check_bootloader { . " 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." ); - return; - } else { + $boot_ok = 0; + } + if (-f "/boot/efi/EFI/BOOT/BOOTX64.efi") { + my $removable_update = 0; + my $exit_code = eval { + run_command( + ['debconf-show', '--db', 'configdb', 'grub-efi-amd64', 'grub-pc'], + outfunc => sub { + my ($line) = @_; + if ($line =~ m|grub2/force_efi_extra_removable: +true$|) { + $removable_update = 1; + } + }, + noerr => 1, + ); + }; + log_warn( + "Removable bootloader found at '/boot/efi/EFI/BOOT/BOOTX64.efi', but GRUB packages" + . " not set up to update it!\nRun the following command:\n" + . "echo 'grub-efi-amd64 grub2/force_efi_extra_removable boolean true' | debconf-set-selections -v -u\n" + . "Then reinstall GRUB with 'apt install --reinstall grub-efi-amd64'") + if !$removable_update; + $boot_ok = 0; + } + if ($boot_ok) { log_pass("bootloader packages installed correctly"); } } -- 2.39.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel