mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-08-28 00:11:15 +00:00
Improvement for UEFI boot compatibility.
This commit is contained in:
@@ -646,8 +646,35 @@ function uefi_linux_menu_func {
|
||||
if [ -n "$vtoy_chain_mem_addr" ]; then
|
||||
ventoy_acpi_param ${vtoy_chain_mem_addr} 2048
|
||||
ventoy_cli_console
|
||||
chainloader ${vtoy_path}/ventoy_${VTOY_EFI_ARCH}.efi env_param=${env_param} isoefi=${LoadIsoEfiDriver} FirstTry=${FirstTryBootFile} ${vtdebug_flag} mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}
|
||||
chainloader ${vtoy_path}/ventoy_${VTOY_EFI_ARCH}.efi fallback env_param=${env_param} isoefi=${LoadIsoEfiDriver} FirstTry=${FirstTryBootFile} ${vtdebug_flag} mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}
|
||||
boot
|
||||
|
||||
# fallback
|
||||
set vtback_root=$root
|
||||
vt_push_last_entry
|
||||
set vtback_theme=$theme
|
||||
unset theme
|
||||
|
||||
vt_trailer_cpio "$vtoy_iso_part" "$vt_chosen_path" noinit
|
||||
vt_set_boot_opt rdinit=/vtoy/vtoy
|
||||
|
||||
set root=(loop)
|
||||
for cfg in "/boot/grub/grub.cfg" "/EFI/BOOT/grub.cfg" "/EFI/debian/grub.cfg" "EFI/boot/grub.cfg" "efi/boot/grub.cfg" "/grub/grub.cfg" "EFI/BOOT/BOOTX64.conf"; do
|
||||
if [ -e "$cfg" ]; then
|
||||
configfile "$cfg"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
vt_unset_boot_opt
|
||||
set root=$vtback_root
|
||||
set theme=$vtback_theme
|
||||
vt_pop_last_entry
|
||||
ventoy_gui_console
|
||||
|
||||
echo "No bootfile found for UEFI!"
|
||||
echo "Maybe the image does not support $VTOY_EFI_ARCH UEFI"
|
||||
echo " "
|
||||
else
|
||||
echo "chain empty failed"
|
||||
ventoy_pause
|
||||
|
Reference in New Issue
Block a user