if [ -e (loop)/casper/initrd ]; then
vt_linux_specify_initrd_file /casper/initrd
fi
+ if [ -e (loop)/casper/initrd.gz ]; then
+ vt_linux_specify_initrd_file /casper/initrd.gz
+ fi
if [ -e (loop)/casper/initrd-oem ]; then
vt_linux_specify_initrd_file /casper/initrd-oem
fi
if [ -f (loop)/parabola/boot/i686/parabolaiso.img ]; then
vt_linux_specify_initrd_file /parabola/boot/i686/parabolaiso.img
fi
+ elif [ -f (loop)/hyperbola/boot/x86_64/hyperiso.img ]; then
+ vt_linux_specify_initrd_file /hyperbola/boot/x86_64/hyperiso.img
+ if [ -f (loop)/hyperbola/boot/i686/hyperiso.img ]; then
+ vt_linux_specify_initrd_file /hyperbola/boot/i686/hyperiso.img
+ fi
elif [ -f (loop)/EFI/BOOT/initrd.img ]; then
#Qubes
vt_linux_specify_initrd_file /EFI/BOOT/initrd.img
vt_linux_specify_initrd_file /initrd
elif [ -f (loop)/live/initrd1 ]; then
vt_linux_specify_initrd_file /live/initrd1
+ elif vt_strstr $vt_volume_id "Daphile"; then
+ vt_linux_parse_initrd_isolinux (loop)/isolinux/
fi
}
set vt_freebsd_ver=12.x
}
+function ventoy_get_furybsd_ver {
+ if regexp "13\.[0-9]" "$2"; then
+ set vt_freebsd_ver=13.x
+ else
+ set vt_freebsd_ver=12.x
+ fi
+}
+
function ventoy_get_freenas_ver {
set vt_freebsd_ver=11.x
ventoy_get_ghostbsd_ver $1 ${chosen_path}
elif vt_strstr "$vt_volume_id" "FREENAS"; then
ventoy_get_freenas_ver $1 ${chosen_path}
+ elif vt_strstr "$vt_volume_id" "FURYBSD"; then
+ ventoy_get_furybsd_ver $1 ${chosen_path}
elif regexp "^13_[0-9]" "$vt_volume_id"; then
set vt_freebsd_ver=13.x
elif regexp "^12_[0-9]" "$vt_volume_id"; then
fi
unset vt_unix_mod_path
- for file in "/COPYRIGHT" "/FreeNAS-MANIFEST" "/version"; do
+ for file in "/COPYRIGHT" "/FreeNAS-MANIFEST" "/version" "/etc/fstab"; do
if [ -e (loop)${file} ]; then
set vt_unix_mod_path=${file}
break
elif [ -d (loop)/EFI/boot/entries ]; then
if [ -f (loop)/parabola/boot/x86_64/parabolaiso.img ]; then
vt_add_replace_file 0 "EFI\\parabolaiso\\parabolaiso.img"
+ elif [ -f (loop)/hyperbola/boot/x86_64/hyperiso.img ]; then
+ vt_add_replace_file 0 "EFI\\hyperiso\\hyperiso.img"
fi
elif [ -e (loop)/syslinux/alt0/full.cz ]; then
vt_add_replace_file 0 "EFI\\BOOT\\full.cz"
common_unsupport_menuentry
}
+#
+#============================================================#
+# IMG file boot process #
+#============================================================#
+#
-function ventoy_img_busybox_ver {
- set ventoy_busybox_ver=32
+
+function ventoy_img_easyos {
+ vt_load_cpio $vtoy_path/ventoy.cpio ${vt_chosen_path} ${vtoy_iso_part} "busybox=$ventoy_busybox_ver"
+ vt_trailer_cpio ${vtoy_iso_part} ${vt_chosen_path} noinit
- 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
+ loopback easysfs (vtimghd,1)/easy.sfs
+ vt_get_lib_module_ver (easysfs) /lib/modules/ vt_module_ver
+
+ if [ -n "$vt_module_ver" ]; then
+ for mod in "kernel/drivers/md/dm-mod.ko" "kernel/drivers/dax/dax.ko"; do
+ vt_img_extra_initrd_append (easysfs)/lib/modules/$vt_module_ver/$mod
+ done
+ fi
+
+ ventoy_debug_pause
+
+ #boot image file
+ vt_set_boot_opt rdinit=/vtoy/vtoy
+ vt_img_hook_root
+
+ syslinux_configfile (vtimghd,1)/syslinux.cfg
+
+ vt_img_unhook_root
+ vt_unset_boot_opt
+ loopback -d easysfs
+}
+
+function ventoy_img_volumio {
+ vt_load_cpio $vtoy_path/ventoy.cpio ${vt_chosen_path} ${vtoy_iso_part} "busybox=$ventoy_busybox_ver"
+ vt_trailer_cpio ${vtoy_iso_part} ${vt_chosen_path} noinit
+
+ ventoy_debug_pause
+
+ #boot image file
+ vt_set_boot_opt rdinit=/vtoy/vtoy imgpart=/dev/ventoy2 bootpart=/dev/ventoy1
+ vt_img_hook_root
+
+ syslinux_configfile (vtimghd,1)/syslinux.cfg
+
+ vt_img_unhook_root
+ vt_unset_boot_opt
}
+
function img_common_menuentry {
+ set ventoy_busybox_ver=32
+
+ vt_chosen_img_path vt_chosen_path vt_chosen_size
+
+ if [ -d (vtimghd)/ ]; then
+ loopback -d vtimghd
+ fi
- echo "To be implement"
+ loopback vtimghd ${vtoy_iso_part}${vt_chosen_path}
+ vt_img_sector ${vtoy_iso_part}${vt_chosen_path}
+
+ vt_img_part_info (vtimghd)
+
+ set vtback_root=$root
+ ventoy_cli_console
+ vt_push_last_entry
+
+ vt_img_extra_initrd_reset
+
+ #vt_get_fs_label (vtimghd,1) vtImgHd1Label
+
+ if [ -e (vtimghd,1)/easy.sfs ]; then
+ ventoy_img_easyos
+ elif [ -e (vtimghd,1)/volumio.initrd ]; then
+ ventoy_img_volumio
+
+
+ else
+ echo -e "\n This IMG file is NOT supported now. \n"
+ echo -e " 当前不支持启动此 IMG 文件 \n"
+ echo -e "\npress ENTER to exit (请按 回车 键返回) ..."
+ read vtInputKey
+ fi
+
+ set root=$vtback_root
+ vt_pop_last_entry
+ ventoy_gui_console
}
function img_unsupport_menuentry {
#############################################################
#############################################################
-set VENTOY_VERSION="1.0.18"
+set VENTOY_VERSION="1.0.19"
# Default menu display mode, you can change it as you want.
# 0: List mode