diff --git a/GRUB2/MOD_SRC/grub-2.04/grub-core/Makefile.core.def b/GRUB2/MOD_SRC/grub-2.04/grub-core/Makefile.core.def index acd62b22..b9d87071 100644 --- a/GRUB2/MOD_SRC/grub-2.04/grub-core/Makefile.core.def +++ b/GRUB2/MOD_SRC/grub-2.04/grub-core/Makefile.core.def @@ -1597,6 +1597,7 @@ module = { common = ventoy/lzx.c; common = ventoy/xpress.c; common = ventoy/huffman.c; + common = ventoy/miniz.c; }; module = { diff --git a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c index 5dd57e48..6b4ee013 100644 --- a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c +++ b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c @@ -43,8 +43,10 @@ #include #include #include +#include #include #include "ventoy_def.h" +#include "miniz.h" GRUB_MOD_LICENSE ("GPLv3+"); @@ -105,6 +107,7 @@ int g_conf_replace_new_len = 0; int g_conf_replace_new_len_align = 0; ventoy_gpt_info *g_ventoy_part_info = NULL; +grub_uint64_t g_ventoy_disk_size = 0; static char *g_tree_script_buf = NULL; static int g_tree_script_pos = 0; @@ -3437,6 +3440,22 @@ static grub_err_t ventoy_cmd_pop_last_entry(grub_extcmd_context_t ctxt, int argc return 0; } +grub_uint64_t ventoy_get_part1_size(ventoy_gpt_info *gpt) +{ + grub_uint64_t sectors; + + if (grub_strncmp(gpt->Head.Signature, "EFI PART", 8) == 0) + { + sectors = gpt->PartTbl[0].LastLBA + 1 - gpt->PartTbl[0].StartLBA; + } + else + { + sectors = gpt->MBR.PartTbl[0].SectorCount; + } + + return sectors * 512; +} + static int ventoy_lib_module_callback(const char *filename, const struct grub_dirhook_info *info, void *data) { const char *pos = filename + 1; @@ -3539,6 +3558,8 @@ static grub_err_t ventoy_cmd_load_part_table(grub_extcmd_context_t ctxt, int arg return 1; } + g_ventoy_disk_size = disk->total_sectors * (1U << disk->log_sector_size); + grub_disk_read(disk, 0, 0, sizeof(ventoy_gpt_info), g_ventoy_part_info); grub_disk_close(disk); @@ -3926,6 +3947,47 @@ int ventoy_is_dir_exist(const char *fmt, ...) return 0; } +int ventoy_gzip_compress(void *mem_in, int mem_in_len, void *mem_out, int mem_out_len) +{ + mz_stream s; + grub_uint8_t *outbuf; + grub_uint8_t gzHdr[10] = + { + 0x1F, 0x8B, /* magic */ + 8, /* z method */ + 0, /* flags */ + 0,0,0,0, /* mtime */ + 4, /* xfl */ + 3, /* OS */ + }; + + grub_memset(&s, 0, sizeof(mz_stream)); + + mz_deflateInit2(&s, 1, MZ_DEFLATED, -MZ_DEFAULT_WINDOW_BITS, 6, MZ_DEFAULT_STRATEGY); + + outbuf = (grub_uint8_t *)mem_out; + + mem_out_len -= sizeof(gzHdr) + 8; + grub_memcpy(outbuf, gzHdr, sizeof(gzHdr)); + outbuf += sizeof(gzHdr); + + s.avail_in = mem_in_len; + s.next_in = mem_in; + + s.avail_out = mem_out_len; + s.next_out = outbuf; + + mz_deflate(&s, MZ_FINISH); + + mz_deflateEnd(&s); + + outbuf += s.total_out; + *(grub_uint32_t *)outbuf = grub_getcrc32c(0, outbuf, s.total_out); + *(grub_uint32_t *)(outbuf + 4) = (grub_uint32_t)(s.total_out); + + return s.total_out + sizeof(gzHdr) + 8; +} + static int ventoy_env_init(void) { char buf[64]; @@ -4055,6 +4117,8 @@ static cmd_para ventoy_cmds[] = { "vt_unix_reset", ventoy_cmd_unix_reset, 0, NULL, "", "", NULL }, { "vt_unix_replace_conf", ventoy_cmd_unix_replace_conf, 0, NULL, "", "", NULL }, { "vt_unix_replace_ko", ventoy_cmd_unix_replace_ko, 0, NULL, "", "", NULL }, + { "vt_unix_fill_image_desc", ventoy_cmd_unix_fill_image_desc, 0, NULL, "", "", NULL }, + { "vt_unix_gzip_new_ko", ventoy_cmd_unix_gzip_newko, 0, NULL, "", "", NULL }, { "vt_unix_chain_data", ventoy_cmd_unix_chain_data, 0, NULL, "", "", NULL }, { "vt_img_hook_root", ventoy_cmd_img_hook_root, 0, NULL, "", "", NULL }, diff --git a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_def.h b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_def.h index 2a79d4e8..856cde33 100644 --- a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_def.h +++ b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_def.h @@ -875,6 +875,7 @@ extern conf_replace *g_conf_replace_node; extern grub_uint8_t *g_conf_replace_new_buf; extern int g_conf_replace_new_len; extern int g_conf_replace_new_len_align; +extern grub_uint64_t g_ventoy_disk_size; #define ventoy_unix_fill_virt(new_data, new_len) \ { \ @@ -924,6 +925,8 @@ int ventoy_get_disk_guid(const char *filename, grub_uint8_t *guid, grub_uint8_t grub_err_t ventoy_cmd_unix_reset(grub_extcmd_context_t ctxt, int argc, char **args); grub_err_t ventoy_cmd_unix_replace_conf(grub_extcmd_context_t ctxt, int argc, char **args); grub_err_t ventoy_cmd_unix_replace_ko(grub_extcmd_context_t ctxt, int argc, char **args); +grub_err_t ventoy_cmd_unix_fill_image_desc(grub_extcmd_context_t ctxt, int argc, char **args); +grub_err_t ventoy_cmd_unix_gzip_newko(grub_extcmd_context_t ctxt, int argc, char **args); grub_err_t ventoy_cmd_unix_freebsd_ver(grub_extcmd_context_t ctxt, int argc, char **args); grub_err_t ventoy_cmd_parse_freenas_ver(grub_extcmd_context_t ctxt, int argc, char **args); int ventoy_check_device_result(int ret); @@ -934,6 +937,8 @@ grub_err_t ventoy_cmd_patch_vhdboot(grub_extcmd_context_t ctxt, int argc, char * grub_err_t ventoy_cmd_raw_chain_data(grub_extcmd_context_t ctxt, int argc, char **args); grub_err_t ventoy_cmd_get_vtoy_type(grub_extcmd_context_t ctxt, int argc, char **args); int ventoy_check_password(const vtoy_password *pwd, int retry); +int ventoy_gzip_compress(void *mem_in, int mem_in_len, void *mem_out, int mem_out_len); +grub_uint64_t ventoy_get_part1_size(ventoy_gpt_info *gpt); #endif /* __VENTOY_DEF_H__ */ diff --git a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_unix.c b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_unix.c index e38597ff..626517a0 100644 --- a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_unix.c +++ b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_unix.c @@ -235,6 +235,21 @@ static int ventoy_freebsd_append_conf(char *buf, const char *isopath) return pos; } +static int ventoy_dragonfly_append_conf(char *buf, const char *isopath) +{ + int pos = 0; + + debug("ventoy_dragonfly_append_conf %s\n", isopath); + + vtoy_ssprintf(buf, pos, "tmpfs_load=\"%s\"\n", "YES"); + vtoy_ssprintf(buf, pos, "dm_target_linear_load=\"%s\"\n", "YES"); + vtoy_ssprintf(buf, pos, "initrd.img_load=\"%s\"\n", "YES"); + vtoy_ssprintf(buf, pos, "initrd.img_type=\"%s\"\n", "md_image"); + vtoy_ssprintf(buf, pos, "vfs.root.mountfrom=\"%s\"\n", "ufs:md0s0"); + + return pos; +} + grub_err_t ventoy_cmd_unix_reset(grub_extcmd_context_t ctxt, int argc, char **args) { (void)ctxt; @@ -431,6 +446,10 @@ grub_err_t ventoy_cmd_unix_replace_conf(grub_extcmd_context_t ctxt, int argc, ch { g_conf_new_len += ventoy_freebsd_append_conf(data + file->size, args[1]); } + else if (grub_strcmp(args[0], "DragonFly") == 0) + { + g_conf_new_len += ventoy_dragonfly_append_conf(data + file->size, args[1]); + } VENTOY_CMD_RETURN(GRUB_ERR_NONE); } @@ -474,6 +493,7 @@ grub_err_t ventoy_cmd_unix_replace_ko(grub_extcmd_context_t ctxt, int argc, char data = grub_malloc(file->size); if (!data) { + debug("Failed to alloc memory for new ko %d\n", (int)file->size); grub_file_close(file); return 1; } @@ -487,6 +507,105 @@ grub_err_t ventoy_cmd_unix_replace_ko(grub_extcmd_context_t ctxt, int argc, char VENTOY_CMD_RETURN(GRUB_ERR_NONE); } +grub_err_t ventoy_cmd_unix_fill_image_desc(grub_extcmd_context_t ctxt, int argc, char **args) +{ + int i; + grub_uint8_t *byte; + grub_uint32_t memsize; + ventoy_image_desc *desc; + grub_uint8_t flag[32] = { + 0xFF, 0xEE, 0xDD, 0xCC, 0xBB, 0xAA, 0x99, 0x88, 0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11, 0x00, + 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF + }; + + (void)ctxt; + (void)argc; + (void)args; + + debug("ventoy_cmd_unix_fill_image_desc %p\n", g_mod_new_data); + + if (!g_mod_new_data) + { + goto end; + } + + byte = (grub_uint8_t *)g_mod_new_data; + for (i = 0; i < g_mod_new_len - 32; i += 16) + { + if (byte[i] == 0xFF && byte[i + 1] == 0xEE) + { + if (grub_memcmp(flag, byte + i, 32) == 0) + { + debug("Find position flag at %d(0x%x)\n", i, i); + break; + } + } + } + + if (i >= g_mod_new_len - 32) + { + debug("Failed to find position flag %d\n", i); + goto end; + } + + desc = (ventoy_image_desc *)(byte + i); + desc->disk_size = g_ventoy_disk_size; + desc->part1_size = ventoy_get_part1_size(g_ventoy_part_info); + grub_memcpy(desc->disk_uuid, g_ventoy_part_info->MBR.BootCode + 0x180, 16); + grub_memcpy(desc->disk_signature, g_ventoy_part_info->MBR.BootCode + 0x1B8, 4); + + desc->img_chunk_count = g_img_chunk_list.cur_chunk; + memsize = g_img_chunk_list.cur_chunk * sizeof(ventoy_img_chunk); + + debug("image chunk count:%u memsize:%u\n", desc->img_chunk_count, memsize); + + if (memsize >= VTOY_SIZE_1MB * 8) + { + grub_printf("image chunk count:%u memsize:%u too big\n", desc->img_chunk_count, memsize); + goto end; + } + + grub_memcpy(desc + 1, g_img_chunk_list.chunk, memsize); + +end: + VENTOY_CMD_RETURN(GRUB_ERR_NONE); +} + +grub_err_t ventoy_cmd_unix_gzip_newko(grub_extcmd_context_t ctxt, int argc, char **args) +{ + int newlen; + grub_uint8_t *buf; + + (void)ctxt; + (void)argc; + (void)args; + + debug("ventoy_cmd_unix_gzip_newko %p\n", g_mod_new_data); + + if (!g_mod_new_data) + { + goto end; + } + + buf = grub_malloc(g_mod_new_len); + if (!buf) + { + goto end; + } + + newlen = ventoy_gzip_compress(g_mod_new_data, g_mod_new_len, buf, g_mod_new_len); + + grub_free(g_mod_new_data); + + debug("gzip org len:%d newlen:%d\n", g_mod_new_len, newlen); + + g_mod_new_data = (char *)buf; + g_mod_new_len = newlen; + +end: + VENTOY_CMD_RETURN(GRUB_ERR_NONE); +} + grub_err_t ventoy_cmd_unix_chain_data(grub_extcmd_context_t ctxt, int argc, char **args) { int ventoy_compatible = 0; diff --git a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_vhd.c b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_vhd.c index 5d64b5b2..0b8b00f5 100644 --- a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_vhd.c +++ b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_vhd.c @@ -342,8 +342,10 @@ static int ventoy_raw_trim_head(grub_uint64_t offset) grub_err_t ventoy_cmd_get_vtoy_type(grub_extcmd_context_t ctxt, int argc, char **args) { int i; + int altboot = 0; int offset = -1; grub_file_t file; + grub_uint8_t data = 0; vhd_footer_t vhdfoot; VDIPREHEADER vdihdr; char type[16] = {0}; @@ -427,6 +429,7 @@ grub_err_t ventoy_cmd_get_vtoy_type(grub_extcmd_context_t ctxt, int argc, char * if (grub_memcmp(gpt->PartTbl[i].PartType, "Hah!IdontNeedEFI", 16) == 0) { debug("part %d is grub_bios part\n", i); + altboot = 1; grub_env_set(args[3], "1"); break; } @@ -436,6 +439,20 @@ grub_err_t ventoy_cmd_get_vtoy_type(grub_extcmd_context_t ctxt, int argc, char * } } } + + if (!altboot) + { + if (gpt->MBR.BootCode[92] == 0x22) + { + grub_file_seek(file, offset + 17908); + grub_file_read(file, &data, 1); + if (data == 0x23) + { + altboot = 1; + grub_env_set(args[3], "1"); + } + } + } } else { @@ -447,6 +464,7 @@ grub_err_t ventoy_cmd_get_vtoy_type(grub_extcmd_context_t ctxt, int argc, char * if (gpt->MBR.PartTbl[i].FsFlag == 0xEF) { debug("part %d is esp part in MBR mode\n", i); + altboot = 1; grub_env_set(args[3], "1"); break; } diff --git a/GRUB2/MOD_SRC/grub-2.04/include/grub/ventoy.h b/GRUB2/MOD_SRC/grub-2.04/include/grub/ventoy.h index d9aa2290..56f357db 100644 --- a/GRUB2/MOD_SRC/grub-2.04/include/grub/ventoy.h +++ b/GRUB2/MOD_SRC/grub-2.04/include/grub/ventoy.h @@ -149,8 +149,6 @@ typedef struct ventoy_secure_data grub_uint8_t magic2[16]; /* VENTOY_GUID */ }ventoy_secure_data; - - #pragma pack() // compile assert check : sizeof(ventoy_os_param) must be 512 @@ -188,6 +186,18 @@ typedef struct ventoy_chain_head grub_uint32_t virt_chunk_num; }ventoy_chain_head; +typedef struct ventoy_image_desc +{ + grub_uint64_t disk_size; + grub_uint64_t part1_size; + grub_uint8_t disk_uuid[16]; + grub_uint8_t disk_signature[4]; + grub_uint32_t img_chunk_count; + /* ventoy_img_chunk list */ +}ventoy_image_desc; + + + typedef struct ventoy_img_chunk { grub_uint32_t img_start_sector; // sector size: 2KB diff --git a/IMG/cpio/ventoy/hook/wifislax/ventoy-hook.sh b/IMG/cpio/ventoy/hook/wifislax/ventoy-hook.sh index f2073b9a..cc0be889 100644 --- a/IMG/cpio/ventoy/hook/wifislax/ventoy-hook.sh +++ b/IMG/cpio/ventoy/hook/wifislax/ventoy-hook.sh @@ -19,7 +19,13 @@ . $VTOY_PATH/hook/ventoy-os-lib.sh -$SED "/mount.*devtmpfs/a $BUSYBOX_PATH/sh $VTOY_PATH/hook/wifislax/disk_hook.sh" -i /linuxrc +if [ -e /linuxrc ]; then + INITFILE=/linuxrc +elif [ -e /init ]; then + INITFILE=/init +fi + +$SED "/mount.*devtmpfs/a $BUSYBOX_PATH/sh $VTOY_PATH/hook/wifislax/disk_hook.sh" -i $INITFILE #replace original blkid $BUSYBOX_PATH/rm -f /usr/bin/blkid diff --git a/INSTALL/EFI/BOOT/BOOTAA64.EFI b/INSTALL/EFI/BOOT/BOOTAA64.EFI index 12bbd7a9..55e062e5 100644 Binary files a/INSTALL/EFI/BOOT/BOOTAA64.EFI and b/INSTALL/EFI/BOOT/BOOTAA64.EFI differ diff --git a/INSTALL/EFI/BOOT/grubia32_real.efi b/INSTALL/EFI/BOOT/grubia32_real.efi index 23755733..08c91727 100644 Binary files a/INSTALL/EFI/BOOT/grubia32_real.efi and b/INSTALL/EFI/BOOT/grubia32_real.efi differ diff --git a/INSTALL/EFI/BOOT/grubx64_real.efi b/INSTALL/EFI/BOOT/grubx64_real.efi index cfe495bf..d61e5363 100644 Binary files a/INSTALL/EFI/BOOT/grubx64_real.efi and b/INSTALL/EFI/BOOT/grubx64_real.efi differ diff --git a/INSTALL/Ventoy2Disk.sh b/INSTALL/Ventoy2Disk.sh index f45bec82..a283423d 100644 --- a/INSTALL/Ventoy2Disk.sh +++ b/INSTALL/Ventoy2Disk.sh @@ -1,5 +1,7 @@ #!/bin/sh +OLDDIR=$(pwd) + if ! [ -f ./tool/ventoy_lib.sh ]; then if [ -f ${0%Ventoy2Disk.sh}/tool/ventoy_lib.sh ]; then cd ${0%Ventoy2Disk.sh} @@ -10,8 +12,6 @@ if [ -f ./ventoy/version ]; then curver=$(cat ./ventoy/version) fi -OLDDIR=$(pwd) - if uname -a | egrep -q 'aarch64|arm64'; then export TOOLDIR=aarch64 elif uname -a | egrep -q 'x86_64|amd64'; then @@ -53,9 +53,10 @@ else for file in $(ls *.xz); do xzcat $file > ${file%.xz} + [ -f ./${file%.xz} ] && chmod +x ./${file%.xz} [ -f ./$file ] && rm -f ./$file done - cd $OLDDIR + cd ../../ chmod +x -R ./tool/$TOOLDIR fi @@ -67,7 +68,8 @@ else fi if [ -n "$OLDDIR" ]; then - cd $OLDDIR + CURDIR=$(pwd) + if [ "$CURDIR" != "$OLDDIR" ]; then + cd "$OLDDIR" + fi fi - - diff --git a/INSTALL/grub/arm64-efi/moddep.lst b/INSTALL/grub/arm64-efi/moddep.lst index 7816acfd..00683f97 100644 --- a/INSTALL/grub/arm64-efi/moddep.lst +++ b/INSTALL/grub/arm64-efi/moddep.lst @@ -92,7 +92,7 @@ terminal: div: crypto: part_bsd: part_msdos -ventoy: ext2 fshelp font crypto gcry_md5 exfat udf extcmd normal video gcry_sha1 iso9660 +ventoy: ext2 fshelp btrfs font crypto gcry_md5 exfat udf extcmd normal video gcry_sha1 iso9660 gcry_sha512: crypto password: crypto normal fshelp: diff --git a/INSTALL/grub/grub.cfg b/INSTALL/grub/grub.cfg index 3e1528f2..0be3f089 100644 --- a/INSTALL/grub/grub.cfg +++ b/INSTALL/grub/grub.cfg @@ -92,6 +92,9 @@ function get_os_type { elif [ -e (loop)/bin/freebsd-version ]; then set vtoy_os=Unix set vt_unix_type=FreeBSD + elif vt_str_begin "$vt_system_id" "DragonFly"; then + set vtoy_os=Unix + set vt_unix_type=DragonFly elif [ -e (loop)/boot/kernel/kernel ]; then @@ -426,6 +429,22 @@ function ventoy_freebsd_proc { vt_unix_replace_conf FreeBSD "${1}${chosen_path}" } +function ventoy_dragonfly_proc { + + unset vt_unix_mod_path + for file in "/boot/kernel/initrd.img.gz"; do + if [ -e (loop)${file} ]; then + set vt_unix_mod_path=${file} + break + fi + done + + vt_unix_replace_ko $vt_unix_mod_path ${vtoy_path}/dragonfly.mfs.xz + vt_unix_fill_image_desc + vt_unix_gzip_new_ko + vt_unix_replace_conf DragonFly "${1}${chosen_path}" +} + function ventoy_unix_comm_proc { vt_unix_reset @@ -434,11 +453,12 @@ function ventoy_unix_comm_proc { if [ "$vt_unix_type" = "FreeBSD" ]; then ventoy_freebsd_proc "$1" "${chosen_path}" + elif [ "$vt_unix_type" = "DragonFly" ]; then + ventoy_dragonfly_proc "$1" "${chosen_path}" elif [ "$vt_unix_type" = "NetBSD" ]; then echo "NetBSD not supported" - else if [ -n "${vtdebug_flag}" ]; then echo "Unknown unix type" diff --git a/INSTALL/grub/i386-efi/moddep.lst b/INSTALL/grub/i386-efi/moddep.lst index 157a53d8..91501d7c 100644 --- a/INSTALL/grub/i386-efi/moddep.lst +++ b/INSTALL/grub/i386-efi/moddep.lst @@ -119,7 +119,7 @@ ehci: cs5536 usb boot crypto: part_bsd: part_msdos cs5536: -ventoy: ext2 fshelp font crypto gcry_md5 exfat udf extcmd normal video gcry_sha1 iso9660 +ventoy: ext2 fshelp btrfs font crypto gcry_md5 exfat udf extcmd normal video gcry_sha1 iso9660 gcry_sha512: crypto password: crypto normal fshelp: diff --git a/INSTALL/grub/i386-pc/core.img b/INSTALL/grub/i386-pc/core.img index 0a448a34..e5adec40 100644 Binary files a/INSTALL/grub/i386-pc/core.img and b/INSTALL/grub/i386-pc/core.img differ diff --git a/INSTALL/grub/i386-pc/moddep.lst b/INSTALL/grub/i386-pc/moddep.lst index a7a263c7..92444c3b 100644 --- a/INSTALL/grub/i386-pc/moddep.lst +++ b/INSTALL/grub/i386-pc/moddep.lst @@ -122,7 +122,7 @@ crypto: part_bsd: part_msdos cs5536: pci biosdisk: -ventoy: ext2 fshelp font crypto gcry_md5 exfat udf extcmd normal video gcry_sha1 iso9660 acpi +ventoy: ext2 fshelp btrfs font crypto gcry_md5 exfat udf extcmd normal video gcry_sha1 iso9660 acpi lsapm: gcry_sha512: crypto password: crypto normal diff --git a/INSTALL/grub/x86_64-efi/moddep.lst b/INSTALL/grub/x86_64-efi/moddep.lst index ddff8c42..6c76a7ab 100644 --- a/INSTALL/grub/x86_64-efi/moddep.lst +++ b/INSTALL/grub/x86_64-efi/moddep.lst @@ -119,7 +119,7 @@ ehci: cs5536 usb boot crypto: part_bsd: part_msdos cs5536: -ventoy: ext2 fshelp font crypto gcry_md5 exfat udf extcmd normal video gcry_sha1 iso9660 +ventoy: ext2 fshelp btrfs font crypto gcry_md5 exfat udf extcmd normal video gcry_sha1 iso9660 gcry_sha512: crypto password: crypto normal fshelp: diff --git a/INSTALL/ventoy/ventoy.cpio b/INSTALL/ventoy/ventoy.cpio index 29d155a7..ec4f6f36 100644 Binary files a/INSTALL/ventoy/ventoy.cpio and b/INSTALL/ventoy/ventoy.cpio differ diff --git a/INSTALL/ventoy/vtloopex.cpio b/INSTALL/ventoy/vtloopex.cpio index 7f96a4cc..393759d6 100644 Binary files a/INSTALL/ventoy/vtloopex.cpio and b/INSTALL/ventoy/vtloopex.cpio differ diff --git a/License/license-mini_gzip.txt b/License/license-mini_gzip.txt new file mode 100644 index 00000000..296be622 --- /dev/null +++ b/License/license-mini_gzip.txt @@ -0,0 +1,13 @@ + +https://github.com/wkoszek/mini_gzip + +Ventoy modify its source code, these code modified by Ventoy follow the same license as mini_gzip. + +=====================================License================================================= +Copyright (c) 2015, Wojciech Adam Koszek wojciech@koszek.com All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/README.md b/README.md index b6b36e6d..9f494e38 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ You can copy many image files at a time and ventoy will give you a boot menu to x86 Legacy BIOS, IA32 UEFI, x86_64 UEFI and ARM64 UEFI are supported in the same way.
Both MBR and GPT partition style are supported in the same way.
Most type of OS supported(Windows/WinPE/Linux/Unix/Vmware/Xen...)
-580+ ISO files are tested. 90%+ distros in distrowatch.com supported.
+600+ ISO files are tested. 90%+ distros in distrowatch.com supported.
# Features @@ -34,7 +34,7 @@ Most type of OS supported(Windows/WinPE/Linux/Unix/Vmware/Xen...)
* FAT32/exFAT/NTFS/UDF/XFS/Ext2(3)(4) supported for main partition * ISO files larger than 4GB supported * Native boot menu style for Legacy & UEFI -* Most type of OS supported, 580+ iso files tested +* Most type of OS supported, 600+ iso files tested * Linux vDisk boot supported * Not only boot but also complete installation process * Menu dynamically switchable between List/TreeView mode diff --git a/VtoyTool/vtoydump.c b/VtoyTool/vtoydump.c index ff3a4d26..21da911c 100644 --- a/VtoyTool/vtoydump.c +++ b/VtoyTool/vtoydump.c @@ -484,8 +484,7 @@ static int vtoy_check_device(ventoy_os_param *param, const char *device) debug("param->vtoy_disk_size=%llu size=%llu\n", (unsigned long long)param->vtoy_disk_size, (unsigned long long)size); - if ((param->vtoy_disk_size == size || param->vtoy_disk_size == size + 512) && - memcmp(vtguid, param->vtoy_disk_guid, 16) == 0 && + if (memcmp(vtguid, param->vtoy_disk_guid, 16) == 0 && memcmp(vtsig, param->vtoy_disk_signature, 4) == 0) { debug("<%s> is right ventoy disk\n", device); @@ -563,8 +562,20 @@ int vtoydump_main(int argc, char **argv) rc = vtoy_os_param_from_file(filename, param); if (rc) { - debug("ventoy os param not found %d\n", rc); - goto end; + debug("ventoy os param not found %d %d\n", rc, ENOENT); + if (ENOENT == rc) + { + debug("now try with file %s\n", "/ventoy/ventoy_os_param"); + rc = vtoy_os_param_from_file("/ventoy/ventoy_os_param", param); + if (rc) + { + goto end; + } + } + else + { + goto end; + } } if (verbose) diff --git a/VtoyTool/vtoytool/00/vtoytool_32 b/VtoyTool/vtoytool/00/vtoytool_32 index cfed7c87..621262f2 100644 Binary files a/VtoyTool/vtoytool/00/vtoytool_32 and b/VtoyTool/vtoytool/00/vtoytool_32 differ diff --git a/VtoyTool/vtoytool/00/vtoytool_64 b/VtoyTool/vtoytool/00/vtoytool_64 index 08b73dee..e9bd188f 100644 Binary files a/VtoyTool/vtoytool/00/vtoytool_64 and b/VtoyTool/vtoytool/00/vtoytool_64 differ diff --git a/VtoyTool/vtoytool/00/vtoytool_aa64 b/VtoyTool/vtoytool/00/vtoytool_aa64 index 4208a561..0799f3cb 100644 Binary files a/VtoyTool/vtoytool/00/vtoytool_aa64 and b/VtoyTool/vtoytool/00/vtoytool_aa64 differ