]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - INSTALL/grub/grub.cfg
Adding support for MiniOS. (#1317)
[Ventoy.git] / INSTALL / grub / grub.cfg
index 188fdefb6ecea17878578d3c2a2eca84dfc9d61f..570fed3684858180816f1683e856812dd8842c12 100644 (file)
@@ -129,6 +129,9 @@ function get_os_type {
         elif [ -e (loop)/bin/freebsd-version ]; then
             set vtoy_os=Unix
             set vt_unix_type=FreeBSD
+        elif [ -e (loop)/boot/kernel/geom_ventoy.ko ]; then
+            set vtoy_os=Unix
+            set vt_unix_type=FreeBSD
         elif vt_str_begin "$vt_system_id" "DragonFly"; then
             set vtoy_os=Unix
             set vt_unix_type=DragonFly
@@ -154,9 +157,7 @@ function vt_check_compatible_pe {
     #Check for PE without external tools
     #set compatible if ISO file is less than 80MB
     if [ $vt_chosen_size -gt 33554432 -a $vt_chosen_size -le 83886080 ]; then
-        set ventoy_compatible=YES
-    elif [ -e $1/WEPE/WEPE.INI ]; then
-        set ventoy_compatible=YES
+        set ventoy_compatible=YES    
     fi
 
     return
@@ -233,6 +234,8 @@ function distro_specify_initrd_file {
         vt_linux_specify_initrd_file /initrd.gz
     elif [ -e (loop)/slax/boot/initrfs.img ]; then
         vt_linux_specify_initrd_file /slax/boot/initrfs.img
+    elif [ -e (loop)/minios/boot/initrfs.img ]; then
+        vt_linux_specify_initrd_file /minios/boot/initrfs.img
     elif [ -e (loop)/pmagic/initrd.img ]; then
         vt_linux_specify_initrd_file /pmagic/initrd.img
     elif [ -e (loop)/boot/initrd.xz ]; then
@@ -355,6 +358,8 @@ function distro_specify_initrd_file_phase2 {
         vt_linux_specify_initrd_file /porteus/initrd.xz
     elif [ -f (loop)/pyabr/boot/initrfs.img ]; then
         vt_linux_specify_initrd_file /pyabr/boot/initrfs.img
+    elif [ -f (loop)/initrd0.img ]; then
+        vt_linux_specify_initrd_file /initrd0.img
     
     fi
 }
@@ -416,6 +421,11 @@ function ventoy_freebsd_proc {
     set vtFreeBsdDistro=FreeBSD
     set vt_freebsd_ver=xx
 
+    if [ -e (loop)/boot/kernel/geom_ventoy.ko ]; then
+        vt_unix_ko_fillmap /boot/kernel/geom_ventoy.ko
+        return
+    fi
+
     if vt_strstr "$vt_volume_id" "GHOSTBSD"; then
         ventoy_get_ghostbsd_ver "$1" "${chosen_path}"
     elif vt_strstr "$vt_volume_id" "FREENAS"; then
@@ -711,7 +721,9 @@ function uefi_linux_menu_func {
         elif [ -e (loop)/syslinux/alt0/full.cz ]; then
             vt_add_replace_file 0 "EFI\\BOOT\\full.cz"            
             set FirstTryBootFile='@EFI@BOOT@grubx64.efi'
-
+            
+        elif vt_str_begin "$vt_volume_id" "SolusLive"; then
+            vt_add_replace_file 0 "initrd"
 
         fi
         
@@ -1015,14 +1027,13 @@ function legacy_linux_menu_func {
             loopback loop "$1$2"
         fi
 
-        if [ -f (loop)/isolinux/isolinux.cfg ]; then
-            if vt_iso9660_isjoliet; then
-                vt_iso9660_nojoliet 1
-                loopback -d loop
-                loopback loop "$1$2"
-            fi
+        
+        if vt_syslinux_need_nojoliet "$1$2"; then
+            vt_iso9660_nojoliet 1
+            loopback -d loop
+            loopback loop "$1$2"
         fi
-    
+
         vt_load_cpio  $vtoy_path  "$2" "$1" "busybox=$ventoy_busybox_ver"
 
         vt_linux_clear_initrd
@@ -2009,7 +2020,7 @@ function img_unsupport_menuentry {
 #############################################################
 #############################################################
 
-set VENTOY_VERSION="1.0.56"
+set VENTOY_VERSION="1.0.62"
 
 #ACPI not compatible with Window7/8, so disable by default
 set VTOY_PARAM_NO_ACPI=1
@@ -2177,12 +2188,19 @@ fi
 
 if [ -n "$VTOY_PLUGIN_SYNTAX_ERROR" ]; then
     clear
-    echo -e "\n Syntax error detected in ventoy.json, please check! \n"
-    echo -e " ventoy.json 文件中有语法错误,所有配置都不会生效,请检查!\n"
+    if [ -n "$VTOY_PLUGIN_ENCODE_ERROR" ]; then
+        echo -e "\n Encoding type for ventoy.json is not supported, please convert to UTF-8.\n"
+        echo -e " ventoy.json 文件编码格式不支持,请转换为 UTF-8 编码格式!\n"
+    else
+        echo -e "\n Syntax error detected in ventoy.json, please check! \n"
+        echo -e " ventoy.json 文件中有语法错误,所有配置都不会生效,请检查!\n"         
+    fi
+
     echo -e "\n press ENTER to continue (请按 回车 键继续) ..."
-    read vtInputKey 
+    read vtInputKey
 fi
 
+
 for vtTFile in ventoy.json ventoy_grub.cfg; do
     if [ -f $vtoy_efi_part/ventoy/$vtTFile ]; then
         clear