X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/b347c1b5da1852eabaf0c3a15476ea0cd6b28e2e..c02a6955c3076e46c2c66becb27a59b434fce3d9:/INSTALL/grub/grub.cfg diff --git a/INSTALL/grub/grub.cfg b/INSTALL/grub/grub.cfg index 7f3347d..6c3c10d 100644 --- a/INSTALL/grub/grub.cfg +++ b/INSTALL/grub/grub.cfg @@ -638,6 +638,8 @@ function uefi_linux_menu_func { vt_add_replace_file 0 "EFI\\hyperiso\\hyperiso.img" fi elif [ -d (loop)/EFI/BOOT/entries ]; then + vt_linux_get_main_initrd_index vtindex + if [ -f (loop)/parabola/boot/x86_64/parabolaiso.img ]; then vt_add_replace_file 0 "EFI\\parabolaiso\\parabolaiso.img" elif [ -f (loop)/parabola/boot/x86_64/initramfs-linux-libre.img ]; then @@ -1704,6 +1706,15 @@ function img_unsupport_tip { read vtInputKey } +function legacy_img_memdisk { + linux16 $vtoy_path/memdisk + echo "Loading img file to memory ..." + initrd16 "${1}${2}" + + ventoy_cli_console + boot +} + function img_common_menuentry { set ventoy_compatible=YES set ventoy_busybox_ver=32 @@ -1718,6 +1729,13 @@ function img_common_menuentry { return fi + if [ "$grub_platform" = "pc" ]; then + if vt_check_mode 0; then + legacy_img_memdisk $vtoy_iso_part "$vt_chosen_path" + return + fi + fi + if [ -d (vtimghd)/ ]; then loopback -d vtimghd fi