X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/f3e267a09e22f9f2db70a04b81a30fefe0824bbe..0891e34d47c2c8d0f77dc09d86a9b23249af123e:/INSTALL/grub/grub.cfg diff --git a/INSTALL/grub/grub.cfg b/INSTALL/grub/grub.cfg index b77b125..5dc76d4 100644 --- a/INSTALL/grub/grub.cfg +++ b/INSTALL/grub/grub.cfg @@ -355,6 +355,8 @@ function distro_specify_initrd_file_phase2 { vt_linux_specify_initrd_file /porteus/initrd.xz elif [ -f (loop)/pyabr/boot/initrfs.img ]; then vt_linux_specify_initrd_file /pyabr/boot/initrfs.img + elif [ -f (loop)/initrd0.img ]; then + vt_linux_specify_initrd_file /initrd0.img fi } @@ -1015,14 +1017,13 @@ function legacy_linux_menu_func { loopback loop "$1$2" fi - if [ -f (loop)/isolinux/isolinux.cfg ]; then - if vt_iso9660_isjoliet; then - vt_iso9660_nojoliet 1 - loopback -d loop - loopback loop "$1$2" - fi + + if vt_syslinux_need_nojoliet "$1$2"; then + vt_iso9660_nojoliet 1 + loopback -d loop + loopback loop "$1$2" fi - + vt_load_cpio $vtoy_path "$2" "$1" "busybox=$ventoy_busybox_ver" vt_linux_clear_initrd @@ -1691,6 +1692,23 @@ function ventoy_img_recalbox { vt_unset_boot_opt } +function ventoy_img_esysrescue { + 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 + + #boot image file + vt_set_boot_opt rdinit=/vtoy/vtoy ventoyos=esysrescue + vt_img_hook_root + + set root=(vtimghd,1) + configfile (vtimghd,1)/boot/grub/grub.cfg + + vt_img_unhook_root + vt_unset_boot_opt +} + function ventoy_img_batocera { 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 @@ -1943,6 +1961,8 @@ function img_common_menuentry { ventoy_img_tails elif [ "$vtImgHd2Label" = "RECALBOX" ]; then ventoy_img_recalbox + elif [ "$vtImgHd1Label" = "ESYSRESCUE" ]; then + ventoy_img_esysrescue elif [ -e (vtimghd,1)/easy.sfs ]; then ventoy_img_easyos elif [ -e (vtimghd,1)/volumio.initrd ]; then @@ -1990,7 +2010,7 @@ function img_unsupport_menuentry { ############################################################# ############################################################# -set VENTOY_VERSION="1.0.55" +set VENTOY_VERSION="1.0.59" #ACPI not compatible with Window7/8, so disable by default set VTOY_PARAM_NO_ACPI=1 @@ -2104,10 +2124,10 @@ fi if [ $VTOY_DEFAULT_MENU_MODE -eq 0 ]; then set VTOY_F3_CMD="vt_dynamic_menu 1 1" - set VTOY_HOTKEY_TIP="F1:Memdisk F2:Power F3:TreeView F4:Localboot F5:Tools F6:ExMenu Ctrl+h:Help" + set VTOY_HOTKEY_TIP="h:Help F1:Memdisk F2:Power F3:TreeView F4:Localboot F5:Tools F6:ExMenu" else set VTOY_F3_CMD="vt_dynamic_menu 1 0" - set VTOY_HOTKEY_TIP="F1:Memdisk F2:Power F3:ListView F4:Localboot F5:Tools F6:ExMenu Ctrl+h:Help" + set VTOY_HOTKEY_TIP="h:Help F1:Memdisk F2:Power F3:ListView F4:Localboot F5:Tools F6:ExMenu" fi @@ -2158,12 +2178,19 @@ fi if [ -n "$VTOY_PLUGIN_SYNTAX_ERROR" ]; then clear - echo -e "\n Syntax error detected in ventoy.json, please check! \n" - echo -e " ventoy.json 文件中有语法错误,所有配置都不会生效,请检查!\n" + if [ -n "$VTOY_PLUGIN_ENCODE_ERROR" ]; then + echo -e "\n Encoding type for ventoy.json is not supported, please convert to UTF-8.\n" + echo -e " ventoy.json 文件编码格式不支持,请转换为 UTF-8 编码格式!\n" + else + echo -e "\n Syntax error detected in ventoy.json, please check! \n" + echo -e " ventoy.json 文件中有语法错误,所有配置都不会生效,请检查!\n" + fi + echo -e "\n press ENTER to continue (请按 回车 键继续) ..." - read vtInputKey + read vtInputKey fi + for vtTFile in ventoy.json ventoy_grub.cfg; do if [ -f $vtoy_efi_part/ventoy/$vtTFile ]; then clear