X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/e1d161af4f7df58723e3a59f306aedfb90af62c7..2cd22da8fb1a77d000484cc177b355f88f4167c2:/INSTALL/grub/grub.cfg diff --git a/INSTALL/grub/grub.cfg b/INSTALL/grub/grub.cfg index ac1e3ea..3f6af71 100644 --- a/INSTALL/grub/grub.cfg +++ b/INSTALL/grub/grub.cfg @@ -111,12 +111,18 @@ function ventoy_show_help { function get_os_type { set vtoy_os=Linux - 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 - set vtoy_os=Windows - break + if vt_str_begin "$vt_volume_id" "DLC Boot"; then + if [ -f (loop)/DLCBoot.exe ]; then + set vtoy_os=Windows fi - done + else + 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 + set vtoy_os=Windows + break + fi + done + fi if [ "$vtoy_os" = "Linux" ]; then if vt_strstr "$vt_system_id" "FreeBSD"; then @@ -206,6 +212,15 @@ function distro_specify_wim_patch_phase2 { if [ -f (loop)/boot/boot.wim ]; then vt_windows_collect_wim_patch wim /boot/boot.wim fi + + if vt_str_begin "$vt_volume_id" "DLC Boot"; then + for vwfile in "/DLC1/WinPE/W11x64.wim" "/DLC1/WinPE/W10x64.wim" "/DLC1/WinPE/W10x86.wim"; do + if [ -f (loop)/$vwfile ]; then + vt_windows_collect_wim_patch wim $vwfile + fi + done + fi + } @@ -364,7 +379,8 @@ function distro_specify_initrd_file_phase2 { vt_linux_specify_initrd_file /initrd0.img elif [ -f (loop)/sysresccd/boot/i686/sysresccd.img ]; then vt_linux_specify_initrd_file /sysresccd/boot/i686/sysresccd.img - + elif [ -f (loop)/boot/full.cz ]; then + vt_linux_specify_initrd_file /boot/full.cz fi } @@ -1037,7 +1053,11 @@ function legacy_windows_menu_func { 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} + if [ "$ventoy_compatible" = "NO" ]; then + linux16 $vtoy_path/ipxe.krn ${vtdebug_flag} mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size} + else + linux16 $vtoy_path/ipxe.krn ${vtdebug_flag} ibft mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size} + fi boot else echo "chain empty failed"