mirror of
https://github.com/ventoy/Ventoy.git
synced 2024-12-26 23:25:57 -05:00
Search VTEFI directory for UEFI boot files.
When user install for example Windows in the reserved space of Ventoy USB stick in UEFI mode. Windows will create part 3 as the EFI partition and when you boot the USB stick, the BIOS may skip Ventoy and directly boot the Windows. To avoid this, we suggest to rename the directory name from EFI to VTEFI.
This commit is contained in:
parent
05bbef63c1
commit
d94d59583a
@ -81,13 +81,18 @@ else
|
|||||||
terminal_output console
|
terminal_output console
|
||||||
chainloader /efi/Microsoft/Boot/bootmgfw.efi
|
chainloader /efi/Microsoft/Boot/bootmgfw.efi
|
||||||
boot
|
boot
|
||||||
|
elif [ -f ($vtoydev,$partid)/VTEFI/Microsoft/Boot/bootmgfw.efi ]; then
|
||||||
|
set root=($vtoydev,$partid)
|
||||||
|
terminal_output console
|
||||||
|
chainloader /VTEFI/Microsoft/Boot/bootmgfw.efi
|
||||||
|
boot
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
vt_incr partid 1
|
vt_incr partid 1
|
||||||
done
|
done
|
||||||
|
|
||||||
if search -n -s -f /EFI/Microsoft/Boot/bootmgfw.efi; then
|
if search -n -s -f /EFI/Microsoft/Boot/bootmgfw.efi; then
|
||||||
terminal_output console
|
terminal_output console
|
||||||
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
|
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
|
||||||
@ -109,6 +114,11 @@ else
|
|||||||
terminal_output console
|
terminal_output console
|
||||||
chainloader /efi/boot/bootia32.efi
|
chainloader /efi/boot/bootia32.efi
|
||||||
boot
|
boot
|
||||||
|
elif search -n -s -f /vtefi/boot/bootia32.efi; then
|
||||||
|
unset VTOY_SEARCH_NO_VTOYEFI
|
||||||
|
terminal_output console
|
||||||
|
chainloader /vtefi/boot/bootia32.efi
|
||||||
|
boot
|
||||||
else
|
else
|
||||||
unset VTOY_SEARCH_NO_VTOYEFI
|
unset VTOY_SEARCH_NO_VTOYEFI
|
||||||
echo "BOOTIA32.EFI NOT found ..."
|
echo "BOOTIA32.EFI NOT found ..."
|
||||||
@ -126,6 +136,15 @@ else
|
|||||||
chainloader /efi/xorboot/xorboot.efi
|
chainloader /efi/xorboot/xorboot.efi
|
||||||
fi
|
fi
|
||||||
boot
|
boot
|
||||||
|
elif search -n -s -f /vtefi/xorboot/xorboot32.xor; then
|
||||||
|
unset VTOY_SEARCH_NO_VTOYEFI
|
||||||
|
terminal_output console
|
||||||
|
if [ -f /vtefi/xorboot/bootia32.efi ]; then
|
||||||
|
chainloader /vtefi/xorboot/bootia32.efi
|
||||||
|
elif [ -f /vtefi/xorboot/xorboot.efi ]; then
|
||||||
|
chainloader /vtefi/xorboot/xorboot.efi
|
||||||
|
fi
|
||||||
|
boot
|
||||||
else
|
else
|
||||||
unset VTOY_SEARCH_NO_VTOYEFI
|
unset VTOY_SEARCH_NO_VTOYEFI
|
||||||
echo "xorboot NOT found ..."
|
echo "xorboot NOT found ..."
|
||||||
@ -139,6 +158,12 @@ else
|
|||||||
terminal_output console
|
terminal_output console
|
||||||
chainloader /efi/boot/bootaa64.efi
|
chainloader /efi/boot/bootaa64.efi
|
||||||
boot
|
boot
|
||||||
|
elif search -n -s -f /vtefi/boot/bootaa64.efi; then
|
||||||
|
unset VTOY_SEARCH_NO_VTOYEFI
|
||||||
|
terminal_output console
|
||||||
|
chainloader /vtefi/boot/bootaa64.efi
|
||||||
|
boot
|
||||||
|
else
|
||||||
else
|
else
|
||||||
unset VTOY_SEARCH_NO_VTOYEFI
|
unset VTOY_SEARCH_NO_VTOYEFI
|
||||||
echo "BOOTAA64.EFI NOT found ..."
|
echo "BOOTAA64.EFI NOT found ..."
|
||||||
@ -152,6 +177,11 @@ else
|
|||||||
terminal_output console
|
terminal_output console
|
||||||
chainloader /efi/boot/bootx64.efi
|
chainloader /efi/boot/bootx64.efi
|
||||||
boot
|
boot
|
||||||
|
elif search -n -s -f /vtefi/boot/bootx64.efi; then
|
||||||
|
unset VTOY_SEARCH_NO_VTOYEFI
|
||||||
|
terminal_output console
|
||||||
|
chainloader /vtefi/boot/bootx64.efi
|
||||||
|
boot
|
||||||
else
|
else
|
||||||
unset VTOY_SEARCH_NO_VTOYEFI
|
unset VTOY_SEARCH_NO_VTOYEFI
|
||||||
echo "BOOTX64.EFI NOT found ..."
|
echo "BOOTX64.EFI NOT found ..."
|
||||||
@ -169,6 +199,15 @@ else
|
|||||||
chainloader /efi/xorboot/xorboot.efi
|
chainloader /efi/xorboot/xorboot.efi
|
||||||
fi
|
fi
|
||||||
boot
|
boot
|
||||||
|
elif search -n -s -f /vtefi/xorboot/xorboot.xor; then
|
||||||
|
unset VTOY_SEARCH_NO_VTOYEFI
|
||||||
|
terminal_output console
|
||||||
|
if [ -f /vtefi/xorboot/bootx64.efi ]; then
|
||||||
|
chainloader /vtefi/xorboot/bootx64.efi
|
||||||
|
elif [ -f /vtefi/xorboot/xorboot.efi ]; then
|
||||||
|
chainloader /vtefi/xorboot/xorboot.efi
|
||||||
|
fi
|
||||||
|
boot
|
||||||
else
|
else
|
||||||
unset VTOY_SEARCH_NO_VTOYEFI
|
unset VTOY_SEARCH_NO_VTOYEFI
|
||||||
echo "xorboot NOT found ..."
|
echo "xorboot NOT found ..."
|
||||||
|
Loading…
Reference in New Issue
Block a user