X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/be50ea69aaf2a18b9801c04efea19825d7f34c44..1186caba41c57c390db2aee650d9c451809bffa3:/INSTALL/grub/grub.cfg diff --git a/INSTALL/grub/grub.cfg b/INSTALL/grub/grub.cfg index d59e46d..38ab7d4 100644 --- a/INSTALL/grub/grub.cfg +++ b/INSTALL/grub/grub.cfg @@ -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 {