Compare commits

..

33 Commits

Author SHA1 Message Date
longpanda
430f81ac49 cc 2023-06-23 23:07:21 +08:00
longpanda
038c0533d9 1.0.92 release 2023-06-23 21:29:51 +08:00
lollilol
102b179cd9 change password input field to type=password (#2427) 2023-06-23 16:28:38 +08:00
Kosta Stojiljkovic
6785f5d049 Added Serbian translation for STR_4KN_UNSUPPORTED strings for cyrilic and latin scripts. (#2406) 2023-06-23 16:27:11 +08:00
William Poetra Yoga
0c812ed5e9 fix: grep warning (#2398) 2023-06-23 16:26:55 +08:00
Blaž Osredkar
9f2b9b0867 Added Slovenian language (#2378) 2023-06-23 16:26:19 +08:00
wiz64
c79b072680 Update languages.json (viva l' ventoy) (#2372) 2023-06-23 16:25:39 +08:00
Nikolas Garofil
6b4509a550 Environment typos (#2368) 2023-06-23 16:24:36 +08:00
longpanda
feea11e2bb Support unattended auto install for Deepin/UOS 2023-05-29 00:11:21 +08:00
A1ive
35c952d891 Correct EFI chainloader image device path (#2397) 2023-05-19 23:23:14 +08:00
Dolphin Oracle
82053680bf Update ventoy-hook.sh for MX Linux (#2390)
due to a systemd issue, we had to rename initrd-release to initrd_release.
2023-05-15 12:30:03 +08:00
longpanda
6d5de12f52 Merge branch 'master' of https://github.com/ventoy/Ventoy 2023-04-21 20:05:40 +08:00
longpanda
84b2ee7ee3 Fix the boot issue for Fedora/CentOS when file name contains special character (e.g. '(' ) #2360 2023-04-21 20:05:30 +08:00
K.B.Dharun Krishna
da1b306e81 ci.yml: bump actions to v3 to fix node warning (#2341) 2023-04-13 19:25:31 +08:00
longpanda
0961ce5624 1.0.91 release 2023-04-05 20:41:34 +08:00
longpanda
07574f0379 Improve grub2 mode process for legacy BIOS mode. 2023-04-05 20:16:36 +08:00
Steve
142aa47944 fixed german translation (#2318)
* Updated german translation

#2277 has an small issue (misstyping; "nocht" should read "noch")
Changed the translation. It is minimally shorter.

* fixed german translation
2023-04-04 13:54:49 +08:00
longpanda
11739fa9d0 Fix a bug that Fedora boot error if Ventoy partition is NTFS. (#2333) 2023-04-03 21:49:21 +08:00
longpanda
9fc85051a7 Fix the issue for booting Bliss OS 15.x 2023-04-03 09:18:13 +08:00
longpanda
b9e82bcf16 Support FreeBSD 14-CURRENT 2023-04-02 13:17:20 +08:00
longpanda
cff3a01289 Support NTFS with large cluster size (greater than 64KB). 2023-03-28 11:38:46 +08:00
longpanda
0f90149c4e 1.0.90 release 2023-03-26 19:01:13 +08:00
longpanda
8ef9732931 Update vtoytool 2023-03-26 16:03:32 +08:00
longpanda
b32eda4262 Fix the VTOY_LINUX_REMOUNT option for new linux kernel in intel 11th(and later) gen CPU. 2023-03-26 10:45:19 +08:00
longpanda
e743f7c15f Add support for chimera linux. (#2309) 2023-03-24 20:43:47 +08:00
longpanda
652475f1ef Optimization for Fedora boot process 2023-03-24 10:37:24 +08:00
longpanda
abfc2a6343 Add checksum jif 2023-03-21 15:44:54 +08:00
longpanda
e73ac04cb6 update README.md 2023-03-20 17:15:36 +08:00
StoyanDimitrov
8727e63880 Update languages.json (#2299) 2023-03-17 17:39:57 +08:00
VenusGirl❤
2d281d7dee Update ko_KR.json (#2286)
Korean Update
2023-03-17 17:39:21 +08:00
Steve
385c806adf Updated german translation (#2279)
#2277 has an small issue (misstyping; "nocht" should read "noch")
Changed the translation. It is minimally shorter.
2023-03-17 17:39:02 +08:00
longpanda
e869bc2386 Fix the issue that Fedora Rawhide install media not detected. (#2283) 2023-03-10 22:33:53 +08:00
longpanda
b47aa1abc7 Support LibreELEC 11.0+ (#2281) 2023-03-09 23:59:12 +08:00
48 changed files with 1164 additions and 212 deletions

View File

@@ -21,7 +21,7 @@ body:
attributes: attributes:
label: Ventoy Version label: Ventoy Version
description: What version of ventoy are you running? description: What version of ventoy are you running?
placeholder: 1.0.87 placeholder: 1.0.91
validations: validations:
required: true required: true
- type: dropdown - type: dropdown

View File

@@ -12,26 +12,26 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Run docker-compose up - name: Run docker-compose up
run: docker-compose up run: docker-compose up
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v3
with: with:
name: ventoy-windows name: ventoy-windows
path: INSTALL/ventoy-*windows* path: INSTALL/ventoy-*windows*
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v3
with: with:
name: ventoy-linux name: ventoy-linux
path: INSTALL/ventoy-*linux* path: INSTALL/ventoy-*linux*
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v3
with: with:
name: ventoy-livecd name: ventoy-livecd
path: INSTALL/ventoy-*livecd* path: INSTALL/ventoy-*livecd*
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v3
with: with:
name: SHA256SUM name: SHA256SUM
path: INSTALL/sha256.txt path: INSTALL/sha256.txt
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v3
with: with:
name: xxx-build-log name: xxx-build-log
path: DOC/build.log path: DOC/build.log

7
DMPATCH/Makefile_IBT Normal file
View File

@@ -0,0 +1,7 @@
obj-m += dm_patch_ibt.o
EXTRA_CFLAGS := -Wall -DVTOY_IBT -fcf-protection=branch -mindirect-branch-register
dm_patch_ibt-objs := dmpatch.o

View File

@@ -52,7 +52,8 @@ typedef struct ko_param
unsigned long sym_put_addr; unsigned long sym_put_addr;
unsigned long sym_put_size; unsigned long sym_put_size;
unsigned long kv_major; unsigned long kv_major;
unsigned long padding[2]; unsigned long ibt;
unsigned long padding[1];
}ko_param; }ko_param;
#pragma pack() #pragma pack()
@@ -91,6 +92,52 @@ static volatile ko_param g_ko_param =
#error "unsupported arch" #error "unsupported arch"
#endif #endif
#ifdef VTOY_IBT
#ifdef CONFIG_X86_64
/* Using 64-bit values saves one instruction clearing the high half of low */
#define DECLARE_ARGS(val, low, high) unsigned long low, high
#define EAX_EDX_VAL(val, low, high) ((low) | (high) << 32)
#define EAX_EDX_RET(val, low, high) "=a" (low), "=d" (high)
#else
#define DECLARE_ARGS(val, low, high) unsigned long long val
#define EAX_EDX_VAL(val, low, high) (val)
#define EAX_EDX_RET(val, low, high) "=A" (val)
#endif
#define EX_TYPE_WRMSR 8
#define EX_TYPE_RDMSR 9
#define MSR_IA32_S_CET 0x000006a2 /* kernel mode cet */
#define CET_ENDBR_EN (1ULL << 2)
/* Exception table entry */
#ifdef __ASSEMBLY__
#define _ASM_EXTABLE_TYPE(from, to, type) \
.pushsection "__ex_table","a" ; \
.balign 4 ; \
.long (from) - . ; \
.long (to) - . ; \
.long type ; \
.popsection
#else /* ! __ASSEMBLY__ */
#define _ASM_EXTABLE_TYPE(from, to, type) \
" .pushsection \"__ex_table\",\"a\"\n" \
" .balign 4\n" \
" .long (" #from ") - .\n" \
" .long (" #to ") - .\n" \
" .long " __stringify(type) " \n" \
" .popsection\n"
#endif /* __ASSEMBLY__ */
#endif /* VTOY_IBT */
#define vdebug(fmt, args...) if(kprintf) kprintf(KERN_ERR fmt, ##args) #define vdebug(fmt, args...) if(kprintf) kprintf(KERN_ERR fmt, ##args)
static unsigned char *g_get_patch[MAX_PATCH] = { NULL }; static unsigned char *g_get_patch[MAX_PATCH] = { NULL };
@@ -166,11 +213,66 @@ static int notrace dmpatch_replace_code
return 0; return 0;
} }
#ifdef VTOY_IBT
static __always_inline unsigned long long dmpatch_rdmsr(unsigned int msr)
{
DECLARE_ARGS(val, low, high);
asm volatile("1: rdmsr\n"
"2:\n"
_ASM_EXTABLE_TYPE(1b, 2b, EX_TYPE_RDMSR)
: EAX_EDX_RET(val, low, high) : "c" (msr));
return EAX_EDX_VAL(val, low, high);
}
static __always_inline void dmpatch_wrmsr(unsigned int msr, u32 low, u32 high)
{
asm volatile("1: wrmsr\n"
"2:\n"
_ASM_EXTABLE_TYPE(1b, 2b, EX_TYPE_WRMSR)
: : "c" (msr), "a"(low), "d" (high) : "memory");
}
static u64 dmpatch_ibt_save(void)
{
u64 msr = 0;
u64 val = 0;
msr = dmpatch_rdmsr(MSR_IA32_S_CET);
val = msr & ~CET_ENDBR_EN;
dmpatch_wrmsr(MSR_IA32_S_CET, (u32)(val & 0xffffffffULL), (u32)(val >> 32));
return msr;
}
static void dmpatch_ibt_restore(u64 save)
{
u64 msr;
msr = dmpatch_rdmsr(MSR_IA32_S_CET);
msr &= ~CET_ENDBR_EN;
msr |= (save & CET_ENDBR_EN);
dmpatch_wrmsr(MSR_IA32_S_CET, (u32)(msr & 0xffffffffULL), (u32)(msr >> 32));
}
#else
static u64 dmpatch_ibt_save(void) { return 0; }
static void dmpatch_ibt_restore(u64 save) { (void)save; }
#endif
static int notrace dmpatch_init(void) static int notrace dmpatch_init(void)
{ {
int r = 0; int r = 0;
int rc = 0; int rc = 0;
u64 msr = 0;
if (g_ko_param.ibt == 0x8888)
{
msr = dmpatch_ibt_save();
}
kprintf = (printk_pf)(g_ko_param.printk_addr); kprintf = (printk_pf)(g_ko_param.printk_addr);
vdebug("dmpatch_init start pagesize=%lu ...\n", g_ko_param.pgsize); vdebug("dmpatch_init start pagesize=%lu ...\n", g_ko_param.pgsize);
@@ -218,6 +320,11 @@ static int notrace dmpatch_init(void)
vdebug("######## dm patch success ###########\n"); vdebug("######## dm patch success ###########\n");
vdebug("#####################################\n"); vdebug("#####################################\n");
if (g_ko_param.ibt == 0x8888)
{
dmpatch_ibt_restore(msr);
}
out: out:
return rc; return rc;
@@ -226,6 +333,12 @@ out:
static void notrace dmpatch_exit(void) static void notrace dmpatch_exit(void)
{ {
int i = 0; int i = 0;
u64 msr;
if (g_ko_param.ibt == 0x8888)
{
msr = dmpatch_ibt_save();
}
for (i = 0; i < MAX_PATCH; i++) for (i = 0; i < MAX_PATCH; i++)
{ {
@@ -234,6 +347,11 @@ static void notrace dmpatch_exit(void)
} }
vdebug("dmpatch_exit success\n"); vdebug("dmpatch_exit success\n");
if (g_ko_param.ibt == 0x8888)
{
dmpatch_ibt_restore(msr);
}
} }
module_init(dmpatch_init); module_init(dmpatch_init);

65
DMPATCH/ubuntu_build.sh Normal file
View File

@@ -0,0 +1,65 @@
#!/bin/bash
FTPIP=168.0.0.209
FTPUSR='a:a'
rm -f dmpatch.c Makefile Makefile_IBT
for f in dmpatch.c Makefile Makefile_IBT; do
curl -s -u $FTPUSR ftp://$FTPIP/$f -o $f
if [ -f $f ]; then
echo "download $f OK ..."
else
echo "download $f FAILED ..."
exit 1
fi
done
rm -f *.ko
echo "build dm_patch.ko ..."
rm -rf ./aa
mkdir ./aa
cp -a *.c aa/
cp -a Makefile aa/
cd /home/panda/linux-source-5.13.0
make modules M=/home/panda/build/aa/
strip --strip-debug /home/panda/build/aa/dm_patch.ko
cd -
cp -a aa/dm_patch.ko ./
echo "build dm_patch_ibt.ko ..."
rm -rf ./aa
mkdir ./aa
cp -a *.c aa/
cp -a Makefile_IBT aa/Makefile
cd /home/panda/linux-source-5.13.0
make modules M=/home/panda/build/aa/
strip --strip-debug /home/panda/build/aa/dm_patch_ibt.ko
cd -
cp -a aa/dm_patch_ibt.ko ./
rm -rf ./aa
curl -s -T dm_patch.ko -u $FTPUSR ftp://$FTPIP/dm_patch_64.ko || exit 1
curl -s -T dm_patch_ibt.ko -u $FTPUSR ftp://$FTPIP/dm_patch_ibt_64.ko || exit 1
if [ -f ./dm_patch.ko -a -f ./dm_patch_ibt.ko ]; then
echo -e "\n\n=============== SUCCESS =============\n\n"
else
echo -e "\n\n=============== FAILED ==============\n\n"
fi

View File

@@ -5,7 +5,7 @@ use an old version of dmsetup
http://vault.centos.org/5.3/os/SRPMS/device-mapper-1.02.28-2.el5.src.rpm http://vault.centos.org/5.3/os/SRPMS/device-mapper-1.02.28-2.el5.src.rpm
https://www.fefe.de/dietlibc/dietlibc-0.34.tar.xz https://www.fefe.de/dietlibc/dietlibc-0.34.tar.xz
======== Build Envrioment ======== ======== Build Environment ========
build for 32bit, static linked with dietlibc build for 32bit, static linked with dietlibc
1. install centos 6.10 i386 with CentOS-6.10-i386-bin-DVD1.iso 1. install centos 6.10 i386 with CentOS-6.10-i386-bin-DVD1.iso
2. yum install gcc kernel-devel package 2. yum install gcc kernel-devel package

View File

@@ -1,8 +1,8 @@
========================================== ==========================================
1. Compile Enviroment 1. Compile Environment
========================================== ==========================================
My build envrioment is CentOS 7.8 x86_64. So here I first explain how to create the build environment from scratch. My build environment is CentOS 7.8 x86_64. So here I first explain how to create the build environment from scratch.
Because Ventoy is based on many open source projects, so the environment is important. I suggest you test it on a virtual machine firstly. Because Ventoy is based on many open source projects, so the environment is important. I suggest you test it on a virtual machine firstly.
1.1 Install CentOS 7.8 1.1 Install CentOS 7.8
@@ -54,7 +54,7 @@
mv /opt/output /opt/mips64el-linux-musl-gcc730 mv /opt/output /opt/mips64el-linux-musl-gcc730
2.4 Set PATH envrioment 2.4 Set PATH environment
export PATH=$PATH:/opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin:/opt/aarch64--uclibc--stable-2020.08-1/bin:/opt/mips64el-linux-musl-gcc730/bin export PATH=$PATH:/opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin:/opt/aarch64--uclibc--stable-2020.08-1/bin:/opt/mips64el-linux-musl-gcc730/bin
better to add this line to /root/.bashrc and relogin as root better to add this line to /root/.bashrc and relogin as root

View File

@@ -1533,7 +1533,7 @@ module = {
name = squash4; name = squash4;
common = fs/squash4.c; common = fs/squash4.c;
cflags = '$(CFLAGS_POSIX) -Wno-undef'; cflags = '$(CFLAGS_POSIX) -Wno-undef';
cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed -I$(srcdir)/lib/minilzo -DMINILZO_HAVE_CONFIG_H'; cppflags = '-I$(srcdir)/lib/posix_wrap -I$(srcdir)/lib/xzembed -I$(srcdir)/lib/minilzo -I$(srcdir)/lib/zstd -DMINILZO_HAVE_CONFIG_H';
}; };
module = { module = {

View File

@@ -889,6 +889,7 @@ grub_ntfs_mount (grub_disk_t disk)
struct grub_ntfs_bpb bpb; struct grub_ntfs_bpb bpb;
struct grub_ntfs_data *data = 0; struct grub_ntfs_data *data = 0;
grub_uint32_t spc; grub_uint32_t spc;
grub_uint32_t sectors_per_cluster;
if (!disk) if (!disk)
goto fail; goto fail;
@@ -903,14 +904,18 @@ grub_ntfs_mount (grub_disk_t disk)
if (grub_disk_read (disk, 0, 0, sizeof (bpb), &bpb)) if (grub_disk_read (disk, 0, 0, sizeof (bpb), &bpb))
goto fail; goto fail;
sectors_per_cluster = bpb.sectors_per_cluster;
if (sectors_per_cluster > 0x80)
sectors_per_cluster = 1U << (256U - bpb.sectors_per_cluster);
if (grub_memcmp ((char *) &bpb.oem_name, "NTFS", 4) != 0 if (grub_memcmp ((char *) &bpb.oem_name, "NTFS", 4) != 0
|| bpb.sectors_per_cluster == 0 || sectors_per_cluster == 0
|| (bpb.sectors_per_cluster & (bpb.sectors_per_cluster - 1)) != 0 || (sectors_per_cluster & (sectors_per_cluster - 1)) != 0
|| bpb.bytes_per_sector == 0 || bpb.bytes_per_sector == 0
|| (bpb.bytes_per_sector & (bpb.bytes_per_sector - 1)) != 0) || (bpb.bytes_per_sector & (bpb.bytes_per_sector - 1)) != 0)
goto fail; goto fail;
spc = (((grub_uint32_t) bpb.sectors_per_cluster spc = (((grub_uint32_t) sectors_per_cluster
* (grub_uint32_t) grub_le_to_cpu16 (bpb.bytes_per_sector)) * (grub_uint32_t) grub_le_to_cpu16 (bpb.bytes_per_sector))
>> GRUB_NTFS_BLK_SHR); >> GRUB_NTFS_BLK_SHR);
if (spc == 0) if (spc == 0)

View File

@@ -27,6 +27,7 @@
#include <grub/fshelp.h> #include <grub/fshelp.h>
#include <grub/deflate.h> #include <grub/deflate.h>
#include <minilzo.h> #include <minilzo.h>
#include <zstd.h>
#include "xz.h" #include "xz.h"
#include "xz_stream.h" #include "xz_stream.h"
@@ -184,6 +185,7 @@ enum
COMPRESSION_LZO = 3, COMPRESSION_LZO = 3,
COMPRESSION_XZ = 4, COMPRESSION_XZ = 4,
COMPRESSION_LZ4 = 5, COMPRESSION_LZ4 = 5,
COMPRESSION_ZSTD = 6,
}; };
@@ -398,6 +400,25 @@ static grub_ssize_t lz4_decompress_wrap(char *inbuf, grub_size_t insize, grub_of
return len; return len;
} }
static grub_ssize_t zstd_decompress_wrap(char *inbuf, grub_size_t insize, grub_off_t off,
char *outbuf, grub_size_t len, struct grub_squash_data *data)
{
char *udata = NULL;
int usize = data->blksz;
if (usize < 8192)
usize = 8192;
udata = grub_malloc (usize);
if (!udata)
return -1;
ZSTD_decompress(udata, usize, inbuf, insize);
grub_memcpy(outbuf, udata + off, len);
grub_free(udata);
return len;
}
static struct grub_squash_data * static struct grub_squash_data *
squash_mount (grub_disk_t disk) squash_mount (grub_disk_t disk)
{ {
@@ -447,6 +468,9 @@ squash_mount (grub_disk_t disk)
case grub_cpu_to_le16_compile_time (COMPRESSION_LZ4): case grub_cpu_to_le16_compile_time (COMPRESSION_LZ4):
data->decompress = lz4_decompress_wrap; data->decompress = lz4_decompress_wrap;
break; break;
case grub_cpu_to_le16_compile_time (COMPRESSION_ZSTD):
data->decompress = zstd_decompress_wrap;
break;
case grub_cpu_to_le16_compile_time (COMPRESSION_XZ): case grub_cpu_to_le16_compile_time (COMPRESSION_XZ):
data->decompress = xz_decompress; data->decompress = xz_decompress;
data->xzbuf = grub_malloc (XZBUFSIZ); data->xzbuf = grub_malloc (XZBUFSIZ);
@@ -519,7 +543,7 @@ grub_squash_iterate_dir (grub_fshelp_node_t dir,
break; break;
case grub_cpu_to_le16_compile_time (SQUASH_TYPE_LONG_DIR): case grub_cpu_to_le16_compile_time (SQUASH_TYPE_LONG_DIR):
off = grub_le_to_cpu16 (dir->ino.long_dir.offset); off = grub_le_to_cpu16 (dir->ino.long_dir.offset);
endoff = grub_le_to_cpu16 (dir->ino.long_dir.size) + off - 3; endoff = grub_le_to_cpu32 (dir->ino.long_dir.size) + off - 3;
chunk = grub_le_to_cpu32 (dir->ino.long_dir.chunk); chunk = grub_le_to_cpu32 (dir->ino.long_dir.chunk);
break; break;
default: default:

View File

@@ -229,10 +229,7 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
if (! file) if (! file)
goto fail; goto fail;
/* Get the root device's device path. */ dev = file->device;
dev = grub_device_open (0);
if (! dev)
goto fail;
if (dev->disk) if (dev->disk)
dev_handle = grub_efidisk_get_device_handle (dev->disk); dev_handle = grub_efidisk_get_device_handle (dev->disk);
@@ -257,16 +254,13 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
if (dev_handle) if (dev_handle)
dp = grub_efi_get_device_path (dev_handle); dp = grub_efi_get_device_path (dev_handle);
if (! dp) if (dp != NULL)
{ {
grub_error (GRUB_ERR_BAD_DEVICE, "not a valid root device"); file_path = make_file_path (dp, filename);
goto fail; if (! file_path)
goto fail;
} }
file_path = make_file_path (dp, filename);
if (! file_path)
goto fail;
//grub_printf ("file path: "); //grub_printf ("file path: ");
//grub_efi_print_device_path (file_path); //grub_efi_print_device_path (file_path);
@@ -390,16 +384,12 @@ grub_cmd_chainloader (grub_command_t cmd __attribute__ ((unused)),
} }
grub_file_close (file); grub_file_close (file);
grub_device_close (dev);
grub_loader_set (grub_chainloader_boot, grub_chainloader_unload, 0); grub_loader_set (grub_chainloader_boot, grub_chainloader_unload, 0);
return 0; return 0;
fail: fail:
if (dev)
grub_device_close (dev);
if (file) if (file)
grub_file_close (file); grub_file_close (file);

View File

@@ -88,6 +88,8 @@ static int ventoy_linux_argc = 0;
static char **ventoy_linux_args = NULL; static char **ventoy_linux_args = NULL;
static int ventoy_extra_initrd_num = 0; static int ventoy_extra_initrd_num = 0;
static char *ventoy_extra_initrd_list[256]; static char *ventoy_extra_initrd_list[256];
static grub_command_func_t ventoy_linux16_func = NULL;
static grub_command_func_t ventoy_initrd16_func = NULL;
static grub_err_t static grub_err_t
grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)), int argc, char *argv[]); grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)), int argc, char *argv[]);
@@ -667,54 +669,6 @@ static int ventoy_bootopt_hook(int argc, char *argv[])
return 0; return 0;
} }
static grub_err_t
grub_cmd_set_boot_opt (grub_command_t cmd __attribute__ ((unused)),
int argc, char *argv[])
{
int i;
const char *vtdebug;
for (i = 0; i < argc; i++)
{
ventoy_linux_args[ventoy_linux_argc + (LINUX_MAX_ARGC / 2) ] = grub_strdup(argv[i]);
ventoy_linux_argc++;
}
vtdebug = grub_env_get("vtdebug_flag");
if (vtdebug && vtdebug[0])
{
ventoy_debug = 1;
}
if (ventoy_debug) grub_printf("ventoy set boot opt %d\n", ventoy_linux_argc);
return 0;
}
static grub_err_t
grub_cmd_unset_boot_opt (grub_command_t cmd __attribute__ ((unused)),
int argc, char *argv[])
{
int i;
(void)argc;
(void)argv;
for (i = 0; i < LINUX_MAX_ARGC; i++)
{
if (ventoy_linux_args[i])
{
grub_free(ventoy_linux_args[i]);
}
}
ventoy_debug = 0;
ventoy_linux_argc = 0;
ventoy_initrd_called = 0;
grub_memset(ventoy_linux_args, 0, sizeof(char *) * LINUX_MAX_ARGC);
return 0;
}
static grub_err_t static grub_err_t
grub_cmd_extra_initrd_append (grub_command_t cmd __attribute__ ((unused)), grub_cmd_extra_initrd_append (grub_command_t cmd __attribute__ ((unused)),
int argc, char *argv[]) int argc, char *argv[])
@@ -1576,6 +1530,92 @@ ventoy_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
return grub_cmd_initrd(cmd, ventoy_extra_initrd_num, ventoy_extra_initrd_list); return grub_cmd_initrd(cmd, ventoy_extra_initrd_num, ventoy_extra_initrd_list);
} }
static grub_err_t
grub_cmd_set_boot_opt (grub_command_t cmd __attribute__ ((unused)),
int argc, char *argv[])
{
int i;
const char *vtdebug;
grub_command_t regcmd;
for (i = 0; i < argc; i++)
{
ventoy_linux_args[ventoy_linux_argc + (LINUX_MAX_ARGC / 2) ] = grub_strdup(argv[i]);
ventoy_linux_argc++;
}
vtdebug = grub_env_get("vtdebug_flag");
if (vtdebug && vtdebug[0])
{
ventoy_debug = 1;
}
if (ventoy_debug) grub_printf("ventoy set boot opt %d\n", ventoy_linux_argc);
ventoy_linux16_func = ventoy_initrd16_func = NULL;
regcmd = grub_command_find("linux16");
if (regcmd)
{
ventoy_linux16_func = regcmd->func;
regcmd->func = grub_cmd_linux;
}
regcmd = grub_command_find("initrd16");
if (regcmd)
{
ventoy_initrd16_func = regcmd->func;
regcmd->func = ventoy_cmd_initrd;
}
return 0;
}
static grub_err_t
grub_cmd_unset_boot_opt (grub_command_t cmd __attribute__ ((unused)),
int argc, char *argv[])
{
int i;
grub_command_t regcmd;
(void)argc;
(void)argv;
for (i = 0; i < LINUX_MAX_ARGC; i++)
{
if (ventoy_linux_args[i])
{
grub_free(ventoy_linux_args[i]);
}
}
ventoy_debug = 0;
ventoy_linux_argc = 0;
ventoy_initrd_called = 0;
grub_memset(ventoy_linux_args, 0, sizeof(char *) * LINUX_MAX_ARGC);
if (ventoy_linux16_func)
{
regcmd = grub_command_find("linux16");
if (regcmd)
{
regcmd->func = ventoy_linux16_func;
}
ventoy_linux16_func = NULL;
}
if (ventoy_initrd16_func)
{
regcmd = grub_command_find("initrd16");
if (regcmd)
{
regcmd->func = ventoy_initrd16_func;
}
ventoy_initrd16_func = NULL;
}
return 0;
}
static grub_command_t cmd_linux, cmd_initrd, cmd_linuxefi, cmd_initrdefi; static grub_command_t cmd_linux, cmd_initrd, cmd_linuxefi, cmd_initrdefi;
static grub_command_t cmd_set_bootopt, cmd_unset_bootopt, cmd_extra_initrd_append, cmd_extra_initrd_reset; static grub_command_t cmd_set_bootopt, cmd_unset_bootopt, cmd_extra_initrd_append, cmd_extra_initrd_reset;

BIN
ICON/filechecksum.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 KiB

View File

@@ -0,0 +1,32 @@
#!/ventoy/busybox/sh
#************************************************************************************
# Copyright (c) 2020, longpanda <admin@ventoy.net>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
#************************************************************************************
. /ventoy/hook/ventoy-hook-lib.sh
for i in 0 1 2 3 4 5 6 7 8 9; do
vtdiskname=$(get_ventoy_disk_name)
if [ "$vtdiskname" = "unknown" ]; then
vtlog "wait for disk ..."
$SLEEP 3
else
break
fi
done
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2"

View File

@@ -0,0 +1,22 @@
#!/ventoy/busybox/sh
#************************************************************************************
# Copyright (c) 2020, longpanda <admin@ventoy.net>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
#************************************************************************************
. $VTOY_PATH/hook/ventoy-os-lib.sh
$SED "/maybe_break *premount/a\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/chimera/disk_hook.sh" -i /init

View File

@@ -26,6 +26,10 @@ ventoy_get_debian_distro() {
if $EGREP -q "ID=.*antix|ID=.*mx" /etc/initrd-release; then if $EGREP -q "ID=.*antix|ID=.*mx" /etc/initrd-release; then
echo 'antix'; return echo 'antix'; return
fi fi
elif [ -e /etc/initrd_release ]; then
if $EGREP -q "ID=.*antix|ID=.*mx" /etc/initrd_release; then
echo 'antix'; return
fi
fi fi
if [ -e /DISTRO_SPECS ]; then if [ -e /DISTRO_SPECS ]; then

View File

@@ -0,0 +1,40 @@
#!/ventoy/busybox/sh
#************************************************************************************
# Copyright (c) 2020, longpanda <admin@ventoy.net>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
#************************************************************************************
. /ventoy/hook/ventoy-hook-lib.sh
vtlog "####### $0 $* ########"
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
wait_for_usb_disk_ready
vtdiskname=$(get_ventoy_disk_name)
if [ "$vtdiskname" = "unknown" ]; then
vtlog "ventoy disk not found"
PATH=$VTPATH_OLD
exit 0
fi
vtlog "${vtdiskname#/dev/}2 found..."
$BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/udev_disk_hook.sh "${vtdiskname#/dev/}2"
if [ -f /ventoy/autoinstall ]; then
sh /ventoy/hook/default/auto_install_varexp.sh /ventoy/autoinstall
fi

View File

@@ -0,0 +1,151 @@
#!/ventoy/busybox/sh
#************************************************************************************
# Copyright (c) 2020, longpanda <admin@ventoy.net>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
#************************************************************************************
. /ventoy/hook/ventoy-hook-lib.sh
ventoy_os_install_dmsetup() {
vtlog "ventoy_os_install_dmsetup $1 ..."
vt_usb_disk=$1
# dump iso file location
$VTOY_PATH/tool/vtoydm -i -f $VTOY_PATH/ventoy_image_map -d ${vt_usb_disk} > $VTOY_PATH/iso_file_list
# install dmsetup
LINE=$($GREP ' dmsetup.*\.udeb' $VTOY_PATH/iso_file_list)
if [ $? -eq 0 ]; then
install_udeb_from_line "$LINE" ${vt_usb_disk}
fi
# install libdevmapper
LINE=$($GREP ' libdevmapper.*\.udeb' $VTOY_PATH/iso_file_list)
if [ $? -eq 0 ]; then
install_udeb_from_line "$LINE" ${vt_usb_disk}
fi
# install md-modules
LINE=$($GREP -i ' md-modules.*\.udeb' $VTOY_PATH/iso_file_list)
if [ $? -eq 0 ]; then
LINTCNT=$($GREP -i -c ' md-modules.*\.udeb' $VTOY_PATH/iso_file_list)
if [ $LINTCNT -gt 1 ]; then
vtlog "more than one pkgs, need to filter..."
VER=$($BUSYBOX_PATH/uname -r)
LINE=$($GREP -i ' md-modules.*\.udeb' $VTOY_PATH/iso_file_list | $GREP -i $VER)
LINTCNT=$($GREP -i ' md-modules.*\.udeb' $VTOY_PATH/iso_file_list | $GREP -i -c $VER)
if [ $LINTCNT -gt 1 ]; then
vtlog "Still more than one pkgs, use the first one..."
LINE=$($GREP -i ' md-modules.*\.udeb' $VTOY_PATH/iso_file_list | $GREP -i -m1 $VER)
fi
fi
install_udeb_from_line "$LINE" ${vt_usb_disk}
fi
# insmod md-mod if needed
if $GREP -q 'device-mapper' /proc/devices; then
vtlog "device mapper module is loaded"
else
vtlog "device mapper module is NOT loaded, now load it..."
VER=$($BUSYBOX_PATH/uname -r)
KO=$($FIND /lib/modules/$VER/kernel/drivers/md -name "dm-mod*")
vtlog "KO=$KO"
insmod $KO
fi
vtlog "dmsetup install finish, now check it..."
if dmsetup info >> $VTLOG 2>&1; then
vtlog "dmsetup work ok"
else
vtlog "dmsetup not work, now try to load eglibc ..."
# install eglibc (some ubuntu 32 bit version need it)
LINE=$($GREP 'libc6-.*\.udeb' $VTOY_PATH/iso_file_list)
if [ $? -eq 0 ]; then
install_udeb_from_line "$LINE" ${vt_usb_disk}
fi
if dmsetup info >> $VTLOG 2>&1; then
vtlog "dmsetup work ok after retry"
else
vtlog "dmsetup still not work after retry"
fi
fi
}
if is_ventoy_hook_finished || not_ventoy_disk "${1:0:-1}"; then
exit 0
fi
vtlog "==== $0 $* ===="
dmsetup_path=$(ventoy_find_bin_path dmsetup)
if [ -z "$dmsetup_path" ]; then
ventoy_os_install_dmsetup "/dev/${1:0:-1}"
fi
if ! $GREP -q 'device-mapper' /proc/devices; then
ventoy_os_install_dmsetup "/dev/${1:0:-1}"
fi
ventoy_udev_disk_common_hook $*
#
# Some distro default only accept usb partitions as install medium.
# So if ventoy is installed on a non-USB device, we just mount /cdrom here except
# for these has boot=live or boot=casper parameter in cmdline
#
VT_BUS_USB=""
if [ -n "$ID_BUS" ]; then
if echo $ID_BUS | $GREP -q -i usb; then
VT_BUS_USB="YES"
fi
else
if $BUSYBOX_PATH/ls -l /sys/class/block/${1:0:-1} | $GREP -q -i usb; then
VT_BUS_USB="YES"
fi
fi
if [ -n "$VT_BUS_USB" ]; then
vtlog "$1 is USB device"
echo /dev/$1 > /ventoy/list-devices-usb-part
else
vtlog "$1 is NOT USB device (bus $ID_BUS)"
if $EGREP -q 'boot=|casper' /proc/cmdline; then
vtlog "boot=, or casper, don't mount"
else
vtlog "No boot param, need to mount"
echo /dev/$1 > /ventoy/list-devices-usb-part
fi
fi
#special process for Linx
if $BUSYBOX_PATH/uname -r | $GREP -q "^2\.6"; then
if $GREP -q "linx" /proc/version; then
blkdev_num=$($VTOY_PATH/tool/dmsetup ls | $GREP ventoy | $SED 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1:\2/')
vtDM=$(ventoy_find_dm_id ${blkdev_num})
echo "/dev/$vtDM" > /ventoy/list-devices-usb-part
fi
fi
# OK finish
set_ventoy_hook_finish

View File

@@ -0,0 +1,42 @@
#!/ventoy/busybox/sh
#************************************************************************************
# Copyright (c) 2020, longpanda <admin@ventoy.net>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
#************************************************************************************
if [ -e /init ] && $GREP -q '^mountroot$' /init; then
echo "Here before mountroot ..." >> $VTLOG
$SED "/^mountroot$/i\\$BUSYBOX_PATH/sh $VTOY_PATH/hook/deepin/disk_mount_hook.sh" -i /init
$SED "/^mountroot$/i\\export LIVEMEDIA=/dev/mapper/ventoy" -i /init
$SED "/^mountroot$/i\\export LIVE_MEDIA=/dev/mapper/ventoy" -i /init
if $GREP -q 'live-media=' /proc/cmdline; then
if [ -f /scripts/casper ] && $GREP -q '^ *LIVEMEDIA=' /scripts/casper; then
$SED "s#^ *LIVEMEDIA=.*#LIVEMEDIA=/dev/mapper/ventoy#" -i /scripts/casper
fi
fi
else
echo "Here use udev hook ..." >> $VTLOG
ventoy_systemd_udevd_work_around
ventoy_add_udev_rule "$VTOY_PATH/hook/deepin/udev_disk_hook.sh %k"
fi
if [ -f $VTOY_PATH/autoinstall ]; then
echo "Do auto install ..." >> $VTLOG
$SED '/maybe_break[[:space:]]*init/i\/ventoy/busybox/sh /ventoy/hook/deepin/ventoy_autoinstall.sh >>/ventoy/autoinstall.log 2>&1' -i /init
fi

View File

@@ -0,0 +1,122 @@
#!/ventoy/busybox/sh
. /ventoy/hook/ventoy_hook_lib.sh
change_var_value() {
local vfile=$1
local vkey=$2
local vVal=$3
local quote=$4
local vline
if [ $quote -eq 0 ]; then
vline="$vkey = $vVal"
else
vline="$vkey = \"$vVal\""
fi
if grep -q -m1 "^$vkey[[:space:]]*=" $vfile; then
sed "s#^$vkey[[:space:]]*=.*#$vline#g" -i $vfile
else
echo "$vline" >> $vfile
fi
}
setting_script_process() {
local sfile=$1
local vItem
local vB64Item
vItem=$(grep '^language[[:space:]]*=' /ventoy/autoinstall | awk '{print $3}')
if [ -n "$vItem" ]; then
change_var_value $sfile 'select_language_default_locale' "$vItem" 0
fi
vItem=$(grep '^timezone[[:space:]]*=' /ventoy/autoinstall | awk '{print $3}')
if [ -n "$vItem" ]; then
change_var_value $sfile 'timezone_default' "$vItem" 0
fi
vItem=$(grep '^hostname[[:space:]]*=' /ventoy/autoinstall | awk '{print $3}')
if [ -n "$vItem" ]; then
change_var_value $sfile 'system_info_default_hostname' "$vItem" 1
change_var_value $sfile 'DI_HOSTNAME' "$vItem" 1
fi
vItem=$(grep '^root_password[[:space:]]*=' /ventoy/autoinstall | awk '{print $3}')
if [ -n "$vItem" ]; then
vB64Item=$(echo -n "$vItem" | base64)
change_var_value $sfile 'system_info_default_root_password' "$vB64Item" 1
change_var_value $sfile 'DI_ROOTPASSWORD' "$vB64Item" 1
fi
vItem=$(grep '^default_username[[:space:]]*=' /ventoy/autoinstall | awk '{print $3}')
if [ -n "$vItem" ]; then
change_var_value $sfile 'system_info_default_username' "$vItem" 1
change_var_value $sfile 'DI_USERNAME' "$vItem" 1
fi
vItem=$(grep '^default_password[[:space:]]*=' /ventoy/autoinstall | awk '{print $3}')
if [ -n "$vItem" ]; then
change_var_value $sfile 'system_info_default_password' "$vItem" 1
change_var_value $sfile 'DI_PASSWORD' "$vItem" 1
fi
vItem=$(grep '^install_disk[[:space:]]*=' /ventoy/autoinstall | awk '{print $3}')
if [ -n "$vItem" ]; then
echo "DI_FULLDISK_MULTIDISK_DEVICE = $vItem" >> $sfile
echo "DI_ROOTDISK = $vItem" >> $sfile
echo "DI_BOOTLOADER = $vItem" >> $sfile
fi
change_var_value $sfile 'skip_virtual_machine_page' 'true' 0
change_var_value $sfile 'skip_select_language_page' 'true' 0
change_var_value $sfile 'skip_select_language_page_on_first_boot' 'true' 0
change_var_value $sfile 'skip_system_keyboard_page' 'true' 0
change_var_value $sfile 'skip_system_info_page' 'true' 0
change_var_value $sfile 'skip_qr_code_system_info_page' 'true' 0
change_var_value $sfile 'skip_timezone_page' 'true' 0
change_var_value $sfile 'skip_partition_page' 'true' 0
change_var_value $sfile 'system_info_password_validate_required' '0' 0
change_var_value $sfile 'system_info_password_strong_check' 'false' 0
change_var_value $sfile 'partition_do_auto_part' 'true' 0
change_var_value $sfile 'system_info_disable_license' 'true' 0
change_var_value $sfile 'system_info_disable_experience' 'true' 0
change_var_value $sfile 'system_info_disable_privacy_license' 'true' 0
#filesystem.squashfs search ini
#first_page_state=0表示不跳过首页展示首页让用户自己选择
#first_page_state=1表示跳过首页并且自动点击一键安装
#first_page_state=2表示跳过首页并且自动点击自定义安装
#first_page_state=3表示跳过首页并且直接以全盘安装方式自动安装
change_var_value $sfile 'first_page_state' '3' 0
}
update_settings() {
local script=$1
local newscript
echo "update_settings for $script ..."
newscript=$(basename $script)
cp -a $script /ventoy/vini_${newscript}
setting_script_process /ventoy/vini_${newscript}
rm -f $script
cp -a /ventoy/vini_${newscript} $script
}
sh /ventoy/hook/common/auto_install_varexp.sh /ventoy/autoinstall
update_settings /root/usr/share/deepin-installer/resources/default_settings.ini
ls -1 /root/usr/share/deepin-installer/resources/override/ | while read line; do
update_settings /root/usr/share/deepin-installer/resources/override/$line
done
ls -1 /root/usr/share/deepin-installer/resources/oem/ | while read line; do
update_settings /root/usr/share/deepin-installer/resources/oem/$line
done

View File

@@ -24,6 +24,7 @@
if [ -f $VTOY_PATH/autoinstall ]; then if [ -f $VTOY_PATH/autoinstall ]; then
VTKS="inst.ks=file:$VTOY_PATH/autoinstall" VTKS="inst.ks=file:$VTOY_PATH/autoinstall"
cp -a $VTOY_PATH/hook/rhel7/ventoy-autoexp.sh /lib/dracut/hooks/pre-mount/99-ventoy-autoexp.sh
else else
for vtParam in $($CAT /proc/cmdline); do for vtParam in $($CAT /proc/cmdline); do
if echo $vtParam | $GREP -q 'ks=file:/'; then if echo $vtParam | $GREP -q 'ks=file:/'; then
@@ -90,23 +91,7 @@ if ls $VTOY_PATH | $GREP -q 'ventoy_dud[0-9]'; then
fi fi
echo "vtInstDD=$vtInstDD" >> $VTLOG echo "vtInstDD=$vtInstDD" >> $VTLOG
if $GREP -q 'root=live' /proc/cmdline; then
$SED "s#printf\(.*\)\$CMDLINE#printf\1\$CMDLINE root=live:/dev/ventoy $VTKS $VTOVERLAY $vtInstDD#" -i /lib/dracut-lib.sh
else
$SED "s#printf\(.*\)\$CMDLINE#printf\1\$CMDLINE inst.stage2=hd:/dev/ventoy $VTKS $VTOVERLAY $vtInstDD#" -i /lib/dracut-lib.sh
fi
ventoy_set_inotify_script rhel7/ventoy-inotifyd-hook.sh
#Fedora
if $BUSYBOX_PATH/which dmsquash-live-root > /dev/null; then
vtPriority=99
else
vtPriority=01
fi
$BUSYBOX_PATH/cp -a $VTOY_PATH/hook/rhel7/ventoy-inotifyd-start.sh /lib/dracut/hooks/pre-udev/${vtPriority}-ventoy-inotifyd-start.sh
$BUSYBOX_PATH/cp -a $VTOY_PATH/hook/rhel7/ventoy-timeout.sh /lib/dracut/hooks/initqueue/timeout/${vtPriority}-ventoy-timeout.sh
vtNeedRepo= vtNeedRepo=
if [ -f /etc/system-release ]; then if [ -f /etc/system-release ]; then
@@ -125,12 +110,61 @@ if $GREP -i -q Fedora /proc/version; then
fi fi
fi fi
if $GREP -i -q Fedora /etc/os-release; then
if $GREP -q 'Server Edition' /etc/os-release; then
vtNeedRepo="yes"
fi
fi
echo "vtNeedRepo=$vtNeedRepo" >> $VTLOG echo "vtNeedRepo=$vtNeedRepo" >> $VTLOG
if [ "$vtNeedRepo" = "yes" ]; then if [ "$vtNeedRepo" = "yes" ]; then
$BUSYBOX_PATH/cp -a $VTOY_PATH/hook/rhel7/ventoy-repo.sh /lib/dracut/hooks/pre-pivot/99-ventoy-repo.sh $BUSYBOX_PATH/cp -a $VTOY_PATH/hook/rhel7/ventoy-repo.sh /lib/dracut/hooks/pre-pivot/99-ventoy-repo.sh
fi fi
#iso-scan (currently only for Fedora)
if $GREP -q Fedora /etc/os-release; then
if /ventoy/tool/vtoydump -a /ventoy/ventoy_os_param; then
if ventoy_iso_scan_check; then
echo "iso_scan process ..." >> $VTLOG
vtIsoPath=$(/ventoy/tool/vtoydump -p /ventoy/ventoy_os_param)
VTISO_SCAN="iso-scan/filename=$vtIsoPath"
echo -n $vtIsoPath > /ventoy/vtoy_iso_scan
$SED "s#printf\(.*\)\$CMDLINE#printf\1\$CMDLINE $VTISO_SCAN $VTKS $VTOVERLAY $vtInstDD#" -i /lib/dracut-lib.sh
if [ "$VTOY_LINUX_REMOUNT" = "01" -a "$vtNeedRepo" != "yes" ]; then
ventoy_rw_iso_scan
fi
exit 0
fi
fi
fi
echo "common process ..." >> $VTLOG
if $GREP -q 'root=live' /proc/cmdline; then
$SED "s#printf\(.*\)\$CMDLINE#printf\1\$CMDLINE root=live:/dev/ventoy $VTKS $VTOVERLAY $VTISO_SCAN $vtInstDD#" -i /lib/dracut-lib.sh
else
$SED "s#printf\(.*\)\$CMDLINE#printf\1\$CMDLINE inst.stage2=hd:/dev/ventoy $VTKS $VTOVERLAY $VTISO_SCAN $vtInstDD#" -i /lib/dracut-lib.sh
fi
ventoy_set_inotify_script rhel7/ventoy-inotifyd-hook.sh
#Fedora
if $BUSYBOX_PATH/which dmsquash-live-root > /dev/null; then
vtPriority=99
else
vtPriority=01
fi
$BUSYBOX_PATH/cp -a $VTOY_PATH/hook/rhel7/ventoy-inotifyd-start.sh /lib/dracut/hooks/pre-udev/${vtPriority}-ventoy-inotifyd-start.sh
$BUSYBOX_PATH/cp -a $VTOY_PATH/hook/rhel7/ventoy-timeout.sh /lib/dracut/hooks/initqueue/timeout/${vtPriority}-ventoy-timeout.sh
if [ -e /sbin/dmsquash-live-root ]; then if [ -e /sbin/dmsquash-live-root ]; then
echo "patch /sbin/dmsquash-live-root ..." >> $VTLOG echo "patch /sbin/dmsquash-live-root ..." >> $VTLOG
$SED "1 a $BUSYBOX_PATH/sh $VTOY_PATH/hook/rhel7/ventoy-make-link.sh" -i /sbin/dmsquash-live-root $SED "1 a $BUSYBOX_PATH/sh $VTOY_PATH/hook/rhel7/ventoy-make-link.sh" -i /sbin/dmsquash-live-root
@@ -147,10 +181,6 @@ if $GREP -i -q 'fedora.*coreos' /etc/os-release; then
cp -a $VTOY_PATH/hook/rhel7/ventoy-make-link.sh /lib/dracut/hooks/pre-mount/99-ventoy-premount-mklink.sh cp -a $VTOY_PATH/hook/rhel7/ventoy-make-link.sh /lib/dracut/hooks/pre-mount/99-ventoy-premount-mklink.sh
fi fi
if [ -f $VTOY_PATH/autoinstall ]; then
cp -a $VTOY_PATH/hook/rhel7/ventoy-autoexp.sh /lib/dracut/hooks/pre-mount/99-ventoy-autoexp.sh
fi
#special distro magic #special distro magic
$BUSYBOX_PATH/mkdir -p $VTOY_PATH/distmagic $BUSYBOX_PATH/mkdir -p $VTOY_PATH/distmagic

View File

@@ -23,7 +23,18 @@ vtlog "##### $0 $* ..."
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
repodev=$(ls $VTOY_PATH/dev_backup*) if [ -f /ventoy/vtoy_iso_scan ]; then
echo "inst.repo=hd:/dev/${repodev#*dev_backup_}" >> /sysroot/etc/cmdline repopath=$(cat /ventoy/vtoy_iso_scan)
repodev=$(vtoydump -f /ventoy/ventoy_os_param | awk -F'#' '{print $1}')
if echo $repodev | egrep -q "nvme|mmc|nbd"; then
vtpart1=${repodev}p1
else
vtpart1=${repodev}1
fi
echo "inst.repo=hd:${vtpart1}:${repopath}" >> /sysroot/etc/cmdline
else
repodev=$(ls $VTOY_PATH/dev_backup*)
echo "inst.repo=hd:/dev/${repodev#*dev_backup_}" >> /sysroot/etc/cmdline
fi
PATH=$VTPATH_OLD PATH=$VTPATH_OLD

View File

@@ -223,6 +223,42 @@ ventoy_check_dm_module() {
fi fi
} }
ventoy_need_proc_ibt() {
vtKv=$($BUSYBOX_PATH/uname -r)
vtMajor=$(echo $vtKv | $AWK -F. '{print $1}')
vtMinor=$(echo $vtKv | $AWK -F. '{print $2}')
#ibt was supported since linux kernel 5.18
if [ $vtMajor -lt 5 ]; then
$BUSYBOX_PATH/false; return
elif [ $vtMajor -eq 5 ]; then
if [ $vtMajor -lt 18 ]; then
$BUSYBOX_PATH/false; return
fi
fi
if $GREP -q ' ibt=off' /proc/cmdline; then
$BUSYBOX_PATH/false; return
fi
#hardware CPU doesn't support IBT
if $VTOY_PATH/tool/vtoykmod -I; then
:
else
$BUSYBOX_PATH/false; return
fi
#dot.CONFIG not enabled
if $GREP -q ' ibt_restore$' /proc/kallsyms; then
:
else
$BUSYBOX_PATH/false; return
fi
$BUSYBOX_PATH/true
}
ventoy_need_dm_patch() { ventoy_need_dm_patch() {
if [ "$VTOY_LINUX_REMOUNT" != "01" ]; then if [ "$VTOY_LINUX_REMOUNT" != "01" ]; then
if $GREP -q 'VTOY_LINUX_REMOUNT=1' /proc/cmdline; then if $GREP -q 'VTOY_LINUX_REMOUNT=1' /proc/cmdline; then
@@ -269,6 +305,16 @@ ventoy_dm_patch() {
return return
fi fi
if ventoy_need_proc_ibt; then
vtlog "need to proc IBT"
vtKoName=dm_patch_ibt_64.ko
vtIBT='0x8888'
else
vtlog "NO need to proc IBT"
vtIBT='0'
fi
if [ -f $VTOY_PATH/tool/$vtKoName ]; then if [ -f $VTOY_PATH/tool/$vtKoName ]; then
vtlog "/ventoy/tool/$vtKoName exist OK" vtlog "/ventoy/tool/$vtKoName exist OK"
else else
@@ -364,14 +410,16 @@ ventoy_dm_patch() {
return return
fi fi
#step1: modify vermagic/mod crc/relocation #step1: modify vermagic/mod crc/relocation
vtlog "$VTOY_PATH/tool/vtoykmod -u $VTOY_PATH/tool/$vtKoName $VTOY_PATH/$vtModName $vtDebug" vtlog "$VTOY_PATH/tool/vtoykmod -u $VTOY_PATH/tool/$vtKoName $VTOY_PATH/$vtModName $vtDebug"
$VTOY_PATH/tool/vtoykmod -u $VTOY_PATH/tool/$vtKoName $VTOY_PATH/$vtModName $vtDebug $VTOY_PATH/tool/vtoykmod -u $VTOY_PATH/tool/$vtKoName $VTOY_PATH/$vtModName $vtDebug
#step2: fill parameters #step2: fill parameters
vtPgsize=$($VTOY_PATH/tool/vtoyksym -p) vtPgsize=$($VTOY_PATH/tool/vtoyksym -p)
vtlog "$VTOY_PATH/tool/vtoykmod -f $VTOY_PATH/tool/$vtKoName $vtPgsize 0x$printk_addr 0x$ro_addr 0x$rw_addr $get_addr $get_size $put_addr $put_size 0x$kprobe_reg_addr 0x$kprobe_unreg_addr $vtKv $vtDebug" vtlog "$VTOY_PATH/tool/vtoykmod -f $VTOY_PATH/tool/$vtKoName $vtPgsize 0x$printk_addr 0x$ro_addr 0x$rw_addr $get_addr $get_size $put_addr $put_size 0x$kprobe_reg_addr 0x$kprobe_unreg_addr $vtKv $vtIBT $vtDebug"
$VTOY_PATH/tool/vtoykmod -f $VTOY_PATH/tool/$vtKoName $vtPgsize 0x$printk_addr 0x$ro_addr 0x$rw_addr $get_addr $get_size $put_addr $put_size 0x$kprobe_reg_addr 0x$kprobe_unreg_addr $vtKv $vtDebug $VTOY_PATH/tool/vtoykmod -f $VTOY_PATH/tool/$vtKoName $vtPgsize 0x$printk_addr 0x$ro_addr 0x$rw_addr $get_addr $get_size $put_addr $put_size 0x$kprobe_reg_addr 0x$kprobe_unreg_addr $vtKv $vtIBT $vtDebug
$BUSYBOX_PATH/insmod $VTOY_PATH/tool/$vtKoName $BUSYBOX_PATH/insmod $VTOY_PATH/tool/$vtKoName

View File

@@ -121,3 +121,53 @@ ventoy_check_mount() {
$BUSYBOX_PATH/mount $1 $2 $BUSYBOX_PATH/mount $1 $2
fi fi
} }
ventoy_has_exfat_ko() {
vtExfat=''
vtKerVer=$($BUSYBOX_PATH/uname -r)
if [ -d /lib/modules/$vtKerVer/kernel/fs/exfat ]; then
vtExfat=$(ls /lib/modules/$vtKerVer/kernel/fs/exfat/)
fi
[ -n "$vtExfat" ]
}
ventoy_is_exfat_part() {
$VTOY_PATH/tool/vtoydump -s /ventoy/ventoy_os_param | $GREP -q exfat
}
ventoy_iso_scan_path() {
if [ -f /sbin/iso-scan ]; then
echo -n '/sbin/iso-scan'
elif [ -f /bin/iso-scan ]; then
echo -n '/bin/iso-scan'
else
echo -n ''
fi
}
ventoy_has_iso_scan() {
vtScanPath=$(ventoy_iso_scan_path)
[ -n "$vtScanPath" ]
}
ventoy_rw_iso_scan() {
vtScanPath=$(ventoy_iso_scan_path)
if [ -n "$vtScanPath" ]; then
if $GREP -q 'mount.* ro .*isoscan' $vtScanPath; then
$SED -i 's/\(mount.*-o.*\) ro /\1 rw /' $vtScanPath
fi
fi
}
ventoy_iso_scan_check() {
vtCheckOk=0
if ventoy_is_exfat_part; then
if ventoy_has_exfat_ko; then
if ventoy_has_iso_scan; then
vtCheckOk=1
fi
fi
fi
[ $vtCheckOk -eq 1 ]
}

View File

@@ -34,9 +34,12 @@ else
vtBit=32 vtBit=32
fi fi
xz -d $VTOY_PATH/vtloopex/dm-mod/$vtKerVer/$vtBit/dm-mod.ko.xz if [ -f $VTOY_PATH/vtloopex/dm-mod/$vtKerVer/$vtBit/dm-mod.ko.xz ]; then
insmod $VTOY_PATH/vtloopex/dm-mod/$vtKerVer/$vtBit/dm-mod.ko xz -d $VTOY_PATH/vtloopex/dm-mod/$vtKerVer/$vtBit/dm-mod.ko.xz
insmod $VTOY_PATH/vtloopex/dm-mod/$vtKerVer/$vtBit/dm-mod.ko
elif [ -f $VTOY_PATH/modules/dm-mod.ko ]; then
insmod $VTOY_PATH/modules/dm-mod.ko
fi
wait_for_usb_disk_ready wait_for_usb_disk_ready

View File

@@ -64,9 +64,9 @@ ventoy_get_os_type() {
elif $GREP -q '[Uu]buntu' /proc/version; then elif $GREP -q '[Uu]buntu' /proc/version; then
echo 'debian'; return echo 'debian'; return
# Deepin : do the same process with debian # Deepin :
elif $GREP -q '[Dd]eepin' /proc/version; then elif $GREP -q '[Dd]eepin' /proc/version; then
echo 'debian'; return echo 'deepin'; return
# rhel5/CentOS5 and all other distributions based on them # rhel5/CentOS5 and all other distributions based on them
elif $GREP -q 'el5' /proc/version; then elif $GREP -q 'el5' /proc/version; then
@@ -169,9 +169,9 @@ ventoy_get_os_type() {
elif $GREP -q 'fuyu' /etc/os-release; then elif $GREP -q 'fuyu' /etc/os-release; then
echo 'openEuler'; return echo 'openEuler'; return
elif $GREP -q 'deepin' /etc/os-release; then elif $GREP -q 'deepin' /etc/os-release; then
echo 'debian'; return echo 'deepin'; return
elif $GREP -q 'chinauos' /etc/os-release; then elif $GREP -q 'chinauos' /etc/os-release; then
echo 'debian'; return echo 'deepin'; return
fi fi
fi fi
@@ -229,6 +229,10 @@ ventoy_get_os_type() {
echo 'android'; return echo 'android'; return
fi fi
if $GREP -q 'android.google' /proc/version; then
echo 'android'; return
fi
if $GREP -q 'adelielinux' /proc/version; then if $GREP -q 'adelielinux' /proc/version; then
echo 'adelie'; return echo 'adelie'; return
fi fi
@@ -369,6 +373,9 @@ ventoy_get_os_type() {
fi fi
fi fi
if $GREP -q 'chimera' /proc/version; then
echo 'chimera'; return
fi
echo "default" echo "default"
} }

Binary file not shown.

View File

@@ -3,7 +3,7 @@
VTOY_PATH=$PWD/.. VTOY_PATH=$PWD/..
date +"%Y/%m/%d %H:%M:%S" date +"%Y/%m/%d %H:%M:%S"
echo downloading envrionment ... echo downloading environment ...
wget -q -P $VTOY_PATH/DOC/ https://github.com/ventoy/vtoytoolchain/releases/download/1.0/dietlibc-0.34.tar.xz wget -q -P $VTOY_PATH/DOC/ https://github.com/ventoy/vtoytoolchain/releases/download/1.0/dietlibc-0.34.tar.xz
wget -q -P $VTOY_PATH/DOC/ https://github.com/ventoy/vtoytoolchain/releases/download/1.0/musl-1.2.1.tar.gz wget -q -P $VTOY_PATH/DOC/ https://github.com/ventoy/vtoytoolchain/releases/download/1.0/musl-1.2.1.tar.gz
@@ -14,6 +14,6 @@ wget -q -P /opt/ https://github.com/ventoy/vtoytoolchain/releases/download/1.0/a
wget -q -P /opt/ https://github.com/ventoy/vtoytoolchain/releases/download/1.0/mips-loongson-gcc7.3-2019.06-29-linux-gnu.tar.gz wget -q -P /opt/ https://github.com/ventoy/vtoytoolchain/releases/download/1.0/mips-loongson-gcc7.3-2019.06-29-linux-gnu.tar.gz
date +"%Y/%m/%d %H:%M:%S" date +"%Y/%m/%d %H:%M:%S"
echo downloading envrionment finish... echo downloading environment finish...
sh all_in_one.sh CI sh all_in_one.sh CI

View File

@@ -401,6 +401,8 @@ function distro_specify_initrd_file_phase2 {
vt_linux_specify_initrd_file /boot/full.cz vt_linux_specify_initrd_file /boot/full.cz
elif [ -f (loop)/images/pxeboot/initrd.img ]; then elif [ -f (loop)/images/pxeboot/initrd.img ]; then
vt_linux_specify_initrd_file /images/pxeboot/initrd.img vt_linux_specify_initrd_file /images/pxeboot/initrd.img
elif [ -f (loop)/live/initrd ]; then
vt_linux_specify_initrd_file /live/initrd
fi fi
} }
@@ -411,10 +413,9 @@ function ventoy_get_ghostbsd_ver {
} }
function ventoy_get_furybsd_ver { function ventoy_get_furybsd_ver {
if regexp "13\.[0-9]" "$2"; then set vt_freebsd_ver=12.x
set vt_freebsd_ver=13.x if regexp --set 1:vtFuryVer "(14|13)\.[0-9]" "$2"; then
else set vt_freebsd_ver=${vtFuryVer}.x
set vt_freebsd_ver=12.x
fi fi
} }
@@ -423,12 +424,8 @@ function ventoy_get_freenas_ver {
if [ -e (loop)/FreeNAS-MANIFEST ]; then if [ -e (loop)/FreeNAS-MANIFEST ]; then
vt_parse_freenas_ver (loop)/FreeNAS-MANIFEST vt_freenas_ver vt_parse_freenas_ver (loop)/FreeNAS-MANIFEST vt_freenas_ver
if regexp "^13\.[0-9]" "$vt_freenas_ver"; then if regexp --set 1:vtNasVer "^(14|13|12|11)\.[0-9]" "$vt_freenas_ver"; then
set vt_freebsd_ver=13.x set vt_freebsd_ver=${vtNasVer}.x
elif regexp "^12\.[0-9]" "$vt_freenas_ver"; then
set vt_freebsd_ver=12.x
elif regexp "^11\.[0-9]" "$vt_freenas_ver"; then
set vt_freebsd_ver=11.x
fi fi
fi fi
} }
@@ -438,12 +435,8 @@ function ventoy_get_truenas_ver {
if [ -e (loop)/TrueNAS-MANIFEST ]; then if [ -e (loop)/TrueNAS-MANIFEST ]; then
vt_parse_freenas_ver (loop)/TrueNAS-MANIFEST vt_truenas_ver vt_parse_freenas_ver (loop)/TrueNAS-MANIFEST vt_truenas_ver
if regexp "^13\.[0-9]" "$vt_truenas_ver"; then if regexp --set 1:vtTNasVer "^(14|13|12|11)\.[0-9]" "$vt_truenas_ver"; then
set vt_freebsd_ver=13.x set vt_freebsd_ver=${vtTNasVer}.x
elif regexp "^12\.[0-9]" "$vt_truenas_ver"; then
set vt_freebsd_ver=12.x
elif regexp "^11\.[0-9]" "$vt_truenas_ver"; then
set vt_freebsd_ver=11.x
fi fi
fi fi
} }
@@ -475,49 +468,25 @@ function ventoy_freebsd_proc {
ventoy_get_truenas_ver "$1" "${chosen_path}" ventoy_get_truenas_ver "$1" "${chosen_path}"
elif vt_strstr "$vt_volume_id" "FURYBSD"; then elif vt_strstr "$vt_volume_id" "FURYBSD"; then
ventoy_get_furybsd_ver "$1" "${chosen_path}" ventoy_get_furybsd_ver "$1" "${chosen_path}"
elif regexp "^13_[0-9]" "$vt_volume_id"; then elif regexp --set 1:vtBsdVerNum "^(14|13|12|11|10|9)_[0-9]" "$vt_volume_id"; then
set vt_freebsd_ver=13.x set vt_freebsd_ver=${vtBsdVerNum}.x
elif regexp "^12_[0-9]" "$vt_volume_id"; then
set vt_freebsd_ver=12.x
elif regexp "^11_[0-9]" "$vt_volume_id"; then
set vt_freebsd_ver=11.x
elif regexp "^10_[0-9]" "$vt_volume_id"; then
set vt_freebsd_ver=10.x
elif regexp "^9_[0-9]" "$vt_volume_id"; then
set vt_freebsd_ver=9.x
elif [ -d (loop)/usr/midnightbsd-dist ]; then elif [ -d (loop)/usr/midnightbsd-dist ]; then
ventoy_get_midnightbsd_ver "$1" "${chosen_path}" ventoy_get_midnightbsd_ver "$1" "${chosen_path}"
set vtFreeBsdDistro=MidnightBSD set vtFreeBsdDistro=MidnightBSD
elif [ -e (loop)/bin/freebsd-version ]; then elif [ -e (loop)/bin/freebsd-version ]; then
vt_unix_parse_freebsd_ver (loop)/bin/freebsd-version vt_userland_ver vt_unix_parse_freebsd_ver (loop)/bin/freebsd-version vt_userland_ver
if regexp "\"13\.[0-9]-" "$vt_userland_ver"; then if regexp --set 1:vtBsdVerNum "\"(14|13|12|11|10|9)\.[0-9]-" "$vt_userland_ver"; then
set vt_freebsd_ver=13.x set vt_freebsd_ver=${vtBsdVerNum}.x
elif regexp "\"12\.[0-9]-" "$vt_userland_ver"; then fi
set vt_freebsd_ver=12.x
elif regexp "\"11\.[0-9]-" "$vt_userland_ver"; then
set vt_freebsd_ver=11.x
elif regexp "\"10\.[0-9]-" "$vt_userland_ver"; then
set vt_freebsd_ver=10.x
elif regexp "\"9\.[0-9]-" "$vt_userland_ver"; then
set vt_freebsd_ver=9.x
fi
elif [ -e (loop)/README.TXT ]; then elif [ -e (loop)/README.TXT ]; then
vt_1st_line (loop)/README.TXT vt_freebsd_line1 vt_1st_line (loop)/README.TXT vt_freebsd_line1
if regexp "FreeBSD 13\.[0-9]-" "$vt_freebsd_line1"; then if regexp --set 1:vtBsdVerNum "FreeBSD (14|13|12|11|10|9)\.[0-9]-" "$vt_freebsd_line1"; then
set vt_freebsd_ver=13.x set vt_freebsd_ver=${vtBsdVerNum}.x
elif regexp "FreeBSD 12\.[0-9]-" "$vt_freebsd_line1"; then
set vt_freebsd_ver=12.x
elif regexp "FreeBSD 11\.[0-9]-" "$vt_freebsd_line1"; then
set vt_freebsd_ver=11.x
elif regexp "FreeBSD 10\.[0-9]-" "$vt_freebsd_line1"; then
set vt_freebsd_ver=10.x
elif regexp "FreeBSD 9\.[0-9]-" "$vt_freebsd_line1"; then
set vt_freebsd_ver=9.x
fi fi
elif vt_strstr "${chosen_path}" "MidnightBSD"; then elif vt_strstr "${chosen_path}" "MidnightBSD"; then
set vt_freebsd_ver=9.x set vt_freebsd_ver=9.x
fi fi
if [ -e (loop)/usr/freebsd-dist/cloninst.sh ]; then if [ -e (loop)/usr/freebsd-dist/cloninst.sh ]; then
set vtFreeBsdDistro=ClonOS set vtFreeBsdDistro=ClonOS
@@ -541,7 +510,7 @@ function ventoy_freebsd_proc {
fi fi
if [ "$vt_freebsd_ver" = "xx" ]; then if [ "$vt_freebsd_ver" = "xx" ]; then
set vt_freebsd_ver=13.x set vt_freebsd_ver=14.x
fi fi
fi fi
@@ -1926,6 +1895,20 @@ function ventoy_img_openelec {
loopback vtloopex $vtoy_efi_part/ventoy/vtloopex.cpio loopback vtloopex $vtoy_efi_part/ventoy/vtloopex.cpio
vt_img_extra_initrd_append (vtloopex)/$elec_ver/vtloopex.tar.xz vt_img_extra_initrd_append (vtloopex)/$elec_ver/vtloopex.tar.xz
if [ "$elec_ver" = "LibreELEC" ]; then
if [ -f (vtimghd,1)/system ]; then
loopback elecsfs (vtimghd,1)/system
vt_get_lib_module_ver (elecsfs) /usr/lib/kernel-overlays/base/lib/modules/ vt_module_ver
if [ -n "$vt_module_ver" ]; then
for mod in "kernel/drivers/md/dm-mod.ko"; do
if [ -e (elecsfs)/usr/lib/kernel-overlays/base/lib/modules/$vt_module_ver/$mod ]; then
vt_img_extra_initrd_append (elecsfs)/usr/lib/kernel-overlays/base/lib/modules/$vt_module_ver/$mod
fi
done
fi
fi
fi
ventoy_debug_pause ventoy_debug_pause
#boot image file #boot image file
@@ -1938,6 +1921,7 @@ function ventoy_img_openelec {
vt_img_unhook_root vt_img_unhook_root
vt_unset_boot_opt vt_unset_boot_opt
loopback -d vtloopex loopback -d vtloopex
loopback -d elecsfs
} }
@@ -2411,7 +2395,7 @@ function mimg_common_menuentry {
############################################################# #############################################################
############################################################# #############################################################
set VENTOY_VERSION="1.0.89" set VENTOY_VERSION="1.0.93"
#ACPI not compatible with Window7/8, so disable by default #ACPI not compatible with Window7/8, so disable by default
set VTOY_PARAM_NO_ACPI=1 set VTOY_PARAM_NO_ACPI=1

View File

@@ -1,8 +1,8 @@
{ {
"VTLANG_LANGUAGE_NAME": "Korean (한국어)", "VTLANG_LANGUAGE_NAME": "Korean (한국어)",
"VTLANG_STR_HOTKEY_LIST": " L:언어 F1:도움말 F2:찾아보기 F3:목록보기 F4:로컬부팅 F5:도구 F6:확장메뉴", "VTLANG_STR_HOTKEY_LIST": " L:언어 F1:도움말 F2:찾아보기 F3:목록 보기 F4:로컬 부팅 F5:도구 F6:확장 메뉴",
"VTLANG_STR_HOTKEY_TREE": " L:언어 F1:도움말 F2:찾아보기 F3:트리보기 F4:로컬부팅 F5:도구 F6:확장메뉴", "VTLANG_STR_HOTKEY_TREE": " L:언어 F1:도움말 F2:찾아보기 F3:트리 보기 F4:로컬 부팅 F5:도구 F6:확장 메뉴",
"VTLANG_RETURN_PREVIOUS": "이전 메뉴로 돌아가기 [Esc]", "VTLANG_RETURN_PREVIOUS": "이전 메뉴로 돌아가기 [Esc]",
"VTLANG_RETURN_PRV_NOESC": "이전 메뉴로 돌아가기", "VTLANG_RETURN_PRV_NOESC": "이전 메뉴로 돌아가기",
@@ -19,19 +19,19 @@
"VTLANG_LB_SBOOT_XORBOOT": "xorboot 검색 및 부팅", "VTLANG_LB_SBOOT_XORBOOT": "xorboot 검색 및 부팅",
"VTLANG_FILE_CHKSUM": "파일 체크섬", "VTLANG_FILE_CHKSUM": "파일 체크섬",
"VTLANG_CHKSUM_MD5_CALC": "md5sum 계산", "VTLANG_CHKSUM_MD5_CALC": "md5 검사값 계산",
"VTLANG_CHKSUM_SHA1_CALC": "sha1sum 계산", "VTLANG_CHKSUM_SHA1_CALC": "sha1 검사값 계산",
"VTLANG_CHKSUM_SHA256_CALC": "sha256sum 계산", "VTLANG_CHKSUM_SHA256_CALC": "sha256 검사값 계산",
"VTLANG_CHKSUM_SHA512_CALC": "sha512sum 계산", "VTLANG_CHKSUM_SHA512_CALC": "sha512 검사값 계산",
"VTLANG_CHKSUM_MD5_CALC_CHK": "md5sum 계산 및 확인", "VTLANG_CHKSUM_MD5_CALC_CHK": "md5 검사값 계산 및 확인",
"VTLANG_CHKSUM_SHA1_CALC_CHK": "sha1sum 계산 및 확인", "VTLANG_CHKSUM_SHA1_CALC_CHK": "sha1 검사값 계산 및 확인",
"VTLANG_CHKSUM_SHA256_CALC_CHK": "sha256sum 계산 및 확인", "VTLANG_CHKSUM_SHA256_CALC_CHK": "sha256 검사값 계산 및 확인",
"VTLANG_CHKSUM_SHA512_CALC_CHK": "sha512sum 계산 및 확인", "VTLANG_CHKSUM_SHA512_CALC_CHK": "sha512 검사값 계산 및 확인",
"VTLANG_POWER": "전원", "VTLANG_POWER": "전원",
"VTLANG_POWER_REBOOT": "다시 시작", "VTLANG_POWER_REBOOT": "다시 시작",
"VTLANG_POWER_HALT": "전원 끄기", "VTLANG_POWER_HALT": "전원 끄기",
"VTLANG_POWER_BOOT_EFIFW": "EFI 설정으로 다시 시작", "VTLANG_POWER_BOOT_EFIFW": "UEFI 설정으로 다시 시작",
"VTLANG_KEYBRD_LAYOUT": "키보드 레이아웃", "VTLANG_KEYBRD_LAYOUT": "키보드 레이아웃",
"VTLANG_HWINFO": "하드웨어 정보", "VTLANG_HWINFO": "하드웨어 정보",
@@ -44,11 +44,10 @@
"VTLANG_THEME_SELECT": "테마 선택", "VTLANG_THEME_SELECT": "테마 선택",
"VTLANG_UEFI_UTIL": "Ventoy UEFI 유틸리티", "VTLANG_UEFI_UTIL": "Ventoy UEFI 유틸리티",
"VTLANG_UTIL_SHOW_EFI_DRV": "EFI 드라이버 표시", "VTLANG_UTIL_SHOW_EFI_DRV": "UEFI 드라이버 표시",
"VTLANG_UTIL_FIX_BLINIT_FAIL": "Windows 초기화 라이브러리 오류 복구", "VTLANG_UTIL_FIX_BLINIT_FAIL": "Windows 초기화 라이브러리 오류 복구",
"VTLANG_JSON_CHK_JSON": "플러그인 json 구성 확인 (ventoy.json)", "VTLANG_JSON_CHK_JSON": "플러그인 파일 구성 확인 (ventoy.json)",
"VTLANG_JSON_CHK_CONTROL": "전역 제어 플러그인 구성 확인", "VTLANG_JSON_CHK_CONTROL": "전역 제어 플러그인 구성 확인",
"VTLANG_JSON_CHK_THEME": "테마 플러그인 구성 확인", "VTLANG_JSON_CHK_THEME": "테마 플러그인 구성 확인",
"VTLANG_JSON_CHK_AUTOINS": "자동 설치 플러그인 구성 확인", "VTLANG_JSON_CHK_AUTOINS": "자동 설치 플러그인 구성 확인",
@@ -64,7 +63,7 @@
"VTLANG_JSON_CHK_DUD": "드라이버 업데이트 디스크 플러그인 구성 확인", "VTLANG_JSON_CHK_DUD": "드라이버 업데이트 디스크 플러그인 구성 확인",
"VTLANG_JSON_CHK_PASSWORD": "암호 플러그인 구성 확인", "VTLANG_JSON_CHK_PASSWORD": "암호 플러그인 구성 확인",
"VTLANG_NORMAL_MODE": "정상 모드로 부팅", "VTLANG_NORMAL_MODE": "일반 모드로 부팅",
"VTLANG_WIMBOOT_MODE": "wimboot 모드로 부팅", "VTLANG_WIMBOOT_MODE": "wimboot 모드로 부팅",
"VTLANG_GRUB2_MODE": "grub2 모드로 부팅", "VTLANG_GRUB2_MODE": "grub2 모드로 부팅",
"VTLANG_MEMDISK_MODE": "메모리 디스크 모드로 부팅", "VTLANG_MEMDISK_MODE": "메모리 디스크 모드로 부팅",
@@ -74,6 +73,7 @@
"VTLANG_NO_AUTOINS_SCRIPT": "자동 설치 스크립트 사용 안 함", "VTLANG_NO_AUTOINS_SCRIPT": "자동 설치 스크립트 사용 안 함",
"VTLANG_AUTOINS_USE": "부팅 대상", "VTLANG_AUTOINS_USE": "부팅 대상",
"VTLANG_NO_PERSIST": "영구화된 데이터 파일 사용 안 함", "VTLANG_NO_PERSIST": "영구화된 데이터 파일 사용 안 함",
"VTLANG_PERSIST_USE": "부팅 대상", "VTLANG_PERSIST_USE": "부팅 대상",

View File

@@ -0,0 +1,93 @@
{
"VTLANG_LANGUAGE_NAME": "Slovenija (Slovenski)",
"VTLANG_STR_HOTKEY_LIST": "L:Jezik F1:Pomoč F2:Prebrskaj F3:ListView F4:Localboot F5:Orodja F6:ExMenu",
"VTLANG_STR_HOTKEY_TREE": "L:Jezik F1:Pomoč F2:Prebrskaj F3:TreeView F4:Localboot F5:Orodja F6:ExMenu",
"VTLANG_RETURN_PREVIOUS": "Vrnitev v prejšnji meni [Esc]",
"VTLANG_RETURN_PRV_NOESC": "Vrnitev v prejšnji meni",
"VTLANG_MENU_LANG": "Izbira jezika menija",
"VTLANG_LB_SBOOT_WINDOWS": "Iskanje in zagon sistema Windows",
"VTLANG_LB_SBOOT_G4D": "Iskanje in zagon Grub4dos",
"VTLANG_LB_SBOOT_HDD1": "Zagon 1. lokalnega diska",
"VTLANG_LB_SBOOT_HDD2": "Zagon 2. lokalnega diska",
"VTLANG_LB_SBOOT_HDD3": "Zagon 3. lokalnega diska",
"VTLANG_LB_SBOOT_X64EFI": "Iskanje in zagon BOOTX64.EFI",
"VTLANG_LB_SBOOT_IA32EFI": "Iskanje in zagon BOOTIA32.EFI",
"VTLANG_LB_SBOOT_AA64EFI": "Iskanje in zagon BOOTAA64.EFI",
"VTLANG_LB_SBOOT_XORBOOT": "Iskanje in zagon xorboot",
"VTLANG_FILE_CHKSUM": "File checksum",
"VTLANG_CHKSUM_MD5_CALC": "Izračunaj md5sum",
"VTLANG_CHKSUM_SHA1_CALC": "Izračunaj sha1sum",
"VTLANG_CHKSUM_SHA256_CALC": "Izračunaj sha256sum",
"VTLANG_CHKSUM_SHA512_CALC": "Izračunaj sha512sum",
"VTLANG_CHKSUM_MD5_CALC_CHK": "Izračunaj in preveri md5sum",
"VTLANG_CHKSUM_SHA1_CALC_CHK": "Izračunaj in preveri sha1sum",
"VTLANG_CHKSUM_SHA256_CALC_CHK": "Izračunaj in preveri sha256sum",
"VTLANG_CHKSUM_SHA512_CALC_CHK": "Izračunaj in preveri sha512sum",
"VTLANG_POWER": "Napajanje",
"VTLANG_POWER_REBOOT": "Ponovni zagon",
"VTLANG_POWER_HALT": "Halt",
"VTLANG_POWER_BOOT_EFIFW": "Ponovni zagon v nastavitev EFI",
"VTLANG_KEYBRD_LAYOUT": "Postavitev tipkovnice",
"VTLANG_HWINFO": "Informacije o strojni opremi",
"VTLANG_RESOLUTION_CFG": "Nastavitev ločljivosti",
"VTLANG_SCREEN_MODE": "Način prikaza na zaslonu",
"VTLANG_SCREEN_TEXT_MODE": "Vsili besedilni način",
"VTLANG_SCREEN_GUI_MODE": "Vsili grafični način",
"VTLANG_THEME_SELECT": "Izbira teme",
"VTLANG_UEFI_UTIL": "Pripomočki Ventoy UEFI",
"VTLANG_UTIL_SHOW_EFI_DRV": "Prikaži gonilnike EFI",
"VTLANG_UTIL_FIX_BLINIT_FAIL": "Popravek napake Windows BlinitializeLibrary",
"VTLANG_JSON_CHK_JSON": "Preverite konfiguracijo vtičnika json (ventoy.json)",
"VTLANG_JSON_CHK_CONTROL": "Preverite konfiguracijo globalnega nadzornega vtičnika",
"VTLANG_JSON_CHK_THEME": "Preverite konfiguracijo vtičnika teme",
"VTLANG_JSON_CHK_AUTOINS": "Preverite konfiguracijo vtičnika za samodejno namestitev",
"VTLANG_JSON_CHK_PERSIST": "Preverite konfiguracijo vtičnika persistence",
"VTLANG_JSON_CHK_MENU_ALIAS": "Preverite konfiguracijo vtičnika menija",
"VTLANG_JSON_CHK_MENU_TIP": "Preverite konfiguracijo vtičnika za nasvete menija",
"VTLANG_JSON_CHK_MENU_CLASS": "Preverite konfiguracijo vtičnika razreda menija",
"VTLANG_JSON_CHK_INJECTION": "Check injection plugin configuration",
"VTLANG_JSON_CHK_AUTO_MEMDISK": "Preverite konfiguracijo vtičnika Auto Memdisk.",
"VTLANG_JSON_CHK_IMG_LIST": "Preverite konfiguracijo vtičnika za seznam slik",
"VTLANG_JSON_CHK_IMG_BLIST": "Preverite konfiguracijo vtičnika za črno listo slik",
"VTLANG_JSON_CHK_CONF_REPLACE": "Preverite boot conf zamenjajte plugin konfiguracijo",
"VTLANG_JSON_CHK_DUD": "Preverite konfiguracijo vtičnika dud",
"VTLANG_JSON_CHK_PASSWORD": "Preverite konfiguracijo vtičnika za geslo",
"VTLANG_NORMAL_MODE": "Zagon v običajnem načinu",
"VTLANG_WIMBOOT_MODE": "Zagon v načinu wimboot",
"VTLANG_GRUB2_MODE": "Zagon v načinu grub2",
"VTLANG_MEMDISK_MODE": "Zagon v načinu memdisk",
"VTLANG_RET_TO_LISTVIEW": "Vrnitev na ListView",
"VTLANG_RET_TO_TREEVIEW": "Vrnitev v TreeView",
"VTLANG_NO_AUTOINS_SCRIPT": "Zagon brez predloge za samodejno namestitev",
"VTLANG_AUTOINS_USE": "Zagon z",
"VTLANG_NO_PERSIST": "Boot without persistence",
"VTLANG_PERSIST_USE": "Zagon z",
"VTLANG_BROWER_RETURN": "Nazaj",
"VTLANG_ENTER_EXIT": "za izhod pritisnite tipko Enter",
"VTLANG_ENTER_REBOOT": "pritisnite tipko Enter za ponovni zagon",
"VTLANG_ENTER_CONTINUE": "za nadaljevanje pritisnite tipko Enter",
"VTLANG_CTRL_TEMP_SET": "Začasne nadzorne nastavitve",
"VTLANG_WIN11_BYPASS_CHECK": "Obid preverjanja CPU/TPM/SecureBoot pri namestitvi sistema Windows 11",
"VTLANG_WIN11_BYPASS_NRO": "Obid zahteve po spletnem računu pri namestitvi sistema Windows 11",
"VTLANG_LINUX_REMOUNT": "Priklopi Ventoy particijo po zagonu Linuxa",
"VTLANG_SECONDARY_BOOT_MENU": "Prikaz sekundarnega zagonskega menija",
"MENU_STR_XXX": ""
}

View File

@@ -143,7 +143,7 @@ if grep "$DISK" /proc/mounts; then
fi fi
#check swap partition #check swap partition
if swapon --help 2>&1 | grep -q '^ \-s,'; then if swapon --help 2>&1 | grep -q '^ -s,'; then
if swapon -s | grep -q "^${DISK}[0-9]"; then if swapon -s | grep -q "^${DISK}[0-9]"; then
vterr "$DISK is used as swap, please swapoff it first!" vterr "$DISK is used as swap, please swapoff it first!"
exit 1 exit 1

Binary file not shown.

View File

@@ -775,7 +775,7 @@
"STR_PART_CLUSTER":"Clustergröße", "STR_PART_CLUSTER":"Clustergröße",
"STR_PART_CLUSTER_DEFAULT":"Systemstandardwert", "STR_PART_CLUSTER_DEFAULT":"Systemstandardwert",
"STR_DONATE":"Spenden", "STR_DONATE":"Spenden",
"STR_4KN_UNSUPPORTED":"Ventoy unterstützt native 4K Geräte derzeit leider nocht nicht.", "STR_4KN_UNSUPPORTED":"Ventoy unterstützt derzeit keine nativen 4K Geräte.",
"STRXXX":"" "STRXXX":""
}, },
@@ -905,7 +905,7 @@
"STR_PART_CLUSTER":"Taille de cluster", "STR_PART_CLUSTER":"Taille de cluster",
"STR_PART_CLUSTER_DEFAULT":"Valeur par défaut du système", "STR_PART_CLUSTER_DEFAULT":"Valeur par défaut du système",
"STR_DONATE":"Faire un don", "STR_DONATE":"Faire un don",
"STR_4KN_UNSUPPORTED":"Currently Ventoy does not support 4K native devices.", "STR_4KN_UNSUPPORTED":"Actuellement, Ventoy ne prend pas en charge les appareils natifs 4K.",
"STRXXX":"" "STRXXX":""
}, },
@@ -1489,7 +1489,7 @@
"STR_PART_CLUSTER":"Dimensiunea clusterului", "STR_PART_CLUSTER":"Dimensiunea clusterului",
"STR_PART_CLUSTER_DEFAULT":"Valoarea implicită a sistemului", "STR_PART_CLUSTER_DEFAULT":"Valoarea implicită a sistemului",
"STR_DONATE":"Donează", "STR_DONATE":"Donează",
"STR_4KN_UNSUPPORTED":"Currently Ventoy does not support 4K native devices.", "STR_4KN_UNSUPPORTED":"Momentan, Ventoy nu suporta dispozitive native 4k.",
"STRXXX":"" "STRXXX":""
}, },
@@ -1822,13 +1822,13 @@
"name":"Serbian Latin (Srpski)", "name":"Serbian Latin (Srpski)",
"FontFamily":"Courier New", "FontFamily":"Courier New",
"FontSize":16, "FontSize":16,
"Author":"Bojan Maksimović, panickingkernel, Zoran Jankov, Stefan Šućur", "Author":"Bojan Maksimović, panickingkernel, Zoran Jankov, Stefan Šućur, Kosta Stojiljković",
"STR_ERROR":"Greška", "STR_ERROR":"Greška",
"STR_WARNING":"Upozorenje", "STR_WARNING":"Upozorenje",
"STR_INFO":"Informacija", "STR_INFO":"Informacija",
"STR_INCORRECT_DIR":"Molim Vas, pokrenite me u pravom direktorijumu!", "STR_INCORRECT_DIR":"Molim Vas, pokrenite me u pravom direktorijumu!",
"STR_INCORRECT_TREE_DIR":"Nemojте me pokretati ovde, molim Vas preuzmite objavljeni instalacioni paket i pokrenite me tamo.", "STR_INCORRECT_TREE_DIR":"Nemojtе me pokretati ovde, molim Vas preuzmite objavljeni instalacioni paket i pokrenite me tamo.",
"STR_DEVICE":"Uređaj", "STR_DEVICE":"Uređaj",
"STR_LOCAL_VER":"Ventoy u paketu", "STR_LOCAL_VER":"Ventoy u paketu",
"STR_DISK_VER":"Ventoy u uređaju", "STR_DISK_VER":"Ventoy u uređaju",
@@ -1879,7 +1879,7 @@
"STR_PART_CLUSTER":"Veličina klastera", "STR_PART_CLUSTER":"Veličina klastera",
"STR_PART_CLUSTER_DEFAULT":"Podrazumevana sistemska vrednost", "STR_PART_CLUSTER_DEFAULT":"Podrazumevana sistemska vrednost",
"STR_DONATE":"Donirajte", "STR_DONATE":"Donirajte",
"STR_4KN_UNSUPPORTED":"Currently Ventoy does not support 4K native devices.", "STR_4KN_UNSUPPORTED":"Ventoy trenutno ne podržava 4K izvorne uređaje.",
"STRXXX":"" "STRXXX":""
}, },
@@ -1887,7 +1887,7 @@
"name":"Serbian Cyrillic (Српски)", "name":"Serbian Cyrillic (Српски)",
"FontFamily":"Courier New", "FontFamily":"Courier New",
"FontSize":16, "FontSize":16,
"Author":"Bojan Maksimović, panickingkernel, Zoran Jankov, Stefan Šućur", "Author":"Bojan Maksimović, panickingkernel, Zoran Jankov, Stefan Šućur, Kosta Stojiljković",
"STR_ERROR":"Грешка", "STR_ERROR":"Грешка",
"STR_WARNING":"Упозорење", "STR_WARNING":"Упозорење",
@@ -1923,7 +1923,7 @@
"STR_SHOW_ALL_DEV":"Прикажи све уређаје", "STR_SHOW_ALL_DEV":"Прикажи све уређаје",
"STR_PART_ALIGN_4KB":"Поравнајте партиције са 4KB", "STR_PART_ALIGN_4KB":"Поравнајте партиције са 4KB",
"STR_WEB_COMMUNICATION_ERR":"Комуникациона грешка:", "STR_WEB_COMMUNICATION_ERR":"Комуникациона грешка:",
"STR_WEB_REMOTE_ABNORMAL":"Комуникациона грешка: ненормално даљинско управљање", "STR_WEB_REMOTE_ABNORMAL":"Комуникациона грешка: Ненормално даљинско управљање",
"STR_WEB_REQUEST_TIMEOUT":"Комуникациона грешка: Захтев је истекао", "STR_WEB_REQUEST_TIMEOUT":"Комуникациона грешка: Захтев је истекао",
"STR_WEB_SERVICE_UNAVAILABLE":"Комуникациона грешка: Сервис је недоступан", "STR_WEB_SERVICE_UNAVAILABLE":"Комуникациона грешка: Сервис је недоступан",
"STR_WEB_TOKEN_MISMATCH":"Статус демона ажуриран, покушајте поново касније.", "STR_WEB_TOKEN_MISMATCH":"Статус демона ажуриран, покушајте поново касније.",
@@ -1944,7 +1944,7 @@
"STR_PART_CLUSTER":"Величина кластера", "STR_PART_CLUSTER":"Величина кластера",
"STR_PART_CLUSTER_DEFAULT":"Подразумевана системска вредност", "STR_PART_CLUSTER_DEFAULT":"Подразумевана системска вредност",
"STR_DONATE":"Донирајте", "STR_DONATE":"Донирајте",
"STR_4KN_UNSUPPORTED":"Currently Ventoy does not support 4K native devices.", "STR_4KN_UNSUPPORTED":"Ventoy тренутно не подржава 4К изворне уређаје.",
"STRXXX":"" "STRXXX":""
}, },
@@ -2818,7 +2818,7 @@
"STR_INSTALL_FAILED":"По време на инсталацията е възникнала грешка. Можете да поставите отново USB устройството и да опитате отново. Проверете log.txt за подробности. Ако инсталацията винаги е неуспешна, направете справка с често задаваните въпроси на официалната страница.", "STR_INSTALL_FAILED":"По време на инсталацията е възникнала грешка. Можете да поставите отново USB устройството и да опитате отново. Проверете log.txt за подробности. Ако инсталацията винаги е неуспешна, направете справка с често задаваните въпроси на официалната страница.",
"STR_UPDATE_SUCCESS":"Поздравление!#@Ventoy е успешно обновен на устройството.", "STR_UPDATE_SUCCESS":"Поздравление!#@Ventoy е успешно обновен на устройството.",
"STR_UPDATE_FAILED":"По време на обновяването е възникнала грешка. Можете да поставите отново USB устройството и да опитате отново. Проверете log.txt за подробности. Ако обновяването винаги е неуспешно, направете справка с често задаваните въпроси на официалната страница.", "STR_UPDATE_FAILED":"По време на обновяването е възникнала грешка. Можете да поставите отново USB устройството и да опитате отново. Проверете log.txt за подробности. Ако обновяването винаги е неуспешно, направете справка с често задаваните въпроси на официалната страница.",
"STR_WAIT_PROCESS":"Работи, моля изчакайте…", "STR_WAIT_PROCESS":"В процес, изчакайте…",
"STR_MENU_OPTION":"Настройки", "STR_MENU_OPTION":"Настройки",
"STR_MENU_SECURE_BOOT":"Поддръжка на Secure Boot", "STR_MENU_SECURE_BOOT":"Поддръжка на Secure Boot",
"STR_MENU_PART_CFG":"Допълнителен дял", "STR_MENU_PART_CFG":"Допълнителен дял",
@@ -2835,27 +2835,27 @@
"STR_PART_ALIGN_4KB":"Подравняване на дяловете по 4КБ", "STR_PART_ALIGN_4KB":"Подравняване на дяловете по 4КБ",
"STR_WEB_COMMUNICATION_ERR":"Грешка при свързване:", "STR_WEB_COMMUNICATION_ERR":"Грешка при свързване:",
"STR_WEB_REMOTE_ABNORMAL":"Грешка при свързване: Отдалечената връзка е недействителна", "STR_WEB_REMOTE_ABNORMAL":"Грешка при свързване: Отдалечената връзка е недействителна",
"STR_WEB_REQUEST_TIMEOUT":"Грешка при свързване: Изтекло време за изчакване на заявката", "STR_WEB_REQUEST_TIMEOUT":"Грешка при свързване: Времето за изчакване на заявката е просрочено",
"STR_WEB_SERVICE_UNAVAILABLE":"Грешка при свързване: Услугата е недостъпна", "STR_WEB_SERVICE_UNAVAILABLE":"Грешка при свързване: Услугата е недостъпна",
"STR_WEB_TOKEN_MISMATCH":"Статуса на демона е обновен, опитайте по-късно.", "STR_WEB_TOKEN_MISMATCH":"Състоянието на услугата е обновено, опитайте по-късно.",
"STR_WEB_SERVICE_BUSY":"Услугата е заета, опитайте по-късно.", "STR_WEB_SERVICE_BUSY":"Услугата е заета, опитайте по-късно.",
"STR_MENU_VTSI_CREATE":"Създаване на файл на VTSI", "STR_MENU_VTSI_CREATE":"Създаване на файл на VTSI",
"STR_VTSI_CREATE_TIP":"Този път няма да се записва на устройството, а само ще се създаде файл на VTSI#@Продължаване?", "STR_VTSI_CREATE_TIP":"Този път няма да се извършва запис на устройството, а само ще бъде създаден файл на VTSI#@Продължаване?",
"STR_VTSI_CREATE_SUCCESS":"Файлът на VTSI е създаден успешно!#@Може да използвате Rufus(3.15+), за да го запишете на устройството и така да завършите инсталацията на Ventoy.", "STR_VTSI_CREATE_SUCCESS":"Файлът на VTSI е създаден успешно!#@Може да използвате Rufus(3.15+), за да го запишете на устройството и така да завършите инсталацията на Ventoy.",
"STR_VTSI_CREATE_FAILED":"Грешка при създаване на файла на VTSI.", "STR_VTSI_CREATE_FAILED":"Грешка при създаване на файла на VTSI.",
"STR_MENU_PART_RESIZE":"Неразрушително инсталиране", "STR_MENU_PART_RESIZE":"Неразрушително инсталиране",
"STR_PART_RESIZE_TIP":"Ventoy ще направи опит за неразрушително инсталиране, ако е възможно.#@Продължаване?", "STR_PART_RESIZE_TIP":"Ventoy ще направи опит за неразрушително инсталиране, ако е възможно.#@Продължаване?",
"STR_PART_RESIZE_SUCCESS":"Поздравления!#@Неразрушителното инсталиране на Ventoy е успешно.", "STR_PART_RESIZE_SUCCESS":"Поздравления!#@Неразрушителното инсталиране на Ventoy е успешно.",
"STR_PART_RESIZE_FAILED":"Неразрушителното инсталиране на Ventoy е неуспешно. Проверете log.txt за подробности.", "STR_PART_RESIZE_FAILED":"Неразрушителното инсталиране на Ventoy е неуспешно. Проверете log.txt за подробности.",
"STR_PART_RESIZE_UNSUPPORTED":"Неразрушителното инсталиране на Ventoy е спряна, защото някои от условията не могат да бъдат изпълнени. Проверете log.txt за подробности.", "STR_PART_RESIZE_UNSUPPORTED":"Неразрушителното инсталиране на Ventoy е спряно, защото някои от условията не могат да бъдат изпълнени. Проверете log.txt за подробности.",
"STR_INSTALL_YES_TIP1":"Внимание: Ще има загуба на данни!", "STR_INSTALL_YES_TIP1":"Внимание: Ще има загуба на данни!",
"STR_INSTALL_YES_TIP2":"Въведете „YES“ в полето отдолу, за да потвърдите, че искате да извършите нова инсталация вместо обновяване.", "STR_INSTALL_YES_TIP2":"Въведете „YES“ в полето отдолу, за да потвърдите, че искате да извършите нова инсталация вместо обновяване.",
"STR_PART_VENTOY_FS":"File System For Ventoy Partition", "STR_PART_VENTOY_FS":"Файлова система за дял на Ventoy",
"STR_PART_FS":"File System", "STR_PART_FS":"Файлова система",
"STR_PART_CLUSTER":"Cluster Size", "STR_PART_CLUSTER":"Размер на клъстера",
"STR_PART_CLUSTER_DEFAULT":"System Default Value", "STR_PART_CLUSTER_DEFAULT":"По подразбиране от системата",
"STR_DONATE":"Дарете", "STR_DONATE":"Дарете",
"STR_4KN_UNSUPPORTED":"Currently Ventoy does not support 4K native devices.", "STR_4KN_UNSUPPORTED":"За момента Ventoy не поддържа устройства с клъстери, чиито размери са 4КБ.",
"STRXXX":"" "STRXXX":""
}, },

View File

@@ -164,7 +164,7 @@
} }
function CommonPasswordEntry(tbl, name, cn, en) { function CommonPasswordEntry(tbl, name, cn, en) {
var tr = '<tr><td>'+name+'</td><td><input type="text" class="form-control" id="id_'+name+'" disabled="disabled"/></td>' + var tr = '<tr><td>'+name+'</td><td><input type="password" class="form-control" id="id_'+name+'" disabled="disabled"/></td>' +
'<td><button id="id_btn_set_'+name+'" class="btn btn-primary btn-sm btn-add CommPwdSetBtn"><span class="fa fa-edit"></span><span id="id_span_edit"></span></button>&nbsp;&nbsp;' + '<td><button id="id_btn_set_'+name+'" class="btn btn-primary btn-sm btn-add CommPwdSetBtn"><span class="fa fa-edit"></span><span id="id_span_edit"></span></button>&nbsp;&nbsp;' +
'<button id="id_btn_clr_'+name+'" class="btn btn-danger btn-sm btn-del CommPwdClearBtn"><span class="fa fa-trash"></span><span id="id_span_clear"></span></button></td>' + '<button id="id_btn_clr_'+name+'" class="btn btn-danger btn-sm btn-del CommPwdClearBtn"><span class="fa fa-trash"></span><span id="id_span_clear"></span></button></td>' +
'<td><span id="id_span_desc_cn">' + cn + '</span>' + '<td><span id="id_span_desc_cn">' + cn + '</span>' +

View File

@@ -18,7 +18,7 @@ You can also browse ISO/WIM/IMG/VHD(x)/EFI files in local disk and boot them.<br
x86 Legacy BIOS, IA32 UEFI, x86_64 UEFI, ARM64 UEFI and MIPS64EL UEFI are supported in the same way.<br/> x86 Legacy BIOS, IA32 UEFI, x86_64 UEFI, ARM64 UEFI and MIPS64EL UEFI are supported in the same way.<br/>
Both MBR and GPT partition style are supported in the same way.<br/> Both MBR and GPT partition style are supported in the same way.<br/>
Most type of OS supported(Windows/WinPE/Linux/Unix/ChromeOS/Vmware/Xen...) <br/> Most type of OS supported(Windows/WinPE/Linux/Unix/ChromeOS/Vmware/Xen...) <br/>
1000+ ISO files are tested (<a href="https://www.ventoy.net/en/isolist.html">List</a>). 90%+ distros in <a href="https://distrowatch.com/">distrowatch.com</a> supported (<a href="https://www.ventoy.net/en/distrowatch.html">Details</a>). <br/> 1100+ ISO files are tested (<a href="https://www.ventoy.net/en/isolist.html">List</a>). 90%+ distros in <a href="https://distrowatch.com/">distrowatch.com</a> supported (<a href="https://www.ventoy.net/en/distrowatch.html">Details</a>). <br/>
<br/>Official Website: <a href=https://www.ventoy.net>https://www.ventoy.net</a> <br/>Official Website: <a href=https://www.ventoy.net>https://www.ventoy.net</a>
</h4> </h4>
@@ -27,7 +27,7 @@ Most type of OS supported(Windows/WinPE/Linux/Unix/ChromeOS/Vmware/Xen...) <br/>
Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019, Windows Server 2022, WinPE Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019, Windows Server 2022, WinPE
**Linux** **Linux**
Debian, Ubuntu, CentOS(6/7/8/9), RHEL(6/7/8/9), Deepin, Fedora, Rocky Linux, AlmaLinux, EuroLinux(6/7/8/9), openEuler, OpenAnolis, SLES, openSUSE, MX Linux, Manjaro, Linux Mint, Endless OS, Elementary OS, Solus, Linx, Zorin, antiX, PClinuxOS, Arch, ArcoLinux, ArchLabs, BlackArch, Obarun, Artix Linux, Puppy Linux, Tails, Slax, Kali, Mageia, Slackware, Q4OS, Archman, Gentoo, Pentoo, NixOS, Kylin, openKylin, Ubuntu Kylin, KylinSec, Lubuntu, Xubuntu, Kubuntu, Ubuntu MATE, Ubuntu Budgie, Ubuntu Studio, Bluestar, OpenMandriva, ExTiX, Netrunner, ALT Linux, Nitrux, Peppermint, KDE neon, Linux Lite, Parrot OS, Qubes, Pop OS, ROSA, Void Linux, Star Linux, EndeavourOS, MakuluLinux, Voyager, Feren, ArchBang, LXLE, Knoppix, Calculate Linux, Clear Linux, Pure OS, Oracle Linux, Trident, Septor, Porteus, Devuan, GoboLinux, 4MLinux, Simplicity Linux, Zeroshell, Android-x86, netboot.xyz, Slitaz, SuperGrub2Disk, Proxmox VE, Kaspersky Rescue, SystemRescueCD, MemTest86, MemTest86+, MiniTool Partition Wizard, Parted Magic, veket, Sabayon, Scientific, alpine, ClearOS, CloneZilla, Berry Linux, Trisquel, Ataraxia Linux, Minimal Linux Live, BackBox Linux, Emmabuntüs, ESET SysRescue Live,Nova Linux, AV Linux, RoboLinux, NuTyX, IPFire, SELKS, ZStack, Enso Linux, Security Onion, Network Security Toolkit, Absolute Linux, TinyCore, Springdale Linux, Frost Linux, Shark Linux, LinuxFX, Snail Linux, Astra Linux, Namib Linux, Resilient Linux, Virage Linux, Blackweb Security OS, R-DriveImage, O-O.DiskImage, Macrium, ToOpPy LINUX, GNU Guix, YunoHost, foxclone, siduction, Adelie Linux, Elive, Pardus, CDlinux, AcademiX, Austrumi, Zenwalk, Anarchy, DuZeru, BigLinux, OpenMediaVault, Ubuntu DP, Exe GNU/Linux, 3CX Phone System, KANOTIX, Grml, Karoshi, PrimTux, ArchStrike, CAELinux, Cucumber, Fatdog, ForLEx, Hanthana, Kwort, MiniNo, Redcore, Runtu, Asianux, Clu Linux Live, Uruk, OB2D, BlueOnyx, Finnix, HamoniKR, Parabola, LinHES, LinuxConsole, BEE free, Untangle, Pearl, Thinstation, TurnKey, tuxtrans, Neptune, HefftorLinux, GeckoLinux, Mabox Linux, Zentyal, Maui, Reborn OS, SereneLinux , SkyWave Linux, Kaisen Linux, Regata OS, TROM-Jaro, DRBL Linux, Chalet OS, Chapeau, Desa OS, BlankOn, OpenMamba, Frugalware, Kibojoe Linux, Revenge OS, Tsurugi Linux, Drauger OS, Hash Linux, gNewSense, Ikki Boot, SteamOS, Hyperbola, VyOS, EasyNAS, SuperGamer, Live Raizo, Swift Linux, RebeccaBlackOS, Daphile, CRUX, Univention, Ufficio Zero, Rescuezilla, Phoenix OS, Garuda Linux, Mll, NethServer, OSGeoLive, Easy OS, Volumio, FreedomBox, paldo, UBOS, Recalbox, batocera, Lakka, LibreELEC, Pardus Topluluk, Pinguy, KolibriOS, Elastix, Arya, Omoikane, Omarine, Endian Firewall, Hamara, Rocks Cluster, MorpheusArch, Redo, Slackel, SME Server, APODIO, Smoothwall, Dragora, Linspire, Secure-K OS, Peach OSI, Photon, Plamo, SuperX, Bicom, Ploplinux, HP SPP, LliureX, Freespire, DietPi, BOSS, Webconverger, Lunar, TENS, Source Mage, RancherOS, T2, Vine, Pisi, blackPanther, mAid, Acronis, Active.Boot, AOMEI, Boot.Repair, CAINE, DaRT, EasyUEFI, R-Drive, PrimeOS, Avira Rescue System, bitdefender, Checkra1n Linux, Lenovo Diagnostics, Clover, Bliss-OS, Lenovo BIOS Update, Arcabit Rescue Disk, MiyoLinux, TeLOS, Kerio Control, RED OS, OpenWrt, MocaccinoOS, EasyStartup, Pyabr, Refracta, Eset SysRescue, Linpack Xtreme, Archcraft, NHVBOOT, pearOS, SeaTools, Easy Recovery Essentional, iKuai, StorageCraft SCRE, ZFSBootMenu, TROMjaro, BunsenLabs, Todo en Uno, ChallengerOS, Nobara, Holo, CachyOS, Peux OS, ...... Debian, Ubuntu, CentOS(6/7/8/9), RHEL(6/7/8/9), Deepin, Fedora, Rocky Linux, AlmaLinux, EuroLinux(6/7/8/9), openEuler, OpenAnolis, SLES, openSUSE, MX Linux, Manjaro, Linux Mint, Endless OS, Elementary OS, Solus, Linx, Zorin, antiX, PClinuxOS, Arch, ArcoLinux, ArchLabs, BlackArch, Obarun, Artix Linux, Puppy Linux, Tails, Slax, Kali, Mageia, Slackware, Q4OS, Archman, Gentoo, Pentoo, NixOS, Kylin, openKylin, Ubuntu Kylin, KylinSec, Lubuntu, Xubuntu, Kubuntu, Ubuntu MATE, Ubuntu Budgie, Ubuntu Studio, Bluestar, OpenMandriva, ExTiX, Netrunner, ALT Linux, Nitrux, Peppermint, KDE neon, Linux Lite, Parrot OS, Qubes, Pop OS, ROSA, Void Linux, Star Linux, EndeavourOS, MakuluLinux, Voyager, Feren, ArchBang, LXLE, Knoppix, Calculate Linux, Clear Linux, Pure OS, Oracle Linux, Trident, Septor, Porteus, Devuan, GoboLinux, 4MLinux, Simplicity Linux, Zeroshell, Android-x86, netboot.xyz, Slitaz, SuperGrub2Disk, Proxmox VE, Kaspersky Rescue, SystemRescueCD, MemTest86, MemTest86+, MiniTool Partition Wizard, Parted Magic, veket, Sabayon, Scientific, alpine, ClearOS, CloneZilla, Berry Linux, Trisquel, Ataraxia Linux, Minimal Linux Live, BackBox Linux, Emmabuntüs, ESET SysRescue Live,Nova Linux, AV Linux, RoboLinux, NuTyX, IPFire, SELKS, ZStack, Enso Linux, Security Onion, Network Security Toolkit, Absolute Linux, TinyCore, Springdale Linux, Frost Linux, Shark Linux, LinuxFX, Snail Linux, Astra Linux, Namib Linux, Resilient Linux, Virage Linux, Blackweb Security OS, R-DriveImage, O-O.DiskImage, Macrium, ToOpPy LINUX, GNU Guix, YunoHost, foxclone, siduction, Adelie Linux, Elive, Pardus, CDlinux, AcademiX, Austrumi, Zenwalk, Anarchy, DuZeru, BigLinux, OpenMediaVault, Ubuntu DP, Exe GNU/Linux, 3CX Phone System, KANOTIX, Grml, Karoshi, PrimTux, ArchStrike, CAELinux, Cucumber, Fatdog, ForLEx, Hanthana, Kwort, MiniNo, Redcore, Runtu, Asianux, Clu Linux Live, Uruk, OB2D, BlueOnyx, Finnix, HamoniKR, Parabola, LinHES, LinuxConsole, BEE free, Untangle, Pearl, Thinstation, TurnKey, tuxtrans, Neptune, HefftorLinux, GeckoLinux, Mabox Linux, Zentyal, Maui, Reborn OS, SereneLinux , SkyWave Linux, Kaisen Linux, Regata OS, TROM-Jaro, DRBL Linux, Chalet OS, Chapeau, Desa OS, BlankOn, OpenMamba, Frugalware, Kibojoe Linux, Revenge OS, Tsurugi Linux, Drauger OS, Hash Linux, gNewSense, Ikki Boot, SteamOS, Hyperbola, VyOS, EasyNAS, SuperGamer, Live Raizo, Swift Linux, RebeccaBlackOS, Daphile, CRUX, Univention, Ufficio Zero, Rescuezilla, Phoenix OS, Garuda Linux, Mll, NethServer, OSGeoLive, Easy OS, Volumio, FreedomBox, paldo, UBOS, Recalbox, batocera, Lakka, LibreELEC, Pardus Topluluk, Pinguy, KolibriOS, Elastix, Arya, Omoikane, Omarine, Endian Firewall, Hamara, Rocks Cluster, MorpheusArch, Redo, Slackel, SME Server, APODIO, Smoothwall, Dragora, Linspire, Secure-K OS, Peach OSI, Photon, Plamo, SuperX, Bicom, Ploplinux, HP SPP, LliureX, Freespire, DietPi, BOSS, Webconverger, Lunar, TENS, Source Mage, RancherOS, T2, Vine, Pisi, blackPanther, mAid, Acronis, Active.Boot, AOMEI, Boot.Repair, CAINE, DaRT, EasyUEFI, R-Drive, PrimeOS, Avira Rescue System, bitdefender, Checkra1n Linux, Lenovo Diagnostics, Clover, Bliss-OS, Lenovo BIOS Update, Arcabit Rescue Disk, MiyoLinux, TeLOS, Kerio Control, RED OS, OpenWrt, MocaccinoOS, EasyStartup, Pyabr, Refracta, Eset SysRescue, Linpack Xtreme, Archcraft, NHVBOOT, pearOS, SeaTools, Easy Recovery Essentional, iKuai, StorageCraft SCRE, ZFSBootMenu, TROMjaro, BunsenLabs, Todo en Uno, ChallengerOS, Nobara, Holo, CachyOS, Peux OS, Vanilla OS, ShredOS, paladin, Palen1x, dban, ReviOS, HelenOS, XeroLinux, ......
**Unix** **Unix**
DragonFly FreeBSD pfSense GhostBSD FreeNAS TrueNAS XigmaNAS FuryBSD OPNsense HardenedBSD MidnightBSD ClonOS EmergencyBootKit DragonFly FreeBSD pfSense GhostBSD FreeNAS TrueNAS XigmaNAS FuryBSD OPNsense HardenedBSD MidnightBSD ClonOS EmergencyBootKit
@@ -73,7 +73,7 @@ A GUI Ventoy plugin configurator. [VentoyPlugson](https://www.ventoy.net/en/plug
* Menu alias, Menu tip message supported * Menu alias, Menu tip message supported
* Password protect supported * Password protect supported
* Native boot menu style for Legacy & UEFI * Native boot menu style for Legacy & UEFI
* Most types of OS supported, 1000+ iso files tested * Most types of OS supported, 1100+ iso files tested
* Linux vDisk boot supported * Linux vDisk boot supported
* Not only boot but also complete installation process * Not only boot but also complete installation process
* Menu dynamically switchable between List/TreeView mode * Menu dynamically switchable between List/TreeView mode

View File

@@ -2,12 +2,12 @@
rm -f vtoytool/00/* rm -f vtoytool/00/*
/opt/diet64/bin/diet -Os gcc -D_FILE_OFFSET_BITS=64 *.c BabyISO/*.c -IBabyISO -Wall -DBUILD_VTOY_TOOL -DUSE_DIET_C -o vtoytool_64 /opt/diet64/bin/diet -Os gcc -DVTOY_X86_64 -D_FILE_OFFSET_BITS=64 *.c BabyISO/*.c -IBabyISO -Wall -DBUILD_VTOY_TOOL -DUSE_DIET_C -o vtoytool_64
/opt/diet32/bin/diet -Os gcc -D_FILE_OFFSET_BITS=64 -m32 *.c BabyISO/*.c -IBabyISO -Wall -DBUILD_VTOY_TOOL -DUSE_DIET_C -o vtoytool_32 /opt/diet32/bin/diet -Os gcc -DVTOY_I386 -D_FILE_OFFSET_BITS=64 -m32 *.c BabyISO/*.c -IBabyISO -Wall -DBUILD_VTOY_TOOL -DUSE_DIET_C -o vtoytool_32
aarch64-buildroot-linux-uclibc-gcc -Os -static -D_FILE_OFFSET_BITS=64 *.c BabyISO/*.c -IBabyISO -Wall -DBUILD_VTOY_TOOL -o vtoytool_aa64 aarch64-buildroot-linux-uclibc-gcc -Os -static -DVTOY_AA64 -D_FILE_OFFSET_BITS=64 *.c BabyISO/*.c -IBabyISO -Wall -DBUILD_VTOY_TOOL -o vtoytool_aa64
mips64el-linux-musl-gcc -mips64r2 -mabi=64 -Os -static -D_FILE_OFFSET_BITS=64 *.c BabyISO/*.c -IBabyISO -Wall -DBUILD_VTOY_TOOL -o vtoytool_m64e mips64el-linux-musl-gcc -mips64r2 -mabi=64 -Os -static -DVTOY_MIPS64 -D_FILE_OFFSET_BITS=64 *.c BabyISO/*.c -IBabyISO -Wall -DBUILD_VTOY_TOOL -o vtoytool_m64e
#gcc -D_FILE_OFFSET_BITS=64 -static -Wall -DBUILD_VTOY_TOOL *.c BabyISO/*.c -IBabyISO -o vtoytool_64 #gcc -D_FILE_OFFSET_BITS=64 -static -Wall -DBUILD_VTOY_TOOL *.c BabyISO/*.c -IBabyISO -o vtoytool_64
#gcc -D_FILE_OFFSET_BITS=64 -Wall -DBUILD_VTOY_TOOL -m32 *.c BabyISO/*.c -IBabyISO -o vtoytool_32 #gcc -D_FILE_OFFSET_BITS=64 -Wall -DBUILD_VTOY_TOOL -m32 *.c BabyISO/*.c -IBabyISO -o vtoytool_32

View File

@@ -22,6 +22,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <ctype.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/types.h> #include <sys/types.h>
@@ -444,6 +445,29 @@ static int vtoy_vlnk_printf(ventoy_os_param *param, char *diskname)
return 1; return 1;
} }
static int vtoy_check_iso_path_alpnum(ventoy_os_param *param)
{
char c;
int i = 0;
while (param->vtoy_img_path[i])
{
c = param->vtoy_img_path[i];
if (isalnum(c) || c == '_' || c == '-')
{
}
else
{
return 1;
}
i++;
}
return 0;
}
static int vtoy_check_device(ventoy_os_param *param, const char *device) static int vtoy_check_device(ventoy_os_param *param, const char *device)
{ {
unsigned long long size; unsigned long long size;
@@ -560,6 +584,7 @@ int vtoydump_main(int argc, char **argv)
int rc; int rc;
int ch; int ch;
int print_path = 0; int print_path = 0;
int check_ascii = 0;
int print_fs = 0; int print_fs = 0;
int vlnk_print = 0; int vlnk_print = 0;
char filename[256] = {0}; char filename[256] = {0};
@@ -567,7 +592,7 @@ int vtoydump_main(int argc, char **argv)
char device[64] = {0}; char device[64] = {0};
ventoy_os_param *param = NULL; ventoy_os_param *param = NULL;
while ((ch = getopt(argc, argv, "c:f:p:t:s:v::")) != -1) while ((ch = getopt(argc, argv, "a:c:f:p:t:s:v::")) != -1)
{ {
if (ch == 'f') if (ch == 'f')
{ {
@@ -586,6 +611,11 @@ int vtoydump_main(int argc, char **argv)
print_path = 1; print_path = 1;
strncpy(filename, optarg, sizeof(filename) - 1); strncpy(filename, optarg, sizeof(filename) - 1);
} }
else if (ch == 'a')
{
check_ascii = 1;
strncpy(filename, optarg, sizeof(filename) - 1);
}
else if (ch == 't') else if (ch == 't')
{ {
vlnk_print = 1; vlnk_print = 1;
@@ -660,6 +690,10 @@ int vtoydump_main(int argc, char **argv)
{ {
rc = vtoy_check_device(param, device); rc = vtoy_check_device(param, device);
} }
else if (check_ascii)
{
rc = vtoy_check_iso_path_alpnum(param);
}
else else
{ {
// print os param, you can change the output format in the function // print os param, you can change the output format in the function

View File

@@ -24,6 +24,9 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <unistd.h> #include <unistd.h>
#ifdef VTOY_X86_64
#include <cpuid.h>
#endif
#define _ull unsigned long long #define _ull unsigned long long
@@ -177,7 +180,8 @@ typedef struct ko_param
unsigned long sym_put_addr; unsigned long sym_put_addr;
unsigned long sym_put_size; unsigned long sym_put_size;
unsigned long kv_major; unsigned long kv_major;
unsigned long padding[2]; unsigned long ibt;
unsigned long padding[1];
}ko_param; }ko_param;
#pragma pack() #pragma pack()
@@ -486,6 +490,7 @@ int vtoykmod_fill_param(char **argv)
param->reg_kprobe_addr = strtoul(argv[9], NULL, 16); param->reg_kprobe_addr = strtoul(argv[9], NULL, 16);
param->unreg_kprobe_addr = strtoul(argv[10], NULL, 16); param->unreg_kprobe_addr = strtoul(argv[10], NULL, 16);
param->kv_major = (unsigned long)(argv[11][0] - '0'); param->kv_major = (unsigned long)(argv[11][0] - '0');
param->ibt = strtoul(argv[12], NULL, 16);;
debug("pgsize=%lu (%s)\n", param->pgsize, argv[1]); debug("pgsize=%lu (%s)\n", param->pgsize, argv[1]);
debug("printk_addr=0x%lx (%s)\n", param->printk_addr, argv[2]); debug("printk_addr=0x%lx (%s)\n", param->printk_addr, argv[2]);
@@ -498,6 +503,7 @@ int vtoykmod_fill_param(char **argv)
debug("reg_kprobe_addr=0x%lx (%s)\n", param->reg_kprobe_addr, argv[9]); debug("reg_kprobe_addr=0x%lx (%s)\n", param->reg_kprobe_addr, argv[9]);
debug("unreg_kprobe_addr=0x%lx (%s)\n", param->unreg_kprobe_addr, argv[10]); debug("unreg_kprobe_addr=0x%lx (%s)\n", param->unreg_kprobe_addr, argv[10]);
debug("kv_major=%lu (%s)\n", param->kv_major, argv[11]); debug("kv_major=%lu (%s)\n", param->kv_major, argv[11]);
debug("ibt=0x%lx (%s)\n", param->ibt, argv[12]);
break; break;
} }
@@ -514,6 +520,26 @@ int vtoykmod_fill_param(char **argv)
return 0; return 0;
} }
#ifdef VTOY_X86_64
static int vtoykmod_check_ibt(void)
{
uint32_t eax = 0, ebx = 0, ecx = 0, edx = 0;
__cpuid_count(7, 0, eax, ebx, ecx, edx);
if (edx & (1 << 20))
{
return 0;
}
return 1;
}
#else
static int vtoykmod_check_ibt(void)
{
return 1;
}
#endif
int vtoykmod_main(int argc, char **argv) int vtoykmod_main(int argc, char **argv)
{ {
int i; int i;
@@ -535,6 +561,10 @@ int vtoykmod_main(int argc, char **argv)
{ {
return vtoykmod_update(argv[2], argv[3]); return vtoykmod_update(argv[2], argv[3]);
} }
else if (argv[1][0] == '-' && argv[1][1] == 'I')
{
return vtoykmod_check_ibt();
}
return 0; return 0;
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -4,7 +4,7 @@ Build a static linked, small zstdcat tool
use an old version of zstd use an old version of zstd
https://codeload.github.com/facebook/zstd/zip/v1.0.0 https://codeload.github.com/facebook/zstd/zip/v1.0.0
======== Build Envrioment ======== ======== Build Environment ========
build for 32bit, static linked with dietlibc build for 32bit, static linked with dietlibc
1. install centos 6.10 i386 with CentOS-6.10-i386-bin-DVD1.iso 1. install centos 6.10 i386 with CentOS-6.10-i386-bin-DVD1.iso
2. yum install gcc gettext gettext-devel 2. yum install gcc gettext gettext-devel

View File

@@ -2191,7 +2191,7 @@ static BOOL VentoyIsNeedBypass(const char *isofile, const char MntLetter)
} }
else else
{ {
Log("This is not Windows 11, not need to bypass.", Major); Log("This is not Windows 11, not need to bypass %u.", Major);
} }
End: End: