try to support MODS img (#3771)
Ventoy CI / build (push) Canceled after 0s
Mirror GitHub to Gitee / Sync-GitHub-to-Gitee (push) Canceled after 0s

This commit is contained in:
longpanda
2026-10-12 20:32:54 +08:00
parent 6dec44159e
commit 582704ca5b
4 changed files with 227 additions and 29 deletions
+22 -3
View File
@@ -2091,6 +2091,22 @@ function ventoy_img_ubos {
vt_unset_boot_opt
}
function ventoy_img_mods {
vt_load_cpio $vtoy_path "${vt_chosen_path}" ${vtoy_iso_part} "busybox=$ventoy_busybox_ver"
vt_trailer_cpio ${vtoy_iso_part} "${vt_chosen_path}" noinit
ventoy_debug_pause
vt_set_boot_opt rdinit=/vtoy/vtoy ventoyos=mods
vt_img_hook_root
set root=(vtimghd,1)
configfile (vtimghd,1)/grub2/grub.cfg
vt_img_unhook_root
vt_unset_boot_opt
}
function ventoy_img_recalbox {
if [ $vtoy_img_max_part_end -GT $vt_chosen_size ]; then
echo -e "\nPlease extend the img file size before boot it. \n"
@@ -2435,12 +2451,15 @@ function img_common_menuentry {
elif [ -f (vtimghd,2)/loader/entries/ubos.conf ]; then
ventoy_img_ubos
elif [ -f (vtimghd,2)/etc/openwrt_version ]; then
ventoy_img_openwrt
ventoy_img_openwrt
elif [ -e (vtimghd,1)/mods -a -e (vtimghd,1)/tiny ]; then
echo aaa
ventoy_img_mods
else
if [ -f (vtimghd,1)/efi/boot/mt86.png ]; then
if [ -f (vtimghd,1)/efi/boot/mt86.png ]; then
if [ "$grub_platform" = "pc" ]; then
img_unsupport_tip
fi
fi
fi
#common chain