]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - INSTALL/grub/localboot.cfg
Update CI
[Ventoy.git] / INSTALL / grub / localboot.cfg
index ff834169778ae81d4d52a4c6c6d926e31b23cbbf..169a8d4dabfdfce9f6474a449ca8bbc20a0e0495 100644 (file)
@@ -21,7 +21,12 @@ if [ "$grub_platform" = "pc" ]; then
         if search -n -s -f /Boot/BCD; then
             for bt in bootmgr BOOTMGR Bootmgr BootMGR; do
                 if [ -f /$bt ]; then
-                    ntldr /$bt
+                    if regexp '^hd0' $root; then
+                        ntldr /$bt
+                    else
+                        drivemap -s hd0 $root
+                        ntldr /$bt
+                    fi
                     break
                 fi
             done
@@ -87,15 +92,48 @@ else
         fi        
     }
     
-    menuentry 'Search and boot BOOTX64.EFI' --class=boot_uefi {    
-        if search -n -s -f /efi/boot/bootx64.efi; then
-            terminal_output  console
-            chainloader /efi/boot/bootx64.efi
-            boot
-        else
-            echo "BOOTX64.EFI NOT found ..."
-        fi        
-    }
+    if [ "$grub_cpu" = "i386" ]; then
+        menuentry 'Search and boot BOOTIA32.EFI' --class=boot_uefi {
+            set VTOY_SEARCH_NO_VTOYEFI=1
+            if search -n -s -f /efi/boot/bootia32.efi; then
+                unset VTOY_SEARCH_NO_VTOYEFI
+                terminal_output  console
+                chainloader /efi/boot/bootia32.efi
+                boot
+            else
+                unset VTOY_SEARCH_NO_VTOYEFI
+                echo "BOOTIA32.EFI NOT found ..."
+            fi        
+        }
+    elif [ "$grub_cpu" = "arm64" ]; then
+        menuentry 'Search and boot BOOTAA64.EFI' --class=boot_uefi {
+            set VTOY_SEARCH_NO_VTOYEFI=1
+            if search -n -s -f /efi/boot/bootaa64.efi; then
+                unset VTOY_SEARCH_NO_VTOYEFI
+                terminal_output  console
+                chainloader /efi/boot/bootaa64.efi
+                boot
+            else
+                unset VTOY_SEARCH_NO_VTOYEFI
+                echo "BOOTAA64.EFI NOT found ..."
+            fi        
+        }
+    else
+        menuentry 'Search and boot BOOTX64.EFI' --class=boot_uefi {
+            set VTOY_SEARCH_NO_VTOYEFI=1
+            if search -n -s -f /efi/boot/bootx64.efi; then
+                unset VTOY_SEARCH_NO_VTOYEFI
+                terminal_output  console
+                chainloader /efi/boot/bootx64.efi
+                boot
+            else
+                unset VTOY_SEARCH_NO_VTOYEFI
+                echo "BOOTX64.EFI NOT found ..."
+            fi        
+        }
+    fi
+    
+    
 
 fi