mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-08-28 08:21:14 +00:00
vhd boot
live cd fix bug
This commit is contained in:
@@ -505,6 +505,10 @@ function uefi_linux_menu_func {
|
||||
elif [ -f (loop)/hyperbola/boot/x86_64/hyperiso.img ]; then
|
||||
vt_add_replace_file 0 "EFI\\hyperiso\\hyperiso.img"
|
||||
fi
|
||||
elif [ -d (loop)/EFI/BOOT/entries ]; then
|
||||
if [ -f (loop)/parabola/boot/x86_64/parabolaiso.img ]; then
|
||||
vt_add_replace_file 0 "EFI\\parabolaiso\\parabolaiso.img"
|
||||
fi
|
||||
elif [ -e (loop)/syslinux/alt0/full.cz ]; then
|
||||
vt_add_replace_file 0 "EFI\\BOOT\\full.cz"
|
||||
set FirstTryBootFile='@EFI@BOOT@grubx64.efi'
|
||||
@@ -642,6 +646,8 @@ function legacy_windows_menu_func {
|
||||
|
||||
if [ -n "$vtoy_chain_mem_addr" ]; then
|
||||
linux16 $vtoy_path/ipxe.krn ${vtdebug_flag} ibft mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}
|
||||
set gfxmode=1920x1080,1366x768,1024x768,800x600,auto
|
||||
terminal_output gfxterm
|
||||
boot
|
||||
else
|
||||
echo "chain empty failed"
|
||||
@@ -855,6 +861,17 @@ function iso_common_menuentry {
|
||||
fi
|
||||
}
|
||||
|
||||
function miso_common_menuentry {
|
||||
vt_chosen_img_path vt_chosen_path vt_chosen_size
|
||||
|
||||
if [ "$grub_platform" = "pc" ]; then
|
||||
legacy_iso_memdisk $vtoy_iso_part $vt_chosen_path
|
||||
else
|
||||
uefi_iso_memdisk $vtoy_iso_part $vt_chosen_path
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
function common_unsupport_menuentry {
|
||||
echo -e "\n The name of the iso file could NOT contain space or non-ascii characters. \n"
|
||||
echo -e " 文件名中不能有中文或空格 \n"
|
||||
@@ -862,6 +879,10 @@ function common_unsupport_menuentry {
|
||||
read vtInputKey
|
||||
}
|
||||
|
||||
function miso_unsupport_menuentry {
|
||||
common_unsupport_menuentry
|
||||
}
|
||||
|
||||
function iso_unsupport_menuentry {
|
||||
common_unsupport_menuentry
|
||||
}
|
||||
@@ -875,6 +896,8 @@ function wim_common_menuentry {
|
||||
if [ -n "$vtoy_chain_mem_addr" ]; then
|
||||
if [ "$grub_platform" = "pc" ]; then
|
||||
linux16 $vtoy_path/ipxe.krn ${vtdebug_flag} mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}
|
||||
set gfxmode=1920x1080,1366x768,1024x768,800x600,auto
|
||||
terminal_output gfxterm
|
||||
else
|
||||
ventoy_cli_console
|
||||
chainloader ${vtoy_path}/ventoy_x64.efi env_param=${env_param} isoefi=${LoadIsoEfiDriver} ${vtdebug_flag} mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}
|
||||
@@ -917,6 +940,48 @@ function efi_unsupport_menuentry {
|
||||
common_unsupport_menuentry
|
||||
}
|
||||
|
||||
|
||||
function vhd_common_menuentry {
|
||||
|
||||
if [ "$VTOY_VHD_NO_WARNING" != "1" ]; then
|
||||
if [ "$vtoy_iso_fs" != "ntfs" ]; then
|
||||
echo -e "!!! WARNING !!!\n"
|
||||
echo -e "\nPartition1 ($vtoy_iso_fs) is NOT ntfs, the VHD(x) file may not boot normally \n"
|
||||
echo -e "\nVHD(x) 文件所在分区不是 ntfs 格式, 可能无法正常启动 \n\n"
|
||||
echo -n "press ENTER to continue boot (请按 回车 键继续) ..."
|
||||
read vtInputKey
|
||||
fi
|
||||
fi
|
||||
|
||||
vt_chosen_img_path vt_chosen_path vt_chosen_size
|
||||
vt_patch_vhdboot ${vtoy_iso_part} ${vt_chosen_path}
|
||||
|
||||
ventoy_debug_pause
|
||||
|
||||
if [ -n "$vtoy_vhd_buf_addr" ]; then
|
||||
if [ "$grub_platform" = "pc" ]; then
|
||||
linux16 $vtoy_path/memdisk iso raw
|
||||
initrd16 mem:${vtoy_vhd_buf_addr}:size:${vtoy_vhd_buf_size}
|
||||
|
||||
set gfxmode=1920x1080,1366x768,1024x768,800x600,auto
|
||||
terminal_output gfxterm
|
||||
boot
|
||||
else
|
||||
ventoy_cli_console
|
||||
chainloader ${vtoy_path}/ventoy_x64.efi memdisk env_param=${env_param} isoefi=${LoadIsoEfiDriver} ${vtdebug_flag} mem:${vtoy_vhd_buf_addr}:size:${vtoy_vhd_buf_size}
|
||||
boot
|
||||
ventoy_gui_console
|
||||
fi
|
||||
else
|
||||
echo "Failed to boot vhd file"
|
||||
ventoy_pause
|
||||
fi
|
||||
}
|
||||
|
||||
function vhd_unsupport_menuentry {
|
||||
common_unsupport_menuentry
|
||||
}
|
||||
|
||||
#
|
||||
#============================================================#
|
||||
# IMG file boot process #
|
||||
@@ -1257,6 +1322,12 @@ elif [ -f $vtoy_efi_part/ventoy/ventoy_wimboot.img ]; then
|
||||
vt_load_wimboot $vtoy_efi_part/ventoy/ventoy_wimboot.img
|
||||
fi
|
||||
|
||||
if [ -f $vtoy_iso_part/ventoy/ventoy_vhdboot.img ]; then
|
||||
vt_load_vhdboot $vtoy_iso_part/ventoy/ventoy_vhdboot.img
|
||||
elif [ -f $vtoy_efi_part/ventoy/ventoy_vhdboot.img ]; then
|
||||
vt_load_vhdboot $vtoy_efi_part/ventoy/ventoy_vhdboot.img
|
||||
fi
|
||||
|
||||
|
||||
if [ $VTOY_DEFAULT_MENU_MODE -eq 0 ]; then
|
||||
set VTOY_F3_CMD="vt_dynamic_menu 1 1"
|
||||
@@ -1270,7 +1341,7 @@ fi
|
||||
if [ -n "$vtoy_gfxmode" ]; then
|
||||
set gfxmode=$vtoy_gfxmode
|
||||
else
|
||||
set gfxmode=1920x1080,1366x768,1024x768
|
||||
set gfxmode=1920x1080,1366x768,1024x768,800x600,auto
|
||||
fi
|
||||
|
||||
if [ "$vtoy_display_mode" = "CLI" ]; then
|
||||
|
Binary file not shown.
Reference in New Issue
Block a user