X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/4f840ed6736c4622c246bdaba3671e5820b79657..bf4e014023e6fd7b117b4f086fc0c190d46ecdcf:/INSTALL/grub/grub.cfg diff --git a/INSTALL/grub/grub.cfg b/INSTALL/grub/grub.cfg index 9b2a6fe..f517d0a 100644 --- a/INSTALL/grub/grub.cfg +++ b/INSTALL/grub/grub.cfg @@ -477,6 +477,7 @@ function uefi_linux_menu_func { distro_specify_initrd_file vt_linux_initrd_count vtcount + if [ $vtcount -eq 0 ]; then distro_specify_initrd_file_phase2 @@ -991,26 +992,28 @@ function vhd_unsupport_menuentry { } function vtoyboot_common_func { - set efigrubpart=0 + set AltBootPart=0 set vtoysupport=0 - vt_get_vtoy_type ${1} vtoytype parttype efigrubpart + vt_get_vtoy_type ${1} vtoytype parttype AltBootPart if vt_str_begin $vtoytype vhd; then set vtoysupport=1 elif [ "$vtoytype" = "raw" ]; then set vtoysupport=1 + elif [ "$vtoytype" = "vdi" ]; then + set vtoysupport=1 fi if [ $vtoysupport -eq 1 ]; then if [ "$grub_platform" = "pc" ]; then - if [ "$parttype" = "gpt" -a $efigrubpart -eq 0 ]; then + if [ "$parttype" = "gpt" -a $AltBootPart -eq 0 ]; then echo "The OS in the vdisk was created in UEFI mode, but current is Legacy BIOS mode." echo "虚拟磁盘内的系统是在UEFI模式下创建的,而当前系统是Legacy BIOS模式,可能无法正常启动。" ventoy_pause fi else - if [ "$parttype" = "mbr" ]; then + if [ "$parttype" = "mbr" -a $AltBootPart -eq 0 ]; then echo "The OS in the vdisk was created in Legacy BIOS mode, but current is UEFI mode." echo "虚拟磁盘内的系统是在Legacy BIOS模式下创建的,而当前系统是UEFI模式,可能无法正常启动。" ventoy_pause @@ -1321,7 +1324,7 @@ function img_unsupport_menuentry { ############################################################# ############################################################# -set VENTOY_VERSION="1.0.21" +set VENTOY_VERSION="1.0.22" # Default menu display mode, you can change it as you want. # 0: List mode