Commit 75517039 authored by longpanda's avatar longpanda
Browse files

Firstly try to use chainload to boot .efi files.

parent 62022950
...@@ -113,7 +113,7 @@ function get_os_type { ...@@ -113,7 +113,7 @@ function get_os_type {
for file in "efi/microsoft/boot/bcd" "sources/boot.wim" "boot/bcd" "bootmgr.efi" "boot/etfsboot.com" ; do for file in "efi/microsoft/boot/bcd" "sources/boot.wim" "boot/bcd" "bootmgr.efi" "boot/etfsboot.com" ; do
if vt_file_exist_nocase (loop)/$file; then if vt_file_exist_nocase (loop)/$file; then
set vtoy_os=Windows set vtoy_os=Windows
break break
fi fi
done done
...@@ -1445,22 +1445,22 @@ function efi_common_menuentry { ...@@ -1445,22 +1445,22 @@ function efi_common_menuentry {
vt_vlnk_dst="${vtoy_iso_part}${vt_chosen_path}" vt_vlnk_dst="${vtoy_iso_part}${vt_chosen_path}"
fi fi
vt_concat_efi_iso "${vt_vlnk_dst}" vtoy_iso_buf
ventoy_debug_pause ventoy_debug_pause
ventoy_cli_console ventoy_cli_console
#first try with chainload
set vtOldRoot=$root
set root=$vtoy_iso_part
chainloader "${vt_vlnk_dst}"
boot
unset vtoy_dotefi_retry #retry with isoboot
set root=$vtOldRoot
vt_concat_efi_iso "${vt_vlnk_dst}" vtoy_iso_buf
chainloader ${vtoy_path}/ventoy_${VTOY_EFI_ARCH}.efi memdisk env_param=${env_param} dotefi isoefi=on ${vtdebug_flag} mem:${vtoy_iso_buf_addr}:size:${vtoy_iso_buf_size} chainloader ${vtoy_path}/ventoy_${VTOY_EFI_ARCH}.efi memdisk env_param=${env_param} dotefi isoefi=on ${vtdebug_flag} mem:${vtoy_iso_buf_addr}:size:${vtoy_iso_buf_size}
boot boot
if [ -n "$vtoy_dotefi_retry" ]; then
unset vtoy_dotefi_retry
chainloader "${vt_vlnk_dst}"
boot
fi
ventoy_gui_console ventoy_gui_console
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment