]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - INSTALL/grub/grub.cfg
update
[Ventoy.git] / INSTALL / grub / grub.cfg
index d59e46d772fd2a09422dd1bd1b34e2a068247e9e..38ab7d4f3b29044f4821f792bdaf4640b0190c9a 100644 (file)
@@ -389,7 +389,7 @@ function uefi_linux_menu_func {
             loopback loop $1$2
         fi
         
-        vt_load_cpio  ${vtoy_path}/ventoy.cpio   $2 $1
+        vt_load_cpio  ${vtoy_path}/ventoy.cpio   $2 $1 "busybox=$ventoy_busybox_ver"
         
         vt_linux_clear_initrd
         
@@ -594,7 +594,7 @@ function legacy_linux_menu_func {
             loopback loop $1$2
         fi
     
-        vt_load_cpio  $vtoy_path/ventoy.cpio  $2 $1
+        vt_load_cpio  $vtoy_path/ventoy.cpio  $2 $1 "busybox=$ventoy_busybox_ver"
 
         vt_linux_clear_initrd
         
@@ -709,32 +709,6 @@ function legacy_iso_memdisk {
     boot
 }
 
-function iso_deepin_live_proc {
-    if [ -d (loop)/ ]; then
-        loopback -d loop
-    fi
-
-    loopback loop ${1}${2}   
-    vt_img_sector ${1}${2}
-
-    vt_load_cpio  $vtoy_path/ventoy.cpio  $2 $1   
-    vt_trailer_cpio $1 $2 noinit
-    
-    ventoy_debug_pause
-
-    vt_set_boot_opt rdinit=/ventoy/loop/deepin/ventoy-init.sh live-media=/dev/mapper/ventoy
-    
-    set ventoy_loading_tip="Loading files ......"
-    
-    linux (loop)/live/vmlinuz boot=live components locales=zh_CN.UTF-8 splash quiet
-    initrd (loop)/live/initrd.img
-    boot
-    
-    unset ventoy_loading_tip
-    
-    vt_unset_boot_opt
-}
-
 
 function iso_endless_os_proc {
     if [ -d (loop)/ ]; then
@@ -744,7 +718,7 @@ function iso_endless_os_proc {
     loopback loop ${1}${2}   
     vt_img_sector ${1}${2}
 
-    vt_load_cpio  $vtoy_path/ventoy.cpio  $2 $1   
+    vt_load_cpio  $vtoy_path/ventoy.cpio  $2 $1  "busybox=$ventoy_busybox_ver"
     vt_trailer_cpio $1 $2 noinit
     
     ventoy_debug_pause
@@ -765,20 +739,27 @@ function iso_endless_os_proc {
     vt_unset_boot_opt
 }
 
-function iso_common_menuentry {
-    unset vt_system_id
-    unset vt_volume_id
-    
-    vt_chosen_img_path vt_chosen_path vt_chosen_size
-    vt_parse_iso_volume ${vtoy_iso_part}${vt_chosen_path} vt_system_id vt_volume_id
+
+function ventoy_iso_busybox_ver {
+    set ventoy_busybox_ver=32
     
     #special process for deepin-live iso
     if [ "$vt_chosen_size" = "403701760" ]; then
         if vt_str_begin $vt_chosen_path "/deepin-live"; then
-            iso_deepin_live_proc $vtoy_iso_part $vt_chosen_path
+            set ventoy_busybox_ver=64
         fi
     fi
+}
 
+function iso_common_menuentry {
+    unset vt_system_id
+    unset vt_volume_id
+    
+    vt_chosen_img_path vt_chosen_path vt_chosen_size
+    vt_parse_iso_volume ${vtoy_iso_part}${vt_chosen_path} vt_system_id vt_volume_id
+    
+    ventoy_iso_busybox_ver
+    
     #special process for Endless OS
     if vt_str_begin $vt_volume_id "Endless-OS"; then
         iso_endless_os_proc $vtoy_iso_part $vt_chosen_path
@@ -853,8 +834,15 @@ function efi_unsupport_menuentry {
 }
 
 
-
-
+function ventoy_img_busybox_ver {
+    set ventoy_busybox_ver=32
+    
+    if [ -e (vtimghd,2)/etc/openwrt_release ]; then
+        if vt_file_strstr (vtimghd,2)/etc/openwrt_release x86_64; then
+            set ventoy_busybox_ver=64
+        fi
+    fi    
+}
 
 function img_common_menuentry {