if [ "$grub_platform" = "pc" ]; then
insmod setkey
insmod regexp
- insmod video_fb
fi
function ventoy_pause {
}
function ventoy_load_menu_lang_file {
- vt_load_file_to_mem "auto" $vtoy_efi_part/grub/menu.tar.gz vtoy_menu_lang_mem
+ vt_load_file_to_mem "auto" $prefix/menu.tar.gz vtoy_menu_lang_mem
loopback vt_menu_tarfs mem:${vtoy_menu_lang_mem_addr}:size:${vtoy_menu_lang_mem_size}
}
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 distro_specify_wim_patch_phase2 {
if [ -f (loop)/boot/boot.wim ]; then
vt_windows_collect_wim_patch wim /boot/boot.wim
+ elif [ -f (loop)/sources/boot.wim ]; then
+ vt_windows_collect_wim_patch wim /sources/boot.wim
fi
if vt_str_begin "$vt_volume_id" "DLC Boot"; then
if [ -f (loop)/boot/isolinux/syslnx64.cfg ]; then
syslinux_configfile (loop)/boot/isolinux/syslnx64.cfg
set vtback_cfg_find=1
+ elif [ -f (loop)/boot/syslinux/porteus.cfg ]; then
+ syslinux_configfile (loop)/boot/syslinux/porteus.cfg
+ set vtback_cfg_find=1
fi
fi
}
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 {
if [ -f (loop)/boot/isolinux/syslnx64.cfg ]; then
syslinux_configfile (loop)/boot/isolinux/syslnx64.cfg
set vtback_cfg_find=1
+ elif [ -f (loop)/boot/syslinux/porteus.cfg ]; then
+ syslinux_configfile (loop)/boot/syslinux/porteus.cfg
+ set vtback_cfg_find=1
fi
fi
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)
+
+ ventoy_debug_pause
+
+ 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 {
unset linuxpartB
}
+
+function ventoy_img_fwts {
+ vt_load_cpio $vtoy_path "${vt_chosen_path}" ${vtoy_iso_part} "busybox=$ventoy_busybox_ver"
+ vt_trailer_cpio ${vtoy_iso_part} "${vt_chosen_path}" noinit
+
+ ventoy_debug_pause
+
+ #boot image file
+ vt_set_boot_opt rdinit=/vtoy/vtoy ventoyos=fwts
+ vt_img_hook_root
+
+ configfile $prefix/distro/fwts.cfg
+
+ vt_img_unhook_root
+ vt_unset_boot_opt
+}
+
function ventoy_img_memtest86 {
chainloader (vtimghd,1)/efi/boot/BOOTX64.efi
boot
vt_get_fs_label (vtimghd,2) vtImgHd2Label
fi
+ if [ -z "$vtImgHd1Label" ]; then
+ if [ -d (vtimghd,2)/efi ]; then
+ vt_get_fs_label (vtimghd,3) vtImgHd3Label
+ fi
+ fi
+
if [ -e (vtimghd,1)/etc/hostname ]; then
vt_1st_line (vtimghd,1)/etc/hostname vtImgHostname
fi
elif [ -f (vtimghd,3)/etc/chrome_dev.conf ]; then
ventoy_img_cloudready
fi
+ elif vt_str_begin "$vtImgHd3Label" "fwts-result"; then
+ ventoy_img_fwts
elif vt_str_begin "$vtImgHd1Label" "LAKKA"; then
ventoy_img_openelec lakka
elif vt_str_begin "$vtImgHd1Label" "LIBREELEC"; then
#############################################################
#############################################################
-set VENTOY_VERSION="1.0.85"
+set VENTOY_VERSION="1.0.89"
#ACPI not compatible with Window7/8, so disable by default
set VTOY_PARAM_NO_ACPI=1
terminal_input serial console
terminal_output serial console
else
- if [ "$vtoy_res_fit" = "1" ]; then
+ if [ "$vtoy_gfxmode" = "max" ]; then
+ set gfxmode=1024x768
terminal_output gfxterm
- fi
+
+ vt_enum_video_mode
+ vt_get_video_mode 0 vtCurMode
+ terminal_output console
+ set gfxmode=$vtCurMode
+ terminal_output gfxterm
+ elif [ "$vtoy_res_fit" = "1" ]; then
+ terminal_output gfxterm
+ fi
if [ -n "$vtoy_theme" ]; then
vt_set_theme