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 4ADC51FF141 for ; Tue, 16 Jun 2026 11:02:05 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 2C7B8369CF; Tue, 16 Jun 2026 11:02:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781600515; x=1782205315; darn=lists.proxmox.com; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=8kq00KxgvreVNv8WyJ+vNg0tdGb3fxtVFloGHlms9HA=; b=R9BY0oKbDeFOKaEGPquXvbxlUtQQ1A82Hp7Ic3/Qa1Re4q+3kIWsY3mjMt6+MeV98y zgJyp5AmDhCgII+Xvw61Pqznpbyz0SJt3QiyNNGF2V6BqGipWorpVSVl81fv2zw9o+AW kBx0mNDPWrMBT5fB2t8UXsZtyp6qBO3Wkp2YRPHwbSp0MakNT6GPFLnzVlb7FBVNtlOv xNoOFMvIFdcbmJCp4ceD0z5z1fjpChgd18F/A+xi/zO+wujWsmrgZsPLPoQzL0voHqFa RBIQ3W8XoDeBX6I44YmgqlhY52gz/vmpc2IIedll7hv841kQF5DxYau7mtdRxw22+mHg G38g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781600515; x=1782205315; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8kq00KxgvreVNv8WyJ+vNg0tdGb3fxtVFloGHlms9HA=; b=nvd0IoBpQ6yzUcaY9dohhgVmEE/5NjSJgn0sJ/TpaSSG3go+dzUGSHByyHgyfIef/7 /MBZm7l8RYJXdQff8uGO9CCIDBe3gU8/8eCmb2AmKLLaqGpY3lGPAvBVG5+Q9cITi8Bg Lx5dLWWRa0LL4xTZhWlFBjonr92Q0N19HC2kWMCJRRwHjCPZ/b3RCY7Ycu2FqzoqH+49 OMI7JRWBcsyOASSsX8LWwPmx6IGRy2E2tszwwj1wqrn/NrS0Rs+d+HxXnO2cI8JRyaX4 rCLa0InvycDlXIrrWpMbJiEOepn8oK6KdBS60bt4hMQwhFiQTfU0wRIWFnoos22ewHEh K/xQ== X-Gm-Message-State: AOJu0YxqOQO+Hx+JpnkxydjWVkb64AYISM0DAJpytUzFR7YKn0hXs4wE jtUGLJpjhX999zEGB2lmaIEyJAyCuWo8upDpIqauojg3Oo94Khcaqu8+e4vKcUvJ X-Gm-Gg: Acq92OF8933g1QTkba+7C3zVo9kwmUapcOWbAiJNiOUhTUXo0apYygmaICtmONP3g5N ONp0Edl62Jbbne6ETZ+aVb77tFTcd9u/A3/eHbw7IPADl5Ah4xmHANBOwI9j66mQthokUey1/r8 MVq2lE2HJjQqeLhhoIC+5aNI8rFU99F8fPyzLlP/EtTh19g+Suqtg7Esc3PP48IbnIfBAKI6m8B nRXQU3C80ZglK3ZgSthFsxICD4OnzAPQ3z4DkJaIrXhEt2BpyXnXuVWVL7CDGznN8yaUde2kjc7 gVpgRx+zvHTcQluqVT6RL2OfYaaSUFh37thIURSycpwtO/8xUo8vluTNt60ljmPDhlg8ZaKpcgv CC1+J1wVyp881bXXpOxSXv8oPI1EgqMOH6Ffw6zpCU5DA4tfu4lGpcrjiwlOfJ0BJc8LsQn0bAh iWh9436yES05sUGzQSxMXEg747ALdq/jsdVUqcG9vjvQ== X-Received: by 2002:a05:6a00:1252:b0:842:6e9f:9dc with SMTP id d2e1a72fcca58-8434ce845cdmr18563965b3a.34.1781600514649; Tue, 16 Jun 2026 02:01:54 -0700 (PDT) Message-ID: <86d8aa6d-c3da-4f5c-9155-5f6c5101a11b@gmail.com> Date: Tue, 16 Jun 2026 17:01:52 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH kernel-helper] zz-proxmox-boot: make grub EFI architecture aware To: pve-devel@lists.proxmox.com References: <20260607065119.120120-1-wukaiyang@loongfans.cn> Content-Language: en-US From: Kaiyang Wu In-Reply-To: <20260607065119.120120-1-wukaiyang@loongfans.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.147 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain DMARC_PASS -0.1 DMARC pass policy FREEMAIL_ENVFROM_END_DIGIT 1 Envelope-from freemail username ends in digit FREEMAIL_FROM 0.001 Sender email is commonly abused enduser mail provider RCVD_IN_DNSWL_NONE -0.0001 Sender listed at https://www.dnswl.org/, no trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 4RKSL6B74I4UNMNWTFCLPQI3RPSSU52O X-Message-ID-Hash: 4RKSL6B74I4UNMNWTFCLPQI3RPSSU52O X-MailFrom: wukaiyang2003@gmail.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 CC: Kaiyang Wu X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Gentle ping, can anyone please take a look? Kaiyang On 2026-06-07 14:51, Kaiyang Wu wrote: > Add architecture based Grub EFI bootloader detection and processing. > > Signed-off-by: Kaiyang Wu > --- > src/proxmox-boot/zz-proxmox-boot | 38 ++++++++++++++++++++++++-------- > 1 file changed, 29 insertions(+), 9 deletions(-) > > diff --git a/src/proxmox-boot/zz-proxmox-boot b/src/proxmox-boot/zz-proxmox-boot > index 541a982..e80e2f3 100755 > --- a/src/proxmox-boot/zz-proxmox-boot > +++ b/src/proxmox-boot/zz-proxmox-boot > @@ -41,6 +41,8 @@ elif [ -d /usr/share/doc/proxmox-backup/ ]; then > LOADER_TITLE="Proxmox Backup Server" > fi > > +ARCH="$(dpkg --print-architecture)" > + > update_esps() { > if [ ! -f "${ESP_LIST}" ]; then > warn "No ${ESP_LIST} found, skipping ESP sync." > @@ -78,7 +80,16 @@ update_esp_func() { > mount -t vfat -o umask=0077 "${path}" "${mountpoint}" || \ > { warn "mount of ${path} failed - skipping"; return; } > > - if [ -e "${mountpoint}/EFI/proxmox/grubx64.efi" ]; then > + grub_efi_binary="" > + if [ "$ARCH" = "amd64" ]; then > + grub_efi_binary="grubx64.efi" > + elif [ "$ARCH" = "arm64" ]; then > + grub_efi_binary="grubaa64.efi" > + else > + warn "Unsupported architecture ${ARCH}" > + fi > + > + if [ -e "${mountpoint}/EFI/proxmox/${grub_efi_binary}" ]; then > grub=1 > fi > if [ -d /sys/firmware/efi ] && [ "$grub" != 1 ]; then > @@ -235,12 +246,12 @@ check_grub_efi_package() { > return > fi > > - if [ -f /usr/share/doc/grub-efi-amd64/changelog.Debian.gz ]; then > + if [ -f /usr/share/doc/grub-efi-${ARCH}/changelog.Debian.gz ]; then > return > fi > > - warn "System booted in EFI-mode but 'grub-efi-amd64' meta-package not installed!" > - warn "Install 'grub-efi-amd64' to get updates." > + warn "System booted in EFI-mode but 'grub-efi-${ARCH}' meta-package not installed!" > + warn "Install 'grub-efi-${ARCH}' to get updates." > } > > check_grub_efi_removable_status() { > @@ -249,12 +260,21 @@ check_grub_efi_removable_status() { > return > fi > > + removable_efi_binary="" > + if [ "$ARCH" = "amd64" ]; then > + removable_efi_binary="BOOTX64.efi" > + elif [ "$ARCH" = "arm64" ]; then > + removable_efi_binary="BOOTAA64.efi" > + else > + warn "Unsupported architecture ${ARCH}" > + fi > + > # no removable bootloader > - if [ ! -f "/boot/efi/EFI/BOOT/BOOTX64.efi" ]; then > + if [ ! -f "/boot/efi/EFI/BOOT/${removable_efi_binary}" ]; then > return > fi > > - debconf_value="$(debconf-show --db configdb grub-efi-amd64 grub-pc | grep 'force_efi_extra_removable')" > + debconf_value="$(debconf-show --db configdb grub-efi-${ARCH} grub-pc | grep 'force_efi_extra_removable')" > > # packages already set up to install a removable copy, let's trust that it works > if echo "${debconf_value}" | grep -qE ': true$'; then > @@ -262,12 +282,12 @@ check_grub_efi_removable_status() { > fi > > echo "" > - echo "Removable bootloader found at '/boot/efi/EFI/BOOT/BOOTX64.efi', but GRUB packages not set up to update it!" > + echo "Removable bootloader found at '/boot/efi/EFI/BOOT/${removable_efi_binary}', but GRUB packages not set up to update it!" > echo "Run the following command:" > echo "" > - echo "echo 'grub-efi-amd64 grub2/force_efi_extra_removable boolean true' | debconf-set-selections -v -u" > + echo "echo 'grub-efi-${ARCH} grub2/force_efi_extra_removable boolean true' | debconf-set-selections -v -u" > echo "" > - echo "Then reinstall GRUB with 'apt install --reinstall grub-efi-amd64'" > + echo "Then reinstall GRUB with 'apt install --reinstall grub-efi-${ARCH}'" > echo "" > } >