X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/6bd0463d3403c5c3dfe8ef5efe4ff74ceb86eeda..ca62128f9bb4c349637be30cb8290919e03684f7:/INSTALL/grub/grub.cfg diff --git a/INSTALL/grub/grub.cfg b/INSTALL/grub/grub.cfg index 770a4e2..f57a20c 100644 --- a/INSTALL/grub/grub.cfg +++ b/INSTALL/grub/grub.cfg @@ -131,7 +131,7 @@ function get_os_type { function vt_check_compatible_pe { #Check for PE without external tools if [ -f "$1/HBCD_PE.ini" ]; then - set ventoy_compatible=YES + set ventoy_compatible=YES fi } @@ -805,6 +805,25 @@ function uefi_iso_memdisk { } +function legacy_windows_wimboot_func { + set wimbootfile=(loop)/sources/boot.wim + set wimbit=64 + + vt_windows_wimboot_data + + linux16 $vtoy_efi_part/ventoy/wimboot quiet + ventoy_debug_pause + + echo Loading files...... (This may take a few minutes, please wait.) + initrd16 newc:vtoyjump.exe:$vtoy_efi_part/ventoy/vtoyjump${wimbit}.exe \ + newc:wimboot.data:mem:${vtoy_wimboot_mem_addr}:size:${vtoy_wimboot_mem_size} \ + newc:winpeshl.ini:$vtoy_efi_part/ventoy/winpeshl.ini \ + newc:bcd:(loop)/boot/bcd \ + newc:boot.sdi:(loop)/boot/boot.sdi \ + newc:boot.wim:$wimbootfile + boot +} + function legacy_windows_menu_func { vt_windows_reset @@ -833,7 +852,11 @@ function legacy_windows_menu_func { vt_windows_chain_data "${1}${chosen_path}" ventoy_debug_pause - + + if vt_check_mode 4; then + legacy_windows_wimboot_func + fi + if [ -n "$vtoy_chain_mem_addr" ]; then ventoy_acpi_param ${vtoy_chain_mem_addr} 2048 linux16 $vtoy_path/ipxe.krn ${vtdebug_flag} ibft mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size} @@ -1230,6 +1253,30 @@ function efi_unsupport_menuentry { common_unsupport_menuentry } +function vhdboot_common_func { + vt_patch_vhdboot "$1" + + ventoy_debug_pause + + if [ -n "$vtoy_vhd_buf_addr" ]; then + if [ "$grub_platform" = "pc" ]; then + ventoy_cli_console + linux16 $vtoy_path/memdisk iso raw + initrd16 mem:${vtoy_vhd_buf_addr}:size:${vtoy_vhd_buf_size} + boot + ventoy_gui_console + else + ventoy_cli_console + chainloader ${vtoy_path}/ventoy_${VTOY_EFI_ARCH}.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 "Please put the right ventoy_vhdboot.img file to the 1st partition" + ventoy_pause + fi +} + function vhd_common_menuentry { if [ "$VTOY_VHD_NO_WARNING" != "1" ]; then @@ -1252,25 +1299,7 @@ function vhd_common_menuentry { return fi - vt_patch_vhdboot "$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} - boot - else - ventoy_cli_console - chainloader ${vtoy_path}/ventoy_${VTOY_EFI_ARCH}.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 "Please put the right ventoy_vhdboot.img file to the 1st partition" - ventoy_pause - fi + vhdboot_common_func "${vt_chosen_path}" } function vhd_unsupport_menuentry { @@ -1702,7 +1731,7 @@ function img_unsupport_menuentry { ############################################################# ############################################################# -set VENTOY_VERSION="1.0.40" +set VENTOY_VERSION="1.0.43" #ACPI not compatible with Window7/8, so disable by default set VTOY_PARAM_NO_ACPI=1 @@ -1715,6 +1744,7 @@ set VTOY_DEFAULT_MENU_MODE=0 set VTOY_MEM_DISK_STR="[Memdisk]" set VTOY_ISO_RAW_STR="Compatible Mode" set VTOY_GRUB2_MODE_STR="GRUB2 Mode" +set VTOY_WIMBOOT_MODE_STR="WIMBOOT Mode" set VTOY_ISO_UEFI_DRV_STR="UEFI FS" set VTOY_F2_CMD="ventoy_power"