mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-09-18 01:41:15 +00:00
Compare commits
45 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
9e28dd1394 | ||
|
4100e7a886 | ||
|
a4f5ce2c9e | ||
|
c7967ea476 | ||
|
3e7f1ca764 | ||
|
1bc18295ae | ||
|
b4f1f11742 | ||
|
20010c5e88 | ||
|
1de18e43c5 | ||
|
15299d4d87 | ||
|
5d6d6df39b | ||
|
096cc99c3c | ||
|
602e8c7fdf | ||
|
da35a99f7c | ||
|
e46e24dde7 | ||
|
0b81845e42 | ||
|
3c621e4aca | ||
|
aecc579fcc | ||
|
598af7f45c | ||
|
24b05c0345 | ||
|
6d72617ef6 | ||
|
351f15ff18 | ||
|
1ee65a60c2 | ||
|
ecbf45defe | ||
|
b976923f00 | ||
|
8db8e07b61 | ||
|
f200c14730 | ||
|
c090197717 | ||
|
3ac17aa825 | ||
|
595b9441e9 | ||
|
0f3d48b3d9 | ||
|
61f289aa8a | ||
|
b099547af6 | ||
|
23bd2d24e9 | ||
|
85d1910722 | ||
|
9b2b4aa354 | ||
|
45122b59c0 | ||
|
5e607b7f9f | ||
|
1c0b4ee903 | ||
|
bf2517bb25 | ||
|
1065a41992 | ||
|
954cb14d87 | ||
|
4f64aecfa3 | ||
|
8af432b74b | ||
|
d8bca311b2 |
2
.github/ISSUE_TEMPLATE/issue_template.yml
vendored
2
.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.75
|
||||
placeholder: 1.0.79
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
|
@@ -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);
|
||||
|
@@ -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,
|
||||
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] : ""
|
||||
);
|
||||
|
||||
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 ? 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++)
|
||||
{
|
||||
AsciiSPrint(TmpName, sizeof(TmpName), "%s", Name);
|
||||
for (j = 0; j < g_img_replace_list->old_file_cnt; j++)
|
||||
replace = g_img_replace_list + i;
|
||||
if (replace->magic != GRUB_IMG_REPLACE_MAGIC || replace->new_file_virtual_id >= g_virt_chunk_num)
|
||||
{
|
||||
AsciiStrCpyS(OldName, sizeof(OldName), g_img_replace_list[i].old_file_name[j]);
|
||||
continue;
|
||||
}
|
||||
|
||||
AsciiSPrint(TmpName, sizeof(TmpName), "%s", Name);
|
||||
for (j = 0; j < replace->old_file_cnt; 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,31 +1583,31 @@ 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)
|
||||
{
|
||||
(*New)->Open = ventoy_wrapper_file_open;
|
||||
}
|
||||
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()
|
||||
|
1043
GRUB2/MOD_SRC/grub-2.04/grub-core/fs/squash4.c
Normal file
1043
GRUB2/MOD_SRC/grub-2.04/grub-core/fs/squash4.c
Normal file
File diff suppressed because it is too large
Load Diff
285
GRUB2/MOD_SRC/grub-2.04/grub-core/fs/zfs/zfs_lz4.c
Normal file
285
GRUB2/MOD_SRC/grub-2.04/grub-core/fs/zfs/zfs_lz4.c
Normal file
@@ -0,0 +1,285 @@
|
||||
/*
|
||||
* LZ4 - Fast LZ compression algorithm
|
||||
* Header File
|
||||
* Copyright (C) 2011-2013, Yann Collet.
|
||||
* BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above
|
||||
* copyright notice, this list of conditions and the following disclaimer
|
||||
* in the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* You can contact the author at :
|
||||
* - LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html
|
||||
* - LZ4 source repository : http://code.google.com/p/lz4/
|
||||
*/
|
||||
|
||||
#include <grub/err.h>
|
||||
#include <grub/mm.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/types.h>
|
||||
|
||||
int LZ4_uncompress_unknownOutputSize(const char *source, char *dest,
|
||||
int isize, int maxOutputSize);
|
||||
|
||||
/*
|
||||
* CPU Feature Detection
|
||||
*/
|
||||
|
||||
/* 32 or 64 bits ? */
|
||||
#if (GRUB_CPU_SIZEOF_VOID_P == 8)
|
||||
#define LZ4_ARCH64 1
|
||||
#else
|
||||
#define LZ4_ARCH64 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Compiler Options
|
||||
*/
|
||||
|
||||
|
||||
#define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
|
||||
|
||||
#if (GCC_VERSION >= 302) || (defined (__INTEL_COMPILER) && __INTEL_COMPILER >= 800) || defined(__clang__)
|
||||
#define expect(expr, value) (__builtin_expect((expr), (value)))
|
||||
#else
|
||||
#define expect(expr, value) (expr)
|
||||
#endif
|
||||
|
||||
#define likely(expr) expect((expr) != 0, 1)
|
||||
#define unlikely(expr) expect((expr) != 0, 0)
|
||||
|
||||
/* Basic types */
|
||||
#define BYTE grub_uint8_t
|
||||
#define U16 grub_uint16_t
|
||||
#define U32 grub_uint32_t
|
||||
#define S32 grub_int32_t
|
||||
#define U64 grub_uint64_t
|
||||
|
||||
typedef struct _U16_S {
|
||||
U16 v;
|
||||
} GRUB_PACKED U16_S;
|
||||
typedef struct _U32_S {
|
||||
U32 v;
|
||||
} GRUB_PACKED U32_S;
|
||||
typedef struct _U64_S {
|
||||
U64 v;
|
||||
} GRUB_PACKED U64_S;
|
||||
|
||||
#define A64(x) (((U64_S *)(x))->v)
|
||||
#define A32(x) (((U32_S *)(x))->v)
|
||||
#define A16(x) (((U16_S *)(x))->v)
|
||||
|
||||
/*
|
||||
* Constants
|
||||
*/
|
||||
#define MINMATCH 4
|
||||
|
||||
#define COPYLENGTH 8
|
||||
#define LASTLITERALS 5
|
||||
|
||||
#define ML_BITS 4
|
||||
#define ML_MASK ((1U<<ML_BITS)-1)
|
||||
#define RUN_BITS (8-ML_BITS)
|
||||
#define RUN_MASK ((1U<<RUN_BITS)-1)
|
||||
|
||||
/*
|
||||
* Architecture-specific macros
|
||||
*/
|
||||
#if LZ4_ARCH64
|
||||
#define STEPSIZE 8
|
||||
#define UARCH U64
|
||||
#define AARCH A64
|
||||
#define LZ4_COPYSTEP(s, d) A64(d) = A64(s); d += 8; s += 8;
|
||||
#define LZ4_COPYPACKET(s, d) LZ4_COPYSTEP(s, d)
|
||||
#define LZ4_SECURECOPY(s, d, e) if (d < e) LZ4_WILDCOPY(s, d, e)
|
||||
#define HTYPE U32
|
||||
#define INITBASE(base) const BYTE* const base = ip
|
||||
#else
|
||||
#define STEPSIZE 4
|
||||
#define UARCH U32
|
||||
#define AARCH A32
|
||||
#define LZ4_COPYSTEP(s, d) A32(d) = A32(s); d += 4; s += 4;
|
||||
#define LZ4_COPYPACKET(s, d) LZ4_COPYSTEP(s, d); LZ4_COPYSTEP(s, d);
|
||||
#define LZ4_SECURECOPY LZ4_WILDCOPY
|
||||
#define HTYPE const BYTE*
|
||||
#define INITBASE(base) const int base = 0
|
||||
#endif
|
||||
|
||||
#define LZ4_READ_LITTLEENDIAN_16(d, s, p) { d = (s) - grub_le_to_cpu16 (A16 (p)); }
|
||||
#define LZ4_WRITE_LITTLEENDIAN_16(p, v) { A16(p) = grub_cpu_to_le16 (v); p += 2; }
|
||||
|
||||
/* Macros */
|
||||
#define LZ4_WILDCOPY(s, d, e) do { LZ4_COPYPACKET(s, d) } while (d < e);
|
||||
|
||||
/* Decompression functions */
|
||||
grub_err_t
|
||||
lz4_decompress(void *s_start, void *d_start, grub_size_t s_len, grub_size_t d_len);
|
||||
|
||||
grub_err_t
|
||||
lz4_decompress(void *s_start, void *d_start, grub_size_t s_len, grub_size_t d_len)
|
||||
{
|
||||
const BYTE *src = s_start;
|
||||
U32 bufsiz = (src[0] << 24) | (src[1] << 16) | (src[2] << 8) |
|
||||
src[3];
|
||||
|
||||
/* invalid compressed buffer size encoded at start */
|
||||
if (bufsiz + 4 > s_len)
|
||||
return grub_error(GRUB_ERR_BAD_FS,"lz4 decompression failed.");
|
||||
|
||||
/*
|
||||
* Returns 0 on success (decompression function returned non-negative)
|
||||
* and appropriate error on failure (decompression function returned negative).
|
||||
*/
|
||||
return (LZ4_uncompress_unknownOutputSize((char*)s_start + 4, d_start, bufsiz,
|
||||
d_len) < 0)?grub_error(GRUB_ERR_BAD_FS,"lz4 decompression failed."):0;
|
||||
}
|
||||
|
||||
int
|
||||
LZ4_uncompress_unknownOutputSize(const char *source,
|
||||
char *dest, int isize, int maxOutputSize)
|
||||
{
|
||||
/* Local Variables */
|
||||
const BYTE * ip = (const BYTE *) source;
|
||||
const BYTE *const iend = ip + isize;
|
||||
const BYTE * ref;
|
||||
|
||||
BYTE * op = (BYTE *) dest;
|
||||
BYTE *const oend = op + maxOutputSize;
|
||||
BYTE *cpy;
|
||||
|
||||
grub_size_t dec[] = { 0, 3, 2, 3, 0, 0, 0, 0 };
|
||||
|
||||
/* Main Loop */
|
||||
while (ip < iend) {
|
||||
BYTE token;
|
||||
int length;
|
||||
|
||||
/* get runlength */
|
||||
token = *ip++;
|
||||
if ((length = (token >> ML_BITS)) == RUN_MASK) {
|
||||
int s = 255;
|
||||
while ((ip < iend) && (s == 255)) {
|
||||
s = *ip++;
|
||||
length += s;
|
||||
}
|
||||
}
|
||||
/* copy literals */
|
||||
if ((grub_addr_t) length > ~(grub_addr_t)op)
|
||||
goto _output_error;
|
||||
cpy = op + length;
|
||||
if ((cpy > oend - COPYLENGTH) ||
|
||||
(ip + length > iend - COPYLENGTH)) {
|
||||
if (cpy > oend)
|
||||
/*
|
||||
* Error: request to write beyond destination
|
||||
* buffer.
|
||||
*/
|
||||
goto _output_error;
|
||||
if (ip + length > iend)
|
||||
/*
|
||||
* Error : request to read beyond source
|
||||
* buffer.
|
||||
*/
|
||||
goto _output_error;
|
||||
grub_memcpy(op, ip, length);
|
||||
op += length;
|
||||
ip += length;
|
||||
if (ip < iend)
|
||||
/* Error : LZ4 format violation */
|
||||
goto _output_error;
|
||||
/* Necessarily EOF, due to parsing restrictions. */
|
||||
break;
|
||||
}
|
||||
LZ4_WILDCOPY(ip, op, cpy);
|
||||
ip -= (op - cpy);
|
||||
op = cpy;
|
||||
|
||||
/* get offset */
|
||||
LZ4_READ_LITTLEENDIAN_16(ref, cpy, ip);
|
||||
ip += 2;
|
||||
if (ref < (BYTE * const) dest)
|
||||
/*
|
||||
* Error: offset creates reference outside of
|
||||
* destination buffer.
|
||||
*/
|
||||
goto _output_error;
|
||||
|
||||
/* get matchlength */
|
||||
if ((length = (token & ML_MASK)) == ML_MASK) {
|
||||
while (ip < iend) {
|
||||
int s = *ip++;
|
||||
length += s;
|
||||
if (s == 255)
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* copy repeated sequence */
|
||||
if unlikely(op - ref < STEPSIZE) {
|
||||
#if LZ4_ARCH64
|
||||
grub_size_t dec2table[] = { 0, 0, 0, -1, 0, 1, 2, 3 };
|
||||
grub_size_t dec2 = dec2table[op - ref];
|
||||
#else
|
||||
const int dec2 = 0;
|
||||
#endif
|
||||
*op++ = *ref++;
|
||||
*op++ = *ref++;
|
||||
*op++ = *ref++;
|
||||
*op++ = *ref++;
|
||||
ref -= dec[op - ref];
|
||||
A32(op) = A32(ref);
|
||||
op += STEPSIZE - 4;
|
||||
ref -= dec2;
|
||||
} else {
|
||||
LZ4_COPYSTEP(ref, op);
|
||||
}
|
||||
cpy = op + length - (STEPSIZE - 4);
|
||||
if (cpy > oend - COPYLENGTH) {
|
||||
if (cpy > oend)
|
||||
/*
|
||||
* Error: request to write outside of
|
||||
* destination buffer.
|
||||
*/
|
||||
goto _output_error;
|
||||
LZ4_SECURECOPY(ref, op, (oend - COPYLENGTH));
|
||||
while (op < cpy)
|
||||
*op++ = *ref++;
|
||||
op = cpy;
|
||||
if (op == oend)
|
||||
/*
|
||||
* Check EOF (should never happen, since last
|
||||
* 5 bytes are supposed to be literals).
|
||||
*/
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
LZ4_SECURECOPY(ref, op, cpy);
|
||||
op = cpy; /* correction */
|
||||
}
|
||||
|
||||
/* end of decoding */
|
||||
return (int)(((char *)op) - dest);
|
||||
|
||||
/* write overflow error detected */
|
||||
_output_error:
|
||||
return (int)(-(((char *)ip) - source));
|
||||
}
|
@@ -38,6 +38,7 @@
|
||||
#include <grub/memory.h>
|
||||
#ifdef GRUB_MACHINE_EFI
|
||||
#include <grub/efi/efi.h>
|
||||
#include <grub/efi/memory.h>
|
||||
#endif
|
||||
#include <grub/ventoy.h>
|
||||
#include "ventoy_def.h"
|
||||
@@ -75,7 +76,44 @@ void ventoy_str_toupper(char *str)
|
||||
}
|
||||
}
|
||||
|
||||
char *ventoy_str_last(char *str, char ch)
|
||||
{
|
||||
char *pos = NULL;
|
||||
char *last = NULL;
|
||||
|
||||
if (!str)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (pos = str; *pos; pos++)
|
||||
{
|
||||
if (*pos == ch)
|
||||
{
|
||||
last = pos;
|
||||
}
|
||||
}
|
||||
|
||||
return last;
|
||||
}
|
||||
|
||||
int ventoy_str_all_digit(const char *str)
|
||||
{
|
||||
if (NULL == str || 0 == *str)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (*str)
|
||||
{
|
||||
if (*str < '0' || *str > '9')
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int ventoy_strcmp(const char *pattern, const char *str)
|
||||
{
|
||||
@@ -135,6 +173,22 @@ int ventoy_is_efi_os(void)
|
||||
return g_efi_os;
|
||||
}
|
||||
|
||||
void * ventoy_alloc_chain(grub_size_t size)
|
||||
{
|
||||
void *p = NULL;
|
||||
|
||||
p = grub_malloc(size);
|
||||
#ifdef GRUB_MACHINE_EFI
|
||||
if (!p)
|
||||
{
|
||||
p = grub_efi_allocate_any_pages(GRUB_EFI_BYTES_TO_PAGES(size));
|
||||
}
|
||||
#endif
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
static int ventoy_arch_mode_init(void)
|
||||
{
|
||||
#ifdef GRUB_MACHINE_EFI
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -45,6 +45,7 @@
|
||||
#include <grub/charset.h>
|
||||
#include <grub/crypto.h>
|
||||
#include <grub/lib/crc.h>
|
||||
#include <grub/random.h>
|
||||
#include <grub/ventoy.h>
|
||||
#include "ventoy_def.h"
|
||||
#include "miniz.h"
|
||||
@@ -106,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;
|
||||
@@ -482,7 +485,7 @@ static int ventoy_load_efiboot_template(char **buf, int *datalen, int *direntoff
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ventoy_set_check_result(int ret)
|
||||
static int ventoy_set_check_result(int ret, const char *msg)
|
||||
{
|
||||
char buf[32];
|
||||
|
||||
@@ -496,7 +499,8 @@ static int ventoy_set_check_result(int ret)
|
||||
grub_printf(VTOY_WARNING"\n");
|
||||
grub_printf(VTOY_WARNING"\n\n\n");
|
||||
|
||||
grub_printf("This is NOT a standard Ventoy device and is NOT supported (%d).\n\n", ret);
|
||||
grub_printf("This is NOT a standard Ventoy device and is NOT supported (%d).\n", ret);
|
||||
grub_printf("Error message: <%s>\n\n", msg);
|
||||
grub_printf("You should follow the instructions in https://www.ventoy.net to use Ventoy.\n");
|
||||
|
||||
grub_printf("\n\nWill exit after 10 seconds ...... ");
|
||||
@@ -522,7 +526,7 @@ static int ventoy_check_official_device(grub_device_t dev)
|
||||
|
||||
if (dev->disk == NULL || dev->disk->partition == NULL)
|
||||
{
|
||||
return ventoy_set_check_result(1 | 0x1000);
|
||||
return ventoy_set_check_result(1 | 0x1000, "Internal Error");
|
||||
}
|
||||
|
||||
if (0 == ventoy_check_file_exist("(%s,2)/ventoy/ventoy.cpio", dev->disk->name) ||
|
||||
@@ -530,11 +534,17 @@ static int ventoy_check_official_device(grub_device_t dev)
|
||||
0 == ventoy_check_file_exist("(%s,2)/tool/mount.exfat-fuse_aarch64", dev->disk->name))
|
||||
{
|
||||
#ifndef GRUB_MACHINE_EFI
|
||||
if (0 == ventoy_check_file_exist("(ventoydisk)/ventoy/ventoy.cpio", dev->disk->name) ||
|
||||
0 == ventoy_check_file_exist("(ventoydisk)/grub/localboot.cfg", dev->disk->name) ||
|
||||
0 == ventoy_check_file_exist("(ventoydisk)/tool/mount.exfat-fuse_aarch64", dev->disk->name))
|
||||
if (0 == ventoy_check_file_exist("(ventoydisk)/ventoy/ventoy.cpio", dev->disk->name))
|
||||
{
|
||||
return ventoy_set_check_result(2 | 0x1000);
|
||||
return ventoy_set_check_result(2 | 0x1000, "File ventoy/ventoy.cpio missing in VTOYEFI partition");
|
||||
}
|
||||
else if (0 == ventoy_check_file_exist("(ventoydisk)/grub/localboot.cfg", dev->disk->name))
|
||||
{
|
||||
return ventoy_set_check_result(2 | 0x1000, "File grub/localboot.cfg missing in VTOYEFI partition");
|
||||
}
|
||||
else if (0 == ventoy_check_file_exist("(ventoydisk)/tool/mount.exfat-fuse_aarch64", dev->disk->name))
|
||||
{
|
||||
return ventoy_set_check_result(2 | 0x1000, "File tool/mount.exfat-fuse_aarch64 missing in VTOYEFI partition");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -554,19 +564,19 @@ static int ventoy_check_official_device(grub_device_t dev)
|
||||
}
|
||||
if (!file)
|
||||
{
|
||||
return ventoy_set_check_result(3 | 0x1000);
|
||||
return ventoy_set_check_result(3 | 0x1000, "File ventoy/ventoy.cpio open failed in VTOYEFI partition");
|
||||
}
|
||||
|
||||
if (NULL == grub_strstr(file->fs->name, "fat"))
|
||||
{
|
||||
grub_file_close(file);
|
||||
return ventoy_set_check_result(4 | 0x1000);
|
||||
return ventoy_set_check_result(4 | 0x1000, "VTOYEFI partition is not FAT filesystem");
|
||||
}
|
||||
|
||||
partition = dev->disk->partition;
|
||||
if (partition->number != 0 || partition->start != 2048)
|
||||
{
|
||||
return ventoy_set_check_result(5);
|
||||
return ventoy_set_check_result(5, "Ventoy partition is not start at 1MB");
|
||||
}
|
||||
|
||||
if (workaround)
|
||||
@@ -578,7 +588,7 @@ static int ventoy_check_official_device(grub_device_t dev)
|
||||
(PartTbl[1].LastLBA + 1 - PartTbl[1].StartLBA) != 65536)
|
||||
{
|
||||
grub_file_close(file);
|
||||
return ventoy_set_check_result(6);
|
||||
return ventoy_set_check_result(6, "Disk partition layout check failed.");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -588,7 +598,7 @@ static int ventoy_check_official_device(grub_device_t dev)
|
||||
PartTbl[1].SectorCount != 65536)
|
||||
{
|
||||
grub_file_close(file);
|
||||
return ventoy_set_check_result(6);
|
||||
return ventoy_set_check_result(6, "Disk partition layout check failed.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -599,7 +609,7 @@ static int ventoy_check_official_device(grub_device_t dev)
|
||||
if ((partition->number != 1) || (partition->len != 65536) || (offset != partition->start))
|
||||
{
|
||||
grub_file_close(file);
|
||||
return ventoy_set_check_result(7);
|
||||
return ventoy_set_check_result(7, "Disk partition layout check failed.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -611,21 +621,21 @@ static int ventoy_check_official_device(grub_device_t dev)
|
||||
dev2 = grub_device_open(devname);
|
||||
if (!dev2)
|
||||
{
|
||||
return ventoy_set_check_result(8);
|
||||
return ventoy_set_check_result(8, "Disk open failed");
|
||||
}
|
||||
|
||||
fs = grub_fs_probe(dev2);
|
||||
if (!fs)
|
||||
{
|
||||
grub_device_close(dev2);
|
||||
return ventoy_set_check_result(9);
|
||||
return ventoy_set_check_result(9, "FS probe failed");
|
||||
}
|
||||
|
||||
fs->fs_label(dev2, &label);
|
||||
if ((!label) || grub_strncmp("VTOYEFI", label, 7))
|
||||
{
|
||||
grub_device_close(dev2);
|
||||
return ventoy_set_check_result(10);
|
||||
return ventoy_set_check_result(10, "Partition name is not VTOYEFI");
|
||||
}
|
||||
|
||||
grub_device_close(dev2);
|
||||
@@ -635,7 +645,7 @@ static int ventoy_check_official_device(grub_device_t dev)
|
||||
disk = grub_disk_open(dev->disk->name);
|
||||
if (!disk)
|
||||
{
|
||||
return ventoy_set_check_result(11);
|
||||
return ventoy_set_check_result(11, "Disk open failed");
|
||||
}
|
||||
|
||||
grub_memset(mbr, 0, 512);
|
||||
@@ -644,10 +654,10 @@ static int ventoy_check_official_device(grub_device_t dev)
|
||||
|
||||
if (grub_memcmp(g_check_mbr_data, mbr, 0x30) || grub_memcmp(g_check_mbr_data + 0x30, mbr + 0x190, 16))
|
||||
{
|
||||
return ventoy_set_check_result(12);
|
||||
return ventoy_set_check_result(12, "MBR check failed");
|
||||
}
|
||||
|
||||
return ventoy_set_check_result(0);
|
||||
return ventoy_set_check_result(0, NULL);
|
||||
}
|
||||
|
||||
static int ventoy_check_ignore_flag(const char *filename, const struct grub_dirhook_info *info, void *data)
|
||||
@@ -3242,8 +3252,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)
|
||||
{
|
||||
@@ -3286,11 +3297,15 @@ 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;
|
||||
(void)args;
|
||||
@@ -3302,68 +3317,294 @@ 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]);
|
||||
|
||||
file = ventoy_grub_file_open(VENTOY_FILE_TYPE, "(loop)%s", node->orgconf);
|
||||
if (file)
|
||||
g_conf_replace_count = n;
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
offset = grub_iso9660_get_last_file_dirent_pos(file);
|
||||
grub_file_close(file);
|
||||
node = nodes[i];
|
||||
|
||||
file = ventoy_grub_file_open(VENTOY_FILE_TYPE, "(loop)%s", node->orgconf);
|
||||
if (file)
|
||||
{
|
||||
offset = grub_iso9660_get_last_file_dirent_pos(file);
|
||||
grub_file_close(file);
|
||||
}
|
||||
else if (node->img > 0)
|
||||
{
|
||||
offset = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
debug("<(loop)%s> NOT exist\n", node->orgconf);
|
||||
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);
|
||||
continue;
|
||||
}
|
||||
|
||||
align = ((int)file->size + 2047) / 2048 * 2048;
|
||||
|
||||
if (align > vtoy_max_replace_file_size)
|
||||
{
|
||||
debug("New config file <%s%s> too big\n", args[0], node->newconf);
|
||||
grub_file_close(file);
|
||||
continue;
|
||||
}
|
||||
|
||||
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[i] = node;
|
||||
g_conf_replace_offset[i] = offset + 2;
|
||||
|
||||
if (node->img > 0)
|
||||
{
|
||||
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]: %d img:%d\n", i, g_conf_replace_new_len[i], node->img);
|
||||
}
|
||||
else if (node->img > 0)
|
||||
|
||||
end:
|
||||
VENTOY_CMD_RETURN(GRUB_ERR_NONE);
|
||||
}
|
||||
|
||||
static int ventoy_var_expand(int *record, int *flag, const char *var, char *expand, int len)
|
||||
{
|
||||
int i = 0;
|
||||
int n = 0;
|
||||
char c;
|
||||
const char *ch = var;
|
||||
|
||||
*record = 0;
|
||||
expand[0] = 0;
|
||||
|
||||
while (*ch)
|
||||
{
|
||||
offset = 0;
|
||||
if (*ch == '_' || (*ch >= '0' && *ch <= '9') || (*ch >= 'A' && *ch <= 'Z') || (*ch >= 'a' && *ch <= 'z'))
|
||||
{
|
||||
ch++;
|
||||
n++;
|
||||
}
|
||||
else
|
||||
{
|
||||
debug("Invalid variable letter <%c>\n", *ch);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (n > 32)
|
||||
{
|
||||
debug("Invalid variable length:%d <%s>\n", n, var);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (grub_strncmp(var, "VT_", 3) == 0) /* built-in variables */
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
debug("<(loop)%s> NOT exist\n", node->orgconf);
|
||||
goto end;
|
||||
if (*flag == 0)
|
||||
{
|
||||
*flag = 1;
|
||||
grub_printf("\n=================== Variables Expansion ===================\n\n");
|
||||
}
|
||||
|
||||
grub_printf("<%s>: ", var);
|
||||
grub_refresh();
|
||||
|
||||
while (i < (len - 1))
|
||||
{
|
||||
c = grub_getkey();
|
||||
if ((c == '\n') || (c == '\r'))
|
||||
{
|
||||
if (i > 0)
|
||||
{
|
||||
grub_printf("\n");
|
||||
grub_refresh();
|
||||
*record = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (grub_isprint(c))
|
||||
{
|
||||
if (i + 1 < (len - 1))
|
||||
{
|
||||
grub_printf("%c", c);
|
||||
grub_refresh();
|
||||
expand[i++] = c;
|
||||
expand[i] = 0;
|
||||
}
|
||||
}
|
||||
else if (c == '\b')
|
||||
{
|
||||
if (i > 0)
|
||||
{
|
||||
expand[i - 1] = ' ';
|
||||
grub_printf("\r<%s>: %s", var, expand);
|
||||
|
||||
expand[i - 1] = 0;
|
||||
grub_printf("\r<%s>: %s", var, expand);
|
||||
|
||||
grub_refresh();
|
||||
i--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
align = ((int)file->size + 2047) / 2048 * 2048;
|
||||
|
||||
if (align > vtoy_max_replace_file_size)
|
||||
{
|
||||
debug("New config file <%s%s> too big\n", args[0], node->newconf);
|
||||
goto end;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
g_conf_replace_node = node;
|
||||
g_conf_replace_offset = 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);
|
||||
}
|
||||
|
||||
debug("conf_replace OK: newlen: %d\n", g_conf_replace_new_len);
|
||||
|
||||
end:
|
||||
if (file)
|
||||
if (expand[0] == 0)
|
||||
{
|
||||
grub_file_close(file);
|
||||
grub_snprintf(expand, len, "$$%s$$", var);
|
||||
}
|
||||
VENTOY_CMD_RETURN(GRUB_ERR_NONE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ventoy_auto_install_var_expand(install_template *node)
|
||||
{
|
||||
int pos = 0;
|
||||
int flag = 0;
|
||||
int record = 0;
|
||||
int newlen = 0;
|
||||
char *start = NULL;
|
||||
char *end = NULL;
|
||||
char *newbuf = NULL;
|
||||
char *curline = NULL;
|
||||
char *nextline = NULL;
|
||||
grub_uint8_t *code = NULL;
|
||||
char value[512];
|
||||
var_node *CurNode = NULL;
|
||||
var_node *pVarList = NULL;
|
||||
|
||||
code = (grub_uint8_t *)node->filebuf;
|
||||
|
||||
if (node->filelen >= VTOY_SIZE_1MB)
|
||||
{
|
||||
debug("auto install script too long %d\n", node->filelen);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((code[0] == 0xff && code[1] == 0xfe) || (code[0] == 0xfe && code[1] == 0xff))
|
||||
{
|
||||
debug("UCS-2 encoding NOT supported\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
start = grub_strstr(node->filebuf, "$$");
|
||||
if (!start)
|
||||
{
|
||||
debug("no need to expand variable, no start.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
end = grub_strstr(start + 2, "$$");
|
||||
if (!end)
|
||||
{
|
||||
debug("no need to expand variable, no end.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
newlen = grub_max(node->filelen * 10, VTOY_SIZE_128KB);
|
||||
newbuf = grub_malloc(newlen);
|
||||
if (!newbuf)
|
||||
{
|
||||
debug("Failed to alloc newbuf %d\n", newlen);
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (curline = node->filebuf; curline; curline = nextline)
|
||||
{
|
||||
nextline = ventoy_get_line(curline);
|
||||
|
||||
start = grub_strstr(curline, "$$");
|
||||
if (start)
|
||||
{
|
||||
end = grub_strstr(start + 2, "$$");
|
||||
}
|
||||
|
||||
if (start && end)
|
||||
{
|
||||
*start = *end = 0;
|
||||
VTOY_APPEND_NEWBUF(curline);
|
||||
|
||||
for (CurNode = pVarList; CurNode; CurNode = CurNode->next)
|
||||
{
|
||||
if (grub_strcmp(start + 2, CurNode->var) == 0)
|
||||
{
|
||||
grub_snprintf(value, sizeof(value) - 1, "%s", CurNode->val);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!CurNode)
|
||||
{
|
||||
value[sizeof(value) - 1] = 0;
|
||||
ventoy_var_expand(&record, &flag, start + 2, value, sizeof(value) - 1);
|
||||
|
||||
if (record)
|
||||
{
|
||||
CurNode = grub_zalloc(sizeof(var_node));
|
||||
if (CurNode)
|
||||
{
|
||||
grub_snprintf(CurNode->var, sizeof(CurNode->var), "%s", start + 2);
|
||||
grub_snprintf(CurNode->val, sizeof(CurNode->val), "%s", value);
|
||||
CurNode->next = pVarList;
|
||||
pVarList = CurNode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
VTOY_APPEND_NEWBUF(value);
|
||||
|
||||
VTOY_APPEND_NEWBUF(end + 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
VTOY_APPEND_NEWBUF(curline);
|
||||
}
|
||||
|
||||
if (pos > 0 && newbuf[pos - 1] == '\r')
|
||||
{
|
||||
newbuf[pos - 1] = '\n';
|
||||
}
|
||||
else
|
||||
{
|
||||
newbuf[pos++] = '\n';
|
||||
}
|
||||
}
|
||||
|
||||
grub_free(node->filebuf);
|
||||
node->filebuf = newbuf;
|
||||
node->filelen = pos;
|
||||
|
||||
while (pVarList)
|
||||
{
|
||||
CurNode = pVarList->next;
|
||||
grub_free(pVarList);
|
||||
pVarList = CurNode;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static grub_err_t ventoy_cmd_sel_auto_install(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
@@ -3372,6 +3613,7 @@ static grub_err_t ventoy_cmd_sel_auto_install(grub_extcmd_context_t ctxt, int ar
|
||||
int pos = 0;
|
||||
int defidx = 1;
|
||||
char *buf = NULL;
|
||||
grub_file_t file = NULL;
|
||||
char configfile[128];
|
||||
install_template *node = NULL;
|
||||
|
||||
@@ -3400,7 +3642,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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3440,6 +3682,35 @@ 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;
|
||||
|
||||
if (node->cursel >= 0 && node->cursel < node->templatenum)
|
||||
{
|
||||
file = ventoy_grub_file_open(VENTOY_FILE_TYPE, "%s%s", ventoy_get_env("vtoy_iso_part"),
|
||||
node->templatepath[node->cursel].path);
|
||||
if (file)
|
||||
{
|
||||
node->filebuf = grub_malloc(file->size + 8);
|
||||
if (node->filebuf)
|
||||
{
|
||||
grub_file_read(file, node->filebuf, file->size);
|
||||
grub_file_close(file);
|
||||
|
||||
grub_memset(node->filebuf + file->size, 0, 8);
|
||||
node->filelen = (int)file->size;
|
||||
|
||||
ventoy_auto_install_var_expand(node);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
debug("Failed to open auto install script <%s%s>\n",
|
||||
ventoy_get_env("vtoy_iso_part"), node->templatepath[node->cursel].path);
|
||||
}
|
||||
}
|
||||
|
||||
VENTOY_CMD_RETURN(GRUB_ERR_NONE);
|
||||
}
|
||||
|
||||
@@ -3715,20 +3986,70 @@ static grub_err_t ventoy_cmd_dump_persistence(grub_extcmd_context_t ctxt, int ar
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ventoy_check_mode_by_name(char *filename, const char *suffix)
|
||||
{
|
||||
int i;
|
||||
int len1;
|
||||
int len2;
|
||||
|
||||
len1 = (int)grub_strlen(filename);
|
||||
len2 = (int)grub_strlen(suffix);
|
||||
|
||||
if (len1 <= len2)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i = len1 - 1; i >= 0; i--)
|
||||
{
|
||||
if (filename[i] == '.')
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i < len2 + 1)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (filename[i - len2 - 1] != '_')
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (grub_strncasecmp(filename + (i - len2), suffix, len2) == 0)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static grub_err_t ventoy_cmd_check_mode(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
(void)ctxt;
|
||||
(void)argc;
|
||||
(void)args;
|
||||
|
||||
if (argc != 1)
|
||||
if (argc != 1 && argc != 2)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (args[0][0] == '0')
|
||||
{
|
||||
return g_ventoy_memdisk_mode ? 0 : 1;
|
||||
if (g_ventoy_memdisk_mode)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (argc == 2 && ventoy_check_mode_by_name(args[1], "vtmemdisk"))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
else if (args[0][0] == '1')
|
||||
{
|
||||
@@ -3740,11 +4061,31 @@ static grub_err_t ventoy_cmd_check_mode(grub_extcmd_context_t ctxt, int argc, ch
|
||||
}
|
||||
else if (args[0][0] == '3')
|
||||
{
|
||||
return g_ventoy_grub2_mode ? 0 : 1;
|
||||
if (g_ventoy_grub2_mode)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (argc == 2 && ventoy_check_mode_by_name(args[1], "vtgrub2"))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
else if (args[0][0] == '4')
|
||||
{
|
||||
return g_ventoy_wimboot_mode ? 0 : 1;
|
||||
if (g_ventoy_wimboot_mode)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (argc == 2 && ventoy_check_mode_by_name(args[1], "vtwimboot"))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
@@ -5617,6 +5958,7 @@ static grub_err_t ventoy_cmd_dump_rsv_page(grub_extcmd_context_t ctxt, int argc,
|
||||
|
||||
int ventoy_env_init(void)
|
||||
{
|
||||
int i;
|
||||
char buf[64];
|
||||
|
||||
grub_env_set("vtdebug_flag", "");
|
||||
@@ -5624,7 +5966,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);
|
||||
|
||||
|
@@ -36,11 +36,14 @@
|
||||
#define VTOY_SIZE_512KB (512 * 1024)
|
||||
#define VTOY_SIZE_1KB 1024
|
||||
#define VTOY_SIZE_32KB (32 * 1024)
|
||||
#define VTOY_SIZE_128KB (128 * 1024)
|
||||
|
||||
#define JSON_SUCCESS 0
|
||||
#define JSON_FAILED 1
|
||||
#define JSON_NOT_FOUND 2
|
||||
|
||||
#define WINDATA_FLAG_TEMPLATE 1
|
||||
|
||||
#define ulong unsigned long
|
||||
#define ulonglong unsigned long long
|
||||
|
||||
@@ -84,6 +87,16 @@
|
||||
return (err);\
|
||||
}
|
||||
|
||||
#define VTOY_APPEND_NEWBUF(buf) \
|
||||
{\
|
||||
char *__c = buf;\
|
||||
while (*__c)\
|
||||
{\
|
||||
newbuf[pos++] = *__c;\
|
||||
__c++;\
|
||||
}\
|
||||
}
|
||||
|
||||
typedef enum VTOY_FILE_FLT
|
||||
{
|
||||
VTOY_FILE_FLT_ISO = 0, /* .iso */
|
||||
@@ -488,6 +501,7 @@ typedef struct wim_tail
|
||||
grub_uint8_t *jump_bin_data;
|
||||
grub_uint32_t bin_raw_len;
|
||||
grub_uint32_t bin_align_len;
|
||||
grub_uint32_t windata_flag;
|
||||
|
||||
grub_uint8_t *new_meta_data;
|
||||
grub_uint32_t new_meta_len;
|
||||
@@ -587,6 +601,7 @@ typedef struct chk_case_fs_dir
|
||||
grub_fs_t fs;
|
||||
}chk_case_fs_dir;
|
||||
|
||||
int ventoy_str_all_digit(const char *str);
|
||||
int ventoy_strcmp(const char *pattern, const char *str);
|
||||
int ventoy_strncmp (const char *pattern, const char *str, grub_size_t n);
|
||||
void ventoy_fill_os_param(grub_file_t file, ventoy_os_param *param);
|
||||
@@ -853,6 +868,9 @@ typedef struct install_template
|
||||
int templatenum;
|
||||
file_fullpath *templatepath;
|
||||
|
||||
char *filebuf;
|
||||
int filelen;
|
||||
|
||||
struct install_template *next;
|
||||
}install_template;
|
||||
|
||||
@@ -942,7 +960,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;
|
||||
@@ -1028,12 +1046,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];
|
||||
@@ -1061,15 +1080,15 @@ extern grub_uint32_t g_ventoy_plat_data;
|
||||
void ventoy_str_tolower(char *str);
|
||||
void ventoy_str_toupper(char *str);
|
||||
char * ventoy_get_line(char *start);
|
||||
char *ventoy_str_last(char *str, char ch);
|
||||
int ventoy_cmp_img(img_info *img1, img_info *img2);
|
||||
void ventoy_swap_img(img_info *img1, img_info *img2);
|
||||
char * ventoy_plugin_get_cur_install_template(const char *isopath);
|
||||
char * ventoy_plugin_get_cur_install_template(const char *isopath, install_template **cur);
|
||||
install_template * ventoy_plugin_find_install_template(const char *isopath);
|
||||
persistence_config * ventoy_plugin_find_persistent(const char *isopath);
|
||||
grub_uint64_t ventoy_get_vtoy_partsize(int part);
|
||||
void ventoy_plugin_dump_injection(void);
|
||||
void ventoy_plugin_dump_auto_install(void);
|
||||
int ventoy_fill_windows_rtdata(void *buf, char *isopath);
|
||||
int ventoy_plugin_get_persistent_chunklist(const char *isopath, int index, ventoy_img_chunk_list *chunk_list);
|
||||
const char * ventoy_plugin_get_injection(const char *isopath);
|
||||
const char * ventoy_plugin_get_menu_alias(int type, const char *isopath);
|
||||
@@ -1077,7 +1096,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);
|
||||
@@ -1191,6 +1210,14 @@ typedef struct browser_node
|
||||
struct browser_node *next;
|
||||
}browser_node;
|
||||
|
||||
typedef struct var_node
|
||||
{
|
||||
char var[128];
|
||||
char val[256];
|
||||
|
||||
struct var_node *next;
|
||||
}var_node;
|
||||
|
||||
extern char *g_tree_script_buf;
|
||||
extern int g_tree_script_pos;
|
||||
extern int g_tree_script_pre;
|
||||
@@ -1206,6 +1233,7 @@ grub_err_t ventoy_cmd_browser_dir(grub_extcmd_context_t ctxt, int argc, char **a
|
||||
grub_err_t ventoy_cmd_browser_disk(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
int ventoy_get_fs_type(const char *fs);
|
||||
int ventoy_img_name_valid(const char *filename, grub_size_t namelen);
|
||||
void * ventoy_alloc_chain(grub_size_t size);
|
||||
|
||||
#endif /* __VENTOY_DEF_H__ */
|
||||
|
||||
|
@@ -654,11 +654,18 @@ 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)
|
||||
{
|
||||
count++;
|
||||
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 +678,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 +704,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 +714,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,30 +780,37 @@ 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;
|
||||
|
||||
cur->mem_sector_start = sector;
|
||||
cur->mem_sector_end = cur->mem_sector_start + cpio_secs;
|
||||
cur->mem_sector_offset = offset;
|
||||
cur->remap_sector_start = 0;
|
||||
cur->remap_sector_end = 0;
|
||||
cur->org_sector_start = 0;
|
||||
|
||||
grub_memcpy(override + offset, g_conf_replace_new_buf, g_conf_replace_new_len);
|
||||
|
||||
chain->virt_img_size_in_bytes += g_conf_replace_new_len_align;
|
||||
|
||||
if (g_grub_param->img_replace.magic == GRUB_IMG_REPLACE_MAGIC)
|
||||
for (i = 0; i < g_conf_replace_count; i++)
|
||||
{
|
||||
g_grub_param->img_replace.new_file_virtual_id = virtid;
|
||||
}
|
||||
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;
|
||||
cur->mem_sector_offset = offset;
|
||||
cur->remap_sector_start = 0;
|
||||
cur->remap_sector_end = 0;
|
||||
cur->org_sector_start = 0;
|
||||
|
||||
offset += g_conf_replace_new_len_align;
|
||||
sector += cpio_secs;
|
||||
cur++;
|
||||
virtid++;
|
||||
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[i];
|
||||
|
||||
replace = g_grub_param->img_replace + i;
|
||||
if (replace->magic == GRUB_IMG_REPLACE_MAGIC)
|
||||
{
|
||||
replace->new_file_virtual_id = virtid;
|
||||
}
|
||||
|
||||
offset += g_conf_replace_new_len_align[i];
|
||||
sector += cpio_secs;
|
||||
cur++;
|
||||
virtid++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -795,11 +818,18 @@ static void ventoy_linux_fill_virt_data( grub_uint64_t isosize, ventoy_chain_
|
||||
|
||||
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)
|
||||
{
|
||||
count++;
|
||||
for (i = 0; i < g_conf_replace_count; i++)
|
||||
{
|
||||
if (g_conf_replace_offset[i] > 0)
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (g_svd_replace_offset > 0)
|
||||
@@ -812,11 +842,18 @@ 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)
|
||||
{
|
||||
count++;
|
||||
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 +866,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,23 +921,29 @@ static void ventoy_linux_fill_override_data( grub_uint64_t isosize, void *ove
|
||||
cur++;
|
||||
}
|
||||
|
||||
if (g_conf_replace_offset > 0)
|
||||
{
|
||||
cur->img_offset = g_conf_replace_offset;
|
||||
cur->override_size = sizeof(ventoy_iso9660_override);
|
||||
if (g_conf_replace_count > 0)
|
||||
{
|
||||
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;
|
||||
dirent->size = newlen;
|
||||
dirent->first_sector_be = grub_swap_bytes32(dirent->first_sector);
|
||||
dirent->size_be = grub_swap_bytes32(dirent->size);
|
||||
dirent = (ventoy_iso9660_override *)cur->override_data;
|
||||
dirent->first_sector = (grub_uint32_t)sector;
|
||||
dirent->size = newlen;
|
||||
dirent->first_sector_be = grub_swap_bytes32(dirent->first_sector);
|
||||
dirent->size_be = grub_swap_bytes32(dirent->size);
|
||||
|
||||
sector += (dirent->size + 2047) / 2048;
|
||||
cur++;
|
||||
sector += (dirent->size + 2047) / 2048;
|
||||
cur++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (g_svd_replace_offset > 0)
|
||||
{
|
||||
cur->img_offset = g_svd_replace_offset;
|
||||
@@ -1211,6 +1255,7 @@ grub_err_t ventoy_cmd_load_cpio(grub_extcmd_context_t ctxt, int argc, char **arg
|
||||
grub_file_t file;
|
||||
grub_file_t archfile;
|
||||
grub_file_t tmpfile;
|
||||
install_template *template_node = NULL;
|
||||
ventoy_img_chunk_list chunk_list;
|
||||
|
||||
(void)ctxt;
|
||||
@@ -1257,26 +1302,17 @@ grub_err_t ventoy_cmd_load_cpio(grub_extcmd_context_t ctxt, int argc, char **arg
|
||||
persistent_buf = (char *)(chunk_list.chunk);
|
||||
}
|
||||
|
||||
template_file = ventoy_plugin_get_cur_install_template(args[1]);
|
||||
template_file = ventoy_plugin_get_cur_install_template(args[1], &template_node);
|
||||
if (template_file)
|
||||
{
|
||||
debug("auto install template: <%s>\n", template_file);
|
||||
tmpfile = ventoy_grub_file_open(VENTOY_FILE_TYPE, "%s%s", args[2], template_file);
|
||||
if (tmpfile)
|
||||
debug("auto install template: <%s> <addr:%p> <len:%d>\n",
|
||||
template_file, template_node->filebuf, template_node->filelen);
|
||||
|
||||
template_size = template_node->filelen;
|
||||
template_buf = grub_malloc(template_size);
|
||||
if (template_buf)
|
||||
{
|
||||
debug("auto install script size %d\n", (int)tmpfile->size);
|
||||
template_size = tmpfile->size;
|
||||
template_buf = grub_malloc(template_size);
|
||||
if (template_buf)
|
||||
{
|
||||
grub_file_read(tmpfile, template_buf, template_size);
|
||||
}
|
||||
|
||||
grub_file_close(tmpfile);
|
||||
}
|
||||
else
|
||||
{
|
||||
debug("Failed to open install script %s%s\n", args[2], template_file);
|
||||
grub_memcpy(template_buf, template_node->filebuf, template_size);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1363,15 +1399,14 @@ grub_err_t ventoy_cmd_load_cpio(grub_extcmd_context_t ctxt, int argc, char **arg
|
||||
{
|
||||
headlen = ventoy_cpio_newc_fill_head(buf, template_size, template_buf, "ventoy/autoinstall");
|
||||
buf += headlen + ventoy_align(template_size, 4);
|
||||
grub_check_free(template_buf);
|
||||
}
|
||||
|
||||
if (persistent_size > 0 && persistent_buf)
|
||||
{
|
||||
headlen = ventoy_cpio_newc_fill_head(buf, persistent_size, persistent_buf, "ventoy/ventoy_persistent_map");
|
||||
buf += headlen + ventoy_align(persistent_size, 4);
|
||||
|
||||
grub_free(persistent_buf);
|
||||
persistent_buf = NULL;
|
||||
grub_check_free(persistent_buf);
|
||||
}
|
||||
|
||||
if (injection_size > 0 && injection_buf)
|
||||
@@ -1623,10 +1658,10 @@ grub_err_t ventoy_cmd_linux_chain_data(grub_extcmd_context_t ctxt, int argc, cha
|
||||
}
|
||||
}
|
||||
|
||||
chain = grub_malloc(size);
|
||||
chain = ventoy_alloc_chain(size);
|
||||
if (!chain)
|
||||
{
|
||||
grub_printf("Failed to alloc chain memory size %u\n", size);
|
||||
grub_printf("Failed to alloc chain linux memory size %u\n", size);
|
||||
grub_file_close(file);
|
||||
return 1;
|
||||
}
|
||||
|
@@ -2641,10 +2641,15 @@ install_template * ventoy_plugin_find_install_template(const char *isopath)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char * ventoy_plugin_get_cur_install_template(const char *isopath)
|
||||
char * ventoy_plugin_get_cur_install_template(const char *isopath, install_template **cur)
|
||||
{
|
||||
install_template *node = NULL;
|
||||
|
||||
if (cur)
|
||||
{
|
||||
*cur = NULL;
|
||||
}
|
||||
|
||||
node = ventoy_plugin_find_install_template(isopath);
|
||||
if ((!node) || (!node->templatepath))
|
||||
{
|
||||
@@ -2656,6 +2661,11 @@ char * ventoy_plugin_get_cur_install_template(const char *isopath)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (cur)
|
||||
{
|
||||
*cur = node;
|
||||
}
|
||||
|
||||
return node->templatepath[node->cursel].path;
|
||||
}
|
||||
|
||||
@@ -3044,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);
|
||||
@@ -3060,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]);
|
||||
}
|
||||
|
||||
@@ -1185,10 +1189,10 @@ grub_err_t ventoy_cmd_unix_chain_data(grub_extcmd_context_t ctxt, int argc, char
|
||||
}
|
||||
}
|
||||
|
||||
chain = grub_malloc(size);
|
||||
chain = ventoy_alloc_chain(size);
|
||||
if (!chain)
|
||||
{
|
||||
grub_printf("Failed to alloc chain memory size %u\n", size);
|
||||
grub_printf("Failed to alloc chain unix memory size %u\n", size);
|
||||
grub_file_close(file);
|
||||
return 1;
|
||||
}
|
||||
|
@@ -687,10 +687,10 @@ grub_err_t ventoy_cmd_raw_chain_data(grub_extcmd_context_t ctxt, int argc, char
|
||||
}
|
||||
}
|
||||
|
||||
chain = grub_malloc(size);
|
||||
chain = ventoy_alloc_chain(size);
|
||||
if (!chain)
|
||||
{
|
||||
grub_printf("Failed to alloc chain memory size %u\n", size);
|
||||
grub_printf("Failed to alloc chain raw memory size %u\n", size);
|
||||
grub_file_close(file);
|
||||
return 1;
|
||||
}
|
||||
|
@@ -1015,7 +1015,7 @@ static int ventoy_update_all_hash(wim_patch *patch, void *meta_data, wim_directo
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ventoy_cat_exe_file_data(wim_tail *wim_data, grub_uint32_t exe_len, grub_uint8_t *exe_data)
|
||||
static int ventoy_cat_exe_file_data(wim_tail *wim_data, grub_uint32_t exe_len, grub_uint8_t *exe_data, int windatalen)
|
||||
{
|
||||
int pe64 = 0;
|
||||
char file[256];
|
||||
@@ -1030,14 +1030,14 @@ static int ventoy_cat_exe_file_data(wim_tail *wim_data, grub_uint32_t exe_len, g
|
||||
jump_align = ventoy_align(jump_len, 16);
|
||||
|
||||
wim_data->jump_exe_len = jump_len;
|
||||
wim_data->bin_raw_len = jump_align + sizeof(ventoy_os_param) + sizeof(ventoy_windows_data) + exe_len;
|
||||
wim_data->bin_raw_len = jump_align + sizeof(ventoy_os_param) + windatalen + exe_len;
|
||||
wim_data->bin_align_len = ventoy_align(wim_data->bin_raw_len, 2048);
|
||||
|
||||
wim_data->jump_bin_data = grub_malloc(wim_data->bin_align_len);
|
||||
if (wim_data->jump_bin_data)
|
||||
{
|
||||
grub_memcpy(wim_data->jump_bin_data, jump_data, jump_len);
|
||||
grub_memcpy(wim_data->jump_bin_data + jump_align + sizeof(ventoy_os_param) + sizeof(ventoy_windows_data), exe_data, exe_len);
|
||||
grub_memcpy(wim_data->jump_bin_data + jump_align + sizeof(ventoy_os_param) + windatalen, exe_data, exe_len);
|
||||
}
|
||||
|
||||
debug("jump_exe_len:%u bin_raw_len:%u bin_align_len:%u\n",
|
||||
@@ -1046,26 +1046,68 @@ static int ventoy_cat_exe_file_data(wim_tail *wim_data, grub_uint32_t exe_len, g
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ventoy_fill_windows_rtdata(void *buf, char *isopath)
|
||||
static int ventoy_get_windows_rtdata_len(const char *iso, int *flag)
|
||||
{
|
||||
int size = 0;
|
||||
int template_file_len = 0;
|
||||
char *pos = NULL;
|
||||
char *script = NULL;
|
||||
install_template *template_node = NULL;
|
||||
|
||||
*flag = 0;
|
||||
size = (int)sizeof(ventoy_windows_data);
|
||||
|
||||
pos = grub_strstr(iso, "/");
|
||||
if (!pos)
|
||||
{
|
||||
return size;
|
||||
}
|
||||
|
||||
script = ventoy_plugin_get_cur_install_template(pos, &template_node);
|
||||
if (script)
|
||||
{
|
||||
(*flag) |= WINDATA_FLAG_TEMPLATE;
|
||||
template_file_len = template_node->filelen;
|
||||
}
|
||||
|
||||
return size + template_file_len;
|
||||
}
|
||||
|
||||
static int ventoy_fill_windows_rtdata(void *buf, char *isopath, int dataflag)
|
||||
{
|
||||
int template_len = 0;
|
||||
char *pos = NULL;
|
||||
char *end = NULL;
|
||||
char *script = NULL;
|
||||
const char *env = NULL;
|
||||
install_template *template_node = NULL;
|
||||
ventoy_windows_data *data = (ventoy_windows_data *)buf;
|
||||
|
||||
grub_memset(data, 0, sizeof(ventoy_windows_data));
|
||||
|
||||
env = grub_env_get("VTOY_WIN11_BYPASS_CHECK");
|
||||
if (env && env[0] == '1' && env[1] == 0)
|
||||
{
|
||||
data->windows11_bypass_check = 1;
|
||||
}
|
||||
|
||||
pos = grub_strstr(isopath, "/");
|
||||
if (!pos)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
script = ventoy_plugin_get_cur_install_template(pos);
|
||||
if (script)
|
||||
if (dataflag & WINDATA_FLAG_TEMPLATE)
|
||||
{
|
||||
debug("auto install script <%s>\n", script);
|
||||
grub_snprintf(data->auto_install_script, sizeof(data->auto_install_script) - 1, "%s", script);
|
||||
script = ventoy_plugin_get_cur_install_template(pos, &template_node);
|
||||
if (script)
|
||||
{
|
||||
data->auto_install_len = template_len = template_node->filelen;
|
||||
debug("auto install script OK <%s> <len:%d>\n", script, template_len);
|
||||
end = ventoy_str_last(script, '/');
|
||||
grub_snprintf(data->auto_install_script, sizeof(data->auto_install_script) - 1, "%s", end ? end + 1 : script);
|
||||
grub_memcpy(data + 1, template_node->filebuf, template_len);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1090,12 +1132,6 @@ int ventoy_fill_windows_rtdata(void *buf, char *isopath)
|
||||
debug("injection archive not configed %s\n", pos);
|
||||
}
|
||||
|
||||
env = grub_env_get("VTOY_WIN11_BYPASS_CHECK");
|
||||
if (env && env[0] == '1' && env[1] == 0)
|
||||
{
|
||||
data->windows11_bypass_check = 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1125,7 +1161,7 @@ static int ventoy_update_before_chain(ventoy_os_param *param, char *isopath)
|
||||
if (wim_data->jump_bin_data)
|
||||
{
|
||||
grub_memcpy(wim_data->jump_bin_data + jump_align, param, sizeof(ventoy_os_param));
|
||||
ventoy_fill_windows_rtdata(wim_data->jump_bin_data + jump_align + sizeof(ventoy_os_param), isopath);
|
||||
ventoy_fill_windows_rtdata(wim_data->jump_bin_data + jump_align + sizeof(ventoy_os_param), isopath, wim_data->windata_flag);
|
||||
}
|
||||
|
||||
grub_crypto_hash(GRUB_MD_SHA1, wim_data->bin_hash.sha1, wim_data->jump_bin_data, wim_data->bin_raw_len);
|
||||
@@ -1168,7 +1204,7 @@ static int ventoy_update_before_chain(ventoy_os_param *param, char *isopath)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ventoy_wimdows_locate_wim(const char *disk, wim_patch *patch)
|
||||
static int ventoy_wimdows_locate_wim(const char *disk, wim_patch *patch, int windatalen)
|
||||
{
|
||||
int rc;
|
||||
grub_uint16_t i;
|
||||
@@ -1285,7 +1321,7 @@ static int ventoy_wimdows_locate_wim(const char *disk, wim_patch *patch)
|
||||
|
||||
if (0 == ventoy_read_resource(file, head, &(patch->replace_look->resource), (void **)&(exe_data)))
|
||||
{
|
||||
ventoy_cat_exe_file_data(wim_data, exe_len, exe_data);
|
||||
ventoy_cat_exe_file_data(wim_data, exe_len, exe_data, windatalen);
|
||||
grub_free(exe_data);
|
||||
}
|
||||
else
|
||||
@@ -1330,15 +1366,20 @@ static int ventoy_wimdows_locate_wim(const char *disk, wim_patch *patch)
|
||||
|
||||
grub_err_t ventoy_cmd_locate_wim_patch(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
int datalen = 0;
|
||||
int dataflag = 0;
|
||||
wim_patch *node = g_wim_patch_head;
|
||||
|
||||
(void)ctxt;
|
||||
(void)argc;
|
||||
(void)args;
|
||||
|
||||
datalen = ventoy_get_windows_rtdata_len(args[1], &dataflag);
|
||||
|
||||
while (node)
|
||||
{
|
||||
if (0 == ventoy_wimdows_locate_wim(args[0], node))
|
||||
node->wim_data.windata_flag = dataflag;
|
||||
if (0 == ventoy_wimdows_locate_wim(args[0], node, datalen))
|
||||
{
|
||||
node->valid = 1;
|
||||
g_wim_valid_patch_count++;
|
||||
@@ -1751,6 +1792,8 @@ end:
|
||||
|
||||
grub_err_t ventoy_cmd_windows_wimboot_data(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
int datalen = 0;
|
||||
int dataflag = 0;
|
||||
grub_uint32_t size = 0;
|
||||
const char *addr = NULL;
|
||||
ventoy_chain_head *chain = NULL;
|
||||
@@ -1776,7 +1819,9 @@ grub_err_t ventoy_cmd_windows_wimboot_data(grub_extcmd_context_t ctxt, int argc,
|
||||
return 1;
|
||||
}
|
||||
|
||||
size = sizeof(ventoy_os_param) + sizeof(ventoy_windows_data);
|
||||
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)
|
||||
{
|
||||
@@ -1784,7 +1829,7 @@ grub_err_t ventoy_cmd_windows_wimboot_data(grub_extcmd_context_t ctxt, int argc,
|
||||
}
|
||||
|
||||
grub_memcpy(param, &chain->os_param, sizeof(ventoy_os_param));
|
||||
ventoy_fill_windows_rtdata(param + 1, param->vtoy_img_path);
|
||||
ventoy_fill_windows_rtdata(param + 1, param->vtoy_img_path, dataflag);
|
||||
|
||||
grub_snprintf(envbuf, sizeof(envbuf), "0x%lx", (unsigned long)param);
|
||||
grub_env_set("vtoy_wimboot_mem_addr", envbuf);
|
||||
@@ -1896,10 +1941,10 @@ grub_err_t ventoy_cmd_windows_chain_data(grub_extcmd_context_t ctxt, int argc, c
|
||||
}
|
||||
}
|
||||
|
||||
chain = grub_malloc(size);
|
||||
chain = ventoy_alloc_chain(size);
|
||||
if (!chain)
|
||||
{
|
||||
grub_printf("Failed to alloc chain memory size %u\n", size);
|
||||
grub_printf("Failed to alloc chain win1 memory size %u\n", size);
|
||||
grub_file_close(file);
|
||||
return 1;
|
||||
}
|
||||
@@ -2129,10 +2174,10 @@ static grub_err_t ventoy_vlnk_wim_chain_data(grub_file_t wimfile)
|
||||
}
|
||||
}
|
||||
|
||||
chain = grub_malloc(size);
|
||||
chain = ventoy_alloc_chain(size);
|
||||
if (!chain)
|
||||
{
|
||||
grub_printf("Failed to alloc chain memory size %u\n", size);
|
||||
grub_printf("Failed to alloc chain win2 memory size %u\n", size);
|
||||
grub_file_close(file);
|
||||
return 1;
|
||||
}
|
||||
@@ -2294,10 +2339,10 @@ static grub_err_t ventoy_normal_wim_chain_data(grub_file_t wimfile)
|
||||
}
|
||||
}
|
||||
|
||||
chain = grub_malloc(size);
|
||||
chain = ventoy_alloc_chain(size);
|
||||
if (!chain)
|
||||
{
|
||||
grub_printf("Failed to alloc chain memory size %u\n", size);
|
||||
grub_printf("Failed to alloc chain win3 memory size %u\n", size);
|
||||
grub_file_close(file);
|
||||
return 1;
|
||||
}
|
||||
|
@@ -139,7 +139,13 @@ typedef struct ventoy_windows_data
|
||||
char auto_install_script[384];
|
||||
char injection_archive[384];
|
||||
grub_uint8_t windows11_bypass_check;
|
||||
grub_uint8_t reserved[255];
|
||||
|
||||
grub_uint32_t auto_install_len;
|
||||
|
||||
grub_uint8_t reserved[255 - 4];
|
||||
|
||||
/* auto_intall file buf */
|
||||
/* ...... + auto_install_len */
|
||||
}ventoy_windows_data;
|
||||
|
||||
|
||||
@@ -256,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
|
||||
|
||||
@@ -276,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;
|
||||
|
||||
|
@@ -12,14 +12,14 @@ make install
|
||||
PATH=$VT_DIR/GRUB2/INSTALL/bin/:$VT_DIR/GRUB2/INSTALL/sbin/:$PATH
|
||||
|
||||
net_modules_legacy="net tftp http"
|
||||
all_modules_legacy="file setkey date drivemap blocklist regexp newc vga_text ntldr search at_keyboard usb_keyboard gcry_md5 hashsum gzio xzio lzopio lspci pci ext2 xfs ventoy chain read halt iso9660 linux16 test true sleep reboot echo videotest videoinfo videotest_checksum video_colors video_cirrus video_bochs vga vbe video_fb font video gettext extcmd terminal linux minicmd help configfile tr trig boot biosdisk disk ls tar squash4 password_pbkdf2 all_video png jpeg part_gpt part_msdos fat exfat ntfs loopback gzio normal udf gfxmenu gfxterm gfxterm_background gfxterm_menu smbios"
|
||||
all_modules_legacy="file setkey date drivemap blocklist regexp newc vga_text ntldr search at_keyboard usb_keyboard gcry_md5 hashsum gzio xzio lzopio lspci pci ext2 xfs ventoy chain read halt iso9660 linux16 test true sleep reboot echo videotest videoinfo videotest_checksum video_colors video_cirrus video_bochs vga vbe video_fb font video gettext extcmd terminal linux minicmd help configfile tr trig boot biosdisk disk ls tar squash4 password_pbkdf2 all_video png jpeg part_gpt part_msdos fat exfat ntfs loopback gzio normal udf gfxmenu gfxterm gfxterm_background gfxterm_menu smbios zfs"
|
||||
|
||||
net_modules_uefi="efinet net tftp http"
|
||||
all_modules_uefi="file setkey blocklist ventoy test true regexp newc search at_keyboard usb_keyboard gcry_md5 hashsum gzio xzio lzopio ext2 xfs read halt sleep serial terminfo png password_pbkdf2 gcry_sha512 pbkdf2 part_gpt part_msdos ls tar squash4 loopback part_apple minicmd diskfilter linux relocator jpeg iso9660 udf hfsplus halt acpi mmap gfxmenu video_colors trig bitmap_scale gfxterm bitmap font fat exfat ntfs fshelp efifwsetup reboot echo configfile normal terminal gettext chain priority_queue bufio datetime cat extcmd crypto gzio boot all_video efi_gop efi_uga video_bochs video_cirrus video video_fb gfxterm_background gfxterm_menu mouse fwload smbios"
|
||||
all_modules_uefi="file setkey blocklist ventoy test true regexp newc search at_keyboard usb_keyboard gcry_md5 hashsum gzio xzio lzopio ext2 xfs read halt sleep serial terminfo png password_pbkdf2 gcry_sha512 pbkdf2 part_gpt part_msdos ls tar squash4 loopback part_apple minicmd diskfilter linux relocator jpeg iso9660 udf hfsplus halt acpi mmap gfxmenu video_colors trig bitmap_scale gfxterm bitmap font fat exfat ntfs fshelp efifwsetup reboot echo configfile normal terminal gettext chain priority_queue bufio datetime cat extcmd crypto gzio boot all_video efi_gop efi_uga video_bochs video_cirrus video video_fb gfxterm_background gfxterm_menu mouse fwload smbios zfs"
|
||||
|
||||
all_modules_arm64_uefi="file setkey blocklist ventoy test true regexp newc search gcry_md5 hashsum gzio xzio lzopio ext2 xfs read halt sleep serial terminfo png password_pbkdf2 gcry_sha512 pbkdf2 part_gpt part_msdos ls tar squash4 loopback part_apple minicmd diskfilter linux jpeg iso9660 udf hfsplus halt acpi mmap gfxmenu video_colors trig bitmap_scale gfxterm bitmap font fat exfat ntfs fshelp efifwsetup reboot echo configfile normal terminal gettext chain priority_queue bufio datetime cat extcmd crypto gzio boot all_video efi_gop video video_fb gfxterm_background gfxterm_menu"
|
||||
all_modules_arm64_uefi="file setkey blocklist ventoy test true regexp newc search gcry_md5 hashsum gzio xzio lzopio ext2 xfs read halt sleep serial terminfo png password_pbkdf2 gcry_sha512 pbkdf2 part_gpt part_msdos ls tar squash4 loopback part_apple minicmd diskfilter linux jpeg iso9660 udf hfsplus halt acpi mmap gfxmenu video_colors trig bitmap_scale gfxterm bitmap font fat exfat ntfs fshelp efifwsetup reboot echo configfile normal terminal gettext chain priority_queue bufio datetime cat extcmd crypto gzio boot all_video efi_gop video video_fb gfxterm_background gfxterm_menu zfs"
|
||||
|
||||
all_modules_mips64el_uefi="file setkey blocklist ventoy test true regexp newc search gcry_md5 hashsum gzio xzio lzopio ext2 xfs read halt sleep serial terminfo png password_pbkdf2 gcry_sha512 pbkdf2 part_gpt part_msdos ls tar squash4 loopback part_apple minicmd diskfilter linux jpeg iso9660 udf hfsplus halt acpi mmap gfxmenu video_colors trig bitmap_scale gfxterm bitmap font fat exfat ntfs fshelp efifwsetup reboot echo configfile normal terminal gettext chain priority_queue bufio datetime cat extcmd crypto gzio boot all_video efi_gop video video_fb gfxterm_background gfxterm_menu"
|
||||
all_modules_mips64el_uefi="file setkey blocklist ventoy test true regexp newc search gcry_md5 hashsum gzio xzio lzopio ext2 xfs read halt sleep serial terminfo png password_pbkdf2 gcry_sha512 pbkdf2 part_gpt part_msdos ls tar squash4 loopback part_apple minicmd diskfilter linux jpeg iso9660 udf hfsplus halt acpi mmap gfxmenu video_colors trig bitmap_scale gfxterm bitmap font fat exfat ntfs fshelp efifwsetup reboot echo configfile normal terminal gettext chain priority_queue bufio datetime cat extcmd crypto gzio boot all_video efi_gop video video_fb gfxterm_background gfxterm_menu zfs"
|
||||
|
||||
|
||||
if [ "$1" = "uefi" ]; then
|
||||
|
43
IMG/cpio/ventoy/hook/clear/hidden-hook.sh
Normal file
43
IMG/cpio/ventoy/hook/clear/hidden-hook.sh
Normal file
@@ -0,0 +1,43 @@
|
||||
#!/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
|
||||
|
||||
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||
|
||||
NEWROOT=$(grep switch_root /init | awk '{print $3}')
|
||||
|
||||
for i in 'usr/bin' 'usr/sbin'; do
|
||||
if [ -f $NEWROOT/$i/udevadm ]; then
|
||||
UPATH=$i
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
blkdev_num=$(dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1:\2/')
|
||||
vtDM=$(ventoy_find_dm_id ${blkdev_num})
|
||||
|
||||
sed "s#UPATH=.*#UPATH=/$UPATH#" -i /ventoy/hook/clear/udevadm
|
||||
sed "s#DM=.*#DM=$vtDM#" -i /ventoy/hook/clear/udevadm
|
||||
|
||||
|
||||
mv $NEWROOT/$UPATH/udevadm $NEWROOT/$UPATH/udevadm_bk
|
||||
cp -a /ventoy/hook/clear/udevadm $NEWROOT/$UPATH/udevadm
|
||||
chmod 777 $NEWROOT/$UPATH/udevadm
|
||||
|
12
IMG/cpio/ventoy/hook/clear/udevadm
Normal file
12
IMG/cpio/ventoy/hook/clear/udevadm
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
UPATH=/usr/bin
|
||||
DM=dm-0
|
||||
|
||||
rm -f $UPATH/udevadm
|
||||
mv $UPATH/udevadm_bk $UPATH/udevadm
|
||||
|
||||
echo 1 > /tmp/vthidden
|
||||
mount --bind /tmp/vthidden /sys/block/$DM/hidden
|
||||
|
||||
exec $UPATH/udevadm "$@"
|
@@ -26,3 +26,6 @@ else
|
||||
echo "find_installer" >> $VTLOG
|
||||
$SED "/\$.*find_installer/i\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/clear/disk-hook.sh" -i /init
|
||||
fi
|
||||
|
||||
#issue 1674
|
||||
$SED "/switch_root/i $BUSYBOX_PATH/sh $VTOY_PATH/hook/clear/hidden-hook.sh" -i /init
|
||||
|
@@ -19,6 +19,8 @@
|
||||
|
||||
. /ventoy/hook/ventoy-hook-lib.sh
|
||||
|
||||
/sbin/mdev -s
|
||||
|
||||
# Just for KVM test environment
|
||||
$BUSYBOX_PATH/modprobe virtio_blk 2>/dev/null
|
||||
$BUSYBOX_PATH/modprobe virtio_pci 2>/dev/null
|
||||
@@ -34,3 +36,6 @@ for i in 0 1 2 3 4 5 6 7 8 9; do
|
||||
done
|
||||
|
||||
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace"
|
||||
|
||||
$BUSYBOX_PATH/rm -f /dev/dm-*
|
||||
|
||||
|
@@ -19,6 +19,6 @@
|
||||
|
||||
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||
|
||||
$SED "/mount_boot /i\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/gentoo/disk_hook.sh" -i /init
|
||||
$SED "/mount_boot[^(]*$/i\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/daphile/disk_hook.sh" -i /init
|
||||
|
||||
$SED "s#'\.\*/block/mmcblk[^ ]*'#'\.\*/block/dm-[0-9]*'#" -i /init
|
||||
|
@@ -34,3 +34,7 @@ fi
|
||||
|
||||
vtlog "${vtdiskname#/dev/}2 found..."
|
||||
$BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/udev_disk_hook.sh "${vtdiskname#/dev/}2"
|
||||
|
||||
if [ -f /ventoy/autoinstall ]; then
|
||||
sh /ventoy/hook/default/auto_install_varexp.sh /ventoy/autoinstall
|
||||
fi
|
||||
|
@@ -19,21 +19,28 @@
|
||||
|
||||
. /ventoy/hook/ventoy-hook-lib.sh
|
||||
|
||||
if is_ventoy_hook_finished || not_ventoy_disk "${1:0:-1}"; then
|
||||
if is_ventoy_hook_finished; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
vtlog "####### $0 $* ########"
|
||||
|
||||
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||
|
||||
modprobe fuse
|
||||
mkdir -p $VTOY_PATH/mnt/fuse $VTOY_PATH/mnt/iso
|
||||
wait_for_usb_disk_ready
|
||||
|
||||
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
|
||||
vtdiskname=$(get_ventoy_disk_name)
|
||||
if [ "$vtdiskname" = "unknown" ]; then
|
||||
vtlog "ventoy disk not found"
|
||||
PATH=$VTPATH_OLD
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# OK finish
|
||||
set_ventoy_hook_finish
|
||||
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2"
|
||||
|
||||
mkdir /root
|
||||
chmod -R 0755 /root
|
||||
|
||||
PATH=$VTPATH_OLD
|
||||
|
||||
set_ventoy_hook_finish
|
20
IMG/cpio/ventoy/hook/debian/stratodesk-hook.sh
Normal file
20
IMG/cpio/ventoy/hook/debian/stratodesk-hook.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/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/>.
|
||||
#
|
||||
#************************************************************************************
|
||||
|
||||
$SED "/maybe_break *post_modules/a\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/stratodesk-disk.sh" -i /init
|
@@ -44,10 +44,15 @@ if [ $vtSplit -eq 1 ]; then
|
||||
vtlog "Line number: $vtLine $vtLine1 $vtLine2"
|
||||
sed -n "1,${vtLine1}p" $VTOY_PATH/autoinstall >/tmpcidata/user-data
|
||||
sed -n "${vtLine2},\$p" $VTOY_PATH/autoinstall >/tmpcidata/meta-data
|
||||
|
||||
sh /ventoy/hook/default/auto_install_varexp.sh /tmpcidata/user-data
|
||||
sh /ventoy/hook/default/auto_install_varexp.sh /tmpcidata/meta-data
|
||||
else
|
||||
vtlog "only user-data avaliable"
|
||||
cp -a $VTOY_PATH/autoinstall /tmpcidata/user-data
|
||||
touch /tmpcidata/meta-data
|
||||
|
||||
sh /ventoy/hook/default/auto_install_varexp.sh /tmpcidata/user-data
|
||||
fi
|
||||
|
||||
|
||||
|
@@ -43,6 +43,8 @@ ventoy_get_debian_distro() {
|
||||
fi
|
||||
elif $GREP -m1 -q 'Minimal.*Linux.*Live' /init; then
|
||||
echo 'mll'; return
|
||||
elif $GREP -m1 -q 'stratodesk.com' /init; then
|
||||
echo 'stratodesk'; return
|
||||
fi
|
||||
fi
|
||||
|
||||
|
53
IMG/cpio/ventoy/hook/default/auto_install_varexp.sh
Normal file
53
IMG/cpio/ventoy/hook/default/auto_install_varexp.sh
Normal file
@@ -0,0 +1,53 @@
|
||||
#!/bin/sh
|
||||
#************************************************************************************
|
||||
# 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
|
||||
# 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/>.
|
||||
#
|
||||
#************************************************************************************
|
||||
|
||||
PATH=$PATH:/ventoy/busybox:/ventoy/tool
|
||||
|
||||
vlog() {
|
||||
echo "$@" >> /ventoy/autoinstall.log
|
||||
}
|
||||
|
||||
if grep -q '\$\$VT_' /ventoy/autoinstall; then
|
||||
vlog "======== auto install variables expansion ======="
|
||||
else
|
||||
vlog "======== auto install variables expansion no need ======="
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -f /ventoy/ventoy_os_param ]; then
|
||||
VTOYDISK=$(vtoydump -f /ventoy/ventoy_os_param | awk -F'#' '{print $1}')
|
||||
vlog VTOYDISK=$VTOYDISK
|
||||
|
||||
if [ -b "$VTOYDISK" ]; then
|
||||
vlog "$VTOYDISK exist OK"
|
||||
else
|
||||
vlog "$VTOYDISK does NOT exist"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -n "$1" -a -f "$1" ]; then
|
||||
vtoyexpand "$1" "$VTOYDISK"
|
||||
else
|
||||
vlog "File $1 not exist"
|
||||
fi
|
||||
else
|
||||
vlog "os param file not exist"
|
||||
exit 0
|
||||
fi
|
||||
|
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
|
||||
|
24
IMG/cpio/ventoy/hook/openEuler/ventoy-autoexp.sh
Normal file
24
IMG/cpio/ventoy/hook/openEuler/ventoy-autoexp.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
#************************************************************************************
|
||||
# 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
|
||||
# published by the Free Software Foundation; either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#************************************************************************************
|
||||
|
||||
if [ -f /run/install/ks.cfg ]; then
|
||||
sh /ventoy/hook/default/auto_install_varexp.sh /run/install/ks.cfg
|
||||
fi
|
||||
|
||||
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
|
||||
echo "$vtRawKs" > $VTOY_PATH/ventoy_ks_rootpath
|
||||
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
|
||||
|
@@ -29,10 +29,12 @@ ventoy_add_kernel_udev_rule "loop6" "$VTOY_PATH/hook/rhel6/udev_disk_hook.sh %k"
|
||||
|
||||
if [ -f $VTOY_PATH/autoinstall ]; then
|
||||
$BUSYBOX_PATH/mv /sbin/loader /sbin/loader_bk
|
||||
$BUSYBOX_PATH/mv $VTOY_PATH/tool/loader /sbin/loader
|
||||
$BUSYBOX_PATH/cp -a $VTOY_PATH/tool/loader /sbin/loader
|
||||
|
||||
RawCmdLine=$($BUSYBOX_PATH/cat /proc/cmdline)
|
||||
echo -n "/sbin/loader_bk" > "/ventoy/loader_exec_file"
|
||||
echo -n "--cmdline=$RawCmdLine ks=file:$VTOY_PATH/autoinstall" > "/ventoy/loader_exec_cmdline"
|
||||
#echo 111 > "/ventoy/loader_debug"
|
||||
|
||||
echo "/bin/sh /ventoy/hook/rhel6/ventoy-varexp.sh" > "/ventoy/loader_hook_cmd"
|
||||
fi
|
||||
|
37
IMG/cpio/ventoy/hook/rhel6/ventoy-varexp.sh
Normal file
37
IMG/cpio/ventoy/hook/rhel6/ventoy-varexp.sh
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
#************************************************************************************
|
||||
# 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
|
||||
# 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/>.
|
||||
#
|
||||
#************************************************************************************
|
||||
|
||||
PATH=$PATH:/ventoy/busybox:/ventoy/tool
|
||||
|
||||
if grep -q '\$\$VT_' /ventoy/autoinstall; then
|
||||
:
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -f /sbin/hald ]; then
|
||||
mv /sbin/hald /sbin/hald_bk
|
||||
cp -a /ventoy/tool/hald /sbin/hald
|
||||
|
||||
rm -f "/ventoy/loader_exec_cmdline"
|
||||
echo "/bin/sh /ventoy/hook/default/auto_install_varexp.sh /ventoy/autoinstall" > "/ventoy/loader_hook_cmd"
|
||||
echo -n "/sbin/hald_bk" > "/ventoy/loader_exec_file"
|
||||
fi
|
||||
|
||||
exit 0
|
24
IMG/cpio/ventoy/hook/rhel7/ventoy-autoexp.sh
Normal file
24
IMG/cpio/ventoy/hook/rhel7/ventoy-autoexp.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
#************************************************************************************
|
||||
# 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
|
||||
# published by the Free Software Foundation; either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#************************************************************************************
|
||||
|
||||
if [ -f /run/install/ks.cfg ]; then
|
||||
sh /ventoy/hook/default/auto_install_varexp.sh /run/install/ks.cfg
|
||||
fi
|
||||
|
||||
exit 0
|
@@ -27,18 +27,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
|
||||
@@ -67,7 +70,13 @@ fi
|
||||
echo "VTKS=$VTKS VTOVERLAY=$VTOVERLAY" >> $VTLOG
|
||||
|
||||
if [ -n "$vtRawKs" ]; then
|
||||
echo "$vtRawKs" > $VTOY_PATH/ventoy_ks_rootpath
|
||||
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,3 +137,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"
|
||||
$vtScript
|
||||
|
||||
if $GREP -q SCRE /proc/cmdline; then
|
||||
/sbin/dmsquash-live-root /dev/ventoy
|
||||
else
|
||||
$vtScript
|
||||
fi
|
||||
else
|
||||
vtlog "$vtGenRulFile not exist..."
|
||||
fi
|
||||
|
@@ -40,3 +40,11 @@ fi
|
||||
if $GREP -q 'mediacheck=1' /proc/cmdline; then
|
||||
ventoy_copy_device_mapper "${vtdiskname}"
|
||||
fi
|
||||
|
||||
if [ -f /ventoy/autoinstall ]; then
|
||||
sh /ventoy/hook/default/auto_install_varexp.sh /ventoy/autoinstall
|
||||
fi
|
||||
if [ -f /autoinst.xml ]; then
|
||||
sh /ventoy/hook/default/auto_install_varexp.sh /autoinst.xml
|
||||
fi
|
||||
|
||||
|
@@ -278,11 +278,23 @@ ventoy_dm_patch() {
|
||||
|
||||
$CAT /proc/kallsyms | $BUSYBOX_PATH/sort > $VTOY_PATH/kallsyms
|
||||
|
||||
vtLine=$($VTOY_PATH/tool/vtoyksym dm_get_table_device $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}')
|
||||
|
||||
vtLine=$($VTOY_PATH/tool/vtoyksym dm_put_table_device $VTOY_PATH/kallsyms)
|
||||
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
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#!/ventoy/busybox/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
|
||||
@@ -26,7 +26,7 @@ $SED "1a boot_dev=ventoy1;wkg_dev=ventoy2" -i /init
|
||||
#check for ssd will read /sys/block/ventoy, will no exist, need a workaround
|
||||
$SED "s#/sys/block/\${WKG_DRV}/#/sys/block/\$vtDM/#g" -i /init
|
||||
|
||||
#skip the resizing process, can't resizing partition
|
||||
$SED "s#640M#0M#g" -i /init
|
||||
#resizing process
|
||||
$SED "s#partprobe.*#$BUSYBOX_PATH/sh $VTOY_PATH/loop/easyos/ventoy-resize.sh \$WKG_DEV#g" -i /init
|
||||
|
||||
|
||||
|
45
IMG/cpio/ventoy/loop/easyos/ventoy-resize.sh
Normal file
45
IMG/cpio/ventoy/loop/easyos/ventoy-resize.sh
Normal file
@@ -0,0 +1,45 @@
|
||||
#!/ventoy/busybox/sh
|
||||
#************************************************************************************
|
||||
# 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
|
||||
# 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
|
||||
|
||||
blkdev_num=$($VTOY_PATH/tool/dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1:\2/')
|
||||
vtDM0=$(ventoy_find_dm_id ${blkdev_num})
|
||||
blkdev_num=$($VTOY_PATH/tool/dmsetup ls | grep ventoy2 | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1:\2/')
|
||||
vtDM2=$(ventoy_find_dm_id ${blkdev_num})
|
||||
vtlog "vtDM0=$vtDM0 vtDM2=$vtDM2"
|
||||
|
||||
vtSize=$(cat /sys/block/$vtDM0/size)
|
||||
vtSize1=$(sed -n "1p" /vtoy_dm_table | awk '{print $2}')
|
||||
vtStart1=$(sed -n "1p" /vtoy_dm_table | awk '{print $5}')
|
||||
vtSize2=$(sed -n "2p" /vtoy_dm_table | awk '{print $2}')
|
||||
vtNewSize2=$(expr $vtSize - $vtSize1 - $vtStart1)
|
||||
vtlog "vtSize=$vtSize vtSize1=$vtSize1 vtStart1=$vtStart1 vtSize2=$vtSize2 vtNewSize2=$vtNewSize2"
|
||||
|
||||
|
||||
sed -n "2p" /vtoy_dm_table > /ventoy/resize_table
|
||||
sed -i "s/$vtSize2/$vtNewSize2/" /ventoy/resize_table
|
||||
|
||||
dmsetup remove ventoy2
|
||||
dmsetup create ventoy2 /ventoy/resize_table
|
||||
|
@@ -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.
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.
@@ -185,7 +185,7 @@ function locate_initrd {
|
||||
}
|
||||
|
||||
function locate_wim {
|
||||
vt_windows_locate_wim_patch (loop)
|
||||
vt_windows_locate_wim_patch (loop) "$1"
|
||||
|
||||
if [ -n "${vtdebug_flag}" ]; then
|
||||
echo '###############################################'
|
||||
@@ -381,7 +381,9 @@ 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
|
||||
}
|
||||
|
||||
@@ -615,13 +617,13 @@ function uefi_windows_menu_func {
|
||||
fi
|
||||
|
||||
ventoy_debug_pause
|
||||
locate_wim
|
||||
locate_wim "${chosen_path}"
|
||||
fi
|
||||
|
||||
vt_windows_chain_data "${1}${chosen_path}"
|
||||
ventoy_debug_pause
|
||||
|
||||
if vt_check_mode 4; then
|
||||
if vt_check_mode 4 "$vt_chosen_name"; then
|
||||
vtoy_windows_wimboot_func
|
||||
fi
|
||||
|
||||
@@ -688,6 +690,9 @@ function uefi_linux_menu_func {
|
||||
vt_linux_initrd_count vtcount
|
||||
|
||||
if [ $vtcount -eq 0 ]; then
|
||||
if [ -e (loop)/EFI/boot/livegrub.cfg ]; then
|
||||
vt_linux_parse_initrd_grub file (loop)/EFI/boot/livegrub.cfg
|
||||
fi
|
||||
distro_specify_initrd_file_phase2
|
||||
|
||||
if [ "$vt_efi_dir" = "NO" ]; then
|
||||
@@ -776,7 +781,7 @@ function uefi_linux_menu_func {
|
||||
ventoy_cli_console
|
||||
|
||||
unset vtGrub2Mode
|
||||
if vt_check_mode 3; then
|
||||
if vt_check_mode 3 "$vt_chosen_name"; then
|
||||
set vtGrub2Mode=1
|
||||
elif vt_str_begin "$vt_volume_id" "KRD"; then
|
||||
if [ -f (loop)/boot/grub/grub.cfg.sig ]; then
|
||||
@@ -864,7 +869,7 @@ function uefi_iso_menu_func {
|
||||
if [ -n "$vtisouefi" ]; then
|
||||
set LoadIsoEfiDriver=on
|
||||
unset vtisouefi
|
||||
elif vt_check_mode 2; then
|
||||
elif vt_check_mode 2 "$vt_chosen_name"; then
|
||||
set LoadIsoEfiDriver=on
|
||||
else
|
||||
unset LoadIsoEfiDriver
|
||||
@@ -901,7 +906,7 @@ function uefi_iso_menu_func {
|
||||
if [ -n "$vtcompat" ]; then
|
||||
set ventoy_compatible=YES
|
||||
unset vtcompat
|
||||
elif vt_check_mode 1; then
|
||||
elif vt_check_mode 1 "$vt_chosen_name"; then
|
||||
set ventoy_compatible=YES
|
||||
else
|
||||
vt_check_compatible (loop)
|
||||
@@ -1041,13 +1046,13 @@ function legacy_windows_menu_func {
|
||||
fi
|
||||
|
||||
ventoy_debug_pause
|
||||
locate_wim
|
||||
locate_wim "${chosen_path}"
|
||||
fi
|
||||
|
||||
vt_windows_chain_data "${1}${chosen_path}"
|
||||
ventoy_debug_pause
|
||||
|
||||
if vt_check_mode 4; then
|
||||
if vt_check_mode 4 "$vt_chosen_name"; then
|
||||
vtoy_windows_wimboot_func
|
||||
fi
|
||||
|
||||
@@ -1130,7 +1135,7 @@ function legacy_linux_menu_func {
|
||||
ventoy_debug_pause
|
||||
|
||||
if [ -n "$vtoy_chain_mem_addr" ]; then
|
||||
if vt_check_mode 3; then
|
||||
if vt_check_mode 3 "$vt_chosen_name"; then
|
||||
ventoy_acpi_param ${vtoy_chain_mem_addr} 2048
|
||||
ventoy_cli_console
|
||||
|
||||
@@ -1209,7 +1214,7 @@ function legacy_iso_menu_func {
|
||||
if [ -n "$vtcompat" ]; then
|
||||
set ventoy_compatible=YES
|
||||
unset vtcompat
|
||||
elif vt_check_mode 1; then
|
||||
elif vt_check_mode 1 "$vt_chosen_name"; then
|
||||
set ventoy_compatible=YES
|
||||
else
|
||||
vt_check_compatible (loop)
|
||||
@@ -1340,7 +1345,7 @@ function iso_common_menuentry {
|
||||
# auto memdisk mode for some special ISO files
|
||||
vt_iso_vd_id_parse "${vtoy_iso_part}${vt_chosen_path}"
|
||||
unset vtMemDiskBoot
|
||||
if vt_check_mode 0; then
|
||||
if vt_check_mode 0 "$vt_chosen_name"; then
|
||||
set vtMemDiskBoot=1
|
||||
else
|
||||
if [ "$grub_platform" = "pc" ]; then
|
||||
@@ -1377,7 +1382,7 @@ function iso_common_menuentry {
|
||||
}
|
||||
|
||||
function miso_common_menuentry {
|
||||
vt_chosen_img_path vt_chosen_path vt_chosen_size
|
||||
vt_chosen_img_path vt_chosen_path vt_chosen_size vt_chosen_name
|
||||
|
||||
if vt_check_password "${vt_chosen_path}"; then
|
||||
return
|
||||
@@ -1411,7 +1416,7 @@ function iso_unsupport_menuentry {
|
||||
}
|
||||
|
||||
function wim_common_menuentry {
|
||||
vt_chosen_img_path vt_chosen_path vt_chosen_size
|
||||
vt_chosen_img_path vt_chosen_path vt_chosen_size vt_chosen_name
|
||||
|
||||
if vt_check_password "${vt_chosen_path}"; then
|
||||
return
|
||||
@@ -1450,7 +1455,7 @@ function wim_unsupport_menuentry {
|
||||
}
|
||||
|
||||
function efi_common_menuentry {
|
||||
vt_chosen_img_path vt_chosen_path vt_chosen_size
|
||||
vt_chosen_img_path vt_chosen_path vt_chosen_size vt_chosen_name
|
||||
|
||||
if vt_check_password "${vt_chosen_path}"; then
|
||||
return
|
||||
@@ -1520,7 +1525,7 @@ function vhdboot_common_func {
|
||||
}
|
||||
|
||||
function vhd_common_menuentry {
|
||||
vt_chosen_img_path vt_chosen_path vt_chosen_size
|
||||
vt_chosen_img_path vt_chosen_path vt_chosen_size vt_chosen_name
|
||||
|
||||
if vt_check_password "${vt_chosen_path}"; then
|
||||
return
|
||||
@@ -1617,7 +1622,7 @@ function vtoyboot_common_func {
|
||||
}
|
||||
|
||||
function vtoy_common_menuentry {
|
||||
vt_chosen_img_path vt_chosen_path vt_chosen_size
|
||||
vt_chosen_img_path vt_chosen_path vt_chosen_size vt_chosen_name
|
||||
|
||||
if vt_check_password "${vt_chosen_path}"; then
|
||||
return
|
||||
@@ -2027,7 +2032,7 @@ function img_common_menuentry {
|
||||
set ventoy_busybox_ver=32
|
||||
unset LoadIsoEfiDriver
|
||||
|
||||
vt_chosen_img_path vt_chosen_path vt_chosen_size
|
||||
vt_chosen_img_path vt_chosen_path vt_chosen_size vt_chosen_name
|
||||
|
||||
if vt_check_password "${vt_chosen_path}"; then
|
||||
return
|
||||
@@ -2038,7 +2043,7 @@ function img_common_menuentry {
|
||||
fi
|
||||
|
||||
if [ "$grub_platform" = "pc" ]; then
|
||||
if vt_check_mode 0; then
|
||||
if vt_check_mode 0 "$vt_chosen_name"; then
|
||||
legacy_img_memdisk $vtoy_iso_part "$vt_chosen_path"
|
||||
return
|
||||
fi
|
||||
@@ -2142,7 +2147,7 @@ function img_unsupport_menuentry {
|
||||
#############################################################
|
||||
#############################################################
|
||||
|
||||
set VENTOY_VERSION="1.0.75"
|
||||
set VENTOY_VERSION="1.0.79"
|
||||
|
||||
#ACPI not compatible with Window7/8, so disable by default
|
||||
set VTOY_PARAM_NO_ACPI=1
|
||||
|
@@ -201,7 +201,7 @@ cbmemc: cbtable normal terminfo
|
||||
hfsplus: fshelp
|
||||
gcry_cast5: crypto
|
||||
extcmd:
|
||||
squash4: fshelp lzopio xzio gzio
|
||||
squash4: fshelp lzopio zfs xzio gzio
|
||||
part_plan:
|
||||
minix_be:
|
||||
gcry_whirlpool: crypto
|
||||
|
Binary file not shown.
Binary file not shown.
@@ -208,7 +208,7 @@ cmosdump:
|
||||
hfsplus: fshelp
|
||||
gcry_cast5: crypto
|
||||
extcmd:
|
||||
squash4: fshelp lzopio xzio gzio
|
||||
squash4: fshelp lzopio zfs xzio gzio
|
||||
part_plan:
|
||||
minix_be:
|
||||
gcry_whirlpool: crypto
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -202,7 +202,7 @@ cbmemc: cbtable normal terminfo
|
||||
hfsplus: fshelp
|
||||
gcry_cast5: crypto
|
||||
extcmd:
|
||||
squash4: fshelp lzopio xzio gzio
|
||||
squash4: fshelp lzopio zfs xzio gzio
|
||||
part_plan:
|
||||
minix_be:
|
||||
gcry_whirlpool: crypto
|
||||
|
Binary file not shown.
Binary file not shown.
@@ -13,7 +13,7 @@ print_usage() {
|
||||
echo ''
|
||||
echo ' OPTION: (optional)'
|
||||
echo ' -r SIZE_MB preserve some space at the bottom of the disk (only for install)'
|
||||
echo ' -s/-S enable/disable secure boot support (default is disabled)'
|
||||
echo ' -s/-S enable/disable secure boot support (default is enabled)'
|
||||
echo ' -g use GPT partition style, default is MBR (only for install)'
|
||||
echo ' -L Label of the 1st exfat partition (default is Ventoy)'
|
||||
echo ' -n try non-destructive installation (only for install)'
|
||||
@@ -21,6 +21,7 @@ print_usage() {
|
||||
}
|
||||
|
||||
|
||||
SECUREBOOT="YES"
|
||||
VTNEW_LABEL='Ventoy'
|
||||
RESERVE_SIZE_MB=0
|
||||
while [ -n "$1" ]; do
|
||||
|
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.
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.
@@ -1443,8 +1443,15 @@ unsigned int ventoy_int13_hook (ventoy_chain_head *chain)
|
||||
|
||||
if (chain->os_param.vtoy_reserved[6])
|
||||
{
|
||||
g_drive_map1 = 0x80;
|
||||
g_drive_map2 = 0x81;
|
||||
if (g_hddmode)
|
||||
{
|
||||
/* drive map no need for linux vtoy/img boot */
|
||||
}
|
||||
else
|
||||
{
|
||||
g_drive_map1 = 0x80;
|
||||
g_drive_map2 = 0x81;
|
||||
}
|
||||
}
|
||||
else if (chain->disk_drive >= 0x80 && chain->drive_map >= 0x80)
|
||||
{
|
||||
|
@@ -16,9 +16,9 @@
|
||||
"STR_STATUS":"الحالة - جاهز",
|
||||
"STR_INSTALL":"تثبيت",
|
||||
"STR_UPDATE":"تحديث",
|
||||
"STR_UPDATE_TIP":"عملية التحديث آمنة, لن يتم عمل تغييرات على ملفات الـISO.#@استمرار؟",
|
||||
"STR_INSTALL_TIP":"سوف يتم تهيئة القرص وسيتم حذف جميع البيانات.#@المواصلة؟",
|
||||
"STR_INSTALL_TIP2":"سوف يتم تهيئة القرص وسيتم حذف جميع البيانات.#@المواصلة؟ (التحقق مرة أخرى)",
|
||||
"STR_UPDATE_TIP":"عملية التحديث آمنة, لن يتم عمل تغييرات على ملفات الـISO.#@المتابعة؟",
|
||||
"STR_INSTALL_TIP":"سوف يتم تهيئة القرص وسيتم حذف جميع البيانات.#@المتابعة؟",
|
||||
"STR_INSTALL_TIP2":"سوف يتم تهيئة القرص وسيتم حذف جميع البيانات.#@المتابعة؟ (التحقق مرة أخرى)",
|
||||
"STR_INSTALL_SUCCESS":"مبروك!#@تم تثبيت Ventoy بنجاح على الجهاز.",
|
||||
"STR_INSTALL_FAILED":"حدث خطأ أثناء التثبيت. يمكنك إعادة توصيل الـUSB والمحاولة مرة أخرى. تفقّد log.txt للتفاصيل.",
|
||||
"STR_UPDATE_SUCCESS":"مبروك!#@تم تحديث Ventoy بنجاح على الجهاز.",
|
||||
@@ -44,17 +44,17 @@
|
||||
"STR_WEB_SERVICE_UNAVAILABLE":"خطأ في الاتصال: الخدمة غير متوفرة",
|
||||
"STR_WEB_TOKEN_MISMATCH":"تم تحديث حالة البرنامج الخفي ، يرجى إعادة المحاولة لاحقًا.",
|
||||
"STR_WEB_SERVICE_BUSY":"الخدمة مشغولة ، يرجى إعادة المحاولة لاحقًا.",
|
||||
"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_MENU_VTSI_CREATE":"إنشاء ملف VTSI",
|
||||
"STR_VTSI_CREATE_TIP":"هذه المرة لن يتم الكتابة على الجهاز، ولكن سيتم إنشاء ملف VTSI#@المتابعة؟",
|
||||
"STR_VTSI_CREATE_SUCCESS":"تم إنشاء ملف VTSI بنجاح!#@يمكنك استخدام Rufus(3.15+) للكتابة على الجهاز لاستكمال تثبيت Ventoy.",
|
||||
"STR_VTSI_CREATE_FAILED":"فشل إنشاء ملف VTSI.",
|
||||
"STR_MENU_PART_RESIZE":"تثبيت بدون تهيئة",
|
||||
"STR_PART_RESIZE_TIP":"سيحاول Ventoy أن يقوم بالتثبيت بدون عمل تهيئة إن أمكن. #@المتابعة؟",
|
||||
"STR_PART_RESIZE_SUCCESS":"تهانينا!#@اكتملت عملية تثبيت Ventoy بدون تهيئة بنجاح.",
|
||||
"STR_PART_RESIZE_FAILED":"فشلت عملية التثبيت بدون تهيئة، تفقد ملف log.txt للتفاصيل.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"توقفت عملية تثبيت Ventoy بدون تهيئة لعدم استيفاء بعض الشروط. تفقد ملف log.txt للتفاصيل.",
|
||||
"STR_INSTALL_YES_TIP1":"تحذير: سيتم فقدان البيانات!",
|
||||
"STR_INSTALL_YES_TIP2":"يرجى إدخال YES في مربع النص في الأسفل للتأكيد بأنك تريد عمل تثبيت جديد بدلاً من التحديث.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -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":""
|
||||
},
|
||||
@@ -579,13 +636,13 @@
|
||||
"STR_VTSI_CREATE_TIP":"Es wird nur eine VTSI-Datei erstellt und nichts auf ein Gerät geschrieben.#@Fortfahren?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"VTSI-Datei erfolgreich erstellt!#@Sie können Rufus(3.15+) zum auf das Gerät schreiben verwenden um die Installation von Ventoy fertigzustellen.",
|
||||
"STR_VTSI_CREATE_FAILED":"VTSI-Datei konnte nicht erstellt werden.",
|
||||
"STR_MENU_PART_RESIZE":"Non-destructive Install",
|
||||
"STR_MENU_PART_RESIZE":"zerstörungsfreie Installation",
|
||||
"STR_PART_RESIZE_TIP":"Ventoy wird eine Installation ohne vorherige Formatierung versuchen. #@Fortfahren?",
|
||||
"STR_PART_RESIZE_SUCCESS":"Glückwunsch!#@Die Installation von Ventoy, ohne vorherige Formatierung, wurde erfolgreich abgeschlossen.",
|
||||
"STR_PART_RESIZE_FAILED":"Installation ohne vorherige Formatierung fehlgeschlagen. Für Details die log.txt prüfen.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Installation ohne vorherige Formatierung wurde auf Grund einiger nicht erfüllbarer Bedingungen gestoppt. Für Details die log.txt prüfen.",
|
||||
"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":"Warnung: Die Daten gehen verloren!",
|
||||
"STR_INSTALL_YES_TIP2":"Bitte bestätigen Sie in der unteren Textbox mit YES, dass Sie anstelle eines Upgrades eine frische Installation durchführen möchten.",
|
||||
|
||||
"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",
|
||||
@@ -756,13 +813,13 @@
|
||||
"STR_VTSI_CREATE_TIP":"Tentokrát se do zařízení nebude zapisovat, jenom se vygeneruje VTSI soubor#@Pokračovat?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"VTSI soubor úspěšne vytvořen!#@Múžete použit Rufus(3.15+) na jeho zapsání do zařízení pro dokončení instalace Ventoy.",
|
||||
"STR_VTSI_CREATE_FAILED":"Chyba při vytváření VTSI souboru.",
|
||||
"STR_MENU_PART_RESIZE":"Nedestruktivní Instalace",
|
||||
"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":""
|
||||
},
|
||||
@@ -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":""
|
||||
},
|
||||
@@ -2359,61 +2416,61 @@
|
||||
},
|
||||
{
|
||||
"name":"Bulgarian (Български)",
|
||||
"FontFamily":"Courier New",
|
||||
"FontFamily":"Segoe",
|
||||
"FontSize":16,
|
||||
"Author":"jekovcar",
|
||||
|
||||
|
||||
"STR_ERROR":"Грешка",
|
||||
"STR_WARNING":"Предупреждение",
|
||||
"STR_INFO":"Информация",
|
||||
"STR_INCORRECT_DIR":"Моля, стартирайте в друга директория!",
|
||||
"STR_INCORRECT_TREE_DIR":"Не ме стартирайте оттук, моля, изтеглете инсталационен пакет и го стартирайте в друго място.",
|
||||
"STR_INCORRECT_DIR":"Стартирайте от правилната папка!",
|
||||
"STR_INCORRECT_TREE_DIR":"Не стартирайте оттук, изтеглете инсталационен пакет и стартирайте него.",
|
||||
"STR_DEVICE":"Устройство",
|
||||
"STR_LOCAL_VER":"Ventoy в пакета",
|
||||
"STR_DISK_VER":"Ventoy на устройството",
|
||||
"STR_STATUS":"Статус - ГОТОВ",
|
||||
"STR_INSTALL":"Инсталирай",
|
||||
"STR_UPDATE":"Обнови",
|
||||
"STR_UPDATE_TIP":"Обновяването е безопасно, ISO-файловете няма да се променят.#@Продължаваме?",
|
||||
"STR_INSTALL_TIP":"Диска ще се форматира и всички данни изтрият.#@Продължаваме?",
|
||||
"STR_INSTALL_TIP2":"Диска ще се форматира и всички данни изтрият..#@ДЕЙСТВИТЕЛНО ще продължите?",
|
||||
"STR_INSTALL_SUCCESS":"Поздрави!#@Ventoy бе успешно инсталиран на устройството.",
|
||||
"STR_INSTALL_FAILED":"По време на инсталирането на Ventoy възникна грешка. Подсъединете устройството и опитайте отново. Проверете log.txt за грешки.",
|
||||
"STR_UPDATE_SUCCESS":"Поздрави!#@Ventoy бе успешно обновен на устройството.",
|
||||
"STR_UPDATE_FAILED":"По време на обновяването на Ventoy възникна грешка. Подсъединете устройството и опитайте отново. Проверете log.txt за грешки.",
|
||||
"STR_WAIT_PROCESS":"Процеса е стартиран, моля изчакайте...",
|
||||
"STR_MENU_OPTION":"Опции",
|
||||
"STR_STATUS":"Състояние - В готовност",
|
||||
"STR_INSTALL":"Инсталиране",
|
||||
"STR_UPDATE":"Обновяване",
|
||||
"STR_UPDATE_TIP":"Обновяването е безопасно, файловете на ISO няма да бъдат променени.#@Продължаване?",
|
||||
"STR_INSTALL_TIP":"Устройството ще бъде форматирано, а всички данни - премахнати.#@Продължаване?",
|
||||
"STR_INSTALL_TIP2":"Устройството ще бъде форматирано, а всички данни - премахнати.#@Продължаване? (повторно потвърждаване)",
|
||||
"STR_INSTALL_SUCCESS":"Поздравления!#@Ventoy е успешно инсталиран на устройството.",
|
||||
"STR_INSTALL_FAILED":"По време на инсталацията е възникнала грешка. Можете да поставите отново USB устройството и да опитате отново. Проверете log.txt за подробности. Ако инсталацията винаги е неуспешна, направете справка с често задаваните въпроси на официалната страница.",
|
||||
"STR_UPDATE_SUCCESS":"Поздравление!#@Ventoy е успешно обновен на устройството.",
|
||||
"STR_UPDATE_FAILED":"По време на обновяването е възникнала грешка. Можете да поставите отново USB устройството и да опитате отново. Проверете log.txt за подробности. Ако обновяването винаги е неуспешно, направете справка с често задаваните въпроси на официалната страница.",
|
||||
"STR_WAIT_PROCESS":"Работи, моля изчакайте…",
|
||||
"STR_MENU_OPTION":"Настройки",
|
||||
"STR_MENU_SECURE_BOOT":"Поддръжка на Secure Boot",
|
||||
"STR_MENU_PART_CFG":"Допълнителен дял",
|
||||
"STR_BTN_OK":"ОК",
|
||||
"STR_BTN_OK":"Добре",
|
||||
"STR_BTN_CANCEL":"Отказ",
|
||||
"STR_PRESERVE_SPACE":"Създай Допълнителен дял в края на диска",
|
||||
"STR_SPACE_VAL_INVALID":"Неправилен размер на дяла",
|
||||
"STR_MENU_CLEAR":"Изтрий Ventoy",
|
||||
"STR_CLEAR_SUCCESS":"Ventoy бе успешно изтрит от устройството.",
|
||||
"STR_CLEAR_FAILED":"По време на изтриването на Ventoy възникна грешка. Подсъединете устройството и опитайте отново. Проверете log.txt за грешки.",
|
||||
"STR_MENU_PART_STYLE":"Стил на оразмеряване на дяловете",
|
||||
"STR_DISK_2TB_MBR_ERROR":"Моля, изберете GPT за дискове по-големи от 2ТБ",
|
||||
"STR_SHOW_ALL_DEV":"Покажи всички устройства",
|
||||
"STR_PART_ALIGN_4KB":"Подравни дяловете с размер 4КБ",
|
||||
"STR_PRESERVE_SPACE":"Създаване на допълнителен дял в края на диска",
|
||||
"STR_SPACE_VAL_INVALID":"Невярна стойност за запазено пространство",
|
||||
"STR_MENU_CLEAR":"Премахване на Ventoy",
|
||||
"STR_CLEAR_SUCCESS":"Ventoy е успешно премахнат от устройството.",
|
||||
"STR_CLEAR_FAILED":"По време на премахването е възникнала грешка. Можете да поставите отново USB устройството и да опитате отново. Проверете log.txt за подробности.",
|
||||
"STR_MENU_PART_STYLE":"Вид на дяловете",
|
||||
"STR_DISK_2TB_MBR_ERROR":"Изберете GPT за устройства по-големи от 2ТБ",
|
||||
"STR_SHOW_ALL_DEV":"Показване на всички устройства",
|
||||
"STR_PART_ALIGN_4KB":"Подравняване на дяловете по 4КБ",
|
||||
"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":"Generate VTSI File",
|
||||
"STR_VTSI_CREATE_TIP":"Сега няма да се записва на диска, само ще се генерира VTSI файл#@Продължаваме?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"VTSI файла бе създаден успешно!#@Може да използвате Rufus(3.15+) да го запишете на устройството за инсталацията с Ventoy.",
|
||||
"STR_VTSI_CREATE_FAILED":"VTSI файла създаване се провали.",
|
||||
"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_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 е създаден успешно!#@Може да използвате Rufus(3.15+), за да го запишете на устройството и така да завършите инсталацията на Ventoy.",
|
||||
"STR_VTSI_CREATE_FAILED":"Грешка при създаване на файла на VTSI.",
|
||||
"STR_MENU_PART_RESIZE":"Неразрушително инсталиране",
|
||||
"STR_PART_RESIZE_TIP":"Ventoy ще направи опит за неразрушително инсталиране, ако е възможно.#@Продължаване?",
|
||||
"STR_PART_RESIZE_SUCCESS":"Поздравления!#@Неразрушителното инсталиране на Ventoy е успешно.",
|
||||
"STR_PART_RESIZE_FAILED":"Неразрушителното инсталиране на Ventoy е неуспешно. Проверете log.txt за подробности.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Неразрушителното инсталиране на Ventoy е спряна, защото някои от условията не могат да бъдат изпълнени. Проверете log.txt за подробности.",
|
||||
"STR_INSTALL_YES_TIP1":"Внимание: Ще има загуба на данни!",
|
||||
"STR_INSTALL_YES_TIP2":"Въведете „YES“ в полето отдолу, за да потвърдите, че искате да извършите нова инсталация вместо обновяване.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
|
@@ -262,7 +262,7 @@ void on_devlist_changed(GtkWidget *widget, gpointer data)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (g_secure_boot_support)
|
||||
if (!g_secure_boot_support)
|
||||
{
|
||||
gtk_check_menu_item_set_active(g_menu_item_secure_boot, 1 - g_secure_boot_support);
|
||||
}
|
||||
@@ -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;
|
||||
@@ -1111,6 +1111,8 @@ void on_init_window(GtkBuilder *pBuilder)
|
||||
add_accelerator(agMain, g_update_button, "clicked", GDK_KEY_u);
|
||||
add_accelerator(agMain, g_refresh_button, "clicked", GDK_KEY_r);
|
||||
|
||||
gtk_check_menu_item_set_active(g_menu_item_secure_boot, 1 - g_secure_boot_support);
|
||||
|
||||
fill_dev_list(NULL);
|
||||
|
||||
return;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user