mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-09-18 18:01:14 +00:00
Compare commits
47 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
17f9e2fd09 | ||
|
6b22a6200e | ||
|
860dce6683 | ||
|
7fc72d5ce6 | ||
|
b7c3cbd23b | ||
|
3de97bdf44 | ||
|
e79dc57ebe | ||
|
7bf85a1ef8 | ||
|
a5e0641226 | ||
|
2c65eec9ec | ||
|
0c310c5bd8 | ||
|
c81b49807b | ||
|
085e20f64d | ||
|
ff3ce4da66 | ||
|
81d3492a61 | ||
|
635b1a1c6c | ||
|
10b80f2690 | ||
|
36c21a21e4 | ||
|
13eb9829fa | ||
|
88f77c01e4 | ||
|
11b30dab5f | ||
|
fb729146de | ||
|
92bd6733dd | ||
|
9e28dd1394 | ||
|
4100e7a886 | ||
|
a4f5ce2c9e | ||
|
c7967ea476 | ||
|
3e7f1ca764 | ||
|
1bc18295ae | ||
|
b4f1f11742 | ||
|
20010c5e88 | ||
|
1de18e43c5 | ||
|
15299d4d87 | ||
|
5d6d6df39b | ||
|
096cc99c3c | ||
|
602e8c7fdf | ||
|
da35a99f7c | ||
|
e46e24dde7 | ||
|
0b81845e42 | ||
|
3c621e4aca | ||
|
aecc579fcc | ||
|
598af7f45c | ||
|
24b05c0345 | ||
|
6d72617ef6 | ||
|
351f15ff18 | ||
|
1ee65a60c2 | ||
|
ecbf45defe |
12
.github/ISSUE_TEMPLATE/issue_template.yml
vendored
12
.github/ISSUE_TEMPLATE/issue_template.yml
vendored
@@ -21,7 +21,7 @@ body:
|
||||
attributes:
|
||||
label: Ventoy Version
|
||||
description: What version of ventoy are you running?
|
||||
placeholder: 1.0.76
|
||||
placeholder: 1.0.80
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
@@ -34,6 +34,16 @@ body:
|
||||
- No. I didn't try the latest release.
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: alternativemode
|
||||
attributes:
|
||||
label: Try alternative boot mode
|
||||
description: Have you tried alternative boot mode? (wimboot mode for Windows/WinPE, grub2 mode for linux)
|
||||
options:
|
||||
- Yes. I have tried them, but the bug still exist.
|
||||
- No. I didn't try these alternative boot modes.
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: bios
|
||||
attributes:
|
||||
|
@@ -85,7 +85,7 @@ body:
|
||||
- type: input
|
||||
id: testenv
|
||||
attributes:
|
||||
label: Test envrionment
|
||||
label: Test environment
|
||||
description: The manufacturer/model and other details about your computer (or VM).
|
||||
placeholder: Lenovo Thinkpad T420 laptop
|
||||
validations:
|
||||
|
@@ -82,12 +82,34 @@ static volatile ko_param g_ko_param =
|
||||
|
||||
#define vdebug(fmt, args...) if(kprintf) kprintf(KERN_ERR fmt, ##args)
|
||||
|
||||
static int notrace dmpatch_replace_code(unsigned long addr, unsigned long size, int expect, const char *desc)
|
||||
static unsigned char *g_get_patch[MAX_PATCH] = { NULL };
|
||||
static unsigned char *g_put_patch[MAX_PATCH] = { NULL };
|
||||
|
||||
static void notrace dmpatch_restore_code(unsigned char *opCode)
|
||||
{
|
||||
unsigned long align;
|
||||
|
||||
if (opCode)
|
||||
{
|
||||
align = (unsigned long)opCode / g_ko_param.pgsize * g_ko_param.pgsize;
|
||||
set_mem_rw(align, 1);
|
||||
*opCode = 0x80;
|
||||
set_mem_ro(align, 1);
|
||||
}
|
||||
}
|
||||
|
||||
static int notrace dmpatch_replace_code
|
||||
(
|
||||
unsigned long addr,
|
||||
unsigned long size,
|
||||
int expect,
|
||||
const char *desc,
|
||||
unsigned char **patch
|
||||
)
|
||||
{
|
||||
int i = 0;
|
||||
int cnt = 0;
|
||||
unsigned long align;
|
||||
unsigned char *patch[MAX_PATCH];
|
||||
unsigned char *opCode = (unsigned char *)addr;
|
||||
|
||||
vdebug("patch for %s 0x%lx %d\n", desc, addr, (int)size);
|
||||
@@ -147,7 +169,7 @@ static int notrace dmpatch_init(void)
|
||||
reg_kprobe = (kprobe_reg_pf)g_ko_param.reg_kprobe_addr;
|
||||
unreg_kprobe = (kprobe_unreg_pf)g_ko_param.unreg_kprobe_addr;
|
||||
|
||||
r = dmpatch_replace_code(g_ko_param.sym_get_addr, g_ko_param.sym_get_size, 2, "dm_get_table_device");
|
||||
r = dmpatch_replace_code(g_ko_param.sym_get_addr, g_ko_param.sym_get_size, 2, "dm_get_table_device", g_get_patch);
|
||||
if (r)
|
||||
{
|
||||
rc = -EINVAL;
|
||||
@@ -155,7 +177,7 @@ static int notrace dmpatch_init(void)
|
||||
}
|
||||
vdebug("patch dm_get_table_device success\n");
|
||||
|
||||
r = dmpatch_replace_code(g_ko_param.sym_put_addr, g_ko_param.sym_put_size, 1, "dm_put_table_device");
|
||||
r = dmpatch_replace_code(g_ko_param.sym_put_addr, g_ko_param.sym_put_size, 1, "dm_put_table_device", g_put_patch);
|
||||
if (r)
|
||||
{
|
||||
rc = -EINVAL;
|
||||
@@ -174,7 +196,15 @@ out:
|
||||
|
||||
static void notrace dmpatch_exit(void)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
for (i = 0; i < MAX_PATCH; i++)
|
||||
{
|
||||
dmpatch_restore_code(g_get_patch[i]);
|
||||
dmpatch_restore_code(g_put_patch[i]);
|
||||
}
|
||||
|
||||
vdebug("dmpatch_exit success\n");
|
||||
}
|
||||
|
||||
module_init(dmpatch_init);
|
||||
|
@@ -34,7 +34,7 @@
|
||||
https://codeload.github.com/libfuse/libfuse/zip/fuse-2.9.9 ===> /home/Ventoy-master/ExFAT/libfuse-fuse-2.9.9.zip
|
||||
https://releases.linaro.org/components/toolchain/binaries/7.4-2019.02/aarch64-linux-gnu/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz ===> /opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz
|
||||
https://toolchains.bootlin.com/downloads/releases/toolchains/aarch64/tarballs/aarch64--uclibc--stable-2020.08-1.tar.bz2 ===> /opt/aarch64--uclibc--stable-2020.08-1.tar.bz2
|
||||
http://ftp.loongnix.org/toolchain/gcc/release/mips-loongson-gcc7.3-2019.06-29-linux-gnu.tar.gz ===> /opt/mips-loongson-gcc7.3-2019.06-29-linux-gnu.tar.gz
|
||||
http://ftp.loongnix.cn/toolchain/gcc/release/mips/gcc7/mips-loongson-gcc7.3-2019.06-29-linux-gnu.tar.gz ===> /opt/mips-loongson-gcc7.3-2019.06-29-linux-gnu.tar.gz
|
||||
https://github.com/ventoy/musl-cross-make/releases/download/latest/output.tar.bz2 ===> /opt/output.tar.bz2
|
||||
|
||||
|
||||
|
@@ -60,7 +60,7 @@ ventoy_grub_param_file_replace *g_file_replace_list = NULL;
|
||||
ventoy_efi_file_replace g_efi_file_replace;
|
||||
|
||||
ventoy_grub_param_file_replace *g_img_replace_list = NULL;
|
||||
ventoy_efi_file_replace g_img_file_replace;
|
||||
ventoy_efi_file_replace g_img_file_replace[VTOY_MAX_CONF_REPLACE];
|
||||
|
||||
CONST CHAR16 gIso9660EfiDriverPath[] = ISO9660_EFI_DRIVER_PATH;
|
||||
CONST CHAR16 gUdfEfiDriverPath[] = UDF_EFI_DRIVER_PATH;
|
||||
@@ -829,6 +829,7 @@ STATIC EFI_STATUS EFIAPI ventoy_parse_cmdline(IN EFI_HANDLE ImageHandle)
|
||||
ventoy_grub_param *pGrubParam = NULL;
|
||||
EFI_LOADED_IMAGE_PROTOCOL *pImageInfo = NULL;
|
||||
ventoy_chain_head *chain = NULL;
|
||||
ventoy_grub_param_file_replace *replace = NULL;
|
||||
|
||||
Status = gBS->HandleProtocol(ImageHandle, &gEfiLoadedImageProtocolGuid, (VOID **)&pImageInfo);
|
||||
if (EFI_ERROR(Status))
|
||||
@@ -926,18 +927,27 @@ STATIC EFI_STATUS EFIAPI ventoy_parse_cmdline(IN EFI_HANDLE ImageHandle)
|
||||
old_cnt > 3 ? g_file_replace_list->old_file_name[3] : ""
|
||||
);
|
||||
|
||||
g_img_replace_list = &pGrubParam->img_replace;
|
||||
ventoy_proc_img_replace_name(g_img_replace_list);
|
||||
old_cnt = g_img_replace_list->old_file_cnt;
|
||||
debug("img replace: magic:0x%x virtid:%u name count:%u <%a> <%a> <%a> <%a>",
|
||||
g_img_replace_list->magic,
|
||||
g_img_replace_list->new_file_virtual_id,
|
||||
|
||||
for (i = 0; i < VTOY_MAX_CONF_REPLACE; i++)
|
||||
{
|
||||
replace = pGrubParam->img_replace + i;
|
||||
if (replace->magic == GRUB_IMG_REPLACE_MAGIC)
|
||||
{
|
||||
ventoy_proc_img_replace_name(replace);
|
||||
old_cnt = replace->old_file_cnt;
|
||||
debug("img replace[%d]: magic:0x%x virtid:%u name count:%u <%a> <%a> <%a> <%a>",
|
||||
i, replace->magic,
|
||||
replace->new_file_virtual_id,
|
||||
old_cnt,
|
||||
old_cnt > 0 ? g_img_replace_list->old_file_name[0] : "",
|
||||
old_cnt > 1 ? g_img_replace_list->old_file_name[1] : "",
|
||||
old_cnt > 2 ? g_img_replace_list->old_file_name[2] : "",
|
||||
old_cnt > 3 ? g_img_replace_list->old_file_name[3] : ""
|
||||
old_cnt > 0 ? replace->old_file_name[0] : "",
|
||||
old_cnt > 1 ? replace->old_file_name[1] : "",
|
||||
old_cnt > 2 ? replace->old_file_name[2] : "",
|
||||
old_cnt > 3 ? replace->old_file_name[3] : ""
|
||||
);
|
||||
g_img_replace_list = pGrubParam->img_replace;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pPos = StrStr(pCmdLine, L"mem:");
|
||||
chain = (ventoy_chain_head *)StrHexToUintn(pPos + 4);
|
||||
@@ -1178,8 +1188,7 @@ EFI_STATUS EFIAPI ventoy_boot(IN EFI_HANDLE ImageHandle)
|
||||
gST->ConIn->Reset(gST->ConIn, FALSE);
|
||||
}
|
||||
|
||||
if ((g_file_replace_list && g_file_replace_list->magic == GRUB_FILE_REPLACE_MAGIC) ||
|
||||
(g_img_replace_list && g_img_replace_list->magic == GRUB_IMG_REPLACE_MAGIC))
|
||||
if ((g_file_replace_list && g_file_replace_list->magic == GRUB_FILE_REPLACE_MAGIC) || g_img_replace_list)
|
||||
{
|
||||
ventoy_wrapper_push_openvolume(pFile->OpenVolume);
|
||||
pFile->OpenVolume = ventoy_wrapper_open_volume;
|
||||
|
@@ -244,6 +244,7 @@ typedef int (*grub_env_printf_pf)(const char *fmt, ...);
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
#define VTOY_MAX_CONF_REPLACE 2
|
||||
#define GRUB_FILE_REPLACE_MAGIC 0x1258BEEF
|
||||
#define GRUB_IMG_REPLACE_MAGIC 0x1259BEEF
|
||||
|
||||
@@ -270,7 +271,7 @@ typedef struct ventoy_grub_param
|
||||
grub_env_get_pf grub_env_get;
|
||||
grub_env_set_pf grub_env_set;
|
||||
ventoy_grub_param_file_replace file_replace;
|
||||
ventoy_grub_param_file_replace img_replace;
|
||||
ventoy_grub_param_file_replace img_replace[VTOY_MAX_CONF_REPLACE];
|
||||
grub_env_printf_pf grub_env_printf;
|
||||
}ventoy_grub_param;
|
||||
|
||||
@@ -400,7 +401,7 @@ extern ventoy_virt_chunk *g_virt_chunk;
|
||||
extern UINT32 g_virt_chunk_num;
|
||||
extern vtoy_block_data gBlockData;
|
||||
extern ventoy_efi_file_replace g_efi_file_replace;
|
||||
extern ventoy_efi_file_replace g_img_file_replace;
|
||||
extern ventoy_efi_file_replace g_img_file_replace[VTOY_MAX_CONF_REPLACE];
|
||||
extern ventoy_sector_flag *g_sector_flag;
|
||||
extern UINT32 g_sector_flag_num;
|
||||
extern BOOLEAN gMemdiskMode;
|
||||
|
@@ -37,9 +37,6 @@
|
||||
#include <Protocol/DriverBinding.h>
|
||||
#include <Ventoy.h>
|
||||
|
||||
#define ASSIGN_REPLACE(This, replace) \
|
||||
replace = (This->FlushEx == ventoy_wrapper_file_flush_ex) ? &g_efi_file_replace : &g_img_file_replace
|
||||
|
||||
UINT8 *g_iso_data_buf = NULL;
|
||||
UINTN g_iso_buf_size = 0;
|
||||
BOOLEAN gMemdiskMode = FALSE;
|
||||
@@ -1251,13 +1248,96 @@ ventoy_wrapper_file_flush_ex(EFI_FILE_HANDLE This, EFI_FILE_IO_TOKEN *Token)
|
||||
|
||||
/* Ex version */
|
||||
STATIC EFI_STATUS EFIAPI
|
||||
ventoy_wrapper_file_flush_ex_img(EFI_FILE_HANDLE This, EFI_FILE_IO_TOKEN *Token)
|
||||
ventoy_wrapper_file_flush_ex_img0(EFI_FILE_HANDLE This, EFI_FILE_IO_TOKEN *Token)
|
||||
{
|
||||
(VOID)This;
|
||||
(VOID)Token;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
/* Ex version */
|
||||
STATIC EFI_STATUS EFIAPI
|
||||
ventoy_wrapper_file_flush_ex_img1(EFI_FILE_HANDLE This, EFI_FILE_IO_TOKEN *Token)
|
||||
{
|
||||
(VOID)This;
|
||||
(VOID)Token;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
#define DEF_WRAP_FUNC(n) \
|
||||
STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_flush_ex_img#n(EFI_FILE_HANDLE This, EFI_FILE_IO_TOKEN *Token) \
|
||||
{\
|
||||
(VOID)This;\
|
||||
(VOID)Token;\
|
||||
return EFI_SUCCESS;\
|
||||
}
|
||||
|
||||
#define ITEM_WRAP_FUNC(n) ventoy_wrapper_file_flush_ex_img#n
|
||||
|
||||
#if (VTOY_MAX_CONF_REPLACE > 2)
|
||||
DEF_WRAP_FUNC(2);
|
||||
#endif
|
||||
#if (VTOY_MAX_CONF_REPLACE > 3)
|
||||
DEF_WRAP_FUNC(3);
|
||||
#endif
|
||||
#if (VTOY_MAX_CONF_REPLACE > 4)
|
||||
DEF_WRAP_FUNC(4);
|
||||
#endif
|
||||
#if (VTOY_MAX_CONF_REPLACE > 5)
|
||||
DEF_WRAP_FUNC(5);
|
||||
#endif
|
||||
#if (VTOY_MAX_CONF_REPLACE > 6)
|
||||
DEF_WRAP_FUNC(6);
|
||||
#endif
|
||||
#if (VTOY_MAX_CONF_REPLACE > 7)
|
||||
DEF_WRAP_FUNC(7);
|
||||
#endif
|
||||
#if (VTOY_MAX_CONF_REPLACE > 8)
|
||||
#error "VTOY_MAX_CONF_REPLACE overflow"
|
||||
#endif
|
||||
|
||||
static EFI_FILE_FLUSH_EX g_img_flush_func[VTOY_MAX_CONF_REPLACE] =
|
||||
{
|
||||
ventoy_wrapper_file_flush_ex_img0,
|
||||
ventoy_wrapper_file_flush_ex_img1,
|
||||
#if (VTOY_MAX_CONF_REPLACE > 2)
|
||||
ITEM_WRAP_FUNC(2),
|
||||
#endif
|
||||
#if (VTOY_MAX_CONF_REPLACE > 3)
|
||||
ITEM_WRAP_FUNC(3),
|
||||
#endif
|
||||
#if (VTOY_MAX_CONF_REPLACE > 4)
|
||||
ITEM_WRAP_FUNC(4),
|
||||
#endif
|
||||
#if (VTOY_MAX_CONF_REPLACE > 5)
|
||||
ITEM_WRAP_FUNC(5),
|
||||
#endif
|
||||
#if (VTOY_MAX_CONF_REPLACE > 6)
|
||||
ITEM_WRAP_FUNC(6),
|
||||
#endif
|
||||
#if (VTOY_MAX_CONF_REPLACE > 7)
|
||||
ITEM_WRAP_FUNC(7),
|
||||
#endif
|
||||
};
|
||||
|
||||
STATIC ventoy_efi_file_replace *ventoy_wrapper_get_replace(EFI_FILE_HANDLE This)
|
||||
{
|
||||
UINTN i;
|
||||
|
||||
if (This->FlushEx == ventoy_wrapper_file_flush_ex)
|
||||
{
|
||||
return &g_efi_file_replace;
|
||||
}
|
||||
|
||||
for (i = 0; i < VTOY_MAX_CONF_REPLACE; i++)
|
||||
{
|
||||
if (This->FlushEx == g_img_flush_func[i])
|
||||
{
|
||||
return g_img_file_replace + i;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
STATIC EFI_STATUS EFIAPI
|
||||
ventoy_wrapper_file_write(EFI_FILE_HANDLE This, UINTN *Len, VOID *Data)
|
||||
@@ -1288,7 +1368,7 @@ ventoy_wrapper_file_set_pos(EFI_FILE_HANDLE This, UINT64 Position)
|
||||
{
|
||||
ventoy_efi_file_replace *replace = NULL;
|
||||
|
||||
ASSIGN_REPLACE(This, replace);
|
||||
replace = ventoy_wrapper_get_replace(This);
|
||||
|
||||
if (Position <= replace->FileSizeBytes)
|
||||
{
|
||||
@@ -1307,7 +1387,7 @@ ventoy_wrapper_file_get_pos(EFI_FILE_HANDLE This, UINT64 *Position)
|
||||
{
|
||||
ventoy_efi_file_replace *replace = NULL;
|
||||
|
||||
ASSIGN_REPLACE(This, replace);
|
||||
replace = ventoy_wrapper_get_replace(This);
|
||||
|
||||
*Position = replace->CurPos;
|
||||
|
||||
@@ -1321,7 +1401,7 @@ ventoy_wrapper_file_get_info(EFI_FILE_HANDLE This, EFI_GUID *Type, UINTN *Len, V
|
||||
EFI_FILE_INFO *Info = (EFI_FILE_INFO *) Data;
|
||||
ventoy_efi_file_replace *replace = NULL;
|
||||
|
||||
ASSIGN_REPLACE(This, replace);
|
||||
replace = ventoy_wrapper_get_replace(This);
|
||||
|
||||
debug("ventoy_wrapper_file_get_info ... %u", *Len);
|
||||
|
||||
@@ -1356,7 +1436,7 @@ ventoy_wrapper_file_read(EFI_FILE_HANDLE This, UINTN *Len, VOID *Data)
|
||||
UINTN ReadLen = *Len;
|
||||
ventoy_efi_file_replace *replace = NULL;
|
||||
|
||||
ASSIGN_REPLACE(This, replace);
|
||||
replace = ventoy_wrapper_get_replace(This);
|
||||
|
||||
debug("ventoy_wrapper_file_read ... %u", *Len);
|
||||
|
||||
@@ -1382,7 +1462,7 @@ ventoy_wrapper_file_read_ex(IN EFI_FILE_PROTOCOL *This, IN OUT EFI_FILE_IO_TOKEN
|
||||
return ventoy_wrapper_file_read(This, &(Token->BufferSize), Token->Buffer);
|
||||
}
|
||||
|
||||
STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_procotol(EFI_FILE_PROTOCOL *File, BOOLEAN Img)
|
||||
STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_procotol(EFI_FILE_PROTOCOL *File, BOOLEAN Img, UINTN Index)
|
||||
{
|
||||
File->Revision = EFI_FILE_PROTOCOL_REVISION2;
|
||||
File->Open = ventoy_wrapper_fs_open;
|
||||
@@ -1398,7 +1478,15 @@ STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_procotol(EFI_FILE_PROTOCOL *File, B
|
||||
File->OpenEx = ventoy_wrapper_file_open_ex;
|
||||
File->ReadEx = ventoy_wrapper_file_read_ex;
|
||||
File->WriteEx = ventoy_wrapper_file_write_ex;
|
||||
File->FlushEx = Img ? ventoy_wrapper_file_flush_ex_img : ventoy_wrapper_file_flush_ex;
|
||||
|
||||
if (Img)
|
||||
{
|
||||
File->FlushEx = g_img_flush_func[Index];
|
||||
}
|
||||
else
|
||||
{
|
||||
File->FlushEx = ventoy_wrapper_file_flush_ex;
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
@@ -1419,6 +1507,7 @@ STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_open
|
||||
CHAR8 TmpName[256];
|
||||
CHAR8 OldName[256];
|
||||
ventoy_virt_chunk *virt = NULL;
|
||||
ventoy_grub_param_file_replace *replace = NULL;
|
||||
|
||||
debug("## ventoy_wrapper_file_open <%s> ", Name);
|
||||
|
||||
@@ -1449,7 +1538,7 @@ STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_open
|
||||
{
|
||||
g_original_fclose(*New);
|
||||
*New = &g_efi_file_replace.WrapperHandle;
|
||||
ventoy_wrapper_file_procotol(*New, FALSE);
|
||||
ventoy_wrapper_file_procotol(*New, FALSE, 0);
|
||||
|
||||
virt = g_virt_chunk + g_file_replace_list->new_file_virtual_id;
|
||||
|
||||
@@ -1475,15 +1564,18 @@ STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_open
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (g_img_replace_list && g_img_replace_list->magic == GRUB_IMG_REPLACE_MAGIC &&
|
||||
g_img_replace_list->new_file_virtual_id < g_virt_chunk_num)
|
||||
for (i = 0; g_img_replace_list && i < VTOY_MAX_CONF_REPLACE; i++)
|
||||
{
|
||||
replace = g_img_replace_list + i;
|
||||
if (replace->magic != GRUB_IMG_REPLACE_MAGIC || replace->new_file_virtual_id >= g_virt_chunk_num)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
AsciiSPrint(TmpName, sizeof(TmpName), "%s", Name);
|
||||
for (j = 0; j < g_img_replace_list->old_file_cnt; j++)
|
||||
for (j = 0; j < replace->old_file_cnt; j++)
|
||||
{
|
||||
AsciiStrCpyS(OldName, sizeof(OldName), g_img_replace_list[i].old_file_name[j]);
|
||||
AsciiStrCpyS(OldName, sizeof(OldName), replace->old_file_name[j]);
|
||||
if ((0 == AsciiStrCmp(OldName, TmpName)) ||
|
||||
(AsciiStrnCmp(OldName, "\\loader\\entries\\", 16) == 0 &&
|
||||
AsciiStrCmp(OldName + 16, TmpName) == 0
|
||||
@@ -1491,32 +1583,32 @@ STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_open
|
||||
)
|
||||
{
|
||||
g_original_fclose(*New);
|
||||
*New = &g_img_file_replace.WrapperHandle;
|
||||
ventoy_wrapper_file_procotol(*New, TRUE);
|
||||
*New = &(g_img_file_replace[i].WrapperHandle);
|
||||
ventoy_wrapper_file_procotol(*New, TRUE, i);
|
||||
|
||||
virt = g_virt_chunk + g_img_replace_list->new_file_virtual_id;
|
||||
virt = g_virt_chunk + replace->new_file_virtual_id;
|
||||
|
||||
Sectors = (virt->mem_sector_end - virt->mem_sector_start) + (virt->remap_sector_end - virt->remap_sector_start);
|
||||
|
||||
g_img_file_replace.BlockIoSectorStart = virt->mem_sector_start;
|
||||
g_img_file_replace.FileSizeBytes = Sectors * 2048;
|
||||
g_img_file_replace[i].BlockIoSectorStart = virt->mem_sector_start;
|
||||
g_img_file_replace[i].FileSizeBytes = Sectors * 2048;
|
||||
|
||||
if (gDebugPrint)
|
||||
{
|
||||
debug("## ventoy_wrapper_file_open2 <%s> BlockStart:%lu Sectors:%lu Bytes:%lu", Name,
|
||||
g_img_file_replace.BlockIoSectorStart, Sectors, Sectors * 2048);
|
||||
g_img_file_replace[i].BlockIoSectorStart, Sectors, Sectors * 2048);
|
||||
sleep(3);
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (StrCmp(Name, L"\\loader\\entries") == 0)
|
||||
if (g_img_replace_list && StrCmp(Name, L"\\loader\\entries") == 0)
|
||||
{
|
||||
(*New)->Open = ventoy_wrapper_file_open;
|
||||
}
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
@@ -28,6 +28,8 @@ typedef int (*grub_env_set_pf)(const char *name, const char *val);
|
||||
typedef const char * (*grub_env_get_pf)(const char *name);
|
||||
typedef int (*grub_env_printf_pf)(const char *fmt, ...);
|
||||
|
||||
#define VTOY_MAX_CONF_REPLACE 2
|
||||
|
||||
typedef struct ventoy_grub_param_file_replace
|
||||
{
|
||||
UINT32 magic;
|
||||
@@ -41,7 +43,7 @@ typedef struct ventoy_grub_param
|
||||
grub_env_get_pf grub_env_get;
|
||||
grub_env_set_pf grub_env_set;
|
||||
ventoy_grub_param_file_replace file_replace;
|
||||
ventoy_grub_param_file_replace img_replace;
|
||||
ventoy_grub_param_file_replace img_replace[VTOY_MAX_CONF_REPLACE];
|
||||
grub_env_printf_pf grub_env_printf;
|
||||
}ventoy_grub_param;
|
||||
#pragma pack()
|
||||
|
@@ -229,6 +229,13 @@ test_parse (char **args, int *argn, int argc)
|
||||
(*argn) += 3;
|
||||
continue;
|
||||
}
|
||||
if (grub_strcmp (args[*argn + 1], "-EQ") == 0)
|
||||
{
|
||||
update_val (grub_strtoull (args[*argn], 0, 0)
|
||||
== grub_strtoull (args[*argn + 2], 0, 0), &ctx);
|
||||
(*argn) += 3;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (grub_strcmp (args[*argn + 1], "-ge") == 0)
|
||||
{
|
||||
@@ -237,6 +244,13 @@ test_parse (char **args, int *argn, int argc)
|
||||
(*argn) += 3;
|
||||
continue;
|
||||
}
|
||||
if (grub_strcmp (args[*argn + 1], "-GE") == 0)
|
||||
{
|
||||
update_val (grub_strtoull (args[*argn], 0, 0)
|
||||
>= grub_strtoull (args[*argn + 2], 0, 0), &ctx);
|
||||
(*argn) += 3;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (grub_strcmp (args[*argn + 1], "-gt") == 0)
|
||||
{
|
||||
@@ -245,6 +259,13 @@ test_parse (char **args, int *argn, int argc)
|
||||
(*argn) += 3;
|
||||
continue;
|
||||
}
|
||||
if (grub_strcmp (args[*argn + 1], "-GT") == 0)
|
||||
{
|
||||
update_val (grub_strtoull (args[*argn], 0, 0)
|
||||
> grub_strtoull (args[*argn + 2], 0, 0), &ctx);
|
||||
(*argn) += 3;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (grub_strcmp (args[*argn + 1], "-le") == 0)
|
||||
{
|
||||
@@ -253,6 +274,13 @@ test_parse (char **args, int *argn, int argc)
|
||||
(*argn) += 3;
|
||||
continue;
|
||||
}
|
||||
if (grub_strcmp (args[*argn + 1], "-LE") == 0)
|
||||
{
|
||||
update_val (grub_strtoull (args[*argn], 0, 0)
|
||||
<= grub_strtoull (args[*argn + 2], 0, 0), &ctx);
|
||||
(*argn) += 3;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (grub_strcmp (args[*argn + 1], "-lt") == 0)
|
||||
{
|
||||
@@ -261,6 +289,13 @@ test_parse (char **args, int *argn, int argc)
|
||||
(*argn) += 3;
|
||||
continue;
|
||||
}
|
||||
if (grub_strcmp (args[*argn + 1], "-LT") == 0)
|
||||
{
|
||||
update_val (grub_strtoull (args[*argn], 0, 0)
|
||||
< grub_strtoull (args[*argn + 2], 0, 0), &ctx);
|
||||
(*argn) += 3;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (grub_strcmp (args[*argn + 1], "-ne") == 0)
|
||||
{
|
||||
@@ -269,6 +304,13 @@ test_parse (char **args, int *argn, int argc)
|
||||
(*argn) += 3;
|
||||
continue;
|
||||
}
|
||||
if (grub_strcmp (args[*argn + 1], "-NE") == 0)
|
||||
{
|
||||
update_val (grub_strtoull (args[*argn], 0, 0)
|
||||
!= grub_strtoull (args[*argn + 2], 0, 0), &ctx);
|
||||
(*argn) += 3;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* GRUB extension: compare numbers skipping prefixes.
|
||||
Useful for comparing versions. E.g. vmlinuz-2 -plt vmlinuz-11. */
|
||||
|
@@ -939,24 +939,28 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
|
||||
goto refresh;
|
||||
|
||||
case (GRUB_TERM_CTRL | 'i'):
|
||||
case 'i':
|
||||
menu_fini ();
|
||||
g_ventoy_iso_raw = 1 - g_ventoy_iso_raw;
|
||||
g_ventoy_menu_refresh = 1;
|
||||
goto refresh;
|
||||
|
||||
case (GRUB_TERM_CTRL | 'r'):
|
||||
case 'r':
|
||||
menu_fini ();
|
||||
g_ventoy_grub2_mode = 1 - g_ventoy_grub2_mode;
|
||||
g_ventoy_menu_refresh = 1;
|
||||
goto refresh;
|
||||
|
||||
case (GRUB_TERM_CTRL | 'w'):
|
||||
case 'w':
|
||||
menu_fini ();
|
||||
g_ventoy_wimboot_mode = 1 - g_ventoy_wimboot_mode;
|
||||
g_ventoy_menu_refresh = 1;
|
||||
goto refresh;
|
||||
|
||||
case (GRUB_TERM_CTRL | 'u'):
|
||||
case 'u':
|
||||
menu_fini ();
|
||||
g_ventoy_iso_uefi_drv = 1 - g_ventoy_iso_uefi_drv;
|
||||
g_ventoy_menu_refresh = 1;
|
||||
|
@@ -171,6 +171,11 @@ static int ventoy_browser_iterate_partition(struct grub_disk *disk, const grub_p
|
||||
|
||||
fs->fs_label(dev, &Label);
|
||||
|
||||
if (ventoy_check_file_exist("(%s)/.ventoyignore", partname))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (g_tree_view_menu_style == 0)
|
||||
{
|
||||
grub_snprintf(title, sizeof(title), "%-10s (%s,%s%d) [%s] %s %s",
|
||||
@@ -311,6 +316,25 @@ static int ventoy_browser_valid_filename(const char *filename, int len, int *typ
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int ventoy_browser_check_ignore(const char *device, const char *root, const char *dir)
|
||||
{
|
||||
grub_file_t file;
|
||||
char fullpath[1024] = {0};
|
||||
|
||||
grub_snprintf(fullpath, 1023, "(%s)%s/%s/.ventoyignore", device, root, dir);
|
||||
file = grub_file_open(fullpath, GRUB_FILE_TYPE_NONE);
|
||||
if (!file)
|
||||
{
|
||||
grub_errno = 0;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
grub_file_close(file);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
static int ventoy_browser_iterate_dir(const char *filename, const struct grub_dirhook_info *info, void *data)
|
||||
{
|
||||
int type;
|
||||
@@ -328,6 +352,11 @@ static int ventoy_browser_iterate_dir(const char *filename, const struct grub_di
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ventoy_browser_check_ignore(g_menu_device, g_menu_path_buf, filename))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
node = grub_zalloc(sizeof(browser_node));
|
||||
if (!node)
|
||||
{
|
||||
|
@@ -107,12 +107,14 @@ grub_uint32_t g_wimiso_size = 0;
|
||||
|
||||
int g_vhdboot_enable = 0;
|
||||
|
||||
grub_uint64_t g_conf_replace_offset = 0;
|
||||
grub_uint64_t g_svd_replace_offset = 0;
|
||||
conf_replace *g_conf_replace_node = NULL;
|
||||
grub_uint8_t *g_conf_replace_new_buf = NULL;
|
||||
int g_conf_replace_new_len = 0;
|
||||
int g_conf_replace_new_len_align = 0;
|
||||
|
||||
int g_conf_replace_count = 0;
|
||||
grub_uint64_t g_conf_replace_offset[VTOY_MAX_CONF_REPLACE] = { 0 };
|
||||
conf_replace *g_conf_replace_node[VTOY_MAX_CONF_REPLACE] = { NULL };
|
||||
grub_uint8_t *g_conf_replace_new_buf[VTOY_MAX_CONF_REPLACE] = { NULL };
|
||||
int g_conf_replace_new_len[VTOY_MAX_CONF_REPLACE] = { 0 };
|
||||
int g_conf_replace_new_len_align[VTOY_MAX_CONF_REPLACE] = { 0 };
|
||||
|
||||
int g_ventoy_disk_bios_id = 0;
|
||||
ventoy_gpt_info *g_ventoy_part_info = NULL;
|
||||
@@ -146,8 +148,6 @@ static char g_iso_vd_id_application[130];
|
||||
static int g_pager_flag = 0;
|
||||
static char g_old_pager[32];
|
||||
|
||||
static const char *g_vtoy_winpeshl_ini = "[LaunchApps]\r\nvtoyjump.exe";
|
||||
|
||||
const char *g_menu_class[img_type_max] =
|
||||
{
|
||||
"vtoyiso", "vtoywim", "vtoyefi", "vtoyimg", "vtoyvhd", "vtoyvtoy"
|
||||
@@ -1146,6 +1146,10 @@ grub_ssize_t ventoy_load_file_with_prompt(grub_file_t file, void *buf, grub_ssiz
|
||||
left -= VTOY_SIZE_2MB;
|
||||
|
||||
div = grub_divmod64((grub_uint64_t)((size - left) * 100), (grub_uint64_t)size, &ro);
|
||||
if (div < 1)
|
||||
{
|
||||
div = 1;
|
||||
}
|
||||
grub_printf("\r%s %d%% ", g_vtoy_prompt_msg, (int)div);
|
||||
grub_refresh();
|
||||
}
|
||||
@@ -3250,8 +3254,9 @@ static grub_err_t ventoy_cmd_img_sector(grub_extcmd_context_t ctxt, int argc, ch
|
||||
return grub_error(GRUB_ERR_BAD_ARGUMENT, "Can't open file %s\n", args[0]);
|
||||
}
|
||||
|
||||
g_conf_replace_node = NULL;
|
||||
g_conf_replace_offset = 0;
|
||||
g_conf_replace_count = 0;
|
||||
grub_memset(g_conf_replace_node, 0, sizeof(g_conf_replace_node ));
|
||||
grub_memset(g_conf_replace_offset, 0, sizeof(g_conf_replace_offset ));
|
||||
|
||||
if (g_img_chunk_list.chunk)
|
||||
{
|
||||
@@ -3294,10 +3299,14 @@ static grub_err_t ventoy_cmd_img_sector(grub_extcmd_context_t ctxt, int argc, ch
|
||||
|
||||
static grub_err_t ventoy_select_conf_replace(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
int i;
|
||||
int n;
|
||||
grub_uint64_t offset = 0;
|
||||
grub_uint32_t align = 0;
|
||||
grub_file_t file = NULL;
|
||||
conf_replace *node = NULL;
|
||||
conf_replace *nodes[VTOY_MAX_CONF_REPLACE] = { NULL };
|
||||
ventoy_grub_param_file_replace *replace = NULL;
|
||||
|
||||
(void)ctxt;
|
||||
(void)argc;
|
||||
@@ -3310,14 +3319,19 @@ static grub_err_t ventoy_select_conf_replace(grub_extcmd_context_t ctxt, int arg
|
||||
return 0;
|
||||
}
|
||||
|
||||
node = ventoy_plugin_find_conf_replace(args[1]);
|
||||
if (!node)
|
||||
n = ventoy_plugin_find_conf_replace(args[1], nodes);
|
||||
if (!n)
|
||||
{
|
||||
debug("Conf replace not found for %s\n", args[1]);
|
||||
goto end;
|
||||
}
|
||||
|
||||
debug("Find conf replace for %s\n", args[1]);
|
||||
debug("Find %d conf replace for %s\n", n, args[1]);
|
||||
|
||||
g_conf_replace_count = n;
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
node = nodes[i];
|
||||
|
||||
file = ventoy_grub_file_open(VENTOY_FILE_TYPE, "(loop)%s", node->orgconf);
|
||||
if (file)
|
||||
@@ -3332,14 +3346,14 @@ static grub_err_t ventoy_select_conf_replace(grub_extcmd_context_t ctxt, int arg
|
||||
else
|
||||
{
|
||||
debug("<(loop)%s> NOT exist\n", node->orgconf);
|
||||
goto end;
|
||||
continue;
|
||||
}
|
||||
|
||||
file = ventoy_grub_file_open(VENTOY_FILE_TYPE, "%s%s", args[0], node->newconf);
|
||||
if (!file)
|
||||
{
|
||||
debug("New config file <%s%s> NOT exist\n", args[0], node->newconf);
|
||||
goto end;
|
||||
continue;
|
||||
}
|
||||
|
||||
align = ((int)file->size + 2047) / 2048 * 2048;
|
||||
@@ -3347,30 +3361,30 @@ static grub_err_t ventoy_select_conf_replace(grub_extcmd_context_t ctxt, int arg
|
||||
if (align > vtoy_max_replace_file_size)
|
||||
{
|
||||
debug("New config file <%s%s> too big\n", args[0], node->newconf);
|
||||
goto end;
|
||||
grub_file_close(file);
|
||||
continue;
|
||||
}
|
||||
|
||||
grub_file_read(file, g_conf_replace_new_buf, file->size);
|
||||
g_conf_replace_new_len = (int)file->size;
|
||||
g_conf_replace_new_len_align = align;
|
||||
grub_file_read(file, g_conf_replace_new_buf[i], file->size);
|
||||
grub_file_close(file);
|
||||
g_conf_replace_new_len[i] = (int)file->size;
|
||||
g_conf_replace_new_len_align[i] = align;
|
||||
|
||||
g_conf_replace_node = node;
|
||||
g_conf_replace_offset = offset + 2;
|
||||
g_conf_replace_node[i] = node;
|
||||
g_conf_replace_offset[i] = offset + 2;
|
||||
|
||||
if (node->img > 0)
|
||||
{
|
||||
g_grub_param->img_replace.magic = GRUB_IMG_REPLACE_MAGIC;
|
||||
g_grub_param->img_replace.old_name_cnt = 1;
|
||||
grub_snprintf(g_grub_param->img_replace.old_file_name[0], 256, "%s", node->orgconf);
|
||||
replace = &(g_grub_param->img_replace[i]);
|
||||
replace->magic = GRUB_IMG_REPLACE_MAGIC;
|
||||
grub_snprintf(replace->old_file_name[replace->old_name_cnt], 256, "%s", node->orgconf);
|
||||
replace->old_name_cnt++;
|
||||
}
|
||||
|
||||
debug("conf_replace OK: newlen: %d\n", g_conf_replace_new_len);
|
||||
debug("conf_replace OK: newlen[%d]: %d img:%d\n", i, g_conf_replace_new_len[i], node->img);
|
||||
}
|
||||
|
||||
end:
|
||||
if (file)
|
||||
{
|
||||
grub_file_close(file);
|
||||
}
|
||||
VENTOY_CMD_RETURN(GRUB_ERR_NONE);
|
||||
}
|
||||
|
||||
@@ -3630,7 +3644,7 @@ static grub_err_t ventoy_cmd_sel_auto_install(grub_extcmd_context_t ctxt, int ar
|
||||
{
|
||||
node->cursel = node->autosel - 1;
|
||||
debug("Auto install template auto select %d\n", node->autosel);
|
||||
return 0;
|
||||
goto load;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3645,12 +3659,12 @@ static grub_err_t ventoy_cmd_sel_auto_install(grub_extcmd_context_t ctxt, int ar
|
||||
vtoy_ssprintf(buf, pos, "set timeout=%d\n", node->timeout);
|
||||
}
|
||||
|
||||
vtoy_ssprintf(buf, pos, "menuentry \"Boot without auto installation template\" {\n"
|
||||
vtoy_ssprintf(buf, pos, "menuentry \"Boot without auto installation template\" --class=\"sel_auto_install\" {\n"
|
||||
" echo %s\n}\n", "");
|
||||
|
||||
for (i = 0; i < node->templatenum; i++)
|
||||
{
|
||||
vtoy_ssprintf(buf, pos, "menuentry \"Boot with %s\"{\n"
|
||||
vtoy_ssprintf(buf, pos, "menuentry \"Boot with %s\" --class=\"sel_auto_install\" {\n"
|
||||
" echo \"\"\n}\n",
|
||||
node->templatepath[i].path);
|
||||
}
|
||||
@@ -3670,6 +3684,7 @@ static grub_err_t ventoy_cmd_sel_auto_install(grub_extcmd_context_t ctxt, int ar
|
||||
|
||||
node->cursel = g_ventoy_last_entry - 1;
|
||||
|
||||
load:
|
||||
grub_check_free(node->filebuf);
|
||||
node->filelen = 0;
|
||||
|
||||
@@ -3750,12 +3765,12 @@ static grub_err_t ventoy_cmd_sel_persistence(grub_extcmd_context_t ctxt, int arg
|
||||
vtoy_ssprintf(buf, pos, "set timeout=%d\n", node->timeout);
|
||||
}
|
||||
|
||||
vtoy_ssprintf(buf, pos, "menuentry \"Boot without persistence\" {\n"
|
||||
vtoy_ssprintf(buf, pos, "menuentry \"Boot without persistence\" --class=\"sel_persistence\" {\n"
|
||||
" echo %s\n}\n", "");
|
||||
|
||||
for (i = 0; i < node->backendnum; i++)
|
||||
{
|
||||
vtoy_ssprintf(buf, pos, "menuentry \"Boot with %s\" {\n"
|
||||
vtoy_ssprintf(buf, pos, "menuentry \"Boot with %s\" --class=\"sel_persistence\" {\n"
|
||||
" echo \"\"\n}\n",
|
||||
node->backendpath[i].path);
|
||||
|
||||
@@ -5943,8 +5958,148 @@ static grub_err_t ventoy_cmd_dump_rsv_page(grub_extcmd_context_t ctxt, int argc,
|
||||
VENTOY_CMD_RETURN(GRUB_ERR_NONE);
|
||||
}
|
||||
|
||||
static grub_err_t ventoy_cmd_need_secondary_menu(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
const char *env = NULL;
|
||||
|
||||
(void)ctxt;
|
||||
(void)argc;
|
||||
|
||||
if (g_ventoy_memdisk_mode || g_ventoy_grub2_mode || g_ventoy_wimboot_mode || g_ventoy_iso_raw)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (ventoy_check_mode_by_name(args[0], "vtmemdisk") ||
|
||||
ventoy_check_mode_by_name(args[0], "vtgrub2") ||
|
||||
ventoy_check_mode_by_name(args[0], "vtwimboot"))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
env = grub_env_get("VTOY_SECONDARY_BOOT_MENU");
|
||||
if (env && env[0] == '0' && env[1] == 0)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static grub_err_t ventoy_cmd_show_secondary_menu(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
int n = 0;
|
||||
int pos = 0;
|
||||
int len = 0;
|
||||
int select = 0;
|
||||
int timeout = 0;
|
||||
char *cmd = NULL;
|
||||
const char *env = NULL;
|
||||
ulonglong fsize = 0;
|
||||
char cfgfile[128];
|
||||
int seldata[16] = {0};
|
||||
|
||||
(void)ctxt;
|
||||
(void)argc;
|
||||
|
||||
len = 8 * VTOY_SIZE_1KB;
|
||||
cmd = (char *)grub_malloc(len);
|
||||
if (!cmd)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
grub_env_unset("VTOY_CHKSUM_FILE_PATH");
|
||||
|
||||
env = grub_env_get("VTOY_SECONDARY_TIMEOUT");
|
||||
if (env)
|
||||
{
|
||||
timeout = (int)grub_strtol(env, NULL, 10);
|
||||
}
|
||||
|
||||
if (timeout > 0)
|
||||
{
|
||||
vtoy_len_ssprintf(cmd, pos, len, "set timeout=%d\n", timeout);
|
||||
}
|
||||
|
||||
fsize = grub_strtoull(args[2], NULL, 10);
|
||||
|
||||
vtoy_dummy_menuentry(cmd, pos, len, "Boot in normal mode", "second_normal"); seldata[n++] = 1;
|
||||
|
||||
if (grub_strcmp(args[1], "Unix") != 0)
|
||||
{
|
||||
if (grub_strcmp(args[1], "Windows") == 0)
|
||||
{
|
||||
vtoy_dummy_menuentry(cmd, pos, len, "Boot in wimboot mode", "second_wimboot"); seldata[n++] = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
vtoy_dummy_menuentry(cmd, pos, len, "Boot in grub2 mode", "second_grub2"); seldata[n++] = 3;
|
||||
}
|
||||
|
||||
if (fsize <= VTOY_SIZE_1GB)
|
||||
{
|
||||
vtoy_dummy_menuentry(cmd, pos, len, "Boot in memdisk mode", "second_memdisk"); seldata[n++] = 4;
|
||||
}
|
||||
}
|
||||
|
||||
vtoy_dummy_menuentry(cmd, pos, len, "File checksum", "second_checksum"); seldata[n++] = 5;
|
||||
|
||||
do {
|
||||
g_ventoy_menu_esc = 1;
|
||||
g_ventoy_suppress_esc = 1;
|
||||
g_ventoy_suppress_esc_default = 0;
|
||||
grub_snprintf(cfgfile, sizeof(cfgfile), "configfile mem:0x%llx:size:%d", (ulonglong)(ulong)cmd, pos);
|
||||
grub_script_execute_sourcecode(cfgfile);
|
||||
g_ventoy_menu_esc = 0;
|
||||
g_ventoy_suppress_esc = 0;
|
||||
g_ventoy_suppress_esc_default = 1;
|
||||
|
||||
select = seldata[g_ventoy_last_entry];
|
||||
|
||||
if (select == 2)
|
||||
{
|
||||
g_ventoy_wimboot_mode = 1;
|
||||
}
|
||||
else if (select == 3)
|
||||
{
|
||||
g_ventoy_grub2_mode = 1;
|
||||
}
|
||||
else if (select == 4)
|
||||
{
|
||||
g_ventoy_memdisk_mode = 1;
|
||||
}
|
||||
else if (select == 5)
|
||||
{
|
||||
grub_env_set("VTOY_CHKSUM_FILE_PATH", args[0]);
|
||||
grub_script_execute_sourcecode("configfile $vtoy_efi_part/grub/checksum.cfg");
|
||||
}
|
||||
}while (select == 5);
|
||||
|
||||
grub_free(cmd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static grub_err_t ventoy_cmd_fs_ignore_case(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
(void)ctxt;
|
||||
(void)argc;
|
||||
|
||||
if (args[0][0] == '0')
|
||||
{
|
||||
g_ventoy_case_insensitive = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
g_ventoy_case_insensitive = 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ventoy_env_init(void)
|
||||
{
|
||||
int i;
|
||||
char buf[64];
|
||||
|
||||
grub_env_set("vtdebug_flag", "");
|
||||
@@ -5952,7 +6107,10 @@ int ventoy_env_init(void)
|
||||
g_part_list_buf = grub_malloc(VTOY_PART_BUF_LEN);
|
||||
g_tree_script_buf = grub_malloc(VTOY_MAX_SCRIPT_BUF);
|
||||
g_list_script_buf = grub_malloc(VTOY_MAX_SCRIPT_BUF);
|
||||
g_conf_replace_new_buf = grub_malloc(vtoy_max_replace_file_size);
|
||||
for (i = 0; i < VTOY_MAX_CONF_REPLACE; i++)
|
||||
{
|
||||
g_conf_replace_new_buf[i] = grub_malloc(vtoy_max_replace_file_size);
|
||||
}
|
||||
|
||||
ventoy_filt_register(0, ventoy_wrapper_open);
|
||||
|
||||
@@ -5970,12 +6128,6 @@ int ventoy_env_init(void)
|
||||
grub_env_export("ventoy_env_param");
|
||||
}
|
||||
|
||||
grub_snprintf(buf, sizeof(buf), "0x%lx", (ulong)g_vtoy_winpeshl_ini);
|
||||
grub_env_set("vtoy_winpeshl_ini_addr", buf);
|
||||
|
||||
grub_snprintf(buf, sizeof(buf), "%d", (int)grub_strlen(g_vtoy_winpeshl_ini));
|
||||
grub_env_set("vtoy_winpeshl_ini_size", buf);
|
||||
|
||||
grub_env_export("vtoy_winpeshl_ini_addr");
|
||||
grub_env_export("vtoy_winpeshl_ini_size");
|
||||
|
||||
@@ -6145,6 +6297,12 @@ static cmd_para ventoy_cmds[] =
|
||||
{ "vt_iso_vd_id_begin", ventoy_cmd_iso_vd_id_begin, 0, NULL, "", "", NULL },
|
||||
{ "vt_fn_mutex_lock", ventoy_cmd_fn_mutex_lock, 0, NULL, "", "", NULL },
|
||||
{ "vt_efi_dump_rsv_page", ventoy_cmd_dump_rsv_page, 0, NULL, "", "", NULL },
|
||||
{ "vt_is_standard_winiso", ventoy_cmd_is_standard_winiso, 0, NULL, "", "", NULL },
|
||||
{ "vt_sel_winpe_wim", ventoy_cmd_sel_winpe_wim, 0, NULL, "", "", NULL },
|
||||
{ "vt_need_secondary_menu", ventoy_cmd_need_secondary_menu, 0, NULL, "", "", NULL },
|
||||
{ "vt_show_secondary_menu", ventoy_cmd_show_secondary_menu, 0, NULL, "", "", NULL },
|
||||
{ "vt_fs_ignore_case", ventoy_cmd_fs_ignore_case, 0, NULL, "", "", NULL },
|
||||
{ "vt_systemd_menu", ventoy_cmd_linux_systemd_menu, 0, NULL, "", "", NULL },
|
||||
};
|
||||
|
||||
int ventoy_register_all_cmd(void)
|
||||
|
@@ -29,6 +29,8 @@
|
||||
|
||||
#define VTOY_FILT_MIN_FILE_SIZE 32768
|
||||
|
||||
#define VTOY_LINUX_SYSTEMD_MENU_MAX_BUF 16384
|
||||
|
||||
#define VTOY_SIZE_1GB 1073741824
|
||||
#define VTOY_SIZE_1MB (1024 * 1024)
|
||||
#define VTOY_SIZE_2MB (2 * 1024 * 1024)
|
||||
@@ -329,9 +331,16 @@ void ventoy_debug(const char *fmt, ...);
|
||||
#define vtoy_ssprintf(buf, pos, fmt, args...) \
|
||||
pos += grub_snprintf(buf + pos, VTOY_MAX_SCRIPT_BUF - pos, fmt, ##args)
|
||||
|
||||
#define vtoy_len_ssprintf(buf, pos, len, fmt, args...) \
|
||||
pos += grub_snprintf(buf + pos, len - pos, fmt, ##args)
|
||||
|
||||
#define browser_ssprintf(mbuf, fmt, args...) \
|
||||
(mbuf)->pos += grub_snprintf((mbuf)->buf + (mbuf)->pos, (mbuf)->max - (mbuf)->pos, fmt, ##args)
|
||||
|
||||
#define vtoy_dummy_menuentry(buf, pos, len, title, class) \
|
||||
vtoy_len_ssprintf(buf, pos, len, "menuentry \"%s\" --class=\"%s\" {\n echo \"\"\n}\n", title, class)
|
||||
|
||||
|
||||
#define FLAG_HEADER_RESERVED 0x00000001
|
||||
#define FLAG_HEADER_COMPRESSION 0x00000002
|
||||
#define FLAG_HEADER_READONLY 0x00000004
|
||||
@@ -613,6 +622,7 @@ grub_err_t ventoy_cmd_clear_initrd_list(grub_extcmd_context_t ctxt, int argc, ch
|
||||
grub_uint32_t ventoy_get_iso_boot_catlog(grub_file_t file);
|
||||
int ventoy_has_efi_eltorito(grub_file_t file, grub_uint32_t sector);
|
||||
grub_err_t ventoy_cmd_linux_chain_data(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
grub_err_t ventoy_cmd_linux_systemd_menu(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
grub_err_t ventoy_cmd_linux_locate_initrd(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
grub_err_t ventoy_cmd_initrd_count(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
grub_err_t ventoy_cmd_valid_initrd_count(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
@@ -633,6 +643,7 @@ grub_err_t ventoy_cmd_windows_chain_data(grub_extcmd_context_t ctxt, int argc, c
|
||||
grub_err_t ventoy_cmd_windows_wimboot_data(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
grub_err_t ventoy_cmd_wim_chain_data(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
grub_err_t ventoy_cmd_wim_check_bootable(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
grub_err_t ventoy_cmd_is_standard_winiso(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
grub_err_t ventoy_cmd_dump_wim_patch(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
grub_err_t ventoy_cmd_sel_wimboot(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
grub_err_t ventoy_cmd_set_wim_prompt(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
@@ -960,7 +971,7 @@ typedef struct custom_boot
|
||||
struct custom_boot *next;
|
||||
}custom_boot;
|
||||
|
||||
#define vtoy_max_replace_file_size (2 * 1024 * 1024)
|
||||
#define vtoy_max_replace_file_size (1024 * 1024)
|
||||
typedef struct conf_replace
|
||||
{
|
||||
int pathlen;
|
||||
@@ -1046,12 +1057,13 @@ extern int g_vhdboot_enable;
|
||||
extern int g_plugin_image_list;
|
||||
|
||||
extern ventoy_gpt_info *g_ventoy_part_info;
|
||||
extern grub_uint64_t g_conf_replace_offset;
|
||||
extern int g_conf_replace_count;
|
||||
extern grub_uint64_t g_conf_replace_offset[VTOY_MAX_CONF_REPLACE];
|
||||
extern grub_uint64_t g_svd_replace_offset;
|
||||
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 conf_replace *g_conf_replace_node[VTOY_MAX_CONF_REPLACE];
|
||||
extern grub_uint8_t *g_conf_replace_new_buf[VTOY_MAX_CONF_REPLACE];
|
||||
extern int g_conf_replace_new_len[VTOY_MAX_CONF_REPLACE];
|
||||
extern int g_conf_replace_new_len_align[VTOY_MAX_CONF_REPLACE];
|
||||
extern int g_ventoy_disk_bios_id;
|
||||
extern grub_uint64_t g_ventoy_disk_size;
|
||||
extern grub_uint64_t g_ventoy_disk_part_size[2];
|
||||
@@ -1095,7 +1107,7 @@ const menu_tip * ventoy_plugin_get_menu_tip(int type, const char *isopath);
|
||||
const char * ventoy_plugin_get_menu_class(int type, const char *name, const char *path);
|
||||
int ventoy_plugin_check_memdisk(const char *isopath);
|
||||
int ventoy_plugin_get_image_list_index(int type, const char *name);
|
||||
conf_replace * ventoy_plugin_find_conf_replace(const char *iso);
|
||||
int ventoy_plugin_find_conf_replace(const char *iso, conf_replace *nodes[VTOY_MAX_CONF_REPLACE]);
|
||||
dud * ventoy_plugin_find_dud(const char *iso);
|
||||
int ventoy_plugin_load_dud(dud *node, const char *isopart);
|
||||
int ventoy_get_block_list(grub_file_t file, ventoy_img_chunk_list *chunklist, grub_disk_addr_t start);
|
||||
@@ -1110,6 +1122,7 @@ grub_err_t ventoy_cmd_linux_get_main_initrd_index(grub_extcmd_context_t ctxt, in
|
||||
grub_err_t ventoy_cmd_collect_wim_patch(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
grub_err_t ventoy_cmd_wim_patch_count(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
grub_err_t ventoy_cmd_locate_wim_patch(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
grub_err_t ventoy_cmd_sel_winpe_wim(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
grub_err_t ventoy_cmd_unix_chain_data(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
int ventoy_get_disk_guid(const char *filename, grub_uint8_t *guid, grub_uint8_t *signature);
|
||||
grub_err_t ventoy_cmd_unix_reset(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
@@ -1217,6 +1230,16 @@ typedef struct var_node
|
||||
struct var_node *next;
|
||||
}var_node;
|
||||
|
||||
typedef struct systemd_menu_ctx
|
||||
{
|
||||
char *dev;
|
||||
char *buf;
|
||||
int pos;
|
||||
int len;
|
||||
}systemd_menu_ctx;
|
||||
|
||||
#define vtoy_check_goto_out(p) if (!p) goto out
|
||||
|
||||
extern char *g_tree_script_buf;
|
||||
extern int g_tree_script_pos;
|
||||
extern int g_tree_script_pre;
|
||||
|
@@ -333,12 +333,84 @@ end:
|
||||
VENTOY_CMD_RETURN(GRUB_ERR_NONE);
|
||||
}
|
||||
|
||||
static int ventoy_linux_initrd_collect_hook(const char *filename, const struct grub_dirhook_info *info, void *data)
|
||||
{
|
||||
int len;
|
||||
initrd_info *img = NULL;
|
||||
|
||||
(void)data;
|
||||
|
||||
if (0 == info->dir)
|
||||
{
|
||||
if (grub_strncmp(filename, "initrd", 6) == 0)
|
||||
{
|
||||
len = (int)grub_strlen(filename);
|
||||
if (grub_strcmp(filename + len - 4, ".img") == 0)
|
||||
{
|
||||
img = grub_zalloc(sizeof(initrd_info));
|
||||
if (img)
|
||||
{
|
||||
grub_snprintf(img->name, sizeof(img->name), "/boot/%s", filename);
|
||||
|
||||
if (ventoy_find_initrd_by_name(g_initrd_img_list, img->name))
|
||||
{
|
||||
grub_free(img);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (g_initrd_img_list)
|
||||
{
|
||||
img->prev = g_initrd_img_tail;
|
||||
g_initrd_img_tail->next = img;
|
||||
}
|
||||
else
|
||||
{
|
||||
g_initrd_img_list = img;
|
||||
}
|
||||
|
||||
g_initrd_img_tail = img;
|
||||
g_initrd_img_count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ventoy_linux_collect_boot_initrds(void)
|
||||
{
|
||||
grub_fs_t fs;
|
||||
grub_device_t dev = NULL;
|
||||
|
||||
dev = grub_device_open("loop");
|
||||
if (!dev)
|
||||
{
|
||||
debug("failed to open device loop\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
fs = grub_fs_probe(dev);
|
||||
if (!fs)
|
||||
{
|
||||
debug("failed to probe fs %d\n", grub_errno);
|
||||
goto end;
|
||||
}
|
||||
|
||||
fs->fs_dir(dev, "/boot", ventoy_linux_initrd_collect_hook, NULL);
|
||||
|
||||
end:
|
||||
return 0;
|
||||
}
|
||||
|
||||
static grub_err_t ventoy_grub_cfg_initrd_collect(const char *fileName)
|
||||
{
|
||||
int i = 0;
|
||||
int len = 0;
|
||||
int dollar = 0;
|
||||
int quotation = 0;
|
||||
int initrd_dollar = 0;
|
||||
grub_file_t file = NULL;
|
||||
char *buf = NULL;
|
||||
char *start = NULL;
|
||||
@@ -421,6 +493,19 @@ static grub_err_t ventoy_grub_cfg_initrd_collect(const char *fileName)
|
||||
debug("Remove quotation <%s>\n", img->name);
|
||||
}
|
||||
|
||||
/* special process for /boot/initrd$XXX.img */
|
||||
if (dollar == 1)
|
||||
{
|
||||
if (grub_strncmp(img->name, "/boot/initrd$", 13) == 0)
|
||||
{
|
||||
len = (int)grub_strlen(img->name);
|
||||
if (grub_strcmp(img->name + len - 4, ".img") == 0)
|
||||
{
|
||||
initrd_dollar++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dollar == 1 || ventoy_find_initrd_by_name(g_initrd_img_list, img->name))
|
||||
{
|
||||
grub_free(img);
|
||||
@@ -458,6 +543,12 @@ static grub_err_t ventoy_grub_cfg_initrd_collect(const char *fileName)
|
||||
grub_free(buf);
|
||||
grub_file_close(file);
|
||||
|
||||
if (initrd_dollar > 0 && grub_strncmp(fileName, "(loop)/", 7) == 0)
|
||||
{
|
||||
debug("collect initrd variable %d\n", initrd_dollar);
|
||||
ventoy_linux_collect_boot_initrds();
|
||||
}
|
||||
|
||||
VENTOY_CMD_RETURN(GRUB_ERR_NONE);
|
||||
}
|
||||
|
||||
@@ -654,12 +745,19 @@ int ventoy_cpio_newc_fill_head(void *buf, int filesize, const void *filedata, co
|
||||
|
||||
static grub_uint32_t ventoy_linux_get_virt_chunk_count(void)
|
||||
{
|
||||
int i;
|
||||
grub_uint32_t count = g_valid_initrd_count;
|
||||
|
||||
if (g_conf_replace_offset > 0)
|
||||
if (g_conf_replace_count > 0)
|
||||
{
|
||||
for (i = 0; i < g_conf_replace_count; i++)
|
||||
{
|
||||
if (g_conf_replace_offset[i] > 0)
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (g_append_ext_sector > 0)
|
||||
{
|
||||
@@ -671,13 +769,20 @@ static grub_uint32_t ventoy_linux_get_virt_chunk_count(void)
|
||||
|
||||
static grub_uint32_t ventoy_linux_get_virt_chunk_size(void)
|
||||
{
|
||||
int i;
|
||||
grub_uint32_t size;
|
||||
|
||||
size = (sizeof(ventoy_virt_chunk) + g_ventoy_cpio_size) * g_valid_initrd_count;
|
||||
|
||||
if (g_conf_replace_offset > 0)
|
||||
if (g_conf_replace_count > 0)
|
||||
{
|
||||
size += sizeof(ventoy_virt_chunk) + g_conf_replace_new_len_align;
|
||||
for (i = 0; i < g_conf_replace_count; i++)
|
||||
{
|
||||
if (g_conf_replace_offset[i] > 0)
|
||||
{
|
||||
size += sizeof(ventoy_virt_chunk) + g_conf_replace_new_len_align[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (g_append_ext_sector > 0)
|
||||
@@ -690,6 +795,7 @@ static grub_uint32_t ventoy_linux_get_virt_chunk_size(void)
|
||||
|
||||
static void ventoy_linux_fill_virt_data( grub_uint64_t isosize, ventoy_chain_head *chain)
|
||||
{
|
||||
int i = 0;
|
||||
int id = 0;
|
||||
int virtid = 0;
|
||||
initrd_info *node;
|
||||
@@ -699,6 +805,7 @@ static void ventoy_linux_fill_virt_data( grub_uint64_t isosize, ventoy_chain_
|
||||
grub_uint32_t initrd_secs;
|
||||
char *override;
|
||||
ventoy_virt_chunk *cur;
|
||||
ventoy_grub_param_file_replace *replace = NULL;
|
||||
char name[32];
|
||||
|
||||
override = (char *)chain + chain->virt_chunk_offset;
|
||||
@@ -764,9 +871,13 @@ static void ventoy_linux_fill_virt_data( grub_uint64_t isosize, ventoy_chain_
|
||||
virtid++;
|
||||
}
|
||||
|
||||
if (g_conf_replace_offset > 0)
|
||||
if (g_conf_replace_count > 0)
|
||||
{
|
||||
cpio_secs = g_conf_replace_new_len_align / 2048;
|
||||
for (i = 0; i < g_conf_replace_count; i++)
|
||||
{
|
||||
if (g_conf_replace_offset[i] > 0)
|
||||
{
|
||||
cpio_secs = g_conf_replace_new_len_align[i] / 2048;
|
||||
|
||||
cur->mem_sector_start = sector;
|
||||
cur->mem_sector_end = cur->mem_sector_start + cpio_secs;
|
||||
@@ -775,32 +886,42 @@ static void ventoy_linux_fill_virt_data( grub_uint64_t isosize, ventoy_chain_
|
||||
cur->remap_sector_end = 0;
|
||||
cur->org_sector_start = 0;
|
||||
|
||||
grub_memcpy(override + offset, g_conf_replace_new_buf, g_conf_replace_new_len);
|
||||
grub_memcpy(override + offset, g_conf_replace_new_buf[i], g_conf_replace_new_len[i]);
|
||||
|
||||
chain->virt_img_size_in_bytes += g_conf_replace_new_len_align;
|
||||
chain->virt_img_size_in_bytes += g_conf_replace_new_len_align[i];
|
||||
|
||||
if (g_grub_param->img_replace.magic == GRUB_IMG_REPLACE_MAGIC)
|
||||
replace = g_grub_param->img_replace + i;
|
||||
if (replace->magic == GRUB_IMG_REPLACE_MAGIC)
|
||||
{
|
||||
g_grub_param->img_replace.new_file_virtual_id = virtid;
|
||||
replace->new_file_virtual_id = virtid;
|
||||
}
|
||||
|
||||
offset += g_conf_replace_new_len_align;
|
||||
offset += g_conf_replace_new_len_align[i];
|
||||
sector += cpio_secs;
|
||||
cur++;
|
||||
virtid++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static grub_uint32_t ventoy_linux_get_override_chunk_count(void)
|
||||
{
|
||||
int i;
|
||||
grub_uint32_t count = g_valid_initrd_count;
|
||||
|
||||
if (g_conf_replace_offset > 0)
|
||||
if (g_conf_replace_count > 0)
|
||||
{
|
||||
for (i = 0; i < g_conf_replace_count; i++)
|
||||
{
|
||||
if (g_conf_replace_offset[i] > 0)
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (g_svd_replace_offset > 0)
|
||||
{
|
||||
@@ -812,12 +933,19 @@ static grub_uint32_t ventoy_linux_get_override_chunk_count(void)
|
||||
|
||||
static grub_uint32_t ventoy_linux_get_override_chunk_size(void)
|
||||
{
|
||||
int i;
|
||||
int count = g_valid_initrd_count;
|
||||
|
||||
if (g_conf_replace_offset > 0)
|
||||
if (g_conf_replace_count > 0)
|
||||
{
|
||||
for (i = 0; i < g_conf_replace_count; i++)
|
||||
{
|
||||
if (g_conf_replace_offset[i] > 0)
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (g_svd_replace_offset > 0)
|
||||
{
|
||||
@@ -829,6 +957,7 @@ static grub_uint32_t ventoy_linux_get_override_chunk_size(void)
|
||||
|
||||
static void ventoy_linux_fill_override_data( grub_uint64_t isosize, void *override)
|
||||
{
|
||||
int i;
|
||||
initrd_info *node;
|
||||
grub_uint32_t mod;
|
||||
grub_uint32_t newlen;
|
||||
@@ -883,12 +1012,16 @@ static void ventoy_linux_fill_override_data( grub_uint64_t isosize, void *ove
|
||||
cur++;
|
||||
}
|
||||
|
||||
if (g_conf_replace_offset > 0)
|
||||
if (g_conf_replace_count > 0)
|
||||
{
|
||||
cur->img_offset = g_conf_replace_offset;
|
||||
for (i = 0; i < g_conf_replace_count; i++)
|
||||
{
|
||||
if (g_conf_replace_offset[i] > 0)
|
||||
{
|
||||
cur->img_offset = g_conf_replace_offset[i];
|
||||
cur->override_size = sizeof(ventoy_iso9660_override);
|
||||
|
||||
newlen = (grub_uint32_t)(g_conf_replace_new_len);
|
||||
newlen = (grub_uint32_t)(g_conf_replace_new_len[i]);
|
||||
|
||||
dirent = (ventoy_iso9660_override *)cur->override_data;
|
||||
dirent->first_sector = (grub_uint32_t)sector;
|
||||
@@ -899,6 +1032,8 @@ static void ventoy_linux_fill_override_data( grub_uint64_t isosize, void *ove
|
||||
sector += (dirent->size + 2047) / 2048;
|
||||
cur++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (g_svd_replace_offset > 0)
|
||||
{
|
||||
@@ -1676,3 +1811,173 @@ grub_err_t ventoy_cmd_linux_chain_data(grub_extcmd_context_t ctxt, int argc, cha
|
||||
VENTOY_CMD_RETURN(GRUB_ERR_NONE);
|
||||
}
|
||||
|
||||
static char *ventoy_systemd_conf_tag(char *buf, const char *tag, int optional)
|
||||
{
|
||||
int taglen = 0;
|
||||
char *start = NULL;
|
||||
char *nextline = NULL;
|
||||
|
||||
taglen = grub_strlen(tag);
|
||||
for (start = buf; start; start = nextline)
|
||||
{
|
||||
nextline = ventoy_get_line(start);
|
||||
while (ventoy_isspace(*start))
|
||||
{
|
||||
start++;
|
||||
}
|
||||
|
||||
if (grub_strncmp(start, tag, taglen) == 0 && (start[taglen] == ' ' || start[taglen] == '\t'))
|
||||
{
|
||||
start += taglen;
|
||||
while (ventoy_isspace(*start))
|
||||
{
|
||||
start++;
|
||||
}
|
||||
return start;
|
||||
}
|
||||
}
|
||||
|
||||
if (optional == 0)
|
||||
{
|
||||
debug("tag<%s> NOT found\n", tag);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int ventoy_systemd_conf_hook(const char *filename, const struct grub_dirhook_info *info, void *data)
|
||||
{
|
||||
int oldpos = 0;
|
||||
char *tag = NULL;
|
||||
char *bkbuf = NULL;
|
||||
char *filebuf = NULL;
|
||||
grub_file_t file = NULL;
|
||||
systemd_menu_ctx *ctx = (systemd_menu_ctx *)data;
|
||||
|
||||
debug("ventoy_systemd_conf_hook %s\n", filename);
|
||||
|
||||
if (info->dir || NULL == grub_strstr(filename, ".conf"))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
file = ventoy_grub_file_open(VENTOY_FILE_TYPE, "%s/loader/entries/%s", ctx->dev, filename);
|
||||
if (!file)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
filebuf = grub_zalloc(2 * file->size + 8);
|
||||
if (!filebuf)
|
||||
{
|
||||
goto out;
|
||||
}
|
||||
|
||||
bkbuf = filebuf + file->size + 4;
|
||||
grub_file_read(file, bkbuf, file->size);
|
||||
|
||||
oldpos = ctx->pos;
|
||||
|
||||
/* title --> menuentry */
|
||||
grub_memcpy(filebuf, bkbuf, file->size);
|
||||
tag = ventoy_systemd_conf_tag(filebuf, "title", 0);
|
||||
vtoy_check_goto_out(tag);
|
||||
vtoy_len_ssprintf(ctx->buf, ctx->pos, ctx->len, "menuentry \"%s\" {\n", tag);
|
||||
|
||||
/* linux xxx */
|
||||
grub_memcpy(filebuf, bkbuf, file->size);
|
||||
tag = ventoy_systemd_conf_tag(filebuf, "linux", 0);
|
||||
if (!tag)
|
||||
{
|
||||
ctx->pos = oldpos;
|
||||
goto out;
|
||||
}
|
||||
vtoy_len_ssprintf(ctx->buf, ctx->pos, ctx->len, " echo \"Downloading kernel ...\"\n linux %s ", tag);
|
||||
|
||||
/* kernel options */
|
||||
grub_memcpy(filebuf, bkbuf, file->size);
|
||||
tag = ventoy_systemd_conf_tag(filebuf, "options", 0);
|
||||
vtoy_len_ssprintf(ctx->buf, ctx->pos, ctx->len, "%s \n", tag ? tag : "");
|
||||
|
||||
|
||||
/* initrd xxx xxx xxx */
|
||||
vtoy_len_ssprintf(ctx->buf, ctx->pos, ctx->len, " echo \"Downloading initrd ...\"\n initrd ");
|
||||
grub_memcpy(filebuf, bkbuf, file->size);
|
||||
tag = ventoy_systemd_conf_tag(filebuf, "initrd", 1);
|
||||
while (tag)
|
||||
{
|
||||
vtoy_len_ssprintf(ctx->buf, ctx->pos, ctx->len, "%s ", tag);
|
||||
tag = ventoy_systemd_conf_tag(tag + grub_strlen(tag) + 1, "initrd", 1);
|
||||
}
|
||||
|
||||
vtoy_len_ssprintf(ctx->buf, ctx->pos, ctx->len, "\n boot\n}\n");
|
||||
|
||||
out:
|
||||
grub_check_free(filebuf);
|
||||
grub_file_close(file);
|
||||
return 0;
|
||||
}
|
||||
|
||||
grub_err_t ventoy_cmd_linux_systemd_menu(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
static char *buf = NULL;
|
||||
char name[128];
|
||||
char value[64];
|
||||
grub_fs_t fs;
|
||||
char *device_name = NULL;
|
||||
grub_device_t dev = NULL;
|
||||
systemd_menu_ctx ctx;
|
||||
|
||||
(void)ctxt;
|
||||
(void)argc;
|
||||
|
||||
if (!buf)
|
||||
{
|
||||
buf = grub_malloc(VTOY_LINUX_SYSTEMD_MENU_MAX_BUF);
|
||||
if (!buf)
|
||||
{
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
device_name = grub_file_get_device_name(args[0]);
|
||||
if (!device_name)
|
||||
{
|
||||
debug("failed to get device name %s\n", args[0]);
|
||||
goto end;
|
||||
}
|
||||
|
||||
dev = grub_device_open(device_name);
|
||||
if (!dev)
|
||||
{
|
||||
debug("failed to open device %s\n", device_name);
|
||||
goto end;
|
||||
}
|
||||
|
||||
fs = grub_fs_probe(dev);
|
||||
if (!fs)
|
||||
{
|
||||
debug("failed to probe fs %d\n", grub_errno);
|
||||
goto end;
|
||||
}
|
||||
|
||||
ctx.dev = args[0];
|
||||
ctx.buf = buf;
|
||||
ctx.pos = 0;
|
||||
ctx.len = VTOY_LINUX_SYSTEMD_MENU_MAX_BUF;
|
||||
fs->fs_dir(dev, "/loader/entries", ventoy_systemd_conf_hook, &ctx);
|
||||
|
||||
grub_snprintf(name, sizeof(name), "%s_addr", args[1]);
|
||||
grub_snprintf(value, sizeof(value), "0x%llx", (ulonglong)(ulong)buf);
|
||||
grub_env_set(name, value);
|
||||
|
||||
grub_snprintf(name, sizeof(name), "%s_size", args[1]);
|
||||
grub_snprintf(value, sizeof(value), "%d", ctx.pos);
|
||||
grub_env_set(name, value);
|
||||
|
||||
end:
|
||||
grub_check_free(device_name);
|
||||
check_free(dev, grub_device_close);
|
||||
VENTOY_CMD_RETURN(GRUB_ERR_NONE);
|
||||
}
|
||||
|
||||
|
@@ -3054,14 +3054,15 @@ int ventoy_plugin_get_image_list_index(int type, const char *name)
|
||||
return 0;
|
||||
}
|
||||
|
||||
conf_replace * ventoy_plugin_find_conf_replace(const char *iso)
|
||||
int ventoy_plugin_find_conf_replace(const char *iso, conf_replace *nodes[VTOY_MAX_CONF_REPLACE])
|
||||
{
|
||||
int n = 0;
|
||||
int len;
|
||||
conf_replace *node;
|
||||
|
||||
if (!g_conf_replace_head)
|
||||
{
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
len = (int)grub_strlen(iso);
|
||||
@@ -3070,11 +3071,15 @@ conf_replace * ventoy_plugin_find_conf_replace(const char *iso)
|
||||
{
|
||||
if (node->pathlen == len && ventoy_strncmp(node->isopath, iso, len) == 0)
|
||||
{
|
||||
return node;
|
||||
nodes[n++] = node;
|
||||
if (n >= VTOY_MAX_CONF_REPLACE)
|
||||
{
|
||||
return n;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return n;
|
||||
}
|
||||
|
||||
dud * ventoy_plugin_find_dud(const char *iso)
|
||||
|
@@ -445,12 +445,16 @@ grub_err_t ventoy_cmd_parse_freenas_ver(grub_extcmd_context_t ctxt, int argc, ch
|
||||
ver = vtoy_json_get_string_ex(json->pstChild, "Version");
|
||||
if (ver)
|
||||
{
|
||||
debug("freenas version:<%s>\n", ver);
|
||||
debug("NAS version:<%s>\n", ver);
|
||||
if (grub_strncmp(ver, "TrueNAS-", 8) == 0)
|
||||
{
|
||||
ver += 8;
|
||||
}
|
||||
ventoy_set_env(args[1], ver);
|
||||
}
|
||||
else
|
||||
{
|
||||
debug("freenas version:<%s>\n", "NOT FOUND");
|
||||
debug("NAS version:<%s>\n", "NOT FOUND");
|
||||
grub_env_unset(args[1]);
|
||||
}
|
||||
|
||||
|
@@ -1364,6 +1364,110 @@ static int ventoy_wimdows_locate_wim(const char *disk, wim_patch *patch, int win
|
||||
return 0;
|
||||
}
|
||||
|
||||
grub_err_t ventoy_cmd_sel_winpe_wim(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
int i = 0;
|
||||
int pos = 0;
|
||||
int len = 0;
|
||||
int find = 0;
|
||||
char *cmd = NULL;
|
||||
wim_patch *node = NULL;
|
||||
wim_patch *tmp = NULL;
|
||||
grub_file_t file = NULL;
|
||||
wim_header *head = NULL;
|
||||
char cfgfile[128];
|
||||
|
||||
(void)ctxt;
|
||||
(void)argc;
|
||||
|
||||
len = 8 * VTOY_SIZE_1KB;
|
||||
cmd = (char *)grub_malloc(len + sizeof(wim_header));
|
||||
if (!cmd)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
head = (wim_header *)(cmd + len);
|
||||
grub_env_unset("vtoy_pe_wim_path");
|
||||
|
||||
for (node = g_wim_patch_head; node; node = node->next)
|
||||
{
|
||||
find = 0;
|
||||
for (tmp = g_wim_patch_head; tmp != node; tmp = tmp->next)
|
||||
{
|
||||
if (tmp->valid && grub_strcasecmp(tmp->path, node->path) == 0)
|
||||
{
|
||||
find = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (find)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
g_ventoy_case_insensitive = 1;
|
||||
file = ventoy_grub_file_open(VENTOY_FILE_TYPE, "%s%s", args[0], node->path);
|
||||
g_ventoy_case_insensitive = 0;
|
||||
if (!file)
|
||||
{
|
||||
debug("File %s%s NOT exist\n", args[0], node->path);
|
||||
continue;
|
||||
}
|
||||
|
||||
grub_file_read(file, head, sizeof(wim_header));
|
||||
if (grub_memcmp(head->signature, WIM_HEAD_SIGNATURE, sizeof(head->signature)))
|
||||
{
|
||||
debug("Not a valid wim file %s\n", (char *)head->signature);
|
||||
grub_file_close(file);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (head->flags & FLAG_HEADER_COMPRESS_LZMS)
|
||||
{
|
||||
debug("LZMS compress is not supported 0x%x\n", head->flags);
|
||||
grub_file_close(file);
|
||||
continue;
|
||||
}
|
||||
|
||||
grub_file_close(file);
|
||||
node->valid = 1;
|
||||
|
||||
vtoy_len_ssprintf(cmd, pos, len, "menuentry \"%s\" --class=\"sel_wim\" {\n echo \"\"\n}\n", node->path);
|
||||
}
|
||||
|
||||
if (pos > 0)
|
||||
{
|
||||
g_ventoy_menu_esc = 1;
|
||||
g_ventoy_suppress_esc = 1;
|
||||
g_ventoy_suppress_esc_default = 0;
|
||||
|
||||
grub_snprintf(cfgfile, sizeof(cfgfile), "configfile mem:0x%llx:size:%d", (ulonglong)(ulong)cmd, pos);
|
||||
grub_script_execute_sourcecode(cfgfile);
|
||||
|
||||
g_ventoy_menu_esc = 0;
|
||||
g_ventoy_suppress_esc = 0;
|
||||
g_ventoy_suppress_esc_default = 1;
|
||||
|
||||
for (node = g_wim_patch_head; node; node = node->next)
|
||||
{
|
||||
if (node->valid)
|
||||
{
|
||||
if (i == g_ventoy_last_entry)
|
||||
{
|
||||
grub_env_set("vtoy_pe_wim_path", node->path);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
grub_free(cmd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
grub_err_t ventoy_cmd_locate_wim_patch(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
int datalen = 0;
|
||||
@@ -1790,19 +1894,151 @@ end:
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int ventoy_extract_init_exe(char *wimfile, grub_uint8_t **pexe_data, grub_uint32_t *pexe_len, char *exe_name)
|
||||
{
|
||||
int rc;
|
||||
int ret = 1;
|
||||
grub_uint16_t i;
|
||||
grub_file_t file = NULL;
|
||||
grub_uint32_t exe_len = 0;
|
||||
wim_header *head = NULL;
|
||||
grub_uint16_t *uname = NULL;
|
||||
grub_uint8_t *exe_data = NULL;
|
||||
grub_uint8_t *decompress_data = NULL;
|
||||
wim_lookup_entry *lookup = NULL;
|
||||
wim_security_header *security = NULL;
|
||||
wim_directory_entry *rootdir = NULL;
|
||||
wim_directory_entry *search = NULL;
|
||||
wim_stream_entry *stream = NULL;
|
||||
wim_lookup_entry *replace_look = NULL;
|
||||
wim_header wimhdr;
|
||||
wim_hash hashdata;
|
||||
|
||||
head = &wimhdr;
|
||||
|
||||
file = grub_file_open(wimfile, VENTOY_FILE_TYPE);
|
||||
if (!file)
|
||||
{
|
||||
goto out;
|
||||
}
|
||||
|
||||
grub_file_read(file, head, sizeof(wim_header));
|
||||
rc = ventoy_read_resource(file, head, &head->metadata, (void **)&decompress_data);
|
||||
if (rc)
|
||||
{
|
||||
grub_printf("failed to read meta data %d\n", rc);
|
||||
goto out;
|
||||
}
|
||||
|
||||
security = (wim_security_header *)decompress_data;
|
||||
if (security->len > 0)
|
||||
{
|
||||
rootdir = (wim_directory_entry *)(decompress_data + ((security->len + 7) & 0xFFFFFFF8U));
|
||||
}
|
||||
else
|
||||
{
|
||||
rootdir = (wim_directory_entry *)(decompress_data + 8);
|
||||
}
|
||||
|
||||
debug("read lookup offset:%llu size:%llu\n", (ulonglong)head->lookup.offset, (ulonglong)head->lookup.raw_size);
|
||||
lookup = grub_malloc(head->lookup.raw_size);
|
||||
grub_file_seek(file, head->lookup.offset);
|
||||
grub_file_read(file, lookup, head->lookup.raw_size);
|
||||
|
||||
/* search winpeshl.exe dirent entry */
|
||||
search = search_replace_wim_dirent(file, head, lookup, decompress_data, rootdir);
|
||||
if (!search)
|
||||
{
|
||||
debug("Failed to find replace file %p\n", search);
|
||||
goto out;
|
||||
}
|
||||
|
||||
uname = (grub_uint16_t *)(search + 1);
|
||||
for (i = 0; i < search->name_len / 2 && i < 200; i++)
|
||||
{
|
||||
exe_name[i] = (char)uname[i];
|
||||
}
|
||||
exe_name[i] = 0;
|
||||
debug("find replace file at %p <%s>\n", search, exe_name);
|
||||
|
||||
grub_memset(&hashdata, 0, sizeof(wim_hash));
|
||||
if (grub_memcmp(&hashdata, search->hash.sha1, sizeof(wim_hash)) == 0)
|
||||
{
|
||||
debug("search hash all 0, now do deep search\n");
|
||||
stream = (wim_stream_entry *)((char *)search + search->len);
|
||||
for (i = 0; i < search->streams; i++)
|
||||
{
|
||||
if (stream->name_len == 0)
|
||||
{
|
||||
grub_memcpy(&hashdata, stream->hash.sha1, sizeof(wim_hash));
|
||||
debug("new search hash: %02x %02x %02x %02x %02x %02x %02x %02x\n",
|
||||
ventoy_varg_8(hashdata.sha1));
|
||||
break;
|
||||
}
|
||||
stream = (wim_stream_entry *)((char *)stream + stream->len);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
grub_memcpy(&hashdata, search->hash.sha1, sizeof(wim_hash));
|
||||
}
|
||||
|
||||
/* find and extact winpeshl.exe */
|
||||
replace_look = ventoy_find_look_entry(head, lookup, &hashdata);
|
||||
if (replace_look)
|
||||
{
|
||||
exe_len = (grub_uint32_t)replace_look->resource.raw_size;
|
||||
debug("find replace lookup entry_id:%ld raw_size:%u\n",
|
||||
((long)replace_look - (long)lookup) / sizeof(wim_lookup_entry), exe_len);
|
||||
|
||||
if (0 != ventoy_read_resource(file, head, &(replace_look->resource), (void **)&(exe_data)))
|
||||
{
|
||||
exe_len = 0;
|
||||
exe_data = NULL;
|
||||
debug("failed to read replace file meta data %u\n", exe_len);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
debug("failed to find lookup entry for replace file %02x %02x %02x %02x\n",
|
||||
ventoy_varg_4(hashdata.sha1));
|
||||
}
|
||||
|
||||
if (exe_data)
|
||||
{
|
||||
ret = 0;
|
||||
*pexe_data = exe_data;
|
||||
*pexe_len = exe_len;
|
||||
}
|
||||
|
||||
out:
|
||||
|
||||
grub_check_free(lookup);
|
||||
grub_check_free(decompress_data);
|
||||
check_free(file, grub_file_close);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
grub_err_t ventoy_cmd_windows_wimboot_data(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
int rc = 0;
|
||||
int wim64 = 0;
|
||||
int datalen = 0;
|
||||
int dataflag = 0;
|
||||
grub_uint32_t size = 0;
|
||||
grub_uint32_t exe_len = 0;
|
||||
grub_uint32_t jump_align = 0;
|
||||
const char *addr = NULL;
|
||||
ventoy_chain_head *chain = NULL;
|
||||
ventoy_os_param *param = NULL;
|
||||
char envbuf[64];
|
||||
grub_uint8_t *param = NULL;
|
||||
grub_uint8_t *exe_data = NULL;
|
||||
ventoy_windows_data *rtdata = NULL;
|
||||
char envbuf[64] = {0};
|
||||
char exename[128] = {0};
|
||||
wim_tail wim_data;
|
||||
|
||||
(void)ctxt;
|
||||
(void)argc;
|
||||
(void)args;
|
||||
|
||||
addr = grub_env_get("vtoy_chain_mem_addr");
|
||||
if (!addr)
|
||||
@@ -1821,24 +2057,36 @@ grub_err_t ventoy_cmd_windows_wimboot_data(grub_extcmd_context_t ctxt, int argc,
|
||||
|
||||
datalen = ventoy_get_windows_rtdata_len(chain->os_param.vtoy_img_path, &dataflag);
|
||||
|
||||
size = sizeof(ventoy_os_param) + datalen;
|
||||
param = (ventoy_os_param *)grub_zalloc(size);
|
||||
if (!param)
|
||||
rc = ventoy_extract_init_exe(args[0], &exe_data, &exe_len, exename);
|
||||
if (rc)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
wim64 = ventoy_is_pe64(exe_data);
|
||||
|
||||
grub_memcpy(param, &chain->os_param, sizeof(ventoy_os_param));
|
||||
ventoy_fill_windows_rtdata(param + 1, param->vtoy_img_path, dataflag);
|
||||
grub_memset(&wim_data, 0, sizeof(wim_data));
|
||||
ventoy_cat_exe_file_data(&wim_data, exe_len, exe_data, datalen);
|
||||
grub_check_free(exe_data);
|
||||
|
||||
grub_snprintf(envbuf, sizeof(envbuf), "0x%lx", (unsigned long)param);
|
||||
jump_align = ventoy_align(wim_data.jump_exe_len, 16);
|
||||
param = wim_data.jump_bin_data;
|
||||
|
||||
grub_memcpy(param + jump_align, &chain->os_param, sizeof(ventoy_os_param));
|
||||
|
||||
rtdata = (ventoy_windows_data *)(param + jump_align + sizeof(ventoy_os_param));
|
||||
ventoy_fill_windows_rtdata(rtdata, chain->os_param.vtoy_img_path, dataflag);
|
||||
|
||||
grub_snprintf(envbuf, sizeof(envbuf), "0x%lx", (ulong)param);
|
||||
grub_env_set("vtoy_wimboot_mem_addr", envbuf);
|
||||
debug("vtoy_wimboot_mem_addr: %s\n", envbuf);
|
||||
|
||||
grub_snprintf(envbuf, sizeof(envbuf), "%u", size);
|
||||
grub_snprintf(envbuf, sizeof(envbuf), "%u", wim_data.bin_align_len);
|
||||
grub_env_set("vtoy_wimboot_mem_size", envbuf);
|
||||
debug("vtoy_wimboot_mem_size: %s\n", envbuf);
|
||||
|
||||
grub_env_set(args[1], exename);
|
||||
grub_env_set(args[2], wim64 ? "64" : "32");
|
||||
|
||||
VENTOY_CMD_RETURN(GRUB_ERR_NONE);
|
||||
}
|
||||
|
||||
@@ -1879,8 +2127,11 @@ grub_err_t ventoy_cmd_windows_chain_data(grub_extcmd_context_t ctxt, int argc, c
|
||||
if (0 == ventoy_compatible && g_wim_valid_patch_count == 0)
|
||||
{
|
||||
unknown_image = 1;
|
||||
if (!g_ventoy_wimboot_mode)
|
||||
{
|
||||
debug("Warning: %s was not recognized by Ventoy\n", args[0]);
|
||||
}
|
||||
}
|
||||
|
||||
file = ventoy_grub_file_open(VENTOY_FILE_TYPE, "%s", args[0]);
|
||||
if (!file)
|
||||
@@ -2071,6 +2322,67 @@ static int ventoy_get_wim_chunklist(grub_file_t wimfile, ventoy_img_chunk_list *
|
||||
return 0;
|
||||
}
|
||||
|
||||
grub_err_t ventoy_cmd_is_standard_winiso(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
int i;
|
||||
int ret = 1;
|
||||
char prefix[32] = {0};
|
||||
const char *chkfile[] =
|
||||
{
|
||||
"boot/bcd", "boot/boot.sdi", NULL
|
||||
};
|
||||
|
||||
(void)ctxt;
|
||||
(void)argc;
|
||||
|
||||
if (ventoy_check_file_exist("%s/sources/boot.wim", args[0]))
|
||||
{
|
||||
prefix[0] = 0;
|
||||
}
|
||||
else if (ventoy_check_file_exist("%s/x86/sources/boot.wim", args[0]))
|
||||
{
|
||||
grub_snprintf(prefix, sizeof(prefix), "/x86");
|
||||
}
|
||||
else if (ventoy_check_file_exist("%s/x64/sources/boot.wim", args[0]))
|
||||
{
|
||||
grub_snprintf(prefix, sizeof(prefix), "/x64");
|
||||
}
|
||||
else
|
||||
{
|
||||
debug("No boot.wim found.\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
for (i = 0; chkfile[i]; i++)
|
||||
{
|
||||
if (!ventoy_check_file_exist("%s%s/%s", args[0], prefix, chkfile[i]))
|
||||
{
|
||||
debug("%s not found.\n", chkfile[i]);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
if ((!ventoy_check_file_exist("%s%s/sources/install.wim", args[0], prefix)) &&
|
||||
(!ventoy_check_file_exist("%s%s/sources/install.esd", args[0], prefix)))
|
||||
{
|
||||
debug("No install.wim(esd) found.\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!ventoy_check_file_exist("%s/setup.exe", args[0]))
|
||||
{
|
||||
debug("No setup.exe found.\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
debug("This is standard Windows ISO.\n");
|
||||
|
||||
out:
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
grub_err_t ventoy_cmd_wim_check_bootable(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
grub_uint32_t boot_index;
|
||||
|
@@ -262,6 +262,7 @@ typedef struct ventoy_img_chunk_list
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
#define VTOY_MAX_CONF_REPLACE 2
|
||||
#define GRUB_FILE_REPLACE_MAGIC 0x1258BEEF
|
||||
#define GRUB_IMG_REPLACE_MAGIC 0x1259BEEF
|
||||
|
||||
@@ -282,7 +283,7 @@ typedef struct ventoy_grub_param
|
||||
grub_env_get_pf grub_env_get;
|
||||
grub_env_set_pf grub_env_set;
|
||||
ventoy_grub_param_file_replace file_replace;
|
||||
ventoy_grub_param_file_replace img_replace;
|
||||
ventoy_grub_param_file_replace img_replace[VTOY_MAX_CONF_REPLACE];
|
||||
grub_env_printf_pf grub_env_printf;
|
||||
}ventoy_grub_param;
|
||||
|
||||
|
@@ -33,7 +33,7 @@ ventoy_os_install_dmsetup_by_fuse() {
|
||||
vtoy_fuse_iso -f $VTOY_PATH/ventoy_dm_table -m $VTOY_PATH/mnt/fuse
|
||||
|
||||
mount -t iso9660 $VTOY_PATH/mnt/fuse/ventoy.iso $VTOY_PATH/mnt/iso
|
||||
mount -t squashfs $VTOY_PATH/mnt/iso/minios/01-core*.sb $VTOY_PATH/mnt/squashfs
|
||||
mount -t squashfs $VTOY_PATH/mnt/iso/minios/0*-core*.sb $VTOY_PATH/mnt/squashfs
|
||||
|
||||
KoName=$(ls $VTOY_PATH/mnt/squashfs/lib/modules/$2/kernel/drivers/md/dm-mod.ko*)
|
||||
vtlog "insmod $KoName"
|
||||
|
@@ -24,6 +24,9 @@ if $GREP -q kaspersky /proc/version; then
|
||||
if [ -f /ventoy/ventoy_persistent_map ]; then
|
||||
$SED "/sysresccd_parsecmdline[^(]*$/a\ BACKSTORE_CMD='LABEL=casper-rw,noloop'" -i /init
|
||||
fi
|
||||
elif $GREP -q 'setting up the root filesystem' /init; then
|
||||
$SED "/setting up the root filesystem/a\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/gentoo/disk_hook.sh" -i /init
|
||||
$SED "/setting up the root filesystem/a\ export CDROOT_DEV=/dev/mapper/ventoy" -i /init
|
||||
elif [ -d /etc/udev/rules.d ] || [ -d /lib/udev/rules.d ]; then
|
||||
ventoy_systemd_udevd_work_around
|
||||
ventoy_add_udev_rule "$VTOY_PATH/hook/default/udev_disk_hook.sh %k noreplace"
|
||||
|
118
IMG/cpio/ventoy/hook/kaos/ventoy-disk.sh
Normal file
118
IMG/cpio/ventoy/hook/kaos/ventoy-disk.sh
Normal file
@@ -0,0 +1,118 @@
|
||||
#!/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
|
||||
|
||||
|
||||
ventoy_os_install_dmsetup_by_fuse() {
|
||||
vtlog "ventoy_os_install_dmsetup_by_fuse $*"
|
||||
|
||||
mkdir -p $VTOY_PATH/mnt/fuse $VTOY_PATH/mnt/iso $VTOY_PATH/mnt/squashfs
|
||||
|
||||
vtoydm -p -f $VTOY_PATH/ventoy_image_map -d $1 > $VTOY_PATH/ventoy_dm_table
|
||||
vtoy_fuse_iso -f $VTOY_PATH/ventoy_dm_table -m $VTOY_PATH/mnt/fuse
|
||||
|
||||
mount -t iso9660 $VTOY_PATH/mnt/fuse/ventoy.iso $VTOY_PATH/mnt/iso
|
||||
|
||||
sfsfile=$VTOY_PATH/mnt/iso/kdeos/x86_64/root-image.sqfs
|
||||
|
||||
mount -t squashfs $sfsfile $VTOY_PATH/mnt/squashfs
|
||||
|
||||
kVer=$(uname -r)
|
||||
KoName=$(ls $VTOY_PATH/mnt/squashfs/lib/modules/$kVer/kernel/drivers/md/dm-mod.ko*)
|
||||
vtlog "insmod $KoName"
|
||||
|
||||
if echo $KoName | grep -q '\.zst'; then
|
||||
zstdcat $KoName > $VTOY_PATH/dm-mod.ko
|
||||
insmod $VTOY_PATH/dm-mod.ko
|
||||
else
|
||||
insmod $KoName
|
||||
fi
|
||||
|
||||
ventoy_check_umount $VTOY_PATH/mnt/squashfs
|
||||
ventoy_check_umount $VTOY_PATH/mnt/iso
|
||||
ventoy_check_umount $VTOY_PATH/mnt/fuse
|
||||
vtlog "umount done"
|
||||
}
|
||||
|
||||
|
||||
if is_ventoy_hook_finished; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
wait_for_usb_disk_ready
|
||||
|
||||
vtdiskname=$(get_ventoy_disk_name)
|
||||
if [ "$vtdiskname" = "unknown" ]; then
|
||||
vtlog "ventoy disk not found"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if grep -q 'device-mapper' /proc/devices; then
|
||||
vtlog "device-mapper module exist"
|
||||
else
|
||||
ventoy_os_install_dmsetup_by_fuse $vtdiskname
|
||||
fi
|
||||
|
||||
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace"
|
||||
|
||||
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})
|
||||
vtlog "blkdev_num=$blkdev_num vtDM=$vtDM ..."
|
||||
|
||||
while [ -n "Y" ]; do
|
||||
if [ -b /dev/$vtDM ]; then
|
||||
break
|
||||
else
|
||||
sleep 0.3
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
vtlog "ln -s /dev/$vtDM $1"
|
||||
|
||||
if [ -e "$1" ]; then
|
||||
vtlog "$1 already exist"
|
||||
else
|
||||
ln -s /dev/$vtDM "$1"
|
||||
fi
|
||||
else
|
||||
vtLABEL=$($BUSYBOX_PATH/blkid /dev/$vtDM | $SED 's/.*LABEL="\([^"]*\)".*/\1/')
|
||||
vtlog "vtLABEL is $vtLABEL"
|
||||
|
||||
if [ -z "$vtLABEL" ]; then
|
||||
vtLABEL=$($SED "s/.*label=\([^ ]*\)/\1/" /proc/cmdline)
|
||||
vtlog "vtLABEL is $vtLABEL from cmdline"
|
||||
fi
|
||||
|
||||
if [ -e "/dev/disk/by-label/$vtLABEL" ]; then
|
||||
vtlog "$1 already exist"
|
||||
else
|
||||
ln -s /dev/$vtDM "/dev/disk/by-label/$vtLABEL"
|
||||
fi
|
||||
fi
|
||||
|
||||
PATH=$VTPATH_OLD
|
||||
|
||||
# OK finish
|
||||
set_ventoy_hook_finish
|
@@ -2,5 +2,14 @@
|
||||
|
||||
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||
|
||||
ventoy_systemd_udevd_work_around
|
||||
ventoy_add_udev_rule "$VTOY_PATH/hook/kaos/udev_disk_hook.sh %k"
|
||||
if $GREP -q '^"$mount_handler"' /init; then
|
||||
echo 'use mount_handler1 ...' >> $VTLOG
|
||||
$SED "/^\"\$mount_handler\"/i\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/kaos/ventoy-disk.sh" -i /init
|
||||
elif $GREP -q '^$mount_handler' /init; then
|
||||
echo 'use mount_handler2 ...' >> $VTLOG
|
||||
$SED "/^\$mount_handler/i\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/kaos/ventoy-disk.sh" -i /init
|
||||
fi
|
||||
|
||||
if [ -f $VTOY_PATH/ventoy_persistent_map ]; then
|
||||
$SED "1 aexport cow_label=vtoycow" -i /init
|
||||
fi
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#!/ventoy/busybox/sh
|
||||
#!/bin/sh
|
||||
#************************************************************************************
|
||||
# Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||
# Copyright (c) 2022, 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
|
||||
@@ -17,23 +17,8 @@
|
||||
#
|
||||
#************************************************************************************
|
||||
|
||||
. /ventoy/hook/ventoy-hook-lib.sh
|
||||
|
||||
if is_ventoy_hook_finished || not_ventoy_disk "${1:0:-1}"; then
|
||||
exit 0
|
||||
if [ -f /run/install/ks.cfg ]; then
|
||||
sh /ventoy/hook/default/auto_install_varexp.sh /run/install/ks.cfg
|
||||
fi
|
||||
|
||||
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||
|
||||
modprobe fuse
|
||||
mkdir -p $VTOY_PATH/mnt/fuse $VTOY_PATH/mnt/iso
|
||||
|
||||
vtoydm -p -f $VTOY_PATH/ventoy_image_map -d "/dev/${1:0:-1}" > $VTOY_PATH/ventoy_dm_table
|
||||
vtoy_fuse_iso -f $VTOY_PATH/ventoy_dm_table -m $VTOY_PATH/mnt/fuse
|
||||
mount -t iso9660 $VTOY_PATH/mnt/fuse/ventoy.iso $VTOY_PATH/mnt/iso
|
||||
|
||||
# OK finish
|
||||
set_ventoy_hook_finish
|
||||
|
||||
PATH=$VTPATH_OLD
|
||||
|
||||
exit 0
|
@@ -24,18 +24,21 @@ if [ -f $VTOY_PATH/autoinstall ]; then
|
||||
else
|
||||
for vtParam in $($CAT /proc/cmdline); do
|
||||
if echo $vtParam | $GREP -q 'inst.ks=hd:LABEL='; then
|
||||
vtRawKsFull="$vtParam"
|
||||
vtRawKs=$(echo $vtParam | $AWK -F: '{print $NF}')
|
||||
VTKS="inst.ks=hd:/dev/ventoy:$vtRawKs"
|
||||
break
|
||||
fi
|
||||
|
||||
if echo $vtParam | $GREP -q '^ks=.*:/'; then
|
||||
vtRawKsFull="$vtParam"
|
||||
vtRawKs=$(echo $vtParam | $AWK -F: '{print $NF}')
|
||||
VTKS="ks=hd:/dev/ventoy:$vtRawKs"
|
||||
break
|
||||
fi
|
||||
|
||||
if echo $vtParam | $GREP -q '^inst.ks=.*:/'; then
|
||||
vtRawKsFull="$vtParam"
|
||||
vtRawKs=$(echo $vtParam | $AWK -F: '{print $NF}')
|
||||
VTKS="inst.ks=hd:/dev/ventoy:$vtRawKs"
|
||||
break
|
||||
@@ -63,7 +66,13 @@ fi
|
||||
echo "VTKS=$VTKS VTOVERLAY=$VTOVERLAY" >> $VTLOG
|
||||
|
||||
if [ -n "$vtRawKs" ]; then
|
||||
if echo $vtRawKsFull | $EGREP -q "=http|=https|=ftp|=nfs|=hmc"; then
|
||||
echo "vtRawKsFull=$vtRawKsFull no patch needed." >> $VTLOG
|
||||
vtRawKs=""
|
||||
VTKS=""
|
||||
else
|
||||
echo "$vtRawKs" > $VTOY_PATH/ventoy_ks_rootpath
|
||||
fi
|
||||
fi
|
||||
|
||||
if ls $VTOY_PATH | $GREP -q 'ventoy_dud[0-9]'; then
|
||||
@@ -98,3 +107,7 @@ if [ -f /usr/sbin/anaconda-diskroot ]; then
|
||||
$SED 's/^mount $dev $repodir/mount -oro $dev $repodir/' -i /usr/sbin/anaconda-diskroot
|
||||
fi
|
||||
|
||||
|
||||
if [ -f $VTOY_PATH/autoinstall ]; then
|
||||
cp -a $VTOY_PATH/hook/openEuler/ventoy-autoexp.sh /lib/dracut/hooks/pre-mount/99-ventoy-autoexp.sh
|
||||
fi
|
||||
|
@@ -26,19 +26,26 @@ if [ -f $VTOY_PATH/autoinstall ]; then
|
||||
VTKS="inst.ks=file:$VTOY_PATH/autoinstall"
|
||||
else
|
||||
for vtParam in $($CAT /proc/cmdline); do
|
||||
if echo $vtParam | $GREP -q 'ks=file:/'; then
|
||||
continue
|
||||
fi
|
||||
|
||||
if echo $vtParam | $GREP -q 'inst.ks=hd:LABEL='; then
|
||||
vtRawKsFull="$vtParam"
|
||||
vtRawKs=$(echo $vtParam | $AWK -F: '{print $NF}')
|
||||
VTKS="inst.ks=hd:/dev/ventoy:$vtRawKs"
|
||||
break
|
||||
fi
|
||||
|
||||
if echo $vtParam | $GREP -q '^ks=.*:/'; then
|
||||
vtRawKsFull="$vtParam"
|
||||
vtRawKs=$(echo $vtParam | $AWK -F: '{print $NF}')
|
||||
VTKS="ks=hd:/dev/ventoy:$vtRawKs"
|
||||
break
|
||||
fi
|
||||
|
||||
if echo $vtParam | $GREP -q '^inst.ks=.*:/'; then
|
||||
vtRawKsFull="$vtParam"
|
||||
vtRawKs=$(echo $vtParam | $AWK -F: '{print $NF}')
|
||||
VTKS="inst.ks=hd:/dev/ventoy:$vtRawKs"
|
||||
break
|
||||
@@ -67,7 +74,13 @@ fi
|
||||
echo "VTKS=$VTKS VTOVERLAY=$VTOVERLAY" >> $VTLOG
|
||||
|
||||
if [ -n "$vtRawKs" ]; then
|
||||
if echo $vtRawKsFull | $EGREP -q "=http|=https|=ftp|=nfs|=hmc"; then
|
||||
echo "vtRawKsFull=$vtRawKsFull no patch needed." >> $VTLOG
|
||||
vtRawKs=""
|
||||
VTKS=""
|
||||
else
|
||||
echo "$vtRawKs" > $VTOY_PATH/ventoy_ks_rootpath
|
||||
fi
|
||||
fi
|
||||
|
||||
if ls $VTOY_PATH | $GREP -q 'ventoy_dud[0-9]'; then
|
||||
@@ -128,6 +141,12 @@ if [ -e /usr/sbin/anaconda-diskroot ]; then
|
||||
$SED 's/^mount $dev $repodir/mount -oro $dev $repodir/' -i /usr/sbin/anaconda-diskroot
|
||||
fi
|
||||
|
||||
#For Fedora CoreOS
|
||||
if $GREP -i -q 'fedora.*coreos' /etc/os-release; then
|
||||
$SED "s#isosrc=.*#isosrc=/dev/mapper/ventoy#" -i /lib/systemd/system-generators/live-generator
|
||||
cp -a $VTOY_PATH/hook/rhel7/ventoy-make-link.sh /lib/dracut/hooks/pre-mount/99-ventoy-premount-mklink.sh
|
||||
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
|
||||
|
@@ -49,7 +49,12 @@ if is_inotify_ventoy_part $3; then
|
||||
if [ -e $vtGenRulFile ] && $GREP -q dmsquash $vtGenRulFile; then
|
||||
vtScript=$($GREP -m1 'RUN.=' $vtGenRulFile | $AWK -F'RUN.=' '{print $2}' | $SED 's/"\(.*\)".*/\1/')
|
||||
vtlog "vtScript=$vtScript"
|
||||
|
||||
if $GREP -q SCRE /proc/cmdline; then
|
||||
/sbin/dmsquash-live-root /dev/ventoy
|
||||
else
|
||||
$vtScript
|
||||
fi
|
||||
else
|
||||
vtlog "$vtGenRulFile not exist..."
|
||||
fi
|
||||
|
@@ -278,11 +278,23 @@ ventoy_dm_patch() {
|
||||
|
||||
$CAT /proc/kallsyms | $BUSYBOX_PATH/sort > $VTOY_PATH/kallsyms
|
||||
|
||||
if $GREP -m1 -q 'open_table_device.isra' $VTOY_PATH/kallsyms; then
|
||||
vtLine=$($VTOY_PATH/tool/vtoyksym open_table_device.isra $VTOY_PATH/kallsyms)
|
||||
vtlog "get open_table_device.isra address $vtLine"
|
||||
else
|
||||
vtLine=$($VTOY_PATH/tool/vtoyksym dm_get_table_device $VTOY_PATH/kallsyms)
|
||||
vtlog "get dm_get_table_device address $vtLine"
|
||||
fi
|
||||
get_addr=$(echo $vtLine | $AWK '{print $1}')
|
||||
get_size=$(echo $vtLine | $AWK '{print $2}')
|
||||
|
||||
if $GREP -m1 -q 'close_table_device.isra' $VTOY_PATH/kallsyms; then
|
||||
vtLine=$($VTOY_PATH/tool/vtoyksym close_table_device.isra $VTOY_PATH/kallsyms)
|
||||
vtlog "get close_table_device.isra address $vtLine"
|
||||
else
|
||||
vtLine=$($VTOY_PATH/tool/vtoyksym dm_put_table_device $VTOY_PATH/kallsyms)
|
||||
vtlog "get dm_put_table_device address $vtLine"
|
||||
fi
|
||||
put_addr=$(echo $vtLine | $AWK '{print $1}')
|
||||
put_size=$(echo $vtLine | $AWK '{print $2}')
|
||||
|
||||
@@ -738,6 +750,7 @@ ventoy_udev_disk_common_hook() {
|
||||
fi
|
||||
|
||||
if $GREP -q 'dm_patch' /proc/modules; then
|
||||
vtlog "remove dm_patch module."
|
||||
$BUSYBOX_PATH/rmmod dm_patch
|
||||
fi
|
||||
}
|
||||
@@ -868,3 +881,14 @@ ventoy_check_install_module_xz() {
|
||||
$BUSYBOX_PATH/insmod "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
ventoy_check_umount() {
|
||||
for vtLoop in 0 1 2 3 4 5 6 7 8 9; do
|
||||
$BUSYBOX_PATH/umount "$1" > /dev/null 2>&1
|
||||
if $BUSYBOX_PATH/mountpoint -q "$1"; then
|
||||
$SLEEP 1
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
@@ -362,6 +362,13 @@ ventoy_get_os_type() {
|
||||
fi
|
||||
|
||||
|
||||
#Kylin V10 Server
|
||||
if [ -f /usr/sbin/dhclient ]; then
|
||||
if $BUSYBOX_PATH/strings /usr/sbin/dhclient | $GREP -i -q -m1 openeuler; then
|
||||
echo 'openEuler'; return
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
echo "default"
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
@@ -18,6 +18,18 @@ print_usage() {
|
||||
echo ''
|
||||
}
|
||||
|
||||
print_err() {
|
||||
echo ""
|
||||
echo "$*"
|
||||
echo ""
|
||||
}
|
||||
|
||||
uid=$(id -u)
|
||||
if [ $uid -ne 0 ]; then
|
||||
print_err "Please use sudo or run the script as root."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while [ -n "$1" ]; do
|
||||
if [ "$1" = "-s" ]; then
|
||||
shift
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
print_usage() {
|
||||
echo 'Usage: ExtendPersistentImg.sh file size'
|
||||
@@ -19,6 +19,18 @@ if [ -z "$2" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
if [ "$1" = "__vbash__" ]; then
|
||||
shift
|
||||
else
|
||||
if readlink /bin/sh | grep -q bash; then
|
||||
:
|
||||
else
|
||||
exec /bin/bash $0 "__vbash__" "$@"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
file=$1
|
||||
size=$2
|
||||
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
. ./tool/ventoy_lib.sh
|
||||
|
||||
print_usage() {
|
||||
echo 'Usage: sudo sh VentoyPlugson.sh [OPTION] /dev/sdX'
|
||||
echo 'Usage: sudo bash VentoyPlugson.sh [OPTION] /dev/sdX'
|
||||
echo ' OPTION: (optional)'
|
||||
echo ' -H x.x.x.x http server IP address (default is 127.0.0.1)'
|
||||
echo ' -P PORT http server PORT (default is 24681)'
|
||||
@@ -17,6 +17,15 @@ if [ $uid -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" = "__vbash__" ]; then
|
||||
shift
|
||||
else
|
||||
if readlink /bin/sh | grep -q bash; then
|
||||
:
|
||||
else
|
||||
exec /bin/bash $0 "__vbash__" "$@"
|
||||
fi
|
||||
fi
|
||||
|
||||
OLDDIR=$(pwd)
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
print_usage() {
|
||||
echo 'Usage: VentoyWeb.sh [ OPTION ]'
|
||||
|
Binary file not shown.
@@ -158,7 +158,7 @@ function get_os_type {
|
||||
function vt_check_compatible_pe {
|
||||
#Check for PE without external tools
|
||||
#set compatible if ISO file is less than 80MB
|
||||
if [ $vt_chosen_size -gt 33554432 -a $vt_chosen_size -le 83886080 ]; then
|
||||
if [ $vt_chosen_size -GT 33554432 -a $vt_chosen_size -LE 83886080 ]; then
|
||||
set ventoy_compatible=YES
|
||||
fi
|
||||
|
||||
@@ -381,6 +381,8 @@ function distro_specify_initrd_file_phase2 {
|
||||
vt_linux_specify_initrd_file /sysresccd/boot/i686/sysresccd.img
|
||||
elif [ -f (loop)/boot/full.cz ]; then
|
||||
vt_linux_specify_initrd_file /boot/full.cz
|
||||
elif [ -f (loop)/images/pxeboot/initrd.img ]; then
|
||||
vt_linux_specify_initrd_file /images/pxeboot/initrd.img
|
||||
|
||||
fi
|
||||
}
|
||||
@@ -597,8 +599,12 @@ function ventoy_unix_comm_proc {
|
||||
function uefi_windows_menu_func {
|
||||
vt_windows_reset
|
||||
|
||||
if [ "$ventoy_compatible" = "NO" ]; then
|
||||
unset vt_cur_wimboot_mode
|
||||
if vt_check_mode 4 "$vt_chosen_name"; then
|
||||
set vt_cur_wimboot_mode=1
|
||||
fi
|
||||
|
||||
if [ "$ventoy_compatible" = "NO" -o "$vt_cur_wimboot_mode" = "1" ]; then
|
||||
if [ "$ventoy_fs_probe" = "iso9660" ]; then
|
||||
loopback -d loop
|
||||
vt_iso9660_nojoliet 1
|
||||
@@ -621,8 +627,8 @@ function uefi_windows_menu_func {
|
||||
vt_windows_chain_data "${1}${chosen_path}"
|
||||
ventoy_debug_pause
|
||||
|
||||
if vt_check_mode 4 "$vt_chosen_name"; then
|
||||
vtoy_windows_wimboot_func
|
||||
if [ "$vt_cur_wimboot_mode" = "1" ]; then
|
||||
vtoy_wimboot_func
|
||||
fi
|
||||
|
||||
if [ -n "$vtoy_chain_mem_addr" ]; then
|
||||
@@ -768,7 +774,7 @@ function uefi_linux_menu_func {
|
||||
|
||||
vt_linux_chain_data "${1}${chosen_path}"
|
||||
|
||||
if [ -n "$LoadIsoEfiDriver" -a $vt_chosen_size -lt 104857600 ]; then
|
||||
if [ -n "$LoadIsoEfiDriver" -a $vt_chosen_size -LT 104857600 ]; then
|
||||
if [ -f (loop)/efi/clover/cloverx64.efi ]; then
|
||||
unset LoadIsoEfiDriver
|
||||
fi
|
||||
@@ -781,6 +787,10 @@ function uefi_linux_menu_func {
|
||||
unset vtGrub2Mode
|
||||
if vt_check_mode 3 "$vt_chosen_name"; then
|
||||
set vtGrub2Mode=1
|
||||
elif vt_str_begin "$vt_volume_id" "HOLO_"; then
|
||||
if [ -d (loop)/loader/entries ]; then
|
||||
set vtGrub2Mode=1
|
||||
fi
|
||||
elif vt_str_begin "$vt_volume_id" "KRD"; then
|
||||
if [ -f (loop)/boot/grub/grub.cfg.sig ]; then
|
||||
set vtGrub2Mode=1
|
||||
@@ -814,6 +824,18 @@ function uefi_linux_menu_func {
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ $vtback_cfg_find -eq 0 ]; then
|
||||
if [ -f (loop)/loader/loader.conf -a -d (loop)/loader/entries ]; then
|
||||
if vt_str_begin "$vt_volume_id" "HOLO_"; then
|
||||
set root=(loop,2)
|
||||
vt_systemd_menu (loop,2) vt_sys_menu_mem
|
||||
else
|
||||
vt_systemd_menu (loop) vt_sys_menu_mem
|
||||
fi
|
||||
set vtback_cfg_find=1
|
||||
configfile "mem:${vt_sys_menu_mem_addr}:size:${vt_sys_menu_mem_size}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$vtback_cfg_find" = "0" ]; then
|
||||
echo " "
|
||||
@@ -910,6 +932,14 @@ function uefi_iso_menu_func {
|
||||
vt_check_compatible (loop)
|
||||
fi
|
||||
|
||||
if vt_need_secondary_menu "$vt_chosen_name"; then
|
||||
vt_show_secondary_menu "$vt_chosen_path" "$vtoy_os" $vt_chosen_size
|
||||
if vt_check_mode 0 "$vt_chosen_name"; then
|
||||
uefi_iso_memdisk $vtoy_iso_part "$vt_chosen_path"
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
vt_img_sector "${1}${chosen_path}"
|
||||
|
||||
if [ "$ventoy_fs_probe" = "iso9660" ]; then
|
||||
@@ -940,8 +970,7 @@ function uefi_iso_memdisk {
|
||||
ventoy_gui_console
|
||||
}
|
||||
|
||||
|
||||
function vtoy_windows_wimboot_func {
|
||||
function vtoy_windows_wimboot {
|
||||
if [ -f (loop)/x86/sources/boot.wim -a -f (loop)/x64/sources/boot.wim ]; then
|
||||
vt_sel_wimboot vtoy_wimboot_bit
|
||||
if [ "$vtoy_wimboot_bit" = "32" ]; then
|
||||
@@ -959,43 +988,24 @@ function vtoy_windows_wimboot_func {
|
||||
fi
|
||||
|
||||
if [ -n "${vtdebug_flag}" ]; then
|
||||
echo vtoy_wimboot_prefix=$vtoy_wimboot_prefix vtoy_wimboot_bit=$vtoy_wimboot_bit
|
||||
echo vtoy_wimboot_prefix=$vtoy_wimboot_prefix vtoy_wimboot_bit=$vtoy_wimboot_bit vt_wimkernel=$vt_wimkernel
|
||||
fi
|
||||
|
||||
for wmfile in sources/boot.wim boot/bcd boot/boot.sdi; do
|
||||
if [ ! -f $vtoy_wimboot_prefix/$wmfile ]; then
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -f $vtoy_wimboot_prefix/sources/install.wim -o -f $vtoy_wimboot_prefix/sources/install.esd ]; then
|
||||
vt_windows_wimboot_data
|
||||
else
|
||||
return
|
||||
fi
|
||||
vt_windows_wimboot_data "$vtoy_wimboot_prefix/sources/boot.wim" vtoy_init_exe vtoy_wim_bit
|
||||
|
||||
if [ "$grub_platform" = "pc" ]; then
|
||||
set vt_wimkernel=wimboot.x86_64.xz
|
||||
|
||||
linux16 "$vtoy_path/$vt_wimkernel" quiet
|
||||
ventoy_debug_pause
|
||||
|
||||
vt_set_wim_load_prompt 1 "Loading files......"
|
||||
initrd16 newc:vtoyjump.exe:$vtoy_path/vtoyjump${vtoy_wimboot_bit}.exe \
|
||||
newc:wimboot.data:mem:${vtoy_wimboot_mem_addr}:size:${vtoy_wimboot_mem_size} \
|
||||
newc:winpeshl.ini:mem:${vtoy_winpeshl_ini_addr}:size:${vtoy_winpeshl_ini_size} \
|
||||
initrd16 newc:winpeshl.exe:mem:${vtoy_wimboot_mem_addr}:size:${vtoy_wimboot_mem_size} \
|
||||
newc:vtoy_wimboot:$vtoy_wimboot_prefix/boot/bcd \
|
||||
newc:bcd:$vtoy_wimboot_prefix/boot/bcd \
|
||||
newc:boot.sdi:$vtoy_wimboot_prefix/boot/boot.sdi \
|
||||
newc:boot.wim:$vtoy_wimboot_prefix/sources/boot.wim
|
||||
vt_set_wim_load_prompt 0
|
||||
boot
|
||||
else
|
||||
if [ "$grub_cpu" = "i386" ]; then
|
||||
set vt_wimkernel=wimboot.i386.efi.xz
|
||||
else
|
||||
set vt_wimkernel=wimboot.x86_64.xz
|
||||
fi
|
||||
|
||||
vt_set_wim_load_prompt 1 "Loading files......"
|
||||
vt_load_file_to_mem "nodecompress" $vtoy_wimboot_prefix/sources/boot.wim vtoy_wimfile_mem
|
||||
vt_set_wim_load_prompt 0
|
||||
@@ -1008,9 +1018,8 @@ function vtoy_windows_wimboot_func {
|
||||
|
||||
ventoy_cli_console
|
||||
chainloader "$vtoy_path/$vt_wimkernel" quiet \
|
||||
"vf=wimboot.data:mem:${vtoy_wimboot_mem_addr}:size:${vtoy_wimboot_mem_size}" \
|
||||
"vf=winpeshl.ini:mem:${vtoy_winpeshl_ini_addr}:size:${vtoy_winpeshl_ini_size}" \
|
||||
"vf=vtoyjump.exe:$vtoy_path/vtoyjump${vtoy_wimboot_bit}.exe" \
|
||||
"vf=winpeshl.exe:mem:${vtoy_wimboot_mem_addr}:size:${vtoy_wimboot_mem_size}" \
|
||||
"vf=vtoy_wimboot:$vtoy_wimboot_prefix/boot/bcd" \
|
||||
"vf=bcd:$vtoy_wimboot_prefix/boot/bcd" \
|
||||
"vf=boot.sdi:$vtoy_wimboot_prefix/boot/boot.sdi" \
|
||||
"vf=boot.wim:$vtoy_wimfile_path" \
|
||||
@@ -1021,11 +1030,125 @@ function vtoy_windows_wimboot_func {
|
||||
fi
|
||||
}
|
||||
|
||||
function vtoy_winpe_wimboot {
|
||||
unset vtoy_boot_sdi_legacy
|
||||
unset vtoy_boot_sdi_efi
|
||||
|
||||
set vtoy_wimboot_prefix=(loop)
|
||||
set vtoy_wim_path="$1"
|
||||
|
||||
if [ -n "${vtdebug_flag}" ]; then
|
||||
echo "winpe_wimboot $1 $2 $3"
|
||||
fi
|
||||
|
||||
if [ "$2" != "0" ]; then
|
||||
set vtoy_boot_sdi_legacy="newc:boot.sdi:$vtoy_wimboot_prefix/$2"
|
||||
set vtoy_boot_sdi_efi="vf=boot.sdi:$vtoy_wimboot_prefix/$2"
|
||||
fi
|
||||
|
||||
vt_windows_wimboot_data $vtoy_wimboot_prefix/$vtoy_wim_path vtoy_init_exe vtoy_wim_bit
|
||||
|
||||
if [ "$grub_platform" = "pc" ]; then
|
||||
linux16 "$vtoy_path/$vt_wimkernel" quiet
|
||||
ventoy_debug_pause
|
||||
|
||||
vt_set_wim_load_prompt 1 "Loading files......"
|
||||
initrd16 newc:$vtoy_init_exe:mem:${vtoy_wimboot_mem_addr}:size:${vtoy_wimboot_mem_size} \
|
||||
newc:vtoy_wimboot:$vtoy_path/$vt_wimkernel \
|
||||
newc:bootmgr.exe:mem:${vtoy_pe_bootmgr_mem_addr}:size:${vtoy_pe_bootmgr_mem_size} \
|
||||
newc:bcd:mem:${vtoy_pe_bcd_mem_addr}:size:${vtoy_pe_bcd_mem_size} \
|
||||
$vtoy_boot_sdi_legacy \
|
||||
newc:boot.wim:$vtoy_wimboot_prefix/$vtoy_wim_path
|
||||
vt_set_wim_load_prompt 0
|
||||
boot
|
||||
else
|
||||
if [ "$VTOY_EFI_ARCH" = "x64" -a "$vtoy_wim_bit" = "32" ]; then
|
||||
echo -e "\nThis is 32bit Windows and does NOT support x86_64 UEFI firmware.\n"
|
||||
echo -e "这是32位的 Windows 系统,不支持当前的64位 UEFI 环境。\n"
|
||||
fi
|
||||
|
||||
vt_set_wim_load_prompt 1 "Loading files......"
|
||||
vt_load_file_to_mem "nodecompress" $vtoy_wimboot_prefix/$vtoy_wim_path vtoy_wimfile_mem
|
||||
vt_set_wim_load_prompt 0
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
set vtoy_wimfile_path=mem:${vtoy_wimfile_mem_addr}:size:${vtoy_wimfile_mem_size}
|
||||
else
|
||||
set vtoy_wimfile_path=$vtoy_wimboot_prefix/$vtoy_wim_path
|
||||
fi
|
||||
|
||||
unset vtoy_boot_efi_path
|
||||
if [ -F (loop)/efi/boot/boot${VTOY_EFI_ARCH}.efi ]; then
|
||||
set vtoy_boot_efi_path="vf=bootx64.efi:(loop)/efi/boot/boot${VTOY_EFI_ARCH}.efi"
|
||||
fi
|
||||
|
||||
ventoy_cli_console
|
||||
chainloader "$vtoy_path/$vt_wimkernel" quiet \
|
||||
"vf=$vtoy_init_exe:mem:${vtoy_wimboot_mem_addr}:size:${vtoy_wimboot_mem_size}" \
|
||||
"vf=vtoy_wimboot:$vtoy_path/$vt_wimkernel" \
|
||||
"vf=bcd:mem:${vtoy_pe_bcd_mem_addr}:size:${vtoy_pe_bcd_mem_size}" \
|
||||
"$vtoy_boot_sdi_efi" \
|
||||
"$vtoy_boot_efi_path" \
|
||||
"vf=boot.wim:$vtoy_wimfile_path" \
|
||||
pfsize=$vtoy_chain_file_size \
|
||||
pfread=$vtoy_chain_file_read
|
||||
boot
|
||||
ventoy_gui_console
|
||||
fi
|
||||
}
|
||||
|
||||
function vtoy_wimboot_func {
|
||||
if [ "$grub_platform" = "pc" ]; then
|
||||
set vt_wimkernel=wimboot.x86_64.xz
|
||||
else
|
||||
if [ "$grub_cpu" = "i386" ]; then
|
||||
set vt_wimkernel=wimboot.i386.efi.xz
|
||||
else
|
||||
set vt_wimkernel=wimboot.x86_64.xz
|
||||
fi
|
||||
fi
|
||||
|
||||
if vt_is_standard_winiso (loop); then
|
||||
echo -e "\n==================== VENTOY WIMBOOT ==================\n"
|
||||
vtoy_windows_wimboot
|
||||
else
|
||||
vt_sel_winpe_wim (loop)
|
||||
if [ -n "$vtoy_pe_wim_path" ]; then
|
||||
echo -e "\n==================== VENTOY WIMBOOT ==================\n"
|
||||
|
||||
vt_fs_ignore_case 1
|
||||
vt_load_file_to_mem "auto" $vtoy_path/common_bcd.xz vtoy_pe_bcd_mem
|
||||
|
||||
set vt_sdi_path=0
|
||||
for vsdi in "boot/boot.sdi" "2K10/FONTS/boot.sdi" "SSTR/boot.sdi" "ISPE/BOOT.SDI" \
|
||||
"boot/uqi.sdi" "ISYL/boot.sdi" "WEPE/WEPE.SDI" ; do
|
||||
if [ -F "(loop)/$vsdi" ]; then
|
||||
set vt_sdi_path=$vsdi
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$grub_platform" = "pc" ]; then
|
||||
vt_load_file_to_mem "auto" $vtoy_path/common_bootmgr.xz vtoy_pe_bootmgr_mem
|
||||
vtoy_winpe_wimboot "$vtoy_pe_wim_path" "$vt_sdi_path" 1
|
||||
else
|
||||
vtoy_winpe_wimboot "$vtoy_pe_wim_path" "$vt_sdi_path" 0
|
||||
fi
|
||||
|
||||
vt_fs_ignore_case 0
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function legacy_windows_menu_func {
|
||||
vt_windows_reset
|
||||
|
||||
if [ "$ventoy_compatible" = "NO" ]; then
|
||||
unset vt_cur_wimboot_mode
|
||||
if vt_check_mode 4 "$vt_chosen_name"; then
|
||||
set vt_cur_wimboot_mode=1
|
||||
fi
|
||||
|
||||
if [ "$ventoy_compatible" = "NO" -o "$vt_cur_wimboot_mode" = "1" ]; then
|
||||
if [ "$ventoy_fs_probe" = "iso9660" ]; then
|
||||
loopback -d loop
|
||||
vt_iso9660_nojoliet 1
|
||||
@@ -1044,14 +1167,16 @@ function legacy_windows_menu_func {
|
||||
fi
|
||||
|
||||
ventoy_debug_pause
|
||||
if [ -z "$vt_cur_wimboot_mode" ]; then
|
||||
locate_wim "${chosen_path}"
|
||||
fi
|
||||
fi
|
||||
|
||||
vt_windows_chain_data "${1}${chosen_path}"
|
||||
ventoy_debug_pause
|
||||
|
||||
if vt_check_mode 4 "$vt_chosen_name"; then
|
||||
vtoy_windows_wimboot_func
|
||||
if [ "$vt_cur_wimboot_mode" = "1" ]; then
|
||||
vtoy_wimboot_func
|
||||
fi
|
||||
|
||||
if [ -n "$vtoy_chain_mem_addr" ]; then
|
||||
@@ -1133,7 +1258,16 @@ function legacy_linux_menu_func {
|
||||
ventoy_debug_pause
|
||||
|
||||
if [ -n "$vtoy_chain_mem_addr" ]; then
|
||||
unset vtGrub2Mode
|
||||
if vt_check_mode 3 "$vt_chosen_name"; then
|
||||
set vtGrub2Mode=1
|
||||
elif vt_str_begin "$vt_volume_id" "HOLO_"; then
|
||||
if [ -d (loop)/loader/entries ]; then
|
||||
set vtGrub2Mode=1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$vtGrub2Mode" ]; then
|
||||
ventoy_acpi_param ${vtoy_chain_mem_addr} 2048
|
||||
ventoy_cli_console
|
||||
|
||||
@@ -1155,6 +1289,18 @@ function legacy_linux_menu_func {
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ $vtback_cfg_find -eq 0 ]; then
|
||||
if [ -f (loop)/loader/loader.conf -a -d (loop)/loader/entries ]; then
|
||||
if vt_str_begin "$vt_volume_id" "HOLO_"; then
|
||||
set root=(loop,2)
|
||||
vt_systemd_menu (loop,2) vt_sys_menu_mem
|
||||
else
|
||||
vt_systemd_menu (loop) vt_sys_menu_mem
|
||||
fi
|
||||
set vtback_cfg_find=1
|
||||
configfile "mem:${vt_sys_menu_mem_addr}:size:${vt_sys_menu_mem_size}"
|
||||
fi
|
||||
fi
|
||||
|
||||
vt_unset_boot_opt
|
||||
set root=$vtback_root
|
||||
@@ -1218,6 +1364,14 @@ function legacy_iso_menu_func {
|
||||
vt_check_compatible (loop)
|
||||
fi
|
||||
|
||||
if vt_need_secondary_menu "$vt_chosen_name"; then
|
||||
vt_show_secondary_menu "$vt_chosen_path" "$vtoy_os" $vt_chosen_size
|
||||
if vt_check_mode 0 "$vt_chosen_name"; then
|
||||
legacy_iso_memdisk $vtoy_iso_part "$vt_chosen_path"
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
vt_img_sector "${1}${chosen_path}"
|
||||
|
||||
if [ "$ventoy_fs_probe" = "iso9660" ]; then
|
||||
@@ -1307,7 +1461,7 @@ function iso_common_menuentry {
|
||||
vt_chosen_img_path vt_chosen_path vt_chosen_size vt_chosen_name
|
||||
|
||||
vt_parse_iso_volume "${vtoy_iso_part}${vt_chosen_path}" vt_system_id vt_volume_id vt_volume_space
|
||||
if [ $vt_volume_space -ne $vt_chosen_size ]; then
|
||||
if [ $vt_volume_space -NE $vt_chosen_size ]; then
|
||||
vt_mod $vt_chosen_size 2048 vt_chosen_size_mod
|
||||
if [ $vt_chosen_size_mod -ne 0 ]; then
|
||||
echo -e "\n $vt_volume_space $vt_chosen_size $vt_chosen_size_mod\n"
|
||||
@@ -1355,7 +1509,7 @@ function iso_common_menuentry {
|
||||
fi
|
||||
|
||||
#For iKuai8 (<64MB)
|
||||
if [ $vt_chosen_size -le 67108864 ]; then
|
||||
if [ $vt_chosen_size -LE 67108864 ]; then
|
||||
if vt_str_begin "$vt_chosen_name" "iKuai"; then
|
||||
set vtMemDiskBoot=1
|
||||
fi
|
||||
@@ -1797,7 +1951,7 @@ function ventoy_img_ubos {
|
||||
}
|
||||
|
||||
function ventoy_img_recalbox {
|
||||
if [ $vtoy_img_max_part_end -gt $vt_chosen_size ]; then
|
||||
if [ $vtoy_img_max_part_end -GT $vt_chosen_size ]; then
|
||||
echo -e "\nPlease extend the img file size before boot it. \n"
|
||||
ventoy_pause
|
||||
return
|
||||
@@ -2076,11 +2230,15 @@ function img_common_menuentry {
|
||||
if vt_str_begin "$vtImgHd3Label" "ROOT-"; then
|
||||
if [ -f (vtimghd,3)/etc/os-release.d/ID ]; then
|
||||
vt_1st_line (vtimghd,3)/etc/os-release.d/ID vt_release_line1
|
||||
if [ vt_str_begin "$vt_release_line1" "FydeOS" ]; then
|
||||
if vt_str_begin "$vt_release_line1" "FydeOS"; then
|
||||
ventoy_img_fydeos
|
||||
else
|
||||
ventoy_img_cloudready
|
||||
fi
|
||||
elif [ -f (vtimghd,3)/etc/cloudready-release ]; then
|
||||
ventoy_img_cloudready
|
||||
elif [ -f (vtimghd,3)/etc/chrome_dev.conf ]; then
|
||||
ventoy_img_cloudready
|
||||
fi
|
||||
elif vt_str_begin "$vtImgHd1Label" "LAKKA"; then
|
||||
ventoy_img_openelec lakka
|
||||
@@ -2145,7 +2303,7 @@ function img_unsupport_menuentry {
|
||||
#############################################################
|
||||
#############################################################
|
||||
|
||||
set VENTOY_VERSION="1.0.77"
|
||||
set VENTOY_VERSION="1.0.80"
|
||||
|
||||
#ACPI not compatible with Window7/8, so disable by default
|
||||
set VTOY_PARAM_NO_ACPI=1
|
||||
@@ -2203,6 +2361,11 @@ if [ "$vtoy_dev" = "tftp" ]; then
|
||||
done
|
||||
loadfont ascii
|
||||
|
||||
if [ -n "$vtoy_efi_part" ]; then
|
||||
vt_load_file_to_mem "auto" $vtoy_efi_part/grub/fonts/unicode.pf2 vtoy_font_mem
|
||||
loadfont mem:${vtoy_font_mem_addr}:size:${vtoy_font_mem_size}
|
||||
fi
|
||||
|
||||
if [ -f $vtoy_iso_part/ventoy/ventoy.json ]; then
|
||||
set vt_plugin_path=$vtoy_iso_part
|
||||
else
|
||||
|
@@ -8,10 +8,10 @@ F6 - Benutzerdefiniertes Grub2-Menü laden
|
||||
F7 - Wechseln zwischen GUI-Modus <-> TEXT-Modus
|
||||
|
||||
m - Prüfsummencheck Image Dateien (md5/sha1/sha256/sha512)
|
||||
Ctrl+w - WIMBOOT Modus (Nur für Standard Windows ISO)
|
||||
Ctrl+r - Grub2 Modus (Nur für einige Linux distros)
|
||||
Ctrl+i - Kompatibilitäts Modus (Nur für Fehleranalyse)
|
||||
Ctrl+u - Lade ISO efi Treiber (Nur für Fehleranalyse, darf nicht offiziel benutzt werden)
|
||||
w/Ctrl+w - WIMBOOT Modus (Nur für Standard Windows ISO)
|
||||
r/Ctrl+r - Grub2 Modus (Nur für einige Linux distros)
|
||||
i/Ctrl+i - Kompatibilitäts Modus (Nur für Fehleranalyse)
|
||||
u/Ctrl+u - Lade ISO efi Treiber (Nur für Fehleranalyse, darf nicht offiziel benutzt werden)
|
||||
|
||||
|
||||
|
||||
|
@@ -8,10 +8,10 @@ F6 - Load Custom Grub2 Menu
|
||||
F7 - Switch between GUI Mode <-> TEXT Mode
|
||||
|
||||
m - Checksum image files (md5/sha1/sha256/sha512)
|
||||
Ctrl+w - WIMBOOT Mode (Only for standard Windows ISO)
|
||||
Ctrl+r - Grub2 Mode (Only for some Linux distros)
|
||||
Ctrl+i - Compatible Mode (Just only for debug)
|
||||
Ctrl+u - Load ISO efi driver (Just only for debug, can not be used officially)
|
||||
w/Ctrl+w - WIMBOOT Mode (Only for standard Windows ISO)
|
||||
r/Ctrl+r - Grub2 Mode (Only for some Linux distros)
|
||||
i/Ctrl+i - Compatible Mode (Just only for debug)
|
||||
u/Ctrl+u - Load ISO efi driver (Just only for debug, can not be used officially)
|
||||
|
||||
|
||||
|
||||
|
@@ -8,9 +8,9 @@ F6 - Charger le menu Grub2 personnalisé
|
||||
F7 - Basculer entre le mode graphique <-> mode texte
|
||||
|
||||
m - Somme de contrôle des images (md5/sha1/sha256/sha512)
|
||||
Ctrl+w - Mode WIMBOOT (seulement pour les images standards Windows)
|
||||
Ctrl+r - Mode Grub2 (seulement pour quelques Linux)
|
||||
Ctrl+i - Mode Compatible (seulement à fins de tests)
|
||||
Ctrl+u - Load ISO efi driver (Just only for debug, can not be used officially)
|
||||
w/Ctrl+w - Mode WIMBOOT (seulement pour les images standards Windows)
|
||||
r/Ctrl+r - Mode Grub2 (seulement pour quelques Linux)
|
||||
i/Ctrl+i - Mode Compatible (seulement à fins de tests)
|
||||
u/Ctrl+u - Load ISO efi driver (Just only for debug, can not be used officially)
|
||||
|
||||
Appuyer sur Echap pour sortir ......
|
||||
|
@@ -8,10 +8,10 @@ F6 - Učitava prilagođen GRUB2 meni
|
||||
F7 - Mijenja između GUI <-> TEXT načina rada
|
||||
|
||||
m - Generira heš odabranog imidž fajla (md5/sha1/sha256/sha512)
|
||||
Ctrl+w - WIMBOOT način rada (samo za standardne Windows imidž fajlove)
|
||||
Ctrl+r - GRUB2 način rada (samo za neke Linux distribucije)
|
||||
Ctrl+i - Kompatibilni način rada (samo za testiranje)
|
||||
Ctrl+u - Učitava EFI drajver za imidž fajlove (samo za testiranje)
|
||||
w/Ctrl+w - WIMBOOT način rada (samo za standardne Windows imidž fajlove)
|
||||
r/Ctrl+r - GRUB2 način rada (samo za neke Linux distribucije)
|
||||
i/Ctrl+i - Kompatibilni način rada (samo za testiranje)
|
||||
u/Ctrl+u - Učitava EFI drajver za imidž fajlove (samo za testiranje)
|
||||
|
||||
|
||||
|
||||
|
@@ -8,10 +8,10 @@ F6 - Memuat ubah suai Grub2 Menu
|
||||
F7 - Beralih antara mode GUI <-> Mode TEXT
|
||||
|
||||
m - Periksa berkas files (md5/sha1/sha256/sha512)
|
||||
Ctrl+w - Mode WIMBOOT (Hanya untuk berkas ISO Windows standar)
|
||||
Ctrl+r - Mode Grub2 (Hanya untuk distro Linux tertentu)
|
||||
Ctrl+i - Mode Kompatibel/Compatible (Hanya untuk debug saja)
|
||||
Ctrl+u - Memuat ISO efi driver (Hanya untuk debug saja, tidak dapat dipakai secara umum)
|
||||
w/Ctrl+w - Mode WIMBOOT (Hanya untuk berkas ISO Windows standar)
|
||||
r/Ctrl+r - Mode Grub2 (Hanya untuk distro Linux tertentu)
|
||||
i/Ctrl+i - Mode Kompatibel/Compatible (Hanya untuk debug saja)
|
||||
u/Ctrl+u - Memuat ISO efi driver (Hanya untuk debug saja, tidak dapat dipakai secara umum)
|
||||
|
||||
|
||||
|
||||
|
@@ -8,10 +8,10 @@ F6 - Grub2の構成を読み込む
|
||||
F7 - 操作形式を切り替える(GUI ↔ CUI)
|
||||
|
||||
m - イメージの検査合計を計算する (md5/sha1/sha256/sha512)
|
||||
Ctrl+w - WIMBOOTモード(標準的なWindows ISO専用)
|
||||
Ctrl+r - Grub2モード(一部のLinuxディストリビューション専用)
|
||||
Ctrl+i - 互換モード(開発用)
|
||||
Ctrl+u - ISO efiドライバーを読み取る(開発用,非公式)
|
||||
w/Ctrl+w - WIMBOOTモード(標準的なWindows ISO専用)
|
||||
r/Ctrl+r - Grub2モード(一部のLinuxディストリビューション専用)
|
||||
i/Ctrl+i - 互換モード(開発用)
|
||||
u/Ctrl+u - ISO efiドライバーを読み取る(開発用,非公式)
|
||||
|
||||
|
||||
|
||||
|
@@ -8,10 +8,10 @@ F6 - 사용자 지정 Grub2 메뉴 로드
|
||||
F7 - GUI 모드 <-> TEXT 모드 간에 전환
|
||||
|
||||
m - 체크섬 이미지 파일 (md5/sha1/sha256/sha512)
|
||||
Ctrl+w - WIMBOOT 모드 (표준 Windows ISO 전용)
|
||||
Ctrl+r - Grub2 모드 (일부 Linux 배포판에만 해당)
|
||||
Ctrl+i - 호환 모드 (디버그 전용)
|
||||
Ctrl+u - ISO eFi 드라이버 로드 (디버그 전용, 공식적으로 사용할 수 없음)
|
||||
w/Ctrl+w - WIMBOOT 모드 (표준 Windows ISO 전용)
|
||||
r/Ctrl+r - Grub2 모드 (일부 Linux 배포판에만 해당)
|
||||
i/Ctrl+i - 호환 모드 (디버그 전용)
|
||||
u/Ctrl+u - ISO eFi 드라이버 로드 (디버그 전용, 공식적으로 사용할 수 없음)
|
||||
|
||||
|
||||
|
||||
|
@@ -8,10 +8,10 @@ F6 - Carregar menu Grub2 personalizado
|
||||
F7 - Alternar entre Modo GUI <-> Modo TEXTO
|
||||
|
||||
m - Checksum ficheiros de imagem (md5/sha1/sha256/sha512)
|
||||
Ctrl+w - Modo WIMBOOT (Apenas para Windows ISO padrão)
|
||||
Ctrl+r - Modo Grub2 (Apenas para algumas distros Linux)
|
||||
Ctrl+i - Modo Compatível (Apenas para depuração)
|
||||
Ctrl+u - Carregar o controlador ISO efi (Apenas para depuração, não pode ser utilizado oficialmente)
|
||||
w/Ctrl+w - Modo WIMBOOT (Apenas para Windows ISO padrão)
|
||||
r/Ctrl+r - Modo Grub2 (Apenas para algumas distros Linux)
|
||||
i/Ctrl+i - Modo Compatível (Apenas para depuração)
|
||||
u/Ctrl+u - Carregar o controlador ISO efi (Apenas para depuração, não pode ser utilizado oficialmente)
|
||||
|
||||
|
||||
Prima ESC para voltar ......
|
||||
|
@@ -8,10 +8,10 @@ F6 - Учитава прилагођен GRUB2 мени
|
||||
F7 - Мења између GUI <-> TEXT начина рада
|
||||
|
||||
m - Генерира хеш одабраног имиџ фајла (md5/sha1/sha256/sha512)
|
||||
Ctrl+w - WIMBOOT начин рада (само за стандардне Windows имиџ фајлове)
|
||||
Ctrl+r - GRUB2 начин рада (само за неке Linux дистрибуције)
|
||||
Ctrl+i - Компатибилни начин рада (само за тестирање)
|
||||
Ctrl+u - Учитава EFI драјвер за имиџ фајлове (само за тестирање)
|
||||
w/Ctrl+w - WIMBOOT начин рада (само за стандардне Windows имиџ фајлове)
|
||||
r/Ctrl+r - GRUB2 начин рада (само за неке Linux дистрибуције)
|
||||
i/Ctrl+i - Компатибилни начин рада (само за тестирање)
|
||||
u/Ctrl+u - Учитава EFI драјвер за имиџ фајлове (само за тестирање)
|
||||
|
||||
|
||||
|
||||
|
@@ -8,10 +8,10 @@ F6 - Özelleştirilmiş Grub2 menüsünü yükler
|
||||
F7 - Grafik Modu(GUI Mode) ile Metin Modu(Text Mode) arasında geçiş yapmayı sağlar
|
||||
|
||||
m - İndirilen imaj dosyalarının hatasız indirildiğini teyit etmek için "md5/sha1/sha256/sha512" değerlerini kontrol etmeyi sağlar
|
||||
Ctrl+w - WIMBOOT Modu çalıştırmayı sağlar(Sadece normal Windows ISO ları için)
|
||||
Ctrl+r - Grub2 Modu çalıştırmayı sağlar (Sadece bazı Linux dağıtımları için)
|
||||
Ctrl+i - Uyumluluk Modu'nu (Compatible Mode) çalıştırmayı sağlar (Sadece hata ayıklama için bu modu kullanabilirsiniz)
|
||||
Ctrl+u - ISO efi sürücüsünü yükler(Sadece hata ayıklama için bu mod kullanılabilir, resmi olarak kullanılamaz)
|
||||
w/Ctrl+w - WIMBOOT Modu çalıştırmayı sağlar(Sadece normal Windows ISO ları için)
|
||||
r/Ctrl+r - Grub2 Modu çalıştırmayı sağlar (Sadece bazı Linux dağıtımları için)
|
||||
i/Ctrl+i - Uyumluluk Modu'nu (Compatible Mode) çalıştırmayı sağlar (Sadece hata ayıklama için bu modu kullanabilirsiniz)
|
||||
u/Ctrl+u - ISO efi sürücüsünü yükler(Sadece hata ayıklama için bu mod kullanılabilir, resmi olarak kullanılamaz)
|
||||
|
||||
|
||||
Geriye dönmek için ESC tuşuna basınız......
|
||||
|
@@ -8,10 +8,10 @@ F6 - 加载自定义 GRUB2 菜单。
|
||||
F7 - 界面在文本模式和图形模式之间切换。
|
||||
|
||||
m - 计算文件校验值(md5/sha1/sha256/sha512)
|
||||
Ctrl+w - WIMBOOT 模式 (只适用于标准的 Windows ISO文件)
|
||||
Ctrl+r - Grub2 模式 (只适用于常见的一些 Linux 系统ISO文件)
|
||||
Ctrl+i - 兼容模式 (只用作调试目的,不能正式使用)
|
||||
Ctrl+u - 加载 ISO efi 驱动(只用作调试目的,不能正式使用)
|
||||
w/Ctrl+w - WIMBOOT 模式 (只适用于标准的 Windows ISO文件)
|
||||
r/Ctrl+r - Grub2 模式 (只适用于常见的一些 Linux 系统ISO文件)
|
||||
i/Ctrl+i - 兼容模式 (只用作调试目的,不能正式使用)
|
||||
u/Ctrl+u - 加载 ISO efi 驱动(只用作调试目的,不能正式使用)
|
||||
|
||||
|
||||
按 ESC 键返回 ......
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
INSTALL/ventoy/common_bcd.xz
Normal file
BIN
INSTALL/ventoy/common_bcd.xz
Normal file
Binary file not shown.
BIN
INSTALL/ventoy/common_bootmgr.xz
Normal file
BIN
INSTALL/ventoy/common_bootmgr.xz
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -294,6 +294,63 @@
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
"name": "georgian (ქართული)",
|
||||
"FontFamily": "Courier New",
|
||||
"FontSize": 16,
|
||||
"Author": "44f33",
|
||||
"STR_ERROR": "შეცდომა",
|
||||
"STR_WARNING": "გაფრთხილება",
|
||||
"STR_INFO": "ინფორმაცია",
|
||||
"STR_INCORRECT_DIR": "გთხოვთ გაუშვათ სწორ დირექტორიაში!",
|
||||
"STR_INCORRECT_TREE_DIR": "აქ არ გაუშვათ, გთხოვთ ჩამოტვირთოთ გამოშვებული ინსტალაციის პაკეტი და იქ და-run-ოთ",
|
||||
"STR_DEVICE": "მოწყობილობა",
|
||||
"STR_INSTALL_YES_TIP1": "გაფრთხილება: მონაცემები დაიკარგება",
|
||||
"STR_INSTALL_YES_TIP2": "გთხოვთ შეიყვანოთ YES რათა დამტკიცდეს რომ თვენ დარწმუნებული ხართ რომ გსურთ ხელახლა დაყენაბა ვიდრე განახლება",
|
||||
"STR_LOCAL_VER": "Ventoy პაკეტში",
|
||||
"STR_DISK_VER": "Ventoy მოწყობილობაში",
|
||||
"STR_STATUS": "სტატუსი - მზადაა",
|
||||
"STR_PART_RESIZE_FAILED": "არა-დესტრუქციული ინსტალაცია წარუმატებლივ დასრულა, ნახეთ log.txt დეტალებისთვის",
|
||||
"STR_PART_RESIZE_SUCCESS": "გილოცავთ #@Ventoy არა-დესტრუქციული ინსტალაცია წარმატებით დასრულდა",
|
||||
"STR_PART_RESIZE_UNSUPPORTED": "Ventoy-ს არასაზიანო ინსტალაცია შეჩერდა რადგან რაღაც პირობები არ კმაყოფილდება. ნახეთ log.txt დეტალებისთვის.",
|
||||
"STR_INSTALL": "ინსტალაცია",
|
||||
"STR_UPDATE": "განახლება",
|
||||
"STR_UPDATE_TIP": "განახლების ოპერაცია უსაფრთხოა, ISO ფაილები არ შეიცვლება. გსურს გაგრძელება?",
|
||||
"STR_INSTALL_TIP": "მოწყობილობა დაფორმატდება და ყველა მონაცემი დაიკარგება.გსურს გაგრძელება?",
|
||||
"STR_INSTALL_TIP2": "მოწყობილობა დაფორმატდება და ყველა მონაცემი დაიკარგება! დარწმუნებული ხართ რომ ამის განხორციელება ნამდვილად გსურთ?",
|
||||
"STR_INSTALL_SUCCESS": "გილოცავთ! Ventoy წარმატებით დაინსტალირდა თქვენს მოწყობილობაზე.",
|
||||
"STR_INSTALL_FAILED": "დაყენებისას მოხდა შეცდომა. გთხოვთ მიმართოთ FAQ-ს ოფიციალურ ვებსაიტზე.",
|
||||
"STR_UPDATE_SUCCESS": "გილოცავთ!#@Ventoy წარმატებით განახლდა მოწყობილობაზე.",
|
||||
"STR_UPDATE_FAILED": "შეცდომა მოხდა განახლების დროს. შეგიძლიათ აკონტროლოთ… გაუქმება",
|
||||
"STR_WAIT_PROCESS": "შეინარჩუნე გარკვეული სივრცე დისკის ბოლოს",
|
||||
"STR_MENU_OPTION": "არასწორი მნიშვნელობა რეზერვირებული სივრცისთვის",
|
||||
"STR_MENU_SECURE_BOOT": "გასუფთავება Ventoy",
|
||||
"STR_MENU_PART_CFG": "Ventoy წარმატებით წაიშალა მოწყობილობიდან.",
|
||||
"STR_BTN_OK": "დაიქმნა შეცდომა Ventoy-ის დისკიდან ამოღებისას მოწყობილობა და სცადეთ ხელახლა. შეამოწმეთ log.txt დეტალებისთვის.",
|
||||
"STR_BTN_CANCEL": "პარტიციის სტილი",
|
||||
"STR_PRESERVE_SPACE": "გთხოვთ აირჩიოთ GPT 2 ტერაბიატზე მეტი მოწყობილობებისთვის",
|
||||
"STR_SPACE_VAL_INVALID": "ყველა მოწყობილობის ჩვენება",
|
||||
"STR_MENU_CLEAR": "პარტიციის გასწორება 4KB-ით",
|
||||
"STR_CLEAR_SUCCESS": "კომუნიკაციის შეცდომა:",
|
||||
"STR_CLEAR_FAILED": "კომუნიკაციის შეცდომა: დისტანციური არანორმალური",
|
||||
"STR_MENU_PART_STYLE": "კომუნიკაციის შეცდომა: მოთხოვნის დრო ამოიწურა",
|
||||
"STR_DISK_2TB_MBR_ERROR": "კომუნიკაციის შეცდომა: სერვისი მიუწვდომელია",
|
||||
"STR_SHOW_ALL_DEV": "Daemon-ის სტატუსი განახლებულია, გთხოვთ, სცადოთ მოგვიანებით.",
|
||||
"STR_PART_ALIGN_4KB": "სერვისი დაკავებულია, გთხოვთ, სცადოთ მოგვიანებით.",
|
||||
"STR_WEB_COMMUNICATION_ERR": "VTSI ფაილის გენერირება",
|
||||
"STR_WEB_REMOTE_ABNORMAL": "ამჯერად არ დაწეროთ მოწყობილობაში, არამედ მხოლოდ შექმნათ VTSI ფაილი#@გაგრძელება?",
|
||||
"STR_WEB_REQUEST_TIMEOUT": "VTSI ფაილი შეიქმნა წარმატებით!#@შეგიძლიათ გამოიყენოთ Rufus…ice, რათა დაასრულოთ Ventoy-ის ინსტალაცია.",
|
||||
"STR_WEB_SERVICE_UNAVAILABLE": "VTSI ფაილი შეიქმნა ვერ მოხერხდა.",
|
||||
"STR_WEB_TOKEN_MISMATCH": "არადესტრუქციული ინსტალაცია",
|
||||
"STR_WEB_SERVICE_BUSY": "Ventoy შეეცდება არა-დესტრუქციულ ინსტალაციას, თუ ეს შესაძლებელია. #@გაგრძელება?",
|
||||
"STR_MENU_VTSI_CREATE": "გილოცავთ! #@Ventoy არა-დესტრუქციული ინსტალაცია წარმატებით დასრულდა.",
|
||||
"STR_VTSI_CREATE_TIP": "არადესტრუქციული ინსტალაცია ვერ მოხერხდა, შეამოწმეთ log.txt დეტალებისთვის.",
|
||||
"STR_VTSI_CREATE_SUCCESS": "Ventoy არა-დესტრუქციული ინსტალაცია შეჩერდა, რადგან… პირობა ვერ შესრულდება . შეამოწმეთ log.txt დეტალებისთვის.",
|
||||
"STR_VTSI_CREATE_FAILED": "გაფრთხილება: მონაცემები დაიკარგება!",
|
||||
"STR_MENU_PART_RESIZE": "გთხოვთ, შეიყვანოთ YES ქვემოთ მოცემულ ტექსტურ ველში, რათა დაადასტუროთ... გსურთ განახლების ნაცვლად განახორციელოთ ახალი ინსტალაცია.",
|
||||
"STR_PART_RESIZE_TIP": "Ventoy ჩეეცდება დააყენოს არა-დესტრუქციული რამდენადაც შეეცდება. გსურს გაგრძელება?",
|
||||
"STRXXX": ""
|
||||
},
|
||||
{
|
||||
"name":"Persian (فارسی)",
|
||||
"FontFamily":"Courier New",
|
||||
@@ -420,7 +477,7 @@
|
||||
|
||||
"STR_ERROR":"Erro",
|
||||
"STR_WARNING":"Atenção",
|
||||
"STR_INFO":"Info",
|
||||
"STR_INFO":"Informação",
|
||||
"STR_INCORRECT_DIR":"Por favor, execute no diretório correto!",
|
||||
"STR_INCORRECT_TREE_DIR":"Não me execute aqui, por favor baixe o pacote de instalação lançado, e me execute lá.",
|
||||
"STR_DEVICE":"Dispositivo",
|
||||
@@ -466,8 +523,8 @@
|
||||
"STR_PART_RESIZE_SUCCESS":"Parabéns!#@Instalação não destrutiva do Ventoy concluída com sucesso.",
|
||||
"STR_PART_RESIZE_FAILED":"Falha na instalação não destrutiva, cheque o arquivo log.txt para entender.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Instalação não destrutiva do Ventoy interrompida devido fato desconhecido. Cheque o arquivo log.txt para detalhes.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_INSTALL_YES_TIP1":"Aviso: Os dados serão perdidos!",
|
||||
"STR_INSTALL_YES_TIP2":"Por favor, digite YES na caixa de texto abaixo para confirmar que você realmente quer fazer uma nova instalação em vez de atualização.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -711,12 +768,12 @@
|
||||
"name":"Czech (Čeština)",
|
||||
"FontFamily":"Courier New",
|
||||
"FontSize":16,
|
||||
"Author":"vavanade",
|
||||
"Author":"vavanade, lev741",
|
||||
|
||||
"STR_ERROR":"Chyba",
|
||||
"STR_WARNING":"Varování",
|
||||
"STR_INFO":"Info",
|
||||
"STR_INCORRECT_DIR":"Spusťte prosím ve správném adresáři!",
|
||||
"STR_INCORRECT_DIR":"Spusťte Ventoy ve správném adresáři!",
|
||||
"STR_INCORRECT_TREE_DIR":"Nespouštějte mě zde, stáhněte si prosím vydaný instalační balík a spusťte v něm.",
|
||||
"STR_DEVICE":"Zařízení",
|
||||
"STR_LOCAL_VER":"Ventoy v Balíčku",
|
||||
@@ -726,26 +783,26 @@
|
||||
"STR_UPDATE":"Aktualizovat",
|
||||
"STR_UPDATE_TIP":"Operace aktualizace je bezpečná, ISO soubory nebudou změněny.#@Pokračovat?",
|
||||
"STR_INSTALL_TIP":"Disk bude zformátován a všechna data budou ztracena!#@Pokračovat?",
|
||||
"STR_INSTALL_TIP2":"Disk bude zformátován a všechna data budou ztracena!#@Pokračovat? (druhá kontrola)",
|
||||
"STR_INSTALL_TIP2":"Disk bude zformátován a všechna data budou ztracena!#@Pokračovat? (druhé potvrzení)",
|
||||
"STR_INSTALL_SUCCESS":"Gratulujeme!#@Ventoy byla na zařízení úspěšně nainstalována.",
|
||||
"STR_INSTALL_FAILED":"V průběhu instalace se vyskytla chyba. Můžete vyjmout a znovu zastrčit USB zařízení a zkusit to znovu. Pro podrobnosti se podívejte do souboru log.txt.",
|
||||
"STR_UPDATE_SUCCESS":"Gratulujeme!#@Ventoy byla na zařízení úspěšně aktualizována.",
|
||||
"STR_UPDATE_FAILED":"V průběhu aktualizace se vyskytla chyba. Můžete vyjmout a znovu zastrčit USB zařízení a zkusit to znovu. Pro podrobnosti se podívejte do souboru log.txt.",
|
||||
"STR_WAIT_PROCESS":"Vlákno běží, prosíme vyčkejte...",
|
||||
"STR_MENU_OPTION":"Možnosti",
|
||||
"STR_MENU_SECURE_BOOT":"Secure Boot Podpora",
|
||||
"STR_MENU_SECURE_BOOT":"Podpora Secure Boot",
|
||||
"STR_MENU_PART_CFG":"Konfigurace Oddílu",
|
||||
"STR_BTN_OK":"OK",
|
||||
"STR_BTN_CANCEL":"Zrušit",
|
||||
"STR_PRESERVE_SPACE":"Zachovejte místo na spodní straně disku",
|
||||
"STR_PRESERVE_SPACE":"Zachovejte místo na konci disku",
|
||||
"STR_SPACE_VAL_INVALID":"Neplatná hodnota pro vyhrazený prostor",
|
||||
"STR_MENU_CLEAR":"Vymazat Ventoy",
|
||||
"STR_MENU_CLEAR":"Odstranit Ventoy",
|
||||
"STR_CLEAR_SUCCESS":"Ventoy byl ze zařízení úspěšne odstraněn.",
|
||||
"STR_CLEAR_FAILED":"Nastala chyba při odstraňovaní Ventoy z disku. Múžete USB vytáhnout a znova zastrčit a vyskoušet to znovu. Pro podrobnosti se podívejte do souboru log.txt",
|
||||
"STR_MENU_PART_STYLE":"Styl Oddílu",
|
||||
"STR_DISK_2TB_MBR_ERROR":"Vyberte GPT pro disk přes 2TB",
|
||||
"STR_DISK_2TB_MBR_ERROR":"Vyberte GPT pro disk větší než 2TB",
|
||||
"STR_SHOW_ALL_DEV":"Zobrazit všechna zařízení",
|
||||
"STR_PART_ALIGN_4KB":"Zarovnejte oddíly s 4KB",
|
||||
"STR_PART_ALIGN_4KB":"Zarovnat oddíly s velikostí 4KB",
|
||||
"STR_WEB_COMMUNICATION_ERR":"Chyba komunikace:",
|
||||
"STR_WEB_REMOTE_ABNORMAL":"Chyba komunikace: remote abnormal",
|
||||
"STR_WEB_REQUEST_TIMEOUT":"Chyba komunikace: Request timed out",
|
||||
@@ -758,11 +815,11 @@
|
||||
"STR_VTSI_CREATE_FAILED":"Chyba při vytváření VTSI souboru.",
|
||||
"STR_MENU_PART_RESIZE":"Nedestruktivní Instalace",
|
||||
"STR_PART_RESIZE_TIP":"Ventoy se pokusí o nedestruktivní instalaci. #@Pokračovat?",
|
||||
"STR_PART_RESIZE_SUCCESS":"Gratulujeme!#@Nedestruktivní instalace Ventoy byla úspěšne dokončená.",
|
||||
"STR_PART_RESIZE_FAILED":"Nedestruktivní instalace zlyhala. Pro podrobnosti se podívejte do souboru log.txt.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Nedestruktivní instalace Ventoy zlyhala, protože některé podmínky nemohli být splněné. Pro podrobnosti se podívejte do souboru log.txt.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_RESIZE_SUCCESS":"Gratulujeme!#@Nedestruktivní instalace Ventoy byla úspěšně dokončena.",
|
||||
"STR_PART_RESIZE_FAILED":"Nedestruktivní instalace selhala. Pro podrobnosti se podívejte do souboru log.txt.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Nedestruktivní instalace Ventoy selhala, protože některé podmínky pro ni nemohly být splněny. Pro podrobnosti se podívejte do souboru log.txt.",
|
||||
"STR_INSTALL_YES_TIP1":"Varování: Data budou ztracena!",
|
||||
"STR_INSTALL_YES_TIP2":"Do níže uvedeného textového pole zadejte YES a potvrďte, že skutečně chcete provést novou instalaci namísto aktualizace.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -770,57 +827,57 @@
|
||||
"name":"Slovak (Slovenčina)",
|
||||
"FontFamily":"Courier New",
|
||||
"FontSize":16,
|
||||
"Author":"reggiiie",
|
||||
"Author":"reggiiie/jose1711",
|
||||
|
||||
"STR_ERR":"Chyba",
|
||||
"STR_WARNING":"Varovanie",
|
||||
"STR_INFO":"Info",
|
||||
"STR_INCORRECT_DIR":"Spusťte prosím v správnom adresári!",
|
||||
"STR_INCORRECT_TREE_DIR":"Nepsúšťajte ma tu, stiahnite si prosím vydaný inštalačný balík a spustite ma v ňom.",
|
||||
"STR_INCORRECT_DIR":"Spustite, prosím, v správnom adresári!",
|
||||
"STR_INCORRECT_TREE_DIR":"Nespúšťajte ma tu, stiahnite si, prosím, vydaný inštalačný balík a spustite ma v ňom.",
|
||||
"STR_DEVICE":"Zariadenie",
|
||||
"STR_LOCAL_VER":"Ventoy v Balíčku",
|
||||
"STR_DISK_VER":"Ventoy v Zariadení",
|
||||
"STR_STATUS":"Status - PRIPRAVENÝ",
|
||||
"STR_LOCAL_VER":"Ventoy v balíčku",
|
||||
"STR_DISK_VER":"Ventoy v zariadení",
|
||||
"STR_STATUS":"Stav - PRIPRAVENÝ",
|
||||
"STR_INSTALL":"Inštalovať",
|
||||
"STR_UPDATE":"Aktualizovať",
|
||||
"STR_UPDATE_TIP":"Aktualizácia je bezpečná, ISO súbory zostanú nezmenené.#@Pokračovať?",
|
||||
"STR_INSTALL_TIP":"Disk bude formátovaný a všetky dáta budú ztratené!#@Pokračovať?",
|
||||
"STR_INSTALL_TIP2":"Disk bude formátovaný a všetky dáta budú ztratené!#@Pokračovať? (Druhá Kontrola)",
|
||||
"STR_INSTALL_SUCCESS":"Gratulujeme!#@Ventoy bol na zariadenie úspěšne nainštalovaný.",
|
||||
"STR_INSTALL_FAILED":"V priebehu inštalácie sa vyskytla chyba. Môžete USB vytiahnuť a znova zastrčiť a skúsiť to znovu. Pre podrobnosti sa pozrite do súboru log.txt. Ak sa chyba stále opakuje, prosím skontrolujte FAQ na oficiálnej stránke.",
|
||||
"STR_UPDATE_SUCCESS":"Gratulujeme!#@Ventoy bol na zariadení úspěšne aktualizovaný.",
|
||||
"STR_UPDATE_FAILED":"V priebehu aktualizácie sa vyskytla chyba. Môžete USB vytiahnuť a znova zastrčiť a skúsiť to znovu. Pre podrobnosti sa pozrite do súboru log.txt. Ak sa chyba stále opakuje, prosím skontrolujte FAQ na oficiálnej stránke.",
|
||||
"STR_INSTALL_TIP":"Disk bude formátovaný a všetky údaje sa stratia!#@Pokračovať?",
|
||||
"STR_INSTALL_TIP2":"Disk bude formátovaný a všetky údaje sa stratia!#@Pokračovať? (dvojitá kontrola)",
|
||||
"STR_INSTALL_SUCCESS":"Gratulujeme!#@Ventoy bol úspešne nainštalovaný na zariadenie.",
|
||||
"STR_INSTALL_FAILED":"V priebehu inštalácie sa vyskytla chyba. Môžete USB vytiahnuť, znova ho zasunúť a skúsiť to znovu. Podrobnosti nájdete v súbore log.txt. Ak sa chyba stále opakuje, skontrolujte, prosím, FAQ na oficiálnej stránke.",
|
||||
"STR_UPDATE_SUCCESS":"Gratulujeme!#@Ventoy na zariadení bol úspešne aktualizovaný.",
|
||||
"STR_UPDATE_FAILED":"V priebehu aktualizácie sa vyskytla chyba. Môžete USB vytiahnuť, znova ho zasunúť a skúsiť to znovu. Podrobnosti nájdete v súbore log.txt. Ak sa chyba stále opakuje, skontrolujte, prosím, FAQ na oficiálnej stránke.",
|
||||
"STR_MENU_OPTION":"Možnosti",
|
||||
"STR_MENU_SECURE_BOOT":"Secure Boot Podpora",
|
||||
"STR_MENU_PART_CFG":"Konfigurácia Oddielu",
|
||||
"STR_MENU_SECURE_BOOT":"Podpora pre Secure Boot",
|
||||
"STR_MENU_PART_CFG":"Konfigurácia oddielu",
|
||||
"STR_BTN_OK":"OK",
|
||||
"STR_BTN_CANCEL":"Zrušiť",
|
||||
"STR_PRESERVE_SPACE":"Zachovajte nejaké miesto na konci disku",
|
||||
"STR_PRESERVE_SPACE":"Zachovať nejaké miesto na konci disku",
|
||||
"STR_SPACE_VAL_INVALID":"Neplatná hodnota pre vyhradený priestor",
|
||||
"STR_MENU_CLEAR":"Vymazať Ventoy",
|
||||
"STR_CLEAR_SUCCESS":"Ventoy bol zo zariadenia úspešne odstránený.",
|
||||
"STR_CLEAR_FAILED":"Nastala chyba pri odstraňovaní Ventoy z disku. Môžete USB vytiahnuť a znova zastrčiť a skúsiť to znovu. Pre podrobnosti sa pozrite do súboru log.txt.",
|
||||
"STR_MENU_PART_STYLE":"Štýl Oddielu",
|
||||
"STR_DISK_2TB_MBR_ERROR":"Prosím vyberte GPT pre disk nad 2TB",
|
||||
"STR_SHOW_ALL_DEV":"Zobrazit Všetky Zariadenia",
|
||||
"STR_PART_ALIGN_4KB":"Zarovnať oddiely s 4KB",
|
||||
"STR_CLEAR_FAILED":"Nastala chyba pri odstraňovaní Ventoy z disku. Môžete USB vytiahnuť, znova ho zasunúť a skúsiť to znovu. Podrobnosti nájdete v súbore log.txt.",
|
||||
"STR_MENU_PART_STYLE":"Štýl oddielu",
|
||||
"STR_DISK_2TB_MBR_ERROR":"Prosím vyberte GPT pre disk väčší ako 2 TB",
|
||||
"STR_SHOW_ALL_DEV":"Zobraziť všetky zariadenia",
|
||||
"STR_PART_ALIGN_4KB":"Zarovnať oddiely na 4 KB",
|
||||
"STR_WEB_COMMUNICATION_ERR":"Chyba komunikácie:",
|
||||
"STR_WEB_REMOTE_ABNORMAL":"Chyba komunikácie: remote abnormal",
|
||||
"STR_WEB_REQUEST_TIMEOUT":"Chyba komunikácie: Request timed out",
|
||||
"STR_WEB_SERVICE_UNAVAILABLE":"Chyba komunikácie: Service Unavailable",
|
||||
"STR_WEB_TOKEN_MISMATCH":"Daemon status bol aktualizovaný, prosím skúste neskôr.",
|
||||
"STR_WEB_SERVICE_BUSY":"Služba je zaneprázdnená, prosím skúste neskôr.",
|
||||
"STR_WEB_REMOTE_ABNORMAL":"Chyba komunikácie: Chyba vzdialeného hostiteľa",
|
||||
"STR_WEB_REQUEST_TIMEOUT":"Chyba komunikácie: Požiadavka vypršala",
|
||||
"STR_WEB_SERVICE_UNAVAILABLE":"Chyba komunikácie: Služba je nedostupná",
|
||||
"STR_WEB_TOKEN_MISMATCH":"Stav démona bol aktualizovaný, skúste to, prosím, neskôr.",
|
||||
"STR_WEB_SERVICE_BUSY":"Služba je zaneprázdnená, skúste to, prosím, neskôr.",
|
||||
"STR_MENU_VTSI_CREATE":"Vygenerovať VTSI Súbor",
|
||||
"STR_VTSI_CREATE_TIP":"Tentokrát sa nebude do zariadenia zapisovať, len sa vygeneruje VTSI súbor#@Pokračovať?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"VTSI súbor úspešne vytvorený!#@Môžete použiť Rufus(3.15+) na jeho zapísanie do zariadena na dokončenie inštalácie Ventoy.",
|
||||
"STR_VTSI_CREATE_TIP":"Tentokrát sa nebude na zariadenie zapisovať, len sa vygeneruje VTSI súbor#@Pokračovať?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"VTSI súbor bol úspešne vytvorený!#@Môžete použiť Rufus(3.15+) na jeho zapísanie na zariadenie, aby ste mohli dokončiť inštaláciu Ventoy.",
|
||||
"STR_VTSI_CREATE_FAILED":"Chyba pri vytváraní VTSI súboru.",
|
||||
"STR_MENU_PART_RESIZE":"Nedeštruktívna Inštalácia",
|
||||
"STR_MENU_PART_RESIZE":"Nedeštruktívna inštalácia",
|
||||
"STR_PART_RESIZE_TIP":"Ventoy sa pokúsi o nedeštruktívnu inštaláciu. #@Pokračovať?",
|
||||
"STR_PART_RESIZE_SUCCESS":"Gratulujeme!#@Nedeštruktívna inštalácia Ventoy bola úspešne dokončená.",
|
||||
"STR_PART_RESIZE_FAILED":"Nedeštruktívna inštalácia zlyhala. Pre podrobnosti sa pozrite do súboru log.txt.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Nedeštruktívna inštalácia Ventoy zlyhala, lebo niektoré podmienky nemohli byť splnené. Pre podrobnosti sa pozrite do súboru log.txt.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_RESIZE_FAILED":"Nedeštruktívna inštalácia zlyhala. Podrobnosti nájdete v súbore log.txt.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Nedeštruktívna inštalácia Ventoy zlyhala, lebo niektoré podmienky nemohli byť splnené. Podrobnosti nájdete v súbore log.txt.",
|
||||
"STR_INSTALL_YES_TIP1":"Varovanie: Dôjde k strate údajov!",
|
||||
"STR_INSTALL_YES_TIP2":"Prosím, zadajte YES v textovom poli nižšie, čím potvrdíte, že naozaj chcete vykonať novú inštaláciu miesto aktualizácie.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -828,58 +885,58 @@
|
||||
"name":"Spanish (Español)",
|
||||
"FontFamily":"Courier New",
|
||||
"FontSize":16,
|
||||
"Author":"Carlos Sánchez, MELERIX",
|
||||
"Author":"Carlos Sánchez, MELERIX, shulkalala",
|
||||
|
||||
"STR_ERROR":"Error",
|
||||
"STR_WARNING":"Advertencia",
|
||||
"STR_INFO":"Información",
|
||||
"STR_INCORRECT_DIR":"¡Por favor, ejecuta bajo el directorio correcto!",
|
||||
"STR_INCORRECT_TREE_DIR":"No me ejecutes aquí, por favor descarga el paquete de instalación lanzado, y ejecútalo allí.",
|
||||
"STR_INCORRECT_DIR":"¡Por favor, ejecute Ventoy desde el directorio correcto!",
|
||||
"STR_INCORRECT_TREE_DIR":"No inicie Ventoy aquí, descargue el paquete de instalación publicado y ejecútelo allí.",
|
||||
"STR_DEVICE":"Dispositivo",
|
||||
"STR_LOCAL_VER":"Ventoy En Paquete",
|
||||
"STR_DISK_VER":"Ventoy En Dispositivo",
|
||||
"STR_LOCAL_VER":"Ventoy en paquete",
|
||||
"STR_DISK_VER":"Ventoy en dispositivo",
|
||||
"STR_STATUS":"Estado - LISTO",
|
||||
"STR_INSTALL":"Instalar",
|
||||
"STR_UPDATE":"Actualizar",
|
||||
"STR_UPDATE_TIP":"La operación de actualización es segura, Los archivo ISO no se modificarán.#@¿Continuar?",
|
||||
"STR_INSTALL_TIP":"El dispositivo será formateado y todos los datos se perderán.#@¿Continuar?",
|
||||
"STR_INSTALL_TIP2":"El dispositivo será formateado y todos los datos se perderán.#@¿Continuar? (Doble Comprobación)",
|
||||
"STR_INSTALL_SUCCESS":"¡Felicitaciones!#@Ventoy ha sido instalado exitosamente en el dispositivo.",
|
||||
"STR_INSTALL_FAILED":"Ocurrió un error durante la instalación. Puedes reinsertar el dispositivo USB e intentar de nuevo. Comprueba log.txt para detalles. Si siempre falla, consulta las PF en el sitio web oficial.",
|
||||
"STR_UPDATE_SUCCESS":"¡Felicitaciones!#@Ventoy ha sido actualizado exitosamente en el dispositivo.",
|
||||
"STR_UPDATE_FAILED":"Ocurrió un error durante la actualización. Puedes reinsertar el dispositivo USB e intentar de nuevo. Comprueba log.txt para detalles. Si siempre falla, consulta las PF en el sitio web oficial.",
|
||||
"STR_WAIT_PROCESS":"Un hilo está ejecutándose, por favor espera...",
|
||||
"STR_UPDATE_TIP":"La operación de actualización es segura. Los archivos ISO no se modificarán.#@¿Continuar?",
|
||||
"STR_INSTALL_TIP":"Se va a formatear el dispositivo y a perder todos sus datos.#@¿Continuar?",
|
||||
"STR_INSTALL_TIP2":"Se va a formatear el dispositivo y a perder todos sus datos.#@¿Continuar? (Segunda confirmación)",
|
||||
"STR_INSTALL_SUCCESS":"¡Enhorabuena!#@Ventoy se ha instalado correctamente en el dispositivo.",
|
||||
"STR_INSTALL_FAILED":"Ocurrió un error durante la instalación. Puede reinsertar el dispositivo USB e intentarlo de nuevo.#@Compruebe el archivo log.txt para más información.#@Si la instalación no deja de fallar, consulte el apartado de preguntas frecuentes en el sitio web oficial.",
|
||||
"STR_UPDATE_SUCCESS":"¡Enhorabuena!#@Ventoy se ha actualizado correctamente en el dispositivo.",
|
||||
"STR_UPDATE_FAILED":"Ocurrió un error durante la actualización. Puede reinsertar el dispositivo USB e intentarlo de nuevo.#@Compruebe el archivo log.txt para más información.#@Si la instalación no deja de fallar, consulte el apartado de preguntas frecuentes en el sitio web oficial.",
|
||||
"STR_WAIT_PROCESS":"Un hilo está ejecutándose, por favor espere...",
|
||||
"STR_MENU_OPTION":"Opción",
|
||||
"STR_MENU_SECURE_BOOT":"Soporte De Arranque Seguro",
|
||||
"STR_MENU_PART_CFG":"Configuración De Partición",
|
||||
"STR_MENU_SECURE_BOOT":"Soporte de arranque seguro",
|
||||
"STR_MENU_PART_CFG":"Configuración de particiones",
|
||||
"STR_BTN_OK":"Aceptar",
|
||||
"STR_BTN_CANCEL":"Cancelar",
|
||||
"STR_PRESERVE_SPACE":"Preservar algo de espacio al final del dispositivo",
|
||||
"STR_SPACE_VAL_INVALID":"Valor inválido para espacio reservado",
|
||||
"STR_PRESERVE_SPACE":"Reservar espacio de almacenamiento al final del dispositivo",
|
||||
"STR_SPACE_VAL_INVALID":"Valor inválido para el espacio reservado",
|
||||
"STR_MENU_CLEAR":"Limpiar Ventoy",
|
||||
"STR_CLEAR_SUCCESS":"Ventoy ha sido removido exitosamente desde el dispositivo.",
|
||||
"STR_CLEAR_FAILED":"Ocurrió un error al remover Ventoy del dispositivo. Puedes reinsertar el dispositivo USB e intentar de nuevo. Comprueba log.txt para detalles.",
|
||||
"STR_MENU_PART_STYLE":"Estilo De Partición",
|
||||
"STR_DISK_2TB_MBR_ERROR":"Por favor selecciona GPT para dispositivos sobre 2TB",
|
||||
"STR_SHOW_ALL_DEV":"Mostrar Todos Los Dispositivos",
|
||||
"STR_PART_ALIGN_4KB":"Alinear particiones con 4KB",
|
||||
"STR_CLEAR_SUCCESS":"Ventoy se ha eliminado correctamente del dispositivo.",
|
||||
"STR_CLEAR_FAILED":"Ocurrió un error al eliminar Ventoy del dispositivo. Puede reinsertar el dispositivo USB e intentarlo de nuevo.#@Compruebe el archivo log.txt para más información.",
|
||||
"STR_MENU_PART_STYLE":"Estilo de partición",
|
||||
"STR_DISK_2TB_MBR_ERROR":"Por favor, seleccione GPT para dispositivos con capacidad mayor de 2 TB",
|
||||
"STR_SHOW_ALL_DEV":"Mostrar todos los dispositivos",
|
||||
"STR_PART_ALIGN_4KB":"Alinear particiones a 4 KB",
|
||||
"STR_WEB_COMMUNICATION_ERR":"Error de comunicación:",
|
||||
"STR_WEB_REMOTE_ABNORMAL":"Error de comunicación: anormal remoto",
|
||||
"STR_WEB_REQUEST_TIMEOUT":"Error de comunicación: Tiempo de espera agotado",
|
||||
"STR_WEB_SERVICE_UNAVAILABLE":"Error de comunicación: Servicio No Disponible",
|
||||
"STR_WEB_TOKEN_MISMATCH":" Estado del daemon actualizado, por favor reintenta más tarde.",
|
||||
"STR_WEB_SERVICE_BUSY":" El servicio está ocupado, por favor reintenta más tarde.",
|
||||
"STR_MENU_VTSI_CREATE":"Generar Archivo VTSI",
|
||||
"STR_VTSI_CREATE_TIP":"Esta vez no se escribirá al dispositivo, pero solo generará un archivo VTSI#@¿Continuar?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"¡Archivo VTSI creado exitosamente!#@Puedes usar Rufus(3.15+) para escribirlo al dispositivo a fin de completar la instalación de Ventoy.",
|
||||
"STR_VTSI_CREATE_FAILED":"Fallo en el archivo VTSI creado.",
|
||||
"STR_WEB_REQUEST_TIMEOUT":"Error de comunicación: tiempo de espera agotado",
|
||||
"STR_WEB_SERVICE_UNAVAILABLE":"Error de comunicación: servicio no disponible",
|
||||
"STR_WEB_TOKEN_MISMATCH":"Se ha actualizado el estado del servicio, por favor inténtelo de nuevo más tarde.",
|
||||
"STR_WEB_SERVICE_BUSY":" El servicio está ocupado, por favor inténtelo de nuevo más tarde.",
|
||||
"STR_MENU_VTSI_CREATE":"Generar archivo VTSI",
|
||||
"STR_VTSI_CREATE_TIP":"Esta vez no se escribirá en el dispositivo, tan sólo se generará un archivo VTSI#@¿Continuar?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"¡El archivo VTSI se ha creado correctamente!#@Puede usar Rufus (3.15+) para escribirlo al dispositivo y completar la instalación de Ventoy.",
|
||||
"STR_VTSI_CREATE_FAILED":"Se ha producido un error al intentar crear el archivo VTSI.",
|
||||
"STR_MENU_PART_RESIZE":"Instalación no destructiva",
|
||||
"STR_PART_RESIZE_TIP":"Ventoy intentará una instalación no destructiva si es posible. #@¿Continuar?",
|
||||
"STR_PART_RESIZE_SUCCESS":"¡Felicitaciones!#@La instalación no destructiva de Ventoy a finalizado exitosamente.",
|
||||
"STR_PART_RESIZE_FAILED":"Instalación no destructiva fallida, Comprueba log.txt para detalles.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Instalación no destructiva de Ventoy detenida porque algunas condiciones no se pueden cumplir. Comprueba log.txt para detalles.",
|
||||
"STR_PART_RESIZE_TIP":"Ventoy intentará realizar una instalación no destructiva.#@¿Continuar?",
|
||||
"STR_PART_RESIZE_SUCCESS":"¡Enhorabuena!#@La instalación no destructiva de Ventoy se ha completado correctamente.",
|
||||
"STR_PART_RESIZE_FAILED":"La instalación no destructiva ha fallado.#@Compruebe el archivo log.txt para más información.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"La instalación no destructiva de Ventoy se ha detenido porque no se han cumplido todos los prerrequisitos.#@Compruebe el archivo log.txt para más información.",
|
||||
"STR_INSTALL_YES_TIP1":"Advertencia: ¡Los datos se perderán!",
|
||||
"STR_INSTALL_YES_TIP2":"Por favor ingresa YES en el cuadro de texto a continuación para confirmar que realmente quieres realizar una instalación nueva en vez de actualizar.",
|
||||
"STR_INSTALL_YES_TIP2":"Por favor, escriba YES en el cuadro de texto a continuación para confirmar que realmente quiere realizar una nueva instalación de Ventoy en vez de actualizarlo.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -1359,58 +1416,58 @@
|
||||
"name":"Hungarian (Magyar)",
|
||||
"FontFamily":"Courier New",
|
||||
"FontSize":16,
|
||||
"Author":"Bitfarago",
|
||||
"Author":"Bitfarago, gidano, meskobalazs",
|
||||
|
||||
"STR_ERROR":"Hiba",
|
||||
"STR_WARNING":"Figyelem",
|
||||
"STR_INFO":"Infó",
|
||||
"STR_INCORRECT_DIR":"Kérjük, futtasd a megfelelő könyvtárból!",
|
||||
"STR_INCORRECT_TREE_DIR":"Ne futtasd innen. Töltsd le a kiadott telepítőcsomagot és onnan futtasd.",
|
||||
"STR_WARNING":"Figyelmeztetés",
|
||||
"STR_INFO":"Információ",
|
||||
"STR_INCORRECT_DIR":"Futtassa a megfelelő könyvtárból.",
|
||||
"STR_INCORRECT_TREE_DIR":"Ne innen futtassa, töltse le a kiadott telepítőcsomagot, és futtassa onnan.",
|
||||
"STR_DEVICE":"Eszköz",
|
||||
"STR_LOCAL_VER":"Ventoy a csomagban",
|
||||
"STR_DISK_VER":"Ventoy az eszközön",
|
||||
"STR_STATUS":"Állapot - KÉSZ",
|
||||
"STR_LOCAL_VER":"A csomagban lévő Ventoy",
|
||||
"STR_DISK_VER":"Az eszközön lévő Ventoy",
|
||||
"STR_STATUS":"Állapot – KÉSZ",
|
||||
"STR_INSTALL":"Telepítés",
|
||||
"STR_UPDATE":"Frissítés",
|
||||
"STR_UPDATE_TIP":"A frissítés biztonságos, az ISO fájlok nem változnak.#@Folytatod?",
|
||||
"STR_INSTALL_TIP":"A meghajtó formázva lesz és minden rajta lévő adat elveszik.#@Folytatod?",
|
||||
"STR_INSTALL_TIP2":"A meghajtó formázva lesz és minden rajta lévő adat elveszik.#@Folytatod? (Második jóváhagyás)",
|
||||
"STR_UPDATE_TIP":"A frissítés biztonságos, az ISO-fájlok nem változnak.#@Folytatja?",
|
||||
"STR_INSTALL_TIP":"A meghajtó formázva lesz, és minden rajta lévő adat elvész.#@Folytatja?",
|
||||
"STR_INSTALL_TIP2":"A meghajtó formázva lesz, és minden rajta lévő adat elvész.#@Folytatja? (Második jóváhagyás)",
|
||||
"STR_INSTALL_SUCCESS":"Gratulálunk!#@A Ventoy sikeresen telepítve lett az eszközön.",
|
||||
"STR_INSTALL_FAILED":"Hiba történt a telepítés során. Csatlakoztasd újra az USB eszközt, és próbáld újra.#@A részleteket lásd a log.txt fájlban.",
|
||||
"STR_INSTALL_FAILED":"Hiba történt a telepítés során. Csatlakoztassa újra az USB-eszközt, és próbálja újra.#@A részleteket lásd a log.txt fájlban.",
|
||||
"STR_UPDATE_SUCCESS":"Gratulálunk!#@A Ventoy sikeresen frissítve lett az eszközön.",
|
||||
"STR_UPDATE_FAILED":"Hiba történt a frissítés során. Csatlakoztasd újra az USB eszközt, és próbáld újra.#@A részleteket lásd a log.txt fájlban.",
|
||||
"STR_WAIT_PROCESS":"A feldolgozás még folyamatban van, kérlek várj...",
|
||||
"STR_MENU_OPTION":"Opció",
|
||||
"STR_MENU_SECURE_BOOT":"Biztonsági mód (Secure Boot)",
|
||||
"STR_UPDATE_FAILED":"Hiba történt a frissítés során. Csatlakoztassa újra az USB-eszközt, és próbálja újra.#@A részleteket lásd a log.txt fájlban.",
|
||||
"STR_WAIT_PROCESS":"A feldolgozás még folyamatban van, kis türelmet…",
|
||||
"STR_MENU_OPTION":"Beállítás",
|
||||
"STR_MENU_SECURE_BOOT":"Secure Boot támogatás",
|
||||
"STR_MENU_PART_CFG":"Partíciókonfiguráció",
|
||||
"STR_BTN_OK":"rendben",
|
||||
"STR_BTN_CANCEL":"Megszünteti",
|
||||
"STR_PRESERVE_SPACE":"Tartson szabad helyet a lemez alján",
|
||||
"STR_SPACE_VAL_INVALID":"A fenntartott hely érvénytelen értéke",
|
||||
"STR_MENU_CLEAR":"Clear Ventoy",
|
||||
"STR_CLEAR_SUCCESS":"Ventoy has been successfully removed from the device.",
|
||||
"STR_CLEAR_FAILED":"An error occurred when clear Ventoy from disk. You can replug the USB and try again. Check log.txt for detail.",
|
||||
"STR_MENU_PART_STYLE":"Partition Style",
|
||||
"STR_DISK_2TB_MBR_ERROR":"Please select GPT for disk over 2TB",
|
||||
"STR_SHOW_ALL_DEV":"Show All Devices",
|
||||
"STR_PART_ALIGN_4KB":"Align partitions with 4KB",
|
||||
"STR_WEB_COMMUNICATION_ERR":"Communication error:",
|
||||
"STR_WEB_REMOTE_ABNORMAL":"Communication error: remote abnormal",
|
||||
"STR_WEB_REQUEST_TIMEOUT":"Communication error: Request timed out",
|
||||
"STR_WEB_SERVICE_UNAVAILABLE":"Communication error: Service Unavailable",
|
||||
"STR_WEB_TOKEN_MISMATCH":"Daemon status updated, please retry later.",
|
||||
"STR_WEB_SERVICE_BUSY":"Service is busy, please retry later.",
|
||||
"STR_MENU_VTSI_CREATE":"Generate VTSI File",
|
||||
"STR_VTSI_CREATE_TIP":"This time will not write to the device, but only generate a VTSI file#@Continue?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"VTSI file created successfully!#@You can use Rufus(3.15+) to write it to the device so as to complete the installation of Ventoy.",
|
||||
"STR_VTSI_CREATE_FAILED":"VTSI file created failed.",
|
||||
"STR_MENU_PART_RESIZE":"Non-destructive Install",
|
||||
"STR_PART_RESIZE_TIP":"Ventoy will try non-destructive installation if possible. #@Continue?",
|
||||
"STR_PART_RESIZE_SUCCESS":"Congratulations!#@Ventoy non-destructive installation successfully finished.",
|
||||
"STR_PART_RESIZE_FAILED":"Non-destructive installation failed, Check log.txt for details.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy non-destructive installation stopped because some conditions cannot be met. Check log.txt for details.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_BTN_OK":"OK",
|
||||
"STR_BTN_CANCEL":"Mégse",
|
||||
"STR_PRESERVE_SPACE":"Szabad terület hagyása a lemez végén",
|
||||
"STR_SPACE_VAL_INVALID":"Érvénytelen érték a fenntartott helynél",
|
||||
"STR_MENU_CLEAR":"A Ventoy eltávolítása",
|
||||
"STR_CLEAR_SUCCESS":"A Ventoy sikeresen eltávolítva az eszközről.",
|
||||
"STR_CLEAR_FAILED":"Hiba történt a Ventoy lemezről törlése során. Újra csatlakoztathatja az USB-t, és megpróbálhatja újra. A részleteket lásd a log.txt fájlban.",
|
||||
"STR_MENU_PART_STYLE":"Partíció fajtája",
|
||||
"STR_DISK_2TB_MBR_ERROR":"2 TB-nál nagyobb lemezhez válassza a GPT-t",
|
||||
"STR_SHOW_ALL_DEV":"Az összes eszköz megjelenítése",
|
||||
"STR_PART_ALIGN_4KB":"A partíciók 4 kB-hoz igazítása",
|
||||
"STR_WEB_COMMUNICATION_ERR":"Kommunikációs hiba:",
|
||||
"STR_WEB_REMOTE_ABNORMAL":"Kommunikációs hiba: Távoli hiba",
|
||||
"STR_WEB_REQUEST_TIMEOUT":"Kommunikációs hiba: Kérés időtúllépése",
|
||||
"STR_WEB_SERVICE_UNAVAILABLE":"Kommunikációs hiba: A szolgáltatás nem érhető el",
|
||||
"STR_WEB_TOKEN_MISMATCH":"A démon állapota frissítve, próbálja újra később.",
|
||||
"STR_WEB_SERVICE_BUSY":"A szolgáltatás foglalt, próbálja újra később.",
|
||||
"STR_MENU_VTSI_CREATE":"VTSI fájl előállítása",
|
||||
"STR_VTSI_CREATE_TIP":"Ez alkalommal nem ír az eszközre, csak egy VTSI fájlt állít elő#@Folytatja?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"A VTSI fájl sikeresen létrehozva!#@A Rufus(3.15+) segítségével az eszközre írhatja a Ventoy telepítésének befejezéséhez.",
|
||||
"STR_VTSI_CREATE_FAILED":"A VTSI fájl létrehozása nem sikerült.",
|
||||
"STR_MENU_PART_RESIZE":"Rombolásmentes telepítés",
|
||||
"STR_PART_RESIZE_TIP":"A Ventoy lehetőség szerint megpróbálja a rombolásmentes telepítést. #@Folytatja?",
|
||||
"STR_PART_RESIZE_SUCCESS":"Gratulálunk!#@A Ventoy rombolásmentes telepítése sikeresen befejeződött.",
|
||||
"STR_PART_RESIZE_FAILED":"A rombolásmentes telepítés nem sikerült, a részleteket lásd a log.txt fájlban.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"A Ventoy rombolásmentes telepítése leállt, mert bizonyos feltételek nem teljesíthetők. A részleteket lásd a log.txt fájlban.",
|
||||
"STR_INSTALL_YES_TIP1":"Figyelmeztetés: Az adatok elvesznek!",
|
||||
"STR_INSTALL_YES_TIP2":"Írja a YES szót az alábbi szövegmezőbe, hogy megerősítse, valóban új telepítést szeretne végrehajtani a frissítés helyett.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -2293,8 +2350,8 @@
|
||||
"STR_PART_RESIZE_SUCCESS":"Gratulerar!#@Ventoy lyckades slutföra en icke-förstörande installation.",
|
||||
"STR_PART_RESIZE_FAILED":"Ventoy misslyckades slutföra en icke-förstörande installation. Mer information finns i log.txt.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Icke-förstörande installation stoppades eftersom vissa villkor inte kunde uppfyllas. Mer information finns i log.txt.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_INSTALL_YES_TIP1":"Varning: Data kommer att gå förlorade!",
|
||||
"STR_INSTALL_YES_TIP2":"Skriv YES i textrutan nedan för att bekräfta att du verkligen vill göra en nyinstallation i stället för att uppgradera.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -2710,6 +2767,65 @@
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
"name":"Tamil (தமிழ்)",
|
||||
"FontFamily":"Courier New",
|
||||
"FontSize":16,
|
||||
"Author":"K.B.Dharun Krishna",
|
||||
|
||||
"STR_ERROR":"பிழை",
|
||||
"STR_WARNING":"எச்சரிக்கை",
|
||||
"STR_INFO":"தகவல்",
|
||||
"STR_INCORRECT_DIR":"சரியான கோப்பகத்தின் கீழ் இயக்கவும்!",
|
||||
"STR_INCORRECT_TREE_DIR":"என்னை இங்கே இயக்க வேண்டாம், வெளியிடப்பட்ட நிறுவல் தொகுப்பை பதிவிறக்கம் செய்து, அங்கு இயக்கவும்.",
|
||||
"STR_DEVICE":"சாதனம்",
|
||||
"STR_LOCAL_VER":"தொகுப்பில் வென்டோய்",
|
||||
"STR_DISK_VER":"சாதனத்தில் வென்டோய்",
|
||||
"STR_STATUS":"நிலை - தயார்",
|
||||
"STR_INSTALL":"நிறுவு",
|
||||
"STR_UPDATE":"புதுப்பிக்கவும்",
|
||||
"STR_UPDATE_TIP":"மேம்படுத்தல் செயல்பாடு பாதுகாப்பானது, ISO கோப்புகள் மாறாமல் இருக்கும்.#@தொடரவா?",
|
||||
"STR_INSTALL_TIP":"சாதனம் வடிவமைக்கப்படும் மற்றும் எல்லா தரவும் இழக்கப்படும்.#@தொடரவா?",
|
||||
"STR_INSTALL_TIP2":"சாதனம் வடிவமைக்கப்படும் மற்றும் எல்லா தரவும் இழக்கப்படும்.#@தொடரவா? (இருமுறை சரிபார்க்கவும்)",
|
||||
"STR_INSTALL_SUCCESS":"வாழ்த்துகள்!#@வென்டோய் சாதனத்தில் வெற்றிகரமாக நிறுவப்பட்டது.",
|
||||
"STR_INSTALL_FAILED":"நிறுவலின் போது பிழை ஏற்பட்டது. USB சாதனத்தை மீண்டும் செருகி மீண்டும் முயற்சிக்கவும். விவரங்களுக்கு log.txt ஐப் பார்க்கவும். அது எப்போதும் தோல்வியுற்றால், அதிகாரப்பூர்வ இணையதளத்தில் அடிக்கடி கேட்கப்படும் கேள்விகளைப் பார்க்கவும்.",
|
||||
"STR_UPDATE_SUCCESS":"வாழ்த்துகள்!#@வென்டோய் சாதனத்தில் வெற்றிகரமாக புதுப்பிக்கப்பட்டது.",
|
||||
"STR_UPDATE_FAILED":"புதுப்பித்தலின் போது பிழை ஏற்பட்டது. USB சாதனத்தை மீண்டும் செருகி மீண்டும் முயற்சிக்கவும். விவரங்களுக்கு log.txt ஐப் பார்க்கவும். அது எப்போதும் தோல்வியுற்றால், அதிகாரப்பூர்வ இணையதளத்தில் அடிக்கடி கேட்கப்படும் கேள்விகளைப் பார்க்கவும்.",
|
||||
"STR_WAIT_PROCESS":"ஒரு நூல் இயங்குகிறது, காத்திருக்கவும்...",
|
||||
"STR_MENU_OPTION":"விருப்பத்தேர்வுகள்",
|
||||
"STR_MENU_SECURE_BOOT":"பாதுகாப்பான பூட் ஆதரவு",
|
||||
"STR_MENU_PART_CFG":"பகிர்வு கட்டமைப்பு",
|
||||
"STR_BTN_OK":"சரி",
|
||||
"STR_BTN_CANCEL":"ரத்துசெய்",
|
||||
"STR_PRESERVE_SPACE":"வட்டின் முடிவில் சிறிது இடத்தை சேமிக்கவும்",
|
||||
"STR_SPACE_VAL_INVALID":"ஒதுக்கப்பட்ட இடத்திற்கான தவறான மதிப்பு",
|
||||
"STR_MENU_CLEAR":"தெளிவான வெண்டோய்",
|
||||
"STR_CLEAR_SUCCESS":"சாதனத்திலிருந்து வென்டோய் வெற்றிகரமாக அகற்றப்பட்டது.",
|
||||
"STR_CLEAR_FAILED":"வென்டோயை வட்டில் இருந்து அகற்றும்போது பிழை ஏற்பட்டது. USB சாதனத்தை மீண்டும் செருகி மீண்டும் முயற்சிக்கவும். விவரங்களுக்கு log.txt ஐப் பார்க்கவும்.",
|
||||
"STR_MENU_PART_STYLE":"பகிர்வு நடை",
|
||||
"STR_DISK_2TB_MBR_ERROR":"2TB க்கும் அதிகமான சாதனங்களுக்கு GPTஐத் தேர்ந்தெடுக்கவும்",
|
||||
"STR_SHOW_ALL_DEV":"எல்லா சாதனங்களையும் காட்டு",
|
||||
"STR_PART_ALIGN_4KB":"பகிர்வுகளை 4KB உடன் சீரமைக்கவும்",
|
||||
"STR_WEB_COMMUNICATION_ERR":"தகவல் பிழை:",
|
||||
"STR_WEB_REMOTE_ABNORMAL":"தொடர்பு பிழை: தொலைநிலை அசாதாரணமானது",
|
||||
"STR_WEB_REQUEST_TIMEOUT":"தகவல்தொடர்பு பிழை: கோரிக்கை நேரம் முடிந்தது",
|
||||
"STR_WEB_SERVICE_UNAVAILABLE":"தொடர்பு பிழை: சேவை கிடைக்கவில்லை",
|
||||
"STR_WEB_TOKEN_MISMATCH":"டீமான் நிலை புதுப்பிக்கப்பட்டது, பிறகு முயற்சிக்கவும்.",
|
||||
"STR_WEB_SERVICE_BUSY":"சேவை பிஸியாக உள்ளது, பிறகு முயற்சிக்கவும்.",
|
||||
"STR_MENU_VTSI_CREATE":"VTSI கோப்பை உருவாக்கவும்",
|
||||
"STR_VTSI_CREATE_TIP":"இந்த முறை சாதனத்தில் எழுதப்படாது, ஆனால் VTSI கோப்பை மட்டும் உருவாக்குகிறது#@தொடரவா?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"VTSI கோப்பு வெற்றிகரமாக உருவாக்கப்பட்டது!#@ரூஃபஸ்(3.15+) ஐப் பயன்படுத்தி, வென்டோயின் நிறுவலை முடிக்க, சாதனத்தில் எழுதலாம்.",
|
||||
"STR_VTSI_CREATE_FAILED":"VTSI கோப்பு உருவாக்கப்படுவதில் தோல்வி.",
|
||||
"STR_MENU_PART_RESIZE":"அழிவில்லாத நிறுவல்",
|
||||
"STR_PART_RESIZE_TIP":"வென்டோய் முடிந்தால், அழிவில்லாத நிறுவலை முயற்சிக்கும். #@தொடரவா?",
|
||||
"STR_PART_RESIZE_SUCCESS":"வாழ்த்துகள்!#@வென்டோய் அழிவில்லாத நிறுவல் வெற்றிகரமாக முடிந்தது.",
|
||||
"STR_PART_RESIZE_FAILED":"அழிவில்லாத நிறுவல் தோல்வியடைந்தது, விவரங்களுக்கு log.txt ஐப் பார்க்கவும்.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"சில நிபந்தனைகளை பூர்த்தி செய்ய முடியாததால், வென்டோய் அழிவில்லாத நிறுவல் நிறுத்தப்பட்டது. விவரங்களுக்கு log.txt ஐப் பார்க்கவும்.",
|
||||
"STR_INSTALL_YES_TIP1":"எச்சரிக்கை: தரவு தொலைந்து போகும்!",
|
||||
"STR_INSTALL_YES_TIP2":"மேம்படுத்துவதற்குப் பதிலாக புதிதாக நிறுவ விரும்புகிறீர்கள் என்பதை உறுதிப்படுத்த, கீழே உள்ள உரைப் பெட்டியில் ஆம் என உள்ளிடவும்.",
|
||||
|
||||
"STRXXX":""
|
||||
}
|
||||
]
|
||||
|
@@ -936,7 +936,7 @@ void on_part_cfg_ok(GtkWidget *widget, gpointer data)
|
||||
|
||||
for (pos = input; *pos; pos++)
|
||||
{
|
||||
if (*pos < '0' || *pos >= '9')
|
||||
if (*pos < '0' || *pos > '9')
|
||||
{
|
||||
msgbox(GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "STR_SPACE_VAL_INVALID");
|
||||
return;
|
||||
|
@@ -486,9 +486,11 @@ void ventoy_data_default_control(data_control *data)
|
||||
{
|
||||
memset(data, 0, sizeof(data_control));
|
||||
|
||||
data->secondary_menu = 1;
|
||||
data->filter_dot_underscore = 1;
|
||||
data->max_search_level = -1;
|
||||
data->menu_timeout = 0;
|
||||
data->secondary_menu_timeout = 0;
|
||||
|
||||
strlcpy(data->default_kbd_layout, "QWERTY_USA");
|
||||
strlcpy(data->help_text_language, "en_US");
|
||||
@@ -510,7 +512,9 @@ int ventoy_data_cmp_control(data_control *data1, data_control *data2)
|
||||
data1->filter_vtoy != data2->filter_vtoy ||
|
||||
data1->win11_bypass_check != data2->win11_bypass_check ||
|
||||
data1->linux_remount != data2->linux_remount ||
|
||||
data1->menu_timeout != data2->menu_timeout)
|
||||
data1->secondary_menu != data2->secondary_menu ||
|
||||
data1->menu_timeout != data2->menu_timeout ||
|
||||
data1->secondary_menu_timeout != data2->secondary_menu_timeout)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
@@ -555,7 +559,9 @@ int ventoy_data_save_control(data_control *data, const char *title, char *buf, i
|
||||
VTOY_JSON_FMT_CTRL_INT(L2, "VTOY_FILE_FLT_VTOY", filter_vtoy);
|
||||
VTOY_JSON_FMT_CTRL_INT(L2, "VTOY_WIN11_BYPASS_CHECK", win11_bypass_check);
|
||||
VTOY_JSON_FMT_CTRL_INT(L2, "VTOY_LINUX_REMOUNT", linux_remount);
|
||||
VTOY_JSON_FMT_CTRL_INT(L2, "VTOY_SECONDARY_BOOT_MENU", secondary_menu);
|
||||
VTOY_JSON_FMT_CTRL_INT(L2, "VTOY_MENU_TIMEOUT", menu_timeout);
|
||||
VTOY_JSON_FMT_CTRL_INT(L2, "VTOY_SECONDARY_TIMEOUT", secondary_menu_timeout);
|
||||
|
||||
VTOY_JSON_FMT_CTRL_STRN(L2, "VTOY_DEFAULT_KBD_LAYOUT", default_kbd_layout);
|
||||
VTOY_JSON_FMT_CTRL_STRN(L2, "VTOY_HELP_TXT_LANGUAGE", help_text_language);
|
||||
@@ -600,7 +606,9 @@ int ventoy_data_json_control(data_control *ctrl, char *buf, int buflen)
|
||||
VTOY_JSON_FMT_SINT("filter_vtoy", ctrl->filter_vtoy);
|
||||
VTOY_JSON_FMT_SINT("win11_bypass_check", ctrl->win11_bypass_check);
|
||||
VTOY_JSON_FMT_SINT("linux_remount", ctrl->linux_remount);
|
||||
VTOY_JSON_FMT_SINT("secondary_menu", ctrl->secondary_menu);
|
||||
VTOY_JSON_FMT_SINT("menu_timeout", ctrl->menu_timeout);
|
||||
VTOY_JSON_FMT_SINT("secondary_menu_timeout", ctrl->secondary_menu_timeout);
|
||||
VTOY_JSON_FMT_STRN("default_kbd_layout", ctrl->default_kbd_layout);
|
||||
VTOY_JSON_FMT_STRN("help_text_language", ctrl->help_text_language);
|
||||
|
||||
@@ -666,7 +674,9 @@ static int ventoy_api_save_control(struct mg_connection *conn, VTOY_JSON *json)
|
||||
VTOY_JSON_INT("filter_vtoy", ctrl->filter_vtoy);
|
||||
VTOY_JSON_INT("win11_bypass_check", ctrl->win11_bypass_check);
|
||||
VTOY_JSON_INT("linux_remount", ctrl->linux_remount);
|
||||
VTOY_JSON_INT("secondary_menu", ctrl->secondary_menu);
|
||||
VTOY_JSON_INT("menu_timeout", ctrl->menu_timeout);
|
||||
VTOY_JSON_INT("secondary_menu_timeout", ctrl->secondary_menu_timeout);
|
||||
|
||||
VTOY_JSON_STR("default_image", ctrl->default_image);
|
||||
VTOY_JSON_STR("default_search_root", ctrl->default_search_root);
|
||||
@@ -3808,6 +3818,10 @@ static int ventoy_parse_control(VTOY_JSON *json, void *p)
|
||||
{
|
||||
CONTROL_PARSE_INT(child, data->linux_remount);
|
||||
}
|
||||
else if (strcmp(child->pcName, "VTOY_SECONDARY_BOOT_MENU") == 0)
|
||||
{
|
||||
CONTROL_PARSE_INT(child, data->secondary_menu);
|
||||
}
|
||||
else if (strcmp(child->pcName, "VTOY_TREE_VIEW_MENU_STYLE") == 0)
|
||||
{
|
||||
CONTROL_PARSE_INT(child, data->treeview_style);
|
||||
@@ -3865,6 +3879,10 @@ static int ventoy_parse_control(VTOY_JSON *json, void *p)
|
||||
{
|
||||
data->menu_timeout = (int)strtol(child->unData.pcStrVal, NULL, 10);
|
||||
}
|
||||
else if (strcmp(child->pcName, "VTOY_SECONDARY_TIMEOUT") == 0)
|
||||
{
|
||||
data->secondary_menu_timeout = (int)strtol(child->unData.pcStrVal, NULL, 10);
|
||||
}
|
||||
else if (strcmp(child->pcName, "VTOY_VHD_NO_WARNING") == 0)
|
||||
{
|
||||
CONTROL_PARSE_INT(child, data->vhd_no_warning);
|
||||
|
@@ -58,7 +58,9 @@ typedef struct data_control
|
||||
int filter_vtoy;
|
||||
int win11_bypass_check;
|
||||
int menu_timeout;
|
||||
int secondary_menu_timeout;
|
||||
int linux_remount;
|
||||
int secondary_menu;
|
||||
char default_search_root[MAX_PATH];
|
||||
char default_image[MAX_PATH];
|
||||
char default_kbd_layout[32];
|
||||
|
Binary file not shown.
@@ -1 +1 @@
|
||||
20220430 13:06:42
|
||||
20220921 18:42:35
|
@@ -723,7 +723,7 @@
|
||||
|
||||
<footer class="main-footer">
|
||||
<div class="pull-right hidden-xs">
|
||||
<b id="plugson_build_date">20220430 13:06:42</b>
|
||||
<b id="plugson_build_date">20220921 18:42:35</b>
|
||||
</div>
|
||||
<strong><a href="https://www.ventoy.net" target="_blank">https://www.ventoy.net</a></strong>
|
||||
</footer>
|
||||
@@ -743,10 +743,10 @@
|
||||
<script src="/static/js/jQuery-2.1.4.min.js"></script>
|
||||
<!-- jquery validate -->
|
||||
<script src="/static/js/jquery.validate.min.js"></script>
|
||||
<script src="/static/js/jquery.validate.vtoymethods.js"></script>
|
||||
<script src="/static/js/jquery.validate.vtoymethods.js?v=100"></script>
|
||||
|
||||
<script src="/static/js/vtoy.js"></script>
|
||||
<script src="/static/js/jquery.vtoy.alert.js"></script>
|
||||
<script src="/static/js/vtoy.js?v=100"></script>
|
||||
<script src="/static/js/jquery.vtoy.alert.js?v=100"></script>
|
||||
<script src="/static/js/md5.min.js"></script>
|
||||
|
||||
<!-- Bootstrap 3.3.5 -->
|
||||
|
@@ -117,7 +117,7 @@
|
||||
<tr id="tr_title_desc_en">
|
||||
<td class="td_ctrl_col" id="td_title_desc">Option Description</td>
|
||||
<td>
|
||||
<code style="font-weight: bold;">0</code> Don not bypass Windows 11 hardware check.<br/>
|
||||
<code style="font-weight: bold;">0</code> Do not bypass Windows 11 hardware check.<br/>
|
||||
<code style="font-weight: bold;">1</code> Bypass Windows 11 hardware check. <br/><br/>
|
||||
This option only avaliable for standard Windows 11 ISO files.
|
||||
When set to 1, Ventoy will create the following registries to bypass Windows 11 hardware check when install. <br/>
|
||||
@@ -391,6 +391,85 @@
|
||||
|
||||
|
||||
|
||||
<div class="box box-primary box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_SECONDARY_BOOT_MENU
|
||||
<span id="id_span_desc_cn"> —— 二级启动菜单显示开关</span></h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
</div><!-- /.box-tools -->
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<tr style="font-weight:bold;">
|
||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||
<td>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" id="id_ctrl_secondary_radio0" name="id_ctrl_secondary_radio" data-type="0" value="0"> <span style="font-weight:bold;">0</span>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" id="id_ctrl_secondary_radio1" name="id_ctrl_secondary_radio" data-type="1" value="1"> <span style="font-weight:bold;">1</span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr_title_desc_cn">
|
||||
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
||||
<td>二级启动菜单控制开关
|
||||
<code style="font-weight: bold;">0</code> 不显示
|
||||
<code style="font-weight: bold;">1</code> 显示
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr_title_desc_en">
|
||||
<td class="td_ctrl_col" id="td_title_desc">Option Description</td>
|
||||
<td>
|
||||
Secondary boot menu display option
|
||||
<code style="font-weight: bold;">0</code> Don't display
|
||||
<code style="font-weight: bold;">1</code> Display
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
<div class="box box-primary box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_SECONDARY_TIMEOUT
|
||||
<span id="id_span_desc_cn"> —— 二级启动菜单倒计时</span></h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
</div><!-- /.box-tools -->
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<tr style="font-weight:bold;">
|
||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||
<td>
|
||||
<div class="col-sm-9" style="padding-left:0px;">
|
||||
<input type="text" class="form-control" id="id_ctrl_text_secondary_timeout" name="name_ctrl_text_secondary_timeout"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr_title_desc_cn">
|
||||
<td class="td_ctrl_col">选项说明</td>
|
||||
<td>
|
||||
二级菜单倒计时(秒)。只有当 <code>VTOY_SECONDARY_BOOT_MENU</code> 设置为1时才有效。<br/>
|
||||
默认不设置,设置之后,比如设置为10,则在倒计时10秒之后,会自动选择第一项,即:<code>Boot in normal mode</code> <br/>
|
||||
在倒计时的过程中按任意键会停止倒计时,等待用户操作。
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr_title_desc_en">
|
||||
<td class="td_ctrl_col">Option Description</td>
|
||||
<td>
|
||||
Timeout seconds for the secondary boot menu. Only take effect when <code>VTOY_SECONDARY_BOOT_MENU</code> is 1.<br/>
|
||||
By default no timeout is set. When you set it to 10 for example, the first entry (<code>Boot in normal mode</code>) will be selected an run after 10 seconds.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="box box-primary box-solid">
|
||||
<div class="box-header with-border">
|
||||
@@ -935,8 +1014,10 @@
|
||||
|
||||
data.win11_bypass_check = parseInt($('input:radio[name=id_ctrl_bypass_win11_radio]:checked').val());
|
||||
data.linux_remount = parseInt($('input:radio[name=id_ctrl_linux_remount_radio]:checked').val());
|
||||
data.secondary_menu = parseInt($('input:radio[name=id_ctrl_secondary_radio]:checked').val());
|
||||
data.default_search_root = $('input:text[id=id_ctrl_text_search_root]').val();
|
||||
data.menu_timeout = parseInt($('input:text[id=id_ctrl_text_timeout]').val());
|
||||
data.secondary_menu_timeout = parseInt($('input:text[id=id_ctrl_text_secondary_timeout]').val());
|
||||
data.default_image = $('input:text[id=id_ctrl_text_default_img]').val();
|
||||
|
||||
level = $('select[id=id_ctrl_sel_max_depth').val();
|
||||
@@ -968,6 +1049,7 @@
|
||||
//VTOY_WIN11_BYPASS_CHECK
|
||||
$('input:radio[name=id_ctrl_bypass_win11_radio]')[data.win11_bypass_check].checked = true;
|
||||
$('input:radio[name=id_ctrl_linux_remount_radio]')[data.linux_remount].checked = true;
|
||||
$('input:radio[name=id_ctrl_secondary_radio]')[data.secondary_menu].checked = true;
|
||||
|
||||
//VTOY_DEFAULT_SEARCH_ROOT
|
||||
$('input:text[id=id_ctrl_text_search_root]').val(data.default_search_root);
|
||||
@@ -987,6 +1069,9 @@
|
||||
//VTOY_MENU_TIMEOUT
|
||||
$('input:text[id=id_ctrl_text_timeout]').val(data.menu_timeout);
|
||||
|
||||
//VTOY_SECONDARY_TIMEOUT
|
||||
$('input:text[id=id_ctrl_text_secondary_timeout]').val(data.secondary_menu_timeout);
|
||||
|
||||
|
||||
//VTOY_DEFAULT_IMAGE
|
||||
$('input:text[id=id_ctrl_text_default_img]').val(data.default_image);
|
||||
@@ -1070,8 +1155,10 @@
|
||||
index: current_tab_index,
|
||||
win11_bypass_check: data.win11_bypass_check,
|
||||
linux_remount:data.linux_remount,
|
||||
secondary_menu:data.secondary_menu,
|
||||
default_search_root: data.default_search_root,
|
||||
menu_timeout: data.menu_timeout,
|
||||
secondary_menu_timeout: data.secondary_menu_timeout,
|
||||
default_image: data.default_image,
|
||||
max_search_level: data.max_search_level,
|
||||
default_kbd_layout: data.default_kbd_layout,
|
||||
@@ -1200,6 +1287,15 @@
|
||||
$('input:text[id=id_ctrl_text_timeout]').val(m_data_control[current_tab_index].menu_timeout);
|
||||
}
|
||||
});
|
||||
$('input[id=id_ctrl_text_secondary_timeout]').change(function() {
|
||||
var value = $('input:text[id=id_ctrl_text_secondary_timeout]').val();
|
||||
if (/^[0-9][0-9]*$/.test(value)) {
|
||||
VtoySaveCurrentPage();
|
||||
} else {
|
||||
Message.error(g_vtoy_cur_language.STR_INVALID_TIMEOUT);
|
||||
$('input:text[id=id_ctrl_text_secondary_timeout]').val(m_data_control[current_tab_index].secondary_menu_timeout);
|
||||
}
|
||||
});
|
||||
|
||||
$('#id_tab_control a[href="#tab_0"]').click(OnClickMultiModeTab);
|
||||
$('#id_tab_control a[href="#tab_1"]').click(OnClickMultiModeTab);
|
||||
|
@@ -2,6 +2,13 @@
|
||||
function ventoy_replace_slash(str) {
|
||||
var str1 = str.replace(/\\/g, '/');
|
||||
var str2 = str1.replace(/\/\//g, '/');
|
||||
|
||||
if (str2 && str2.length > 0) {
|
||||
if (str2.substr(-1) === "/") {
|
||||
return str2.substr(0, str2.length - 1);
|
||||
}
|
||||
}
|
||||
|
||||
return str2;
|
||||
}
|
||||
|
||||
|
@@ -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/>
|
||||
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/>
|
||||
900+ 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/>
|
||||
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/>
|
||||
<br/>Official Website: <a href=https://www.ventoy.net>https://www.ventoy.net</a>
|
||||
</h4>
|
||||
|
||||
@@ -27,13 +27,13 @@ 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
|
||||
|
||||
**Linux**
|
||||
Debian, Ubuntu, CentOS, RHEL, Deepin, Fedora, Rocky Linux, SLES, openSUSE, MX Linux, Manjaro, Linux Mint, Endless OS, openEuler, Elementary OS, Solus, Linx, Zorin, antiX, PClinuxOS, Arch, ArcoLinux, ArchLabs, BlackArch, Obarun, Artix Linux, Puppy Linux, Tails, Slax, MiniOS, Kali, Mageia, Slackware, Q4OS, Archman, Gentoo, Pentoo, NixOS, Ubuntu Kylin, 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, Robolinux, 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, 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, Refracta, 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, ......
|
||||
Debian, Ubuntu, CentOS(6/7/8/9), RHEL(6/7/8/9), Deepin, Fedora, EuroLinux(6/7/8/9), Rocky Linux, AlmaLinux, 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, 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, ......
|
||||
|
||||
**Unix**
|
||||
DragonFly FreeBSD pfSense GhostBSD FreeNAS TrueNAS XigmaNAS FuryBSD OPNsense HardenedBSD MidnightBSD ClonOS EmergencyBootKit
|
||||
|
||||
**ChromeOS**
|
||||
FydeOS, CloudReady
|
||||
FydeOS, CloudReady, ChromeOS Flex
|
||||
|
||||
**Other**
|
||||
VMware ESXi, Citrix XenServer, Xen XCP-ng
|
||||
@@ -70,7 +70,7 @@ A GUI Ventoy plugin configurator. [VentoyPlugson](https://www.ventoy.net/en/plug
|
||||
* 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 types of OS supported, 900+ iso files tested
|
||||
* Most types of OS supported, 1000+ iso files tested
|
||||
* Linux vDisk boot supported
|
||||
* Not only boot but also complete installation process
|
||||
* Menu dynamically switchable between List/TreeView mode
|
||||
|
@@ -36,6 +36,8 @@ static ventoy_guid g_ventoy_guid = VENTOY_GUID;
|
||||
static HANDLE g_vtoylog_mutex = NULL;
|
||||
static HANDLE g_vtoyins_mutex = NULL;
|
||||
|
||||
static BOOL g_wimboot_mode = FALSE;
|
||||
|
||||
static DWORD g_vtoy_disk_drive;
|
||||
|
||||
static CHAR g_prog_full_path[MAX_PATH];
|
||||
@@ -46,6 +48,9 @@ static CHAR g_prog_name[MAX_PATH];
|
||||
#define ORG_PECMD_PATH "X:\\Windows\\system32\\PECMD.EXE"
|
||||
#define ORG_PECMD_BK_PATH "X:\\Windows\\system32\\PECMD.EXE_BACK.EXE"
|
||||
|
||||
#define WIMBOOT_FILE "X:\\Windows\\system32\\vtoy_wimboot"
|
||||
#define WIMBOOT_DONE "X:\\Windows\\system32\\vtoy_wimboot_done"
|
||||
|
||||
#define AUTO_RUN_BAT "X:\\VentoyAutoRun.bat"
|
||||
#define AUTO_RUN_LOG "X:\\VentoyAutoRun.log"
|
||||
|
||||
@@ -90,6 +95,38 @@ static int split_path_name(char *fullpath, char *dir, char *name)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void TrimString(CHAR *String, BOOL TrimLeft)
|
||||
{
|
||||
CHAR *Pos1 = String;
|
||||
CHAR *Pos2 = String;
|
||||
size_t Len = strlen(String);
|
||||
|
||||
while (Len > 0)
|
||||
{
|
||||
if (String[Len - 1] != ' ' && String[Len - 1] != '\t')
|
||||
{
|
||||
break;
|
||||
}
|
||||
String[Len - 1] = 0;
|
||||
Len--;
|
||||
}
|
||||
|
||||
if (TrimLeft)
|
||||
{
|
||||
while (*Pos1 == ' ' || *Pos1 == '\t')
|
||||
{
|
||||
Pos1++;
|
||||
}
|
||||
|
||||
while (*Pos1)
|
||||
{
|
||||
*Pos2++ = *Pos1++;
|
||||
}
|
||||
*Pos2++ = 0;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void Log(const char *Fmt, ...)
|
||||
{
|
||||
@@ -990,8 +1027,99 @@ End:
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int GetIsoId(CONST CHAR *IsoPath, IsoId *ids)
|
||||
{
|
||||
int i;
|
||||
int n = 0;
|
||||
HANDLE hFile;
|
||||
DWORD dwSize = 0;
|
||||
BOOL bRet[8];
|
||||
|
||||
hFile = CreateFileA(IsoPath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
|
||||
if (hFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
SetFilePointer(hFile, 2048 * 16 + 8, NULL, FILE_BEGIN);
|
||||
bRet[n++] = ReadFile(hFile, ids->SystemId, 32, &dwSize, NULL);
|
||||
|
||||
SetFilePointer(hFile, 2048 * 16 + 40, NULL, FILE_BEGIN);
|
||||
bRet[n++] = ReadFile(hFile, ids->VolumeId, 32, &dwSize, NULL);
|
||||
|
||||
SetFilePointer(hFile, 2048 * 16 + 318, NULL, FILE_BEGIN);
|
||||
bRet[n++] = ReadFile(hFile, ids->PulisherId, 128, &dwSize, NULL);
|
||||
|
||||
SetFilePointer(hFile, 2048 * 16 + 446, NULL, FILE_BEGIN);
|
||||
bRet[n++] = ReadFile(hFile, ids->PreparerId, 128, &dwSize, NULL);
|
||||
|
||||
CloseHandle(hFile);
|
||||
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
if (bRet[i] == FALSE)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
TrimString(ids->SystemId, FALSE);
|
||||
TrimString(ids->VolumeId, FALSE);
|
||||
TrimString(ids->PulisherId, FALSE);
|
||||
TrimString(ids->PreparerId, FALSE);
|
||||
|
||||
Log("ISO ID: System<%s> Volume<%s> Pulisher<%s> Preparer<%s>",
|
||||
ids->SystemId, ids->VolumeId, ids->PulisherId, ids->PreparerId);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int CheckSkipMountIso(CONST CHAR *IsoPath)
|
||||
{
|
||||
BOOL InRoot = FALSE;
|
||||
int slashcnt = 0;
|
||||
CONST CHAR *p = NULL;
|
||||
IsoId ID;
|
||||
|
||||
// C:\\xxx
|
||||
for (p = IsoPath; *p; p++)
|
||||
{
|
||||
if (*p == '\\' || *p == '/')
|
||||
{
|
||||
slashcnt++;
|
||||
}
|
||||
}
|
||||
|
||||
if (slashcnt == 2)
|
||||
{
|
||||
InRoot = TRUE;
|
||||
}
|
||||
|
||||
memset(&ID, 0, sizeof(ID));
|
||||
if (GetIsoId(IsoPath, &ID))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
//Bob.Ombs.Modified.Win10PEx64.iso will auto find ISO file in root, so we can skip the mount
|
||||
if (InRoot && strcmp(ID.VolumeId, "Modified-Win10PEx64") == 0)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int MountIsoFile(CONST CHAR *IsoPath, DWORD PhyDrive)
|
||||
{
|
||||
if (CheckSkipMountIso(IsoPath))
|
||||
{
|
||||
Log("Skip mount ISO file for <%s>", IsoPath);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (IsWindows8OrGreater())
|
||||
{
|
||||
Log("This is Windows 8 or latter...");
|
||||
@@ -1415,36 +1543,6 @@ static int ExpandSingleVar(VarDiskInfo *pDiskInfo, int DiskNum, const char *var,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void TrimString(CHAR *String)
|
||||
{
|
||||
CHAR *Pos1 = String;
|
||||
CHAR *Pos2 = String;
|
||||
size_t Len = strlen(String);
|
||||
|
||||
while (Len > 0)
|
||||
{
|
||||
if (String[Len - 1] != ' ' && String[Len - 1] != '\t')
|
||||
{
|
||||
break;
|
||||
}
|
||||
String[Len - 1] = 0;
|
||||
Len--;
|
||||
}
|
||||
|
||||
while (*Pos1 == ' ' || *Pos1 == '\t')
|
||||
{
|
||||
Pos1++;
|
||||
}
|
||||
|
||||
while (*Pos1)
|
||||
{
|
||||
*Pos2++ = *Pos1++;
|
||||
}
|
||||
*Pos2++ = 0;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static int GetRegDwordValue(HKEY Key, LPCSTR SubKey, LPCSTR ValueName, DWORD *pValue)
|
||||
{
|
||||
HKEY hKey;
|
||||
@@ -1653,25 +1751,25 @@ static int EnumerateAllDisk(VarDiskInfo **ppDiskInfo, int *pDiskNum)
|
||||
if (pDevDesc->VendorIdOffset)
|
||||
{
|
||||
safe_strcpy(pDiskInfo[i].VendorId, (char *)pDevDesc + pDevDesc->VendorIdOffset);
|
||||
TrimString(pDiskInfo[i].VendorId);
|
||||
TrimString(pDiskInfo[i].VendorId, TRUE);
|
||||
}
|
||||
|
||||
if (pDevDesc->ProductIdOffset)
|
||||
{
|
||||
safe_strcpy(pDiskInfo[i].ProductId, (char *)pDevDesc + pDevDesc->ProductIdOffset);
|
||||
TrimString(pDiskInfo[i].ProductId);
|
||||
TrimString(pDiskInfo[i].ProductId, TRUE);
|
||||
}
|
||||
|
||||
if (pDevDesc->ProductRevisionOffset)
|
||||
{
|
||||
safe_strcpy(pDiskInfo[i].ProductRev, (char *)pDevDesc + pDevDesc->ProductRevisionOffset);
|
||||
TrimString(pDiskInfo[i].ProductRev);
|
||||
TrimString(pDiskInfo[i].ProductRev, TRUE);
|
||||
}
|
||||
|
||||
if (pDevDesc->SerialNumberOffset)
|
||||
{
|
||||
safe_strcpy(pDiskInfo[i].SerialNumber, (char *)pDevDesc + pDevDesc->SerialNumberOffset);
|
||||
TrimString(pDiskInfo[i].SerialNumber);
|
||||
TrimString(pDiskInfo[i].SerialNumber, TRUE);
|
||||
}
|
||||
|
||||
free(pDevDesc);
|
||||
@@ -2256,59 +2354,6 @@ static int ExtractWindowsDataFile(char *databuf)
|
||||
return len;
|
||||
}
|
||||
|
||||
int VentoyJumpWimboot(INT argc, CHAR **argv, CHAR *LunchFile)
|
||||
{
|
||||
int rc = 1;
|
||||
char *buf = NULL;
|
||||
DWORD size = 0;
|
||||
DWORD Pos;
|
||||
|
||||
Log("VentoyJumpWimboot %dbit", g_system_bit);
|
||||
|
||||
sprintf_s(LunchFile, MAX_PATH, "X:\\setup.exe");
|
||||
|
||||
ReadWholeFile2Buf("wimboot.data", &buf, &size);
|
||||
Log("wimboot.data size:%d", size);
|
||||
|
||||
memcpy(&g_os_param, buf, sizeof(ventoy_os_param));
|
||||
memcpy(&g_windows_data, buf + sizeof(ventoy_os_param), sizeof(ventoy_windows_data));
|
||||
ExtractWindowsDataFile(buf + sizeof(ventoy_os_param));
|
||||
memcpy(g_os_param_reserved, g_os_param.vtoy_reserved, sizeof(g_os_param_reserved));
|
||||
|
||||
if (g_os_param_reserved[0] == 1)
|
||||
{
|
||||
Log("break here for debug .....");
|
||||
goto End;
|
||||
}
|
||||
|
||||
// convert / to \\
|
||||
for (Pos = 0; Pos < sizeof(g_os_param.vtoy_img_path) && g_os_param.vtoy_img_path[Pos]; Pos++)
|
||||
{
|
||||
if (g_os_param.vtoy_img_path[Pos] == '/')
|
||||
{
|
||||
g_os_param.vtoy_img_path[Pos] = '\\';
|
||||
}
|
||||
}
|
||||
|
||||
if (g_os_param_reserved[0] == 2)
|
||||
{
|
||||
Log("skip hook for debug .....");
|
||||
rc = 0;
|
||||
goto End;
|
||||
}
|
||||
|
||||
rc = VentoyHook(&g_os_param);
|
||||
|
||||
End:
|
||||
|
||||
if (buf)
|
||||
{
|
||||
free(buf);
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int ventoy_check_create_directory(void)
|
||||
{
|
||||
if (IsDirExist("ventoy"))
|
||||
@@ -2450,7 +2495,7 @@ int real_main(int argc, char **argv)
|
||||
Log("#### real_main #### argc = %d", argc);
|
||||
Log("program full path: <%s>", g_prog_full_path);
|
||||
Log("program dir: <%s>", g_prog_dir);
|
||||
Log("program name:: <%s>", g_prog_name);
|
||||
Log("program name: <%s>", g_prog_name);
|
||||
|
||||
Log("argc = %d", argc);
|
||||
for (i = 0; i < argc; i++)
|
||||
@@ -2466,14 +2511,7 @@ int real_main(int argc, char **argv)
|
||||
GetStartupInfoA(&Si);
|
||||
memset(LunchFile, 0, sizeof(LunchFile));
|
||||
|
||||
if (strstr(argv[0], "vtoyjump.exe"))
|
||||
{
|
||||
rc = VentoyJumpWimboot(argc, argv, LunchFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
rc = VentoyJump(argc, argv, LunchFile);
|
||||
}
|
||||
|
||||
Log("LunchFile=<%s> CallParam=<%s>", LunchFile, CallParam);
|
||||
|
||||
@@ -2552,6 +2590,31 @@ static void VentoyToUpper(CHAR *str)
|
||||
}
|
||||
}
|
||||
|
||||
static int vtoy_remove_duplicate_file(char *File)
|
||||
{
|
||||
CHAR szCmd[MAX_PATH];
|
||||
CHAR NewFile[MAX_PATH];
|
||||
STARTUPINFOA Si;
|
||||
PROCESS_INFORMATION Pi;
|
||||
|
||||
Log("<1> Copy New file", File);
|
||||
sprintf_s(NewFile, sizeof(NewFile), "%s_NEW", File);
|
||||
CopyFileA(File, NewFile, FALSE);
|
||||
|
||||
Log("<2> Remove file <%s>", File);
|
||||
GetStartupInfoA(&Si);
|
||||
Si.dwFlags |= STARTF_USESHOWWINDOW;
|
||||
Si.wShowWindow = SW_HIDE;
|
||||
sprintf_s(szCmd, sizeof(szCmd), "cmd.exe /c del /F /Q %s", File);
|
||||
CreateProcessA(NULL, szCmd, NULL, NULL, FALSE, 0, NULL, NULL, &Si, &Pi);
|
||||
WaitForSingleObject(Pi.hProcess, INFINITE);
|
||||
|
||||
Log("<3> Copy back file <%s>", File);
|
||||
MoveFileA(NewFile, File);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
@@ -2574,6 +2637,22 @@ int main(int argc, char **argv)
|
||||
|
||||
Log("EXE path: <%s> dir:<%s> name:<%s>", g_prog_full_path, g_prog_dir, g_prog_name);
|
||||
|
||||
if (IsFileExist(WIMBOOT_FILE))
|
||||
{
|
||||
Log("This is wimboot mode ...");
|
||||
g_wimboot_mode = TRUE;
|
||||
|
||||
if (!IsFileExist(WIMBOOT_DONE))
|
||||
{
|
||||
vtoy_remove_duplicate_file(g_prog_full_path);
|
||||
SaveBuffer2File(WIMBOOT_DONE, g_prog_full_path, 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("This is normal mode ...");
|
||||
}
|
||||
|
||||
if (_stricmp(g_prog_name, "WinLogon.exe") == 0)
|
||||
{
|
||||
Log("This time is rejump back ...");
|
||||
@@ -2622,6 +2701,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
Log("We don't need to rejump ...");
|
||||
|
||||
ventoy_check_create_directory();
|
||||
strcpy_s(NewArgv0, sizeof(NewArgv0), g_prog_full_path);
|
||||
argv[0] = NewArgv0;
|
||||
|
||||
@@ -2629,4 +2709,3 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -152,7 +152,6 @@ typedef struct VTOY_GPT_INFO
|
||||
#pragma pack()
|
||||
|
||||
|
||||
|
||||
typedef struct VarDiskInfo
|
||||
{
|
||||
UINT64 Capacity;
|
||||
@@ -165,6 +164,13 @@ typedef struct VarDiskInfo
|
||||
CHAR SerialNumber[128];
|
||||
}VarDiskInfo;
|
||||
|
||||
typedef struct IsoId
|
||||
{
|
||||
CHAR SystemId[64];
|
||||
CHAR VolumeId[64];
|
||||
CHAR PulisherId[256];
|
||||
CHAR PreparerId[256];
|
||||
}IsoId;
|
||||
|
||||
#define SAFE_CLOSE_HANDLE(handle) \
|
||||
{\
|
||||
@@ -187,4 +193,5 @@ int unxz(unsigned char *in, int in_size,
|
||||
unsigned char *out, int *in_used,
|
||||
void(*error)(char *x));
|
||||
|
||||
|
||||
#endif
|
||||
|
@@ -32,6 +32,7 @@
|
||||
#include "wimboot.h"
|
||||
#include "vdisk.h"
|
||||
#include "lzx.h"
|
||||
#include "xca.h"
|
||||
#include "wim.h"
|
||||
|
||||
/** WIM chunk buffer */
|
||||
@@ -180,6 +181,8 @@ static int wim_chunk ( struct vdisk_file *file, struct wim_header *header,
|
||||
/* Identify decompressor */
|
||||
if ( header->flags & WIM_HDR_LZX ) {
|
||||
decompress = lzx_decompress;
|
||||
} else if (header->flags & WIM_HDR_XPRESS) {
|
||||
decompress = xca_decompress;
|
||||
} else {
|
||||
DBG ( "Can't handle unknown compression scheme %#08x "
|
||||
"for %#llx chunk %d at [%#llx+%#llx)\n",
|
||||
@@ -447,8 +450,10 @@ int wim_path ( struct vdisk_file *file, struct wim_header *header,
|
||||
return rc;
|
||||
|
||||
/* Get root directory offset */
|
||||
direntry->subdir = ( ( security.len + sizeof ( uint64_t ) - 1 ) &
|
||||
~( sizeof ( uint64_t ) - 1 ) );
|
||||
if (security.len > 0)
|
||||
direntry->subdir = ( ( security.len + sizeof ( uint64_t ) - 1 ) & ~( sizeof ( uint64_t ) - 1 ) );
|
||||
else
|
||||
direntry->subdir = security.len + 8;
|
||||
|
||||
/* Find directory entry */
|
||||
name = memcpy ( path_copy, path, sizeof ( path_copy ) );
|
||||
|
@@ -42,7 +42,7 @@
|
||||
*/
|
||||
ssize_t xca_decompress ( const void *data, size_t len, void *buf ) {
|
||||
const void *src = data;
|
||||
const void *end = ( src + len );
|
||||
const void *end = ( uint8_t * ) src + len;
|
||||
uint8_t *out = buf;
|
||||
size_t out_len = 0;
|
||||
size_t out_len_threshold = 0;
|
||||
@@ -67,11 +67,9 @@ ssize_t xca_decompress ( const void *data, size_t len, void *buf ) {
|
||||
|
||||
/* Construct symbol lengths */
|
||||
lengths = src;
|
||||
src += sizeof ( *lengths );
|
||||
src = ( uint8_t * ) src + sizeof ( *lengths );
|
||||
if ( src > end ) {
|
||||
DBG ( "XCA too short to hold Huffman lengths "
|
||||
"table at input offset %#zx\n",
|
||||
( src - data ) );
|
||||
DBG ( "XCA too short to hold Huffman lengths table.\n");
|
||||
return -1;
|
||||
}
|
||||
for ( raw = 0 ; raw < XCA_CODES ; raw++ )
|
||||
@@ -113,7 +111,7 @@ ssize_t xca_decompress ( const void *data, size_t len, void *buf ) {
|
||||
out_len++;
|
||||
|
||||
} else if ( ( raw == XCA_END_MARKER ) &&
|
||||
( src >= ( end - 1 ) ) ) {
|
||||
( (uint8_t *) src >= ( ( uint8_t * ) end - 1 ) ) ) {
|
||||
|
||||
/* End marker symbol */
|
||||
return out_len;
|
||||
@@ -157,6 +155,5 @@ ssize_t xca_decompress ( const void *data, size_t len, void *buf ) {
|
||||
}
|
||||
}
|
||||
|
||||
DBG ( "XCA input overrun at output length %#zx\n", out_len );
|
||||
return -1;
|
||||
return out_len;
|
||||
}
|
||||
|
Reference in New Issue
Block a user