X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/07d4140cf45c2fb7f9d4f5823b2bd8d73626dfc9..51b92f398a2d29e0be79f770b14a14fb2c652082:/INSTALL/grub/grub.cfg diff --git a/INSTALL/grub/grub.cfg b/INSTALL/grub/grub.cfg index a447747..e0dc654 100644 --- a/INSTALL/grub/grub.cfg +++ b/INSTALL/grub/grub.cfg @@ -130,9 +130,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 - fi + return } function locate_initrd { @@ -550,6 +548,22 @@ function uefi_windows_menu_func { fi } +function uefi_find_replace_initrd { + if vt_get_efi_vdisk_offset "${1}${2}" vt_efivdisk_offset; then + loopback -s $vt_efivdisk_offset vtefivdisk "${1}${2}" + + unset vt_rp_initrd + vt_search_replace_initrd (vtefivdisk) vt_rp_initrd + + if [ -n "$vt_rp_initrd" ]; then + vt_add_replace_file $3 "$vt_rp_initrd" + fi + + loopback -d vtefivdisk + ventoy_debug_pause + fi +} + function uefi_linux_menu_func { if [ "$ventoy_compatible" = "NO" ]; then @@ -631,6 +645,11 @@ function uefi_linux_menu_func { elif [ -f (loop)/loader/entries/pisi-efi-x86_64.conf ]; then vt_add_replace_file $vtindex "EFI\\pisi\\initrd.img" fi + + vt_get_replace_file_cnt vt_replace_cnt + if [ $vt_replace_cnt -eq 0 ]; then + uefi_find_replace_initrd "$1" "$2" $vtindex + 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" @@ -1740,10 +1759,6 @@ function img_common_menuentry { fi fi - if [ -d (vtimghd)/ ]; then - loopback -d vtimghd - fi - loopback vtimghd "${vtoy_iso_part}${vt_chosen_path}" vt_img_sector "${vtoy_iso_part}${vt_chosen_path}" @@ -1808,6 +1823,8 @@ function img_common_menuentry { fi fi + loopback -d vtimghd + set root=$vtback_root vt_pop_last_entry set theme=$vtback_theme @@ -1827,7 +1844,7 @@ function img_unsupport_menuentry { ############################################################# ############################################################# -set VENTOY_VERSION="1.0.46" +set VENTOY_VERSION="1.0.47" #ACPI not compatible with Window7/8, so disable by default set VTOY_PARAM_NO_ACPI=1