]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - INSTALL/grub/grub.cfg
Only use acpi when secureboot if enabled in UEFI mode.
[Ventoy.git] / INSTALL / grub / grub.cfg
index 2a61314fd12810a9a0f2c0e1724937b4cf5cd115..c497c6691a4dd4d8fe573b99b2402a78fabba5f9 100644 (file)
@@ -50,6 +50,21 @@ function ventoy_acpi_param {
     fi
 }
 
+function ventoy_vcfg_proc {
+    if vt_check_custom_boot "${1}" vt_vcfg; then
+        set vtoy_chosen_path="${1}"
+        vt_file_basefile "${vtoy_chosen_path}" vtoy_chosen_file
+        
+        export vtoy_chosen_path
+        export vtoy_chosen_file
+        ventoy_debug_pause
+        configfile "${vtoy_iso_part}${vt_vcfg}"
+        true
+    else
+        false
+    fi
+}
+
 function ventoy_power {
     configfile $prefix/power.cfg
 }
@@ -959,6 +974,7 @@ function ventoy_iso_busybox_ver {
     fi
 }
 
+
 function iso_common_menuentry {
     unset vt_system_id
     unset vt_volume_id
@@ -981,7 +997,11 @@ function iso_common_menuentry {
     if vt_check_password "${vt_chosen_path}"; then
         return
     fi
-        
+
+    if ventoy_vcfg_proc "${vt_chosen_path}"; then        
+        return
+    fi
+
     if vt_str_begin "$vt_volume_id" "Avira"; then 
         vt_skip_svd "${vtoy_iso_part}${vt_chosen_path}"
     fi
@@ -1051,6 +1071,10 @@ function wim_common_menuentry {
         return
     fi
     
+    if ventoy_vcfg_proc "${vt_chosen_path}"; then        
+        return
+    fi
+    
     if vt_wim_check_bootable "${vtoy_iso_part}${vt_chosen_path}"; then
         vt_wim_chain_data "${vtoy_iso_part}${vt_chosen_path}"
     else
@@ -1086,6 +1110,10 @@ function efi_common_menuentry {
         return
     fi
     
+    if ventoy_vcfg_proc "${vt_chosen_path}"; then        
+        return
+    fi
+    
     vt_concat_efi_iso "${vtoy_iso_part}${vt_chosen_path}" vtoy_iso_buf
     
     ventoy_debug_pause
@@ -1127,6 +1155,10 @@ function vhd_common_menuentry {
         return
     fi
     
+    if ventoy_vcfg_proc "${vt_chosen_path}"; then        
+        return
+    fi
+    
     vt_patch_vhdboot "$vt_chosen_path"
     
     ventoy_debug_pause    
@@ -1192,7 +1224,9 @@ function vtoyboot_common_func {
                 linux16 $vtoy_path/ipxe.krn ${vtdebug_flag} bios80  sector512  mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}   
                 boot
             else
-                vt_acpi_param ${vtoy_chain_mem_addr} 512
+                if vt_check_secureboot_var; then
+                    vt_acpi_param ${vtoy_chain_mem_addr} 512
+                fi
                 ventoy_cli_console
                 chainloader ${vtoy_path}/ventoy_${VTOY_EFI_ARCH}.efi sector512 env_param=${ventoy_env_param} ${vtdebug_flag} mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}
                 boot
@@ -1215,6 +1249,10 @@ function vtoy_common_menuentry {
         return
     fi    
     
+    if ventoy_vcfg_proc "${vt_chosen_path}"; then        
+        return
+    fi
+    
     vtoyboot_common_func "${vtoy_iso_part}${vt_chosen_path}"
 }
 
@@ -1418,6 +1456,10 @@ function img_common_menuentry {
         return
     fi
 
+    if ventoy_vcfg_proc "${vt_chosen_path}"; then        
+        return
+    fi
+
     if [ -d (vtimghd)/ ]; then
         loopback -d vtimghd
     fi
@@ -1496,7 +1538,7 @@ function img_unsupport_menuentry {
 #############################################################
 #############################################################
 
-set VENTOY_VERSION="1.0.33"
+set VENTOY_VERSION="1.0.34"
 
 #ACPI not compatible with Window7/8, so disable by default
 set VTOY_PARAM_NO_ACPI=1