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 5EB7C1FF146 for ; Tue, 23 Jun 2026 12:30:53 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 2E9C51F496; Tue, 23 Jun 2026 12:30:53 +0200 (CEST) From: Stoiko Ivanov To: pve-devel@lists.proxmox.com Subject: [PATCH kernel-helper] proxmox-boot: fix copying memtest86 twice for systemd-boot Date: Tue, 23 Jun 2026 12:29:55 +0200 Message-ID: <20260623102957.246597-1-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1782210607661 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.084 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 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. [proxmox.com] Message-ID-Hash: LXEPDKUD3ZTFO2ORELZEKNODADOIYV2L X-Message-ID-Hash: LXEPDKUD3ZTFO2ORELZEKNODADOIYV2L X-MailFrom: s.ivanov@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: currently this results in having memtest86+.efi present in the ESP's root as well as in `/EFI/`. I probably overlooked this when adding the this for grub-booted systems, in addition to systemd-booted systems. reported in our community-forum: https://forum.proxmox.com/threads/184148/ minimally tested by installing this on a system with systemd-boot, and one with grub (secure-boot), formatting the ESP, running p-b-t init, rebooting and selecting memtest (worked for systemd-boot, gave an wrong signature error for secure boot - as expected). Signed-off-by: Stoiko Ivanov --- src/bin/proxmox-boot-tool | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bin/proxmox-boot-tool b/src/bin/proxmox-boot-tool index ee04193..d2f06ce 100755 --- a/src/bin/proxmox-boot-tool +++ b/src/bin/proxmox-boot-tool @@ -161,11 +161,11 @@ init_bootloader() { if [ -d /sys/firmware/efi ]; then memtest=memtest86+x64.efi - if [ -f "/boot/$memtest" ]; then - echo "Adding $memtest .." - cp "/boot/$memtest" "$esp_mp/" - fi if [ -n "$mode" ] && [ "$mode" = "grub" ]; then + if [ -f "/boot/$memtest" ]; then + echo "Adding $memtest .." + cp "/boot/$memtest" "$esp_mp/" + fi echo "Installing grub x86_64 target.." grub-install.real \ --boot-directory "${esp_mp}" \ -- 2.47.3