function get_os_type {
set vtoy_os=Linux
-
+ export vtoy_os
+
if vt_str_begin "$vt_volume_id" "DLC Boot"; then
if [ -f (loop)/DLCBoot.exe ]; then
set vtoy_os=Windows
}
function uefi_iso_menu_func {
-
- if [ -d (loop)/ ]; then
- loopback -d loop
- fi
-
if [ -n "$vtisouefi" ]; then
set LoadIsoEfiDriver=on
unset vtisouefi
vt_select_auto_install "${chosen_path}"
vt_select_persistence "${chosen_path}"
- if vt_is_udf "${1}${chosen_path}"; then
- set ventoy_fs_probe=udf
- else
- set ventoy_fs_probe=iso9660
- ventoy_reset_nojoliet
-
+ if ! vt_is_udf "${1}${chosen_path}"; then
# Lenovo EasyStartup need an addional sector for boundary check
if vt_str_begin "$vt_volume_id" "EasyStartup"; then
vt_skip_svd "${vtoy_iso_part}${vt_chosen_path}"
vt_append_extra_sector 1
fi
fi
-
- loopback loop "${1}${chosen_path}"
- get_os_type (loop)
if [ -d (loop)/EFI ]; then
set vt_efi_dir=YES
vt_check_compatible (loop)
fi
- if vt_need_secondary_menu "$vt_chosen_name"; then
- vt_show_secondary_menu "$vt_chosen_path" "$vtoy_os" $vt_chosen_size
- if vt_check_mode 0 "$vt_chosen_name"; then
- uefi_iso_memdisk $vtoy_iso_part "$vt_chosen_path"
- vt_secondary_recover_mode
- return
- fi
- fi
-
vt_img_sector "${1}${chosen_path}"
if [ "$ventoy_fs_probe" = "iso9660" ]; then
uefi_linux_menu_func "$1" "${chosen_path}"
fi
- ventoy_gui_console
- vt_secondary_recover_mode
+ ventoy_gui_console
}
function uefi_iso_memdisk {
function legacy_iso_menu_func {
-
- if [ -d (loop)/ ]; then
- loopback -d loop
- fi
-
set chosen_path="$2"
vt_select_auto_install "${chosen_path}"
vt_select_persistence "${chosen_path}"
-
- if vt_is_udf "${1}${chosen_path}"; then
- set ventoy_fs_probe=udf
- else
- set ventoy_fs_probe=iso9660
- ventoy_reset_nojoliet
- fi
-
- loopback loop "${1}${chosen_path}"
-
- get_os_type (loop)
if [ -n "$vtcompat" ]; then
set ventoy_compatible=YES
vt_check_compatible (loop)
fi
- if vt_need_secondary_menu "$vt_chosen_name"; then
- vt_show_secondary_menu "$vt_chosen_path" "$vtoy_os" $vt_chosen_size
- if vt_check_mode 0 "$vt_chosen_name"; then
- legacy_iso_memdisk $vtoy_iso_part "$vt_chosen_path"
- vt_secondary_recover_mode
- return
- fi
- fi
-
vt_img_sector "${1}${chosen_path}"
if [ "$ventoy_fs_probe" = "iso9660" ]; then
if ventoy_vcfg_proc "${vt_chosen_path}"; then
return
fi
+
+
+
+ #secondary boot menu
+ if vt_is_udf "${vtoy_iso_part}${vt_chosen_path}"; then
+ set ventoy_fs_probe=udf
+ else
+ set ventoy_fs_probe=iso9660
+ ventoy_reset_nojoliet
+ fi
+
+ if [ -d (loop)/ ]; then
+ loopback -d loop
+ fi
+ loopback loop "${vtoy_iso_part}${vt_chosen_path}"
+
+ get_os_type (loop)
+
+ if vt_need_secondary_menu "$vt_chosen_name"; then
+ vt_show_secondary_menu "$vt_chosen_path" "$vtoy_os" $vt_chosen_size
+ if [ "$VTOY_SECOND_EXIT" = "1" ]; then
+ return
+ fi
+ fi
+
if vt_str_begin "$vt_volume_id" "Avira"; then
vt_skip_svd "${vtoy_iso_part}${vt_chosen_path}"
else
uefi_iso_menu_func $vtoy_iso_part "$vt_chosen_path"
fi
- fi
+ fi
+
+ vt_secondary_recover_mode
}
function miso_common_menuentry {