mirror of
https://github.com/ventoy/Ventoy.git
synced 2026-11-20 12:43:34 +01:00
try to support MODS img (#3771)
This commit is contained in:
+22
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user