X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/84c500666addc8378fb03c3844bf6d25faf54a87..7a0b2d945e8c09ef377fbcdad1164ea070e75245:/INSTALL/grub/grub.cfg diff --git a/INSTALL/grub/grub.cfg b/INSTALL/grub/grub.cfg index 763fed8..0c51f5c 100644 --- a/INSTALL/grub/grub.cfg +++ b/INSTALL/grub/grub.cfg @@ -38,7 +38,7 @@ function ventoy_power { function get_os_type { set vtoy_os=Linux - for file in "efi/microsoft" "sources/boot.wim" "boot/bcd" "bootmgr.efi" "boot/etfsboot.com"; do + for file in "efi/microsoft" "sources/boot.wim" "boot/bcd" "bootmgr.efi" "boot/etfsboot.com" "BOOT/etfsboot.com"; do if [ -e $1/$file ]; then set vtoy_os=Windows break @@ -121,6 +121,7 @@ function distro_specify_initrd_file { fi } + function distro_specify_initrd_file_phase2 { if [ -f (loop)/boot/initrd.img ]; then vt_linux_specify_initrd_file /boot/initrd.img @@ -132,6 +133,8 @@ function distro_specify_initrd_file_phase2 { vt_linux_specify_initrd_file /boot/iniramfs.igz elif [ -f (loop)/initrd-x86_64 ]; then vt_linux_specify_initrd_file /initrd-x86_64 + elif [ -f (loop)/live/initrd.img ]; then + vt_linux_specify_initrd_file /live/initrd.img fi } @@ -453,8 +456,7 @@ function common_menuentry { ############################################################# ############################################################# -set VENTOY_VERSION="1.0.9Y" - +set VENTOY_VERSION="1.0.11" # Default menu display mode, you can change it as you want. # 0: List mode @@ -470,14 +472,6 @@ set VTOY_ISO_UEFI_DRV_STR="UEFI FS" set VTOY_F2_CMD="ventoy_power" -if [ $VTOY_DEFAULT_MENU_MODE -eq 0 ]; then - set VTOY_F3_CMD="vt_dynamic_menu 1 1" - set VTOY_HOTKEY_TIP="F1:Memdisk F2:Power F3:TreeView" -else - set VTOY_F3_CMD="vt_dynamic_menu 1 0" - set VTOY_HOTKEY_TIP="F1:Memdisk F2:Power F3:ListView" -fi - if [ "$grub_platform" = "pc" ]; then set VTOY_TEXT_MENU_VER="Ventoy $VENTOY_VERSION BIOS www.ventoy.net" else @@ -501,10 +495,21 @@ fi loadfont ascii +#Load Plugin if [ -f $iso_path/ventoy/ventoy.json ]; then vt_load_plugin $iso_path fi + +if [ $VTOY_DEFAULT_MENU_MODE -eq 0 ]; then + set VTOY_F3_CMD="vt_dynamic_menu 1 1" + set VTOY_HOTKEY_TIP="F1:Memdisk F2:Power F3:TreeView" +else + set VTOY_F3_CMD="vt_dynamic_menu 1 0" + set VTOY_HOTKEY_TIP="F1:Memdisk F2:Power F3:ListView" +fi + + if [ -n "$vtoy_gfxmode" ]; then set gfxmode=$vtoy_gfxmode else