]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - INSTALL/grub/grub.cfg
linux raw boot
[Ventoy.git] / INSTALL / grub / grub.cfg
index 9b2a6fe85a4ae145dee0a8bf817661397c3ceefe..f517d0ae646d7feaf461ec2d5eb3d89a5befcd8e 100644 (file)
@@ -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