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
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
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"
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
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
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
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
common_unsupport_menuentry
}
+#
+#============================================================#
+# IMG file boot process #
+#============================================================#
+#
+
+
+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
+
+ 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
+
+ loopback vtimghd ${vtoy_iso_part}${vt_chosen_path}
+ vt_img_sector ${vtoy_iso_part}${vt_chosen_path}
+
+ vt_img_part_info (vtimghd)
- echo "To be implement"
+ 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