From 5287b0ba854d4b47a074d85dfaf2b684430f5e5b Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 26 Jul 2026 21:06:40 +0200 Subject: [PATCH] fix: Detect IA32-only EFI media as legacy (#1998) --- src/install.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/install.sh b/src/install.sh index d7eba5c5..2f0f9620 100644 --- a/src/install.sh +++ b/src/install.sh @@ -386,15 +386,24 @@ abortInstall() { local dir="$1" local iso="$2" - local efi + local efi efi32 efi64 [[ "${iso,,}" == *".esd" ]] && exit 60 enabled "${UNPACK:-}" && exit 60 - efi=$(find "$dir" -maxdepth 1 -type d -iname efi -print -quit) + if [[ "${PLATFORM,,}" == "x64" ]]; then + + efi=$(find "$dir" -maxdepth 1 -type d -iname efi -print -quit) + efi32=$(find "$dir" -maxdepth 3 -type f \ + -ipath '*/efi/boot/bootia32.efi' -print -quit) + efi64=$(find "$dir" -maxdepth 3 -type f \ + -ipath '*/efi/boot/bootx64.efi' -print -quit) + + if [ -z "$efi" ] || + { [ -n "$efi32" ] && [ -z "$efi64" ]; }; then + BOOT_MODE="windows_legacy" + fi - if [ -z "$efi" ]; then - [[ "${PLATFORM,,}" == "x64" ]] && BOOT_MODE="windows_legacy" fi if [ -n "$CUSTOM" ]; then