* [PATCH proxmox-kernel-helper v2] fix #8395: proxmox-boot: select the GRUB EFI target by architecture
@ 2026-12-02 15:33 Arran Cudbard-Bell
2026-12-02 21:17 ` applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Arran Cudbard-Bell @ 2026-12-02 15:33 UTC (permalink / raw)
To: pve-devel; +Cc: Arran Cudbard-Bell
Select the GRUB EFI target, binary suffix, removable loader name and
meta-package by dpkg architecture, because the hardcoded x86_64 values
made proxmox-boot-tool init fail on arm64 with Secure Boot and a ZFS
root.
Signed-off-by: Arran Cudbard-Bell <a.cudbardb@gmail.com>
---
src/bin/proxmox-boot-tool | 10 +++++-----
src/proxmox-boot/functions | 16 ++++++++++++++++
src/proxmox-boot/zz-proxmox-boot | 18 +++++++++---------
3 files changed, 30 insertions(+), 14 deletions(-)
diff --git a/src/bin/proxmox-boot-tool b/src/bin/proxmox-boot-tool
index 2632f64..474d1ed 100755
--- a/src/bin/proxmox-boot-tool
+++ b/src/bin/proxmox-boot-tool
@@ -162,7 +162,7 @@ init_bootloader() {
mount -t vfat -o umask=0077 "$part" "$esp_mp"
if [ -z "$mode" ]; then
- if [ -e "$esp_mp/EFI/proxmox/grubx64.efi" ]; then
+ if [ -e "$esp_mp/EFI/proxmox/grub${EFI_ARCH_SUFFIX}.efi" ]; then
# for reinit support
mode=grub
fi
@@ -176,18 +176,18 @@ init_bootloader() {
cp "/boot/$memtest" "$esp_mp/"
fi
if [ -n "$mode" ] && [ "$mode" = "grub" ]; then
- echo "Installing grub x86_64 target.."
+ echo "Installing grub ${GRUB_EFI_TARGET} target.."
grub-install.real \
--boot-directory "${esp_mp}" \
- --target x86_64-efi \
+ --target "${GRUB_EFI_TARGET}" \
--no-floppy \
--efi-directory "${esp_mp}" \
--bootloader-id 'proxmox' \
"/dev/$PKNAME"
- echo "Installing grub x86_64 target (removable).."
+ echo "Installing grub ${GRUB_EFI_TARGET} target (removable).."
grub-install.real \
--boot-directory "${esp_mp}" \
- --target x86_64-efi \
+ --target "${GRUB_EFI_TARGET}" \
--no-floppy \
--efi-directory "${esp_mp}" \
--removable \
diff --git a/src/proxmox-boot/functions b/src/proxmox-boot/functions
index bd9f735..b0e4636 100755
--- a/src/proxmox-boot/functions
+++ b/src/proxmox-boot/functions
@@ -14,6 +14,22 @@ PMX_ESP_DIR="EFI/proxmox"
PMX_LOADER_CONF="loader/loader.conf"
GRUB_PIN_SNIPPET="/etc/default/grub.d/proxmox-kernel-pin.cfg"
+# The GRUB EFI target and file names depend on the architecture.
+case "$(dpkg --print-architecture)" in
+ arm64)
+ GRUB_EFI_TARGET='arm64-efi'
+ EFI_ARCH_SUFFIX='aa64'
+ EFI_REMOVABLE_LOADER='BOOTAA64.EFI'
+ GRUB_EFI_PACKAGE='grub-efi-arm64'
+ ;;
+ *)
+ GRUB_EFI_TARGET='x86_64-efi'
+ EFI_ARCH_SUFFIX='x64'
+ EFI_REMOVABLE_LOADER='BOOTX64.efi'
+ GRUB_EFI_PACKAGE='grub-efi-amd64'
+ ;;
+esac
+
# adapted from /etc/kernel/postinst.d/apt-auto-removal as present in
# debian's apt package:
#
diff --git a/src/proxmox-boot/zz-proxmox-boot b/src/proxmox-boot/zz-proxmox-boot
index f1d51fa..dd20a18 100755
--- a/src/proxmox-boot/zz-proxmox-boot
+++ b/src/proxmox-boot/zz-proxmox-boot
@@ -80,7 +80,7 @@ update_esp_func() {
# reset per ESP, an earlier GRUB ESP must not decide the mode of this one
grub=
- if [ -e "${mountpoint}/EFI/proxmox/grubx64.efi" ]; then
+ if [ -e "${mountpoint}/EFI/proxmox/grub${EFI_ARCH_SUFFIX}.efi" ]; then
grub=1
fi
if [ -d /sys/firmware/efi ] && [ "$grub" != 1 ]; then
@@ -237,12 +237,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_PACKAGE}/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_PACKAGE}' meta-package not installed!"
+ warn "Install '${GRUB_EFI_PACKAGE}' to get updates."
}
check_grub_efi_removable_status() {
@@ -252,11 +252,11 @@ check_grub_efi_removable_status() {
fi
# no removable bootloader
- if [ ! -f "/boot/efi/EFI/BOOT/BOOTX64.efi" ]; then
+ if [ ! -f "/boot/efi/EFI/BOOT/${EFI_REMOVABLE_LOADER}" ]; 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_PACKAGE}" 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
@@ -264,12 +264,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/${EFI_REMOVABLE_LOADER}', 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_PACKAGE} 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_PACKAGE}'"
echo ""
}
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* applied: [PATCH proxmox-kernel-helper v2] fix #8395: proxmox-boot: select the GRUB EFI target by architecture
2026-12-02 15:33 [PATCH proxmox-kernel-helper v2] fix #8395: proxmox-boot: select the GRUB EFI target by architecture Arran Cudbard-Bell
@ 2026-12-02 21:17 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2026-12-02 21:17 UTC (permalink / raw)
To: pve-devel, Arran Cudbard-Bell
On Wed, 02 Dec 2026 10:33:04 -0500, Arran Cudbard-Bell wrote:
> Select the GRUB EFI target, binary suffix, removable loader name and
> meta-package by dpkg architecture, because the hardcoded x86_64 values
> made proxmox-boot-tool init fail on arm64 with Secure Boot and a ZFS
> root.
Applied, thanks!
[1/1] fix #8395: proxmox-boot: select the GRUB EFI target by architecture
commit: 1763be232562025d0eab97652aad1ae512bbb976
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-02 21:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 15:33 [PATCH proxmox-kernel-helper v2] fix #8395: proxmox-boot: select the GRUB EFI target by architecture Arran Cudbard-Bell
2026-12-02 21:17 ` applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox