]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - INSTALL/grub/grub.cfg
fix Parabola systemd-boot loader (#473)
[Ventoy.git] / INSTALL / grub / grub.cfg
index df7d9a6fb75669986c771867ae0949939aa912a7..776a7d57c5fbe0000cad529da30594332c5268ba 100644 (file)
@@ -48,7 +48,8 @@ function ventoy_power {
     configfile $prefix/power.cfg
 }
 
-function ventoy_diagnosis {    
+function ventoy_diagnosis {
+    vt_enum_video_mode    
     configfile $prefix/debug.cfg
 }
 
@@ -492,6 +493,12 @@ function uefi_linux_menu_func {
                 elif [ -f (loop)/boot/initramfs_x86_64.img ]; then
                     vt_add_replace_file $vtindex "boot\\initramfs_x86_64.img"
                 fi
+            elif [ -d (loop)/parabola ]; then
+                if [ -f (loop)/parabola/boot/x86_64/parabola.img ]; then
+                    vt_add_replace_file $vtindex "EFI\\parabola\\parabola.img"
+                elif [ -f (loop)/boot/initramfs_x86_64.img ]; then
+                    vt_add_replace_file $vtindex "boot\\initramfs_x86_64.img"
+                fi
             elif [ -f (loop)/EFI/BOOT/initrd.gz ]; then
                 vt_add_replace_file $vtindex "EFI\\BOOT\\initrd.gz"
             elif [ -f (loop)/loader/entries/thinstation.conf ]; then
@@ -507,7 +514,7 @@ function uefi_linux_menu_func {
             fi
         elif [ -d (loop)/EFI/BOOT/entries ]; then
             if [ -f (loop)/parabola/boot/x86_64/parabolaiso.img ]; then
-                vt_add_replace_file 0 "EFI\\parabolaiso\\parabolaiso.img"            
+                vt_add_replace_file 0 "EFI\\parabolaiso\\parabolaiso.img"
             fi
         elif [ -e (loop)/syslinux/alt0/full.cz ]; then
             vt_add_replace_file 0 "EFI\\BOOT\\full.cz"            
@@ -864,6 +871,10 @@ function iso_common_menuentry {
 function miso_common_menuentry {
     vt_chosen_img_path vt_chosen_path vt_chosen_size
 
+    echo "memdisk mode boot for $vt_chosen_path"
+    echo ""
+    ventoy_debug_pause
+
     if [ "$grub_platform" = "pc" ]; then
         legacy_iso_memdisk $vtoy_iso_part $vt_chosen_path
     else
@@ -954,7 +965,7 @@ function vhd_common_menuentry {
     fi
 
     vt_chosen_img_path vt_chosen_path vt_chosen_size
-    vt_patch_vhdboot ${vtoy_iso_part} ${vt_chosen_path}
+    vt_patch_vhdboot ${vt_chosen_path}
     
     ventoy_debug_pause    
     
@@ -1250,7 +1261,7 @@ function img_unsupport_menuentry {
 #############################################################
 #############################################################
 
-set VENTOY_VERSION="1.0.20"
+set VENTOY_VERSION="1.0.21"
 
 # Default menu display mode, you can change it as you want.
 #    0: List mode   
@@ -1277,9 +1288,10 @@ vt_device $root  vtoy_dev
 if [ "$vtoy_dev" = "tftp" ]; then
     set vtoy_path=($root)
     for vtid in 0 1 2 3; do
-        if [ -d (hd$vtid,2)/ventoy ]; then
+        if [ -f (hd$vtid,2)/ventoy/ventoy.cpio ]; then
             set vtoy_iso_part=(hd$vtid,1)
             set vtoy_efi_part=(hd$vtid,2)
+            set vtoydev=hd$vtid
             break
         fi
     done
@@ -1298,12 +1310,15 @@ else
         set vtoy_path=($root)/ventoy
     fi
 
+    set vtoydev=$vtoy_dev
     set vtoy_iso_part=($vtoy_dev,1)
     set vtoy_efi_part=($vtoy_dev,2)
     loadfont unicode
     set vt_plugin_path=$vtoy_iso_part
 fi
 
+#Load Partition Table
+vt_load_part_table $vtoydev
 
 #Load Plugin
 if [ -f $vtoy_iso_part/ventoy/ventoy.json ]; then
@@ -1331,17 +1346,19 @@ 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  F4:Localboot  F5:Debug  F6:ExMenu"
+    set VTOY_HOTKEY_TIP="F1:Memdisk  F2:Power  F3:TreeView  F4:Localboot  F5:Tools  F6:ExMenu"
 else
     set VTOY_F3_CMD="vt_dynamic_menu 1 0"
-    set VTOY_HOTKEY_TIP="F1:Memdisk  F2:Power  F3:ListView  F4:Localboot  F5:Debug  F6:ExMenu"
+    set VTOY_HOTKEY_TIP="F1:Memdisk  F2:Power  F3:ListView  F4:Localboot  F5:Tools  F6:ExMenu"
 fi
 
 
 if [ -n "$vtoy_gfxmode" ]; then
     set gfxmode=$vtoy_gfxmode
+    set gfxpayload=keep
 else
-    set gfxmode=1920x1080,1366x768,1024x768,800x600,auto
+    set gfxmode=1920x1080,1366x768,1024x768,800x600,auto    
+    set gfxpayload=keep
 fi
 
 if [ "$vtoy_display_mode" = "CLI" ]; then
@@ -1370,10 +1387,11 @@ fi
 #export necessary variable
 export theme
 export gfxmode
-export vtoy_dev
+export vtoydev
 export vtoy_iso_part
 export vtoy_efi_part
 export VENTOY_VERSION
+export VTOY_CUR_VIDEO_MODE