mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-09-16 09:01:15 +00:00
Compare commits
51 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
025425f260 | ||
|
b4120c4079 | ||
|
7f2f845a68 | ||
|
2cd22da8fb | ||
|
7b70a5278a | ||
|
f8b1f98304 | ||
|
ddf0617d83 | ||
|
9b14b418b4 | ||
|
fe137522ad | ||
|
121d927367 | ||
|
75f3e4c5ee | ||
|
fcf10deff3 | ||
|
4d4f958429 | ||
|
e667233994 | ||
|
57944520e5 | ||
|
4544e221d3 | ||
|
3263b64b8a | ||
|
69da3a59d8 | ||
|
75c6c7257f | ||
|
d4d8736620 | ||
|
63f9331c31 | ||
|
e1d161af4f | ||
|
9baa95359c | ||
|
5f3d7f3823 | ||
|
3d1dc81fda | ||
|
3ebc610e7d | ||
|
60588c8442 | ||
|
c4c05fc073 | ||
|
0984f5ba58 | ||
|
fd0d335eb6 | ||
|
12a284b543 | ||
|
9e2e4ec0a9 | ||
|
480afee1a7 | ||
|
1305945bc0 | ||
|
2feb148982 | ||
|
5eec535391 | ||
|
33a562c273 | ||
|
75517039a1 | ||
|
620229508b | ||
|
5553dd4fc4 | ||
|
89addae48f | ||
|
682e8cdc42 | ||
|
1882cfcce2 | ||
|
b8be46f0dc | ||
|
07693bf840 | ||
|
b4a059dd68 | ||
|
858eec99a1 | ||
|
8180382fe1 | ||
|
a5d9b1fd43 | ||
|
8b76e06f6d | ||
|
ecb133ed5e |
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
@@ -2,11 +2,11 @@
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: Ventoy
|
||||
open_collective: ventoy
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: ['https://www.paypal.me/ventoy', 'https://www.ventoy.net/en/donation.html'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
|
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.72
|
||||
placeholder: 1.0.75
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
|
@@ -577,7 +577,8 @@ STATIC EFI_STATUS EFIAPI ventoy_find_iso_disk(IN EFI_HANDLE ImageHandle)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (CompareMem(g_chain->os_param.vtoy_disk_guid, pBuffer + 0x180, 16) == 0)
|
||||
if (CompareMem(g_chain->os_param.vtoy_disk_guid, pBuffer + 0x180, 16) == 0 &&
|
||||
CompareMem(g_chain->os_param.vtoy_disk_signature, pBuffer + 0x1b8, 4) == 0)
|
||||
{
|
||||
pMBR = (MBR_HEAD *)pBuffer;
|
||||
if (g_os_param_reserved[6] == 0 && pMBR->PartTbl[0].FsFlag != 0xEE)
|
||||
@@ -599,7 +600,7 @@ STATIC EFI_STATUS EFIAPI ventoy_find_iso_disk(IN EFI_HANDLE ImageHandle)
|
||||
Handles[i],
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL);
|
||||
|
||||
debug("Find Ventoy Disk Handle:%p DP:%s", Handles[i],
|
||||
debug("Find Ventoy Disk Sig Handle:%p DP:%s", Handles[i],
|
||||
ConvertDevicePathToText(gBlockData.pDiskDevPath, FALSE, FALSE));
|
||||
break;
|
||||
}
|
||||
|
@@ -98,7 +98,9 @@ typedef struct ventoy_os_param
|
||||
|
||||
UINT64 vtoy_reserved[4]; // Internal use by ventoy
|
||||
|
||||
UINT8 reserved[31];
|
||||
UINT8 vtoy_disk_signature[4];
|
||||
|
||||
UINT8 reserved[27];
|
||||
}ventoy_os_param;
|
||||
|
||||
#pragma pack()
|
||||
|
@@ -155,7 +155,8 @@ STATIC EFI_STATUS EFIAPI ventoy_read_iso_sector
|
||||
ventoy_override_chunk *pOverride = g_override_chunk;
|
||||
EFI_BLOCK_IO_PROTOCOL *pRawBlockIo = gBlockData.pRawBlockIo;
|
||||
|
||||
debug("read iso sector %lu count %u Buffer:%p Align:%u", Sector, Count, Buffer, pRawBlockIo->Media->IoAlign);
|
||||
debug("read iso sector %lu count %u Buffer:%p Align:%u blk:%u",
|
||||
Sector, Count, Buffer, pRawBlockIo->Media->IoAlign, pRawBlockIo->Media->BlockSize);
|
||||
|
||||
ReadStart = Sector * 2048;
|
||||
ReadEnd = (Sector + Count) * 2048;
|
||||
@@ -1444,7 +1445,7 @@ STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_open
|
||||
AsciiSPrint(TmpName, sizeof(TmpName), "%s", Name);
|
||||
for (j = 0; j < 4; j++)
|
||||
{
|
||||
if (0 == AsciiStrCmp(g_file_replace_list[i].old_file_name[j], TmpName))
|
||||
if (0 == AsciiStriCmp(g_file_replace_list[i].old_file_name[j], TmpName))
|
||||
{
|
||||
g_original_fclose(*New);
|
||||
*New = &g_efi_file_replace.WrapperHandle;
|
||||
|
@@ -49,6 +49,12 @@ static grub_efi_uintn_t finish_desc_size;
|
||||
static grub_efi_uint32_t finish_desc_version;
|
||||
int grub_efi_is_finished = 0;
|
||||
|
||||
/* 160MB 160 * 1024 * 1024 / 4096 */
|
||||
#define VTOY_CHAIN_MIN_PAGES (160 * 256)
|
||||
static grub_efi_uint64_t g_total_pages;
|
||||
static grub_efi_uint64_t g_org_required_pages;
|
||||
static grub_efi_uint64_t g_new_required_pages;
|
||||
|
||||
/*
|
||||
* We need to roll back EFI allocations on exit. Remember allocations that
|
||||
* we'll free on exit.
|
||||
@@ -614,6 +620,22 @@ grub_efi_mm_init (void)
|
||||
else if (required_pages > BYTES_TO_PAGES (MAX_HEAP_SIZE))
|
||||
required_pages = BYTES_TO_PAGES (MAX_HEAP_SIZE);
|
||||
|
||||
g_org_required_pages = required_pages;
|
||||
if (((total_pages - required_pages) >> 2) < VTOY_CHAIN_MIN_PAGES)
|
||||
{
|
||||
if (total_pages > (VTOY_CHAIN_MIN_PAGES << 2))
|
||||
{
|
||||
g_new_required_pages = total_pages - (VTOY_CHAIN_MIN_PAGES << 2);
|
||||
if (g_new_required_pages >= 8192)
|
||||
{
|
||||
required_pages = g_new_required_pages;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
g_total_pages = total_pages;
|
||||
g_new_required_pages = required_pages;
|
||||
|
||||
/* Sort the filtered descriptors, so that GRUB can allocate pages
|
||||
from smaller regions. */
|
||||
sort_memory_map (filtered_memory_map, desc_size, filtered_memory_map_end);
|
||||
@@ -670,3 +692,11 @@ grub_efi_get_ram_base(grub_addr_t *base_addr)
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
#endif
|
||||
|
||||
void grub_efi_get_reserved_page_num(grub_uint64_t *total, grub_uint64_t *org_required, grub_uint64_t *new_required)
|
||||
{
|
||||
*total = g_total_pages;
|
||||
*org_required = g_org_required_pages;
|
||||
*new_required = g_new_required_pages;
|
||||
}
|
||||
|
||||
|
@@ -520,13 +520,13 @@ grub_err_t ventoy_cmd_browser_dir(grub_extcmd_context_t ctxt, int argc, char **a
|
||||
|
||||
if (g_tree_view_menu_style == 0)
|
||||
{
|
||||
browser_ssprintf(&mbuf, "menuentry \"%-10s [../]\" --class=\"vtoyret\" VTOY_RET {\n "
|
||||
" echo 'return ...' \n}\n", "<--");
|
||||
browser_ssprintf(&mbuf, "menuentry \"%-10s [(%s)%s/..]\" --class=\"vtoyret\" VTOY_RET {\n "
|
||||
" echo 'return ...' \n}\n", "<--", args[0], g_menu_path_buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
browser_ssprintf(&mbuf, "menuentry \"[../]\" --class=\"vtoyret\" VTOY_RET {\n "
|
||||
" echo 'return ...' \n}\n");
|
||||
browser_ssprintf(&mbuf, "menuentry \"[(%s)%s/..]\" --class=\"vtoyret\" VTOY_RET {\n "
|
||||
" echo 'return ...' \n}\n", args[0], g_menu_path_buf);
|
||||
}
|
||||
|
||||
for (i = 1; i >= 0; i--)
|
||||
|
@@ -113,6 +113,7 @@ 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_ventoy_disk_bios_id = 0;
|
||||
ventoy_gpt_info *g_ventoy_part_info = NULL;
|
||||
grub_uint64_t g_ventoy_disk_size = 0;
|
||||
grub_uint64_t g_ventoy_disk_part_size[2];
|
||||
@@ -2295,8 +2296,8 @@ static int ventoy_dynamic_tree_menu(img_iterator_node *node)
|
||||
{
|
||||
vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos,
|
||||
"menuentry \"[Return to ListView]\" --class=\"vtoyret\" VTOY_RET {\n "
|
||||
" echo '%s ...' \n"
|
||||
"}\n", "return");
|
||||
" echo 'return ...' \n"
|
||||
"}\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2350,16 +2351,16 @@ static int ventoy_dynamic_tree_menu(img_iterator_node *node)
|
||||
if (g_tree_view_menu_style == 0)
|
||||
{
|
||||
vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos,
|
||||
"menuentry \"%-10s [../]\" --class=\"vtoyret\" VTOY_RET {\n "
|
||||
"menuentry \"%-10s [%s/..]\" --class=\"vtoyret\" VTOY_RET {\n "
|
||||
" echo 'return ...' \n"
|
||||
"}\n", "<--");
|
||||
"}\n", "<--", node->dir);
|
||||
}
|
||||
else
|
||||
{
|
||||
vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos,
|
||||
"menuentry \"[../]\" --class=\"vtoyret\" VTOY_RET {\n "
|
||||
" echo '%s ...' \n"
|
||||
"}\n", "return");
|
||||
"menuentry \"[%s/..]\" --class=\"vtoyret\" VTOY_RET {\n "
|
||||
" echo 'return ...' \n"
|
||||
"}\n", node->dir);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2397,7 +2398,7 @@ static int ventoy_dynamic_tree_menu(img_iterator_node *node)
|
||||
|
||||
if (node != &g_img_iterator_head)
|
||||
{
|
||||
vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos, "%s", "}\n");
|
||||
vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos, "}\n");
|
||||
}
|
||||
|
||||
node->done = 1;
|
||||
@@ -2611,24 +2612,38 @@ static grub_err_t ventoy_cmd_chosen_img_path(grub_extcmd_context_t ctxt, int arg
|
||||
{
|
||||
char value[32];
|
||||
char *pos = NULL;
|
||||
char *last = NULL;
|
||||
const char *id = NULL;
|
||||
img_info *cur = NULL;
|
||||
|
||||
(void)ctxt;
|
||||
|
||||
if (argc < 1 || argc > 2)
|
||||
if (argc < 1 || argc > 3)
|
||||
{
|
||||
return grub_error(GRUB_ERR_BAD_ARGUMENT, "Usage: %s {var}", cmd_raw_name);
|
||||
}
|
||||
|
||||
if (g_fake_vlnk_src[0] && g_fake_vlnk_dst[0])
|
||||
{
|
||||
grub_env_set(args[0], grub_strchr(g_fake_vlnk_src, '/'));
|
||||
pos = grub_strchr(g_fake_vlnk_src, '/');
|
||||
grub_env_set(args[0], pos);
|
||||
if (argc > 1)
|
||||
{
|
||||
grub_snprintf(value, sizeof(value), "%llu", (ulonglong)(g_fake_vlnk_size));
|
||||
grub_env_set(args[1], value);
|
||||
}
|
||||
|
||||
if (argc > 2)
|
||||
{
|
||||
for (last = pos; *pos; pos++)
|
||||
{
|
||||
if (*pos == '/')
|
||||
{
|
||||
last = pos;
|
||||
}
|
||||
}
|
||||
grub_env_set(args[2], last + 1);
|
||||
}
|
||||
|
||||
goto end;
|
||||
}
|
||||
@@ -2657,6 +2672,12 @@ static grub_err_t ventoy_cmd_chosen_img_path(grub_extcmd_context_t ctxt, int arg
|
||||
grub_snprintf(value, sizeof(value), "%llu", (ulonglong)(cur->size));
|
||||
grub_env_set(args[1], value);
|
||||
}
|
||||
|
||||
if (argc > 2)
|
||||
{
|
||||
grub_snprintf(value, sizeof(value), "%llu", (ulonglong)(cur->size));
|
||||
grub_env_set(args[2], cur->name);
|
||||
}
|
||||
|
||||
end:
|
||||
g_svd_replace_offset = 0;
|
||||
@@ -4526,6 +4547,8 @@ int ventoy_load_part_table(const char *diskname)
|
||||
|
||||
g_ventoy_disk_size = disk->total_sectors * (1U << disk->log_sector_size);
|
||||
|
||||
g_ventoy_disk_bios_id = disk->id;
|
||||
|
||||
grub_disk_read(disk, 0, 0, sizeof(ventoy_gpt_info), g_ventoy_part_info);
|
||||
grub_disk_close(disk);
|
||||
|
||||
@@ -5565,6 +5588,33 @@ static grub_err_t ventoy_cmd_fn_mutex_lock(grub_extcmd_context_t ctxt, int argc,
|
||||
VENTOY_CMD_RETURN(GRUB_ERR_NONE);
|
||||
}
|
||||
|
||||
static grub_err_t ventoy_cmd_dump_rsv_page(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
grub_uint64_t total;
|
||||
grub_uint64_t org_required;
|
||||
grub_uint64_t new_required;
|
||||
|
||||
(void)ctxt;
|
||||
(void)argc;
|
||||
(void)args;
|
||||
|
||||
#ifdef GRUB_MACHINE_EFI
|
||||
grub_efi_get_reserved_page_num(&total, &org_required, &new_required);
|
||||
grub_printf("Total pages: %llu\n", (unsigned long long)total);
|
||||
grub_printf("OrgReq pages: %llu\n", (unsigned long long)org_required);
|
||||
grub_printf("NewReq pages: %llu\n", (unsigned long long)new_required);
|
||||
#else
|
||||
(void)total;
|
||||
(void)org_required;
|
||||
(void)new_required;
|
||||
grub_printf("Non EFI mode!\n");
|
||||
#endif
|
||||
|
||||
grub_refresh();
|
||||
|
||||
VENTOY_CMD_RETURN(GRUB_ERR_NONE);
|
||||
}
|
||||
|
||||
int ventoy_env_init(void)
|
||||
{
|
||||
char buf[64];
|
||||
@@ -5766,6 +5816,7 @@ static cmd_para ventoy_cmds[] =
|
||||
{ "vt_iso_vd_id_clear", ventoy_iso_vd_id_clear, 0, NULL, "", "", NULL },
|
||||
{ "vt_iso_vd_id_begin", ventoy_cmd_iso_vd_id_begin, 0, NULL, "", "", NULL },
|
||||
{ "vt_fn_mutex_lock", ventoy_cmd_fn_mutex_lock, 0, NULL, "", "", NULL },
|
||||
{ "vt_efi_dump_rsv_page", ventoy_cmd_dump_rsv_page, 0, NULL, "", "", NULL },
|
||||
};
|
||||
|
||||
int ventoy_register_all_cmd(void)
|
||||
|
@@ -313,8 +313,8 @@ extern int g_ventoy_debug;
|
||||
void ventoy_debug(const char *fmt, ...);
|
||||
#define debug(fmt, args...) if (g_ventoy_debug) ventoy_debug("[VTOY]: "fmt, ##args)
|
||||
|
||||
#define vtoy_ssprintf(buf, pos, fmt, ...) \
|
||||
pos += grub_snprintf(buf + pos, VTOY_MAX_SCRIPT_BUF - pos, fmt, __VA_ARGS__)
|
||||
#define vtoy_ssprintf(buf, pos, fmt, args...) \
|
||||
pos += grub_snprintf(buf + pos, VTOY_MAX_SCRIPT_BUF - pos, fmt, ##args)
|
||||
|
||||
#define browser_ssprintf(mbuf, fmt, args...) \
|
||||
(mbuf)->pos += grub_snprintf((mbuf)->buf + (mbuf)->pos, (mbuf)->max - (mbuf)->pos, fmt, ##args)
|
||||
@@ -1034,6 +1034,7 @@ extern conf_replace *g_conf_replace_node;
|
||||
extern grub_uint8_t *g_conf_replace_new_buf;
|
||||
extern int g_conf_replace_new_len;
|
||||
extern int g_conf_replace_new_len_align;
|
||||
extern int g_ventoy_disk_bios_id;
|
||||
extern grub_uint64_t g_ventoy_disk_size;
|
||||
extern grub_uint64_t g_ventoy_disk_part_size[2];
|
||||
extern grub_uint32_t g_ventoy_plat_data;
|
||||
|
@@ -1651,24 +1651,39 @@ static void ventoy_windows_fill_virt_data( grub_uint64_t isosize, ventoy_chai
|
||||
return;
|
||||
}
|
||||
|
||||
static int ventoy_windows_drive_map(ventoy_chain_head *chain)
|
||||
static int ventoy_windows_drive_map(ventoy_chain_head *chain, int vlnk)
|
||||
{
|
||||
int hd1 = 0;
|
||||
grub_disk_t disk;
|
||||
|
||||
debug("drive map begin <%p> ...\n", chain);
|
||||
debug("drive map begin <%p> <%d> ...\n", chain, vlnk);
|
||||
|
||||
if (chain->disk_drive == 0x80)
|
||||
disk = grub_disk_open("hd1");
|
||||
if (disk)
|
||||
{
|
||||
disk = grub_disk_open("hd1");
|
||||
if (disk)
|
||||
grub_disk_close(disk);
|
||||
hd1 = 1;
|
||||
debug("BIOS hd1 exist\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
debug("failed to open disk %s\n", "hd1");
|
||||
}
|
||||
|
||||
if (vlnk)
|
||||
{
|
||||
if (g_ventoy_disk_bios_id == 0x80 && hd1)
|
||||
{
|
||||
grub_disk_close(disk);
|
||||
debug("drive map needed %p\n", disk);
|
||||
debug("drive map needed vlnk %p\n", disk);
|
||||
chain->drive_map = 0x81;
|
||||
}
|
||||
else
|
||||
}
|
||||
else if (chain->disk_drive == 0x80)
|
||||
{
|
||||
if (hd1)
|
||||
{
|
||||
debug("failed to open disk %s\n", "hd1");
|
||||
debug("drive map needed normal %p\n", disk);
|
||||
chain->drive_map = 0x81;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1961,7 +1976,7 @@ grub_err_t ventoy_cmd_windows_chain_data(grub_extcmd_context_t ctxt, int argc, c
|
||||
|
||||
if (ventoy_is_efi_os() == 0)
|
||||
{
|
||||
ventoy_windows_drive_map(chain);
|
||||
ventoy_windows_drive_map(chain, file->vlnk);
|
||||
}
|
||||
|
||||
VENTOY_CMD_RETURN(GRUB_ERR_NONE);
|
||||
@@ -2203,7 +2218,7 @@ static grub_err_t ventoy_vlnk_wim_chain_data(grub_file_t wimfile)
|
||||
|
||||
if (ventoy_is_efi_os() == 0)
|
||||
{
|
||||
ventoy_windows_drive_map(chain);
|
||||
ventoy_windows_drive_map(chain, 0);
|
||||
}
|
||||
|
||||
grub_file_close(file);
|
||||
@@ -2357,7 +2372,7 @@ static grub_err_t ventoy_normal_wim_chain_data(grub_file_t wimfile)
|
||||
|
||||
if (ventoy_is_efi_os() == 0)
|
||||
{
|
||||
ventoy_windows_drive_map(chain);
|
||||
ventoy_windows_drive_map(chain, 0);
|
||||
}
|
||||
|
||||
grub_file_close(file);
|
||||
|
@@ -88,7 +88,7 @@ EXPORT_FUNC (grub_efi_compare_device_paths) (const grub_efi_device_path_t *dp1,
|
||||
|
||||
void * EXPORT_FUNC (grub_efi_allocate_iso_buf) (grub_uint64_t size);
|
||||
void * EXPORT_FUNC (grub_efi_allocate_chain_buf) (grub_uint64_t size);
|
||||
|
||||
void EXPORT_FUNC (grub_efi_get_reserved_page_num) (grub_uint64_t *total, grub_uint64_t *org_required, grub_uint64_t *new_required);
|
||||
|
||||
extern void (*EXPORT_VAR(grub_efi_net_config)) (grub_efi_handle_t hnd,
|
||||
char **device,
|
||||
|
69
GRUB2/MOD_SRC/grub-2.04/include/grub/smbios.h
Normal file
69
GRUB2/MOD_SRC/grub-2.04/include/grub/smbios.h
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB 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.
|
||||
*
|
||||
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_SMBIOS_HEADER
|
||||
#define GRUB_SMBIOS_HEADER 1
|
||||
|
||||
#include <grub/symbol.h>
|
||||
#include <grub/types.h>
|
||||
|
||||
#define GRUB_SMBIOS_TYPE_END_OF_TABLE ((grub_uint8_t)127)
|
||||
|
||||
struct grub_smbios_ieps
|
||||
{
|
||||
grub_uint8_t anchor[5]; /* "_DMI_" */
|
||||
grub_uint8_t checksum;
|
||||
grub_uint16_t table_length;
|
||||
grub_uint32_t table_address;
|
||||
grub_uint16_t structures;
|
||||
grub_uint8_t revision;
|
||||
} GRUB_PACKED;
|
||||
|
||||
struct grub_smbios_eps
|
||||
{
|
||||
grub_uint8_t anchor[4]; /* "_SM_" */
|
||||
grub_uint8_t checksum;
|
||||
grub_uint8_t length; /* 0x1f */
|
||||
grub_uint8_t version_major;
|
||||
grub_uint8_t version_minor;
|
||||
grub_uint16_t maximum_structure_size;
|
||||
grub_uint8_t revision;
|
||||
grub_uint8_t formatted[5];
|
||||
struct grub_smbios_ieps intermediate;
|
||||
} GRUB_PACKED;
|
||||
|
||||
struct grub_smbios_eps3
|
||||
{
|
||||
grub_uint8_t anchor[5]; /* "_SM3_" */
|
||||
grub_uint8_t checksum;
|
||||
grub_uint8_t length; /* 0x18 */
|
||||
grub_uint8_t version_major;
|
||||
grub_uint8_t version_minor;
|
||||
grub_uint8_t docrev;
|
||||
grub_uint8_t revision;
|
||||
grub_uint8_t reserved;
|
||||
grub_uint32_t maximum_table_length;
|
||||
grub_uint64_t table_address;
|
||||
} GRUB_PACKED;
|
||||
|
||||
extern struct grub_smbios_eps *grub_machine_smbios_get_eps (void);
|
||||
extern struct grub_smbios_eps3 *grub_machine_smbios_get_eps3 (void);
|
||||
|
||||
extern struct grub_smbios_eps *EXPORT_FUNC (grub_smbios_get_eps) (void);
|
||||
|
||||
#endif /* ! GRUB_SMBIOS_HEADER */
|
@@ -9,7 +9,7 @@ mkdir -p $VT_DIR/GRUB2/PXE
|
||||
|
||||
make install
|
||||
|
||||
PATH=$PATH:$VT_DIR/GRUB2/INSTALL/bin/:$VT_DIR/GRUB2/INSTALL/sbin/
|
||||
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"
|
||||
|
4
IMG/cpio/ventoy/hook/alpine/insert.sh
Normal file
4
IMG/cpio/ventoy/hook/alpine/insert.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
for i in 1 2; do
|
||||
if [ $i -eq 2 ]; then
|
||||
/ventoy/busybox/sh /ventoy/hook/alpine/udev_disk_hook.sh
|
||||
fi
|
@@ -19,22 +19,17 @@
|
||||
|
||||
. /ventoy/hook/ventoy-hook-lib.sh
|
||||
|
||||
if [ "$SUBSYSTEM" != "block" ] || [ "$DEVTYPE" != "partition" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -b /dev/${MDEV:0:-1} ]; then
|
||||
vtlog "/dev/${MDEV:0:-1} exist"
|
||||
else
|
||||
$SLEEP 2
|
||||
fi
|
||||
|
||||
if is_ventoy_hook_finished || not_ventoy_disk "${MDEV:0:-1}"; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||
|
||||
wait_for_usb_disk_ready
|
||||
|
||||
vtdiskname=$(get_ventoy_disk_name)
|
||||
if [ "$vtdiskname" = "unknown" ]; then
|
||||
vtlog "ventoy disk not found"
|
||||
PATH=$VTPATH_OLD
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#
|
||||
# longpanda:
|
||||
# Alpine initramfs doesn't contain dm-mod or fuse module,
|
||||
@@ -47,13 +42,17 @@ PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||
# 3. unmount and delete the squashfs file
|
||||
#
|
||||
|
||||
MDEV="${vtdiskname#/dev/}2"
|
||||
|
||||
vtoydm -i -f $VTOY_PATH/ventoy_image_map -d /dev/${MDEV:0:-1} > $VTOY_PATH/iso_file_list
|
||||
|
||||
vtLine=$(grep '[-][-] modloop-lts ' $VTOY_PATH/iso_file_list)
|
||||
sector=$(echo $vtLine | awk '{print $(NF-1)}')
|
||||
length=$(echo $vtLine | awk '{print $NF}')
|
||||
|
||||
echo -n "Mounting boot media, please wait ......"
|
||||
vtoydm -e -f $VTOY_PATH/ventoy_image_map -d /dev/${MDEV:0:-1} -s $sector -l $length -o /vt_modloop
|
||||
echo "done"
|
||||
|
||||
mkdir -p $VTOY_PATH/mnt
|
||||
mount /vt_modloop $VTOY_PATH/mnt
|
||||
|
@@ -19,6 +19,17 @@
|
||||
|
||||
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||
|
||||
echo "-[-a-z0-9]*2 root:root 0666 @$BUSYBOX_PATH/sh $VTOY_PATH/hook/alpine/udev_disk_hook.sh" >> /mdev.conf
|
||||
$CAT /etc/mdev.conf >> /mdev.conf
|
||||
$BUSYBOX_PATH/mv /mdev.conf /etc/mdev.conf
|
||||
PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||
|
||||
LineBegin=$(grep -n "ebegin.*Mounting boot media" /init | awk -F: '{print $1}')
|
||||
|
||||
grep -n "^eend" /init > /t.list
|
||||
while read line; do
|
||||
LineEnd=$(echo $line | awk -F: '{print $1}')
|
||||
if [ $LineEnd -gt $LineBegin ]; then
|
||||
sed "${LineEnd}i\done" -i /init
|
||||
sed "${LineBegin}r /ventoy/hook/alpine/insert.sh" -i /init
|
||||
break
|
||||
fi
|
||||
done < /t.list
|
||||
rm -f /t.list
|
||||
|
@@ -22,4 +22,4 @@
|
||||
ventoy_set_inotify_script blackPanther/ventoy-inotifyd-hook.sh
|
||||
$BUSYBOX_PATH/cp -a $VTOY_PATH/hook/blackPanther/ventoy-inotifyd-start.sh /lib/dracut/hooks/pre-udev/00-ventoy-inotifyd-start.sh
|
||||
|
||||
$SED "s#printf\(.*\)\$CMDLINE#printf\1 root=/dev/dm-0 \$CMDLINE root=/dev/dm-0#" -i /lib/dracut-lib.sh
|
||||
$SED "s#printf\(.*\)\$CMDLINE#printf\1 root=/dev/ventoy \$CMDLINE root=/dev/ventoy#" -i /lib/dracut-lib.sh
|
||||
|
@@ -33,10 +33,8 @@ if is_inotify_ventoy_part $3; then
|
||||
$BUSYBOX_PATH/sh $VTOY_PATH/hook/default/udev_disk_hook.sh $3 noreplace
|
||||
|
||||
blkdev_num_dev=$($VTOY_PATH/tool/dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1 \2/')
|
||||
if ! [ -e /dev/dm-0 ]; then
|
||||
mknod -m 660 /dev/dm-0 b $blkdev_num_dev
|
||||
fi
|
||||
blackPanther-root /dev/dm-0
|
||||
mknod -m 660 /dev/ventoy b $blkdev_num_dev
|
||||
blackPanther-root /dev/ventoy
|
||||
|
||||
set_ventoy_hook_finish
|
||||
else
|
||||
|
@@ -64,6 +64,10 @@ if [ -f $VTOY_PATH/autoinstall ]; then
|
||||
$SED "/^mount \/proc/a export file=$VTOY_PATH/autoinstall; export auto='true'; export priority='critical'" -i /init
|
||||
fi
|
||||
fi
|
||||
|
||||
# if [ -e /bin/check-missing-firmware ]; then
|
||||
# $SED "/^#!/a\exit 0" -i /bin/check-missing-firmware
|
||||
# fi
|
||||
fi
|
||||
|
||||
#for ARMA aka Omoikane
|
||||
|
@@ -138,6 +138,14 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
#special process for Linx
|
||||
if $BUSYBOX_PATH/uname -r | $GREP -q "^2\.6"; then
|
||||
if $GREP -q "linx" /proc/version; then
|
||||
blkdev_num=$($VTOY_PATH/tool/dmsetup ls | $GREP ventoy | $SED 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1:\2/')
|
||||
vtDM=$(ventoy_find_dm_id ${blkdev_num})
|
||||
echo "/dev/$vtDM" > /ventoy/list-devices-usb-part
|
||||
fi
|
||||
fi
|
||||
|
||||
# OK finish
|
||||
set_ventoy_hook_finish
|
||||
|
@@ -78,6 +78,9 @@ fi
|
||||
|
||||
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace"
|
||||
|
||||
ln -s /dev/dm-0 /dev/root
|
||||
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})
|
||||
cp -a /dev/$vtDM /dev/ventoy
|
||||
ln -s /dev/$vtDM /dev/root
|
||||
|
||||
PATH=$VTPATH_OLD
|
||||
|
@@ -19,5 +19,5 @@
|
||||
|
||||
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||
|
||||
$SED "s#^CDROM=.*#CDROM=/dev/dm-0#" -i /init
|
||||
$SED "s#^CDROM=.*#CDROM=/dev/ventoy#" -i /init
|
||||
$BUSYBOX_PATH/cp -a $VTOY_PATH/hook/easystartup/ventoy-initqueue.sh /initqueue/ventoy.sh
|
||||
|
@@ -31,16 +31,6 @@ if is_inotify_ventoy_part $3; then
|
||||
vtlog "find ventoy partition $3 ..."
|
||||
$BUSYBOX_PATH/sh $VTOY_PATH/hook/default/udev_disk_hook.sh $3 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})
|
||||
#
|
||||
# if [ "$vtDM" = "dm-0" ]; then
|
||||
# vtlog "This is dm-0, OK ..."
|
||||
# else
|
||||
# vtlog "####### This is $vtDM ####### this is abnormal ..."
|
||||
# ventoy_swap_device /dev/dm-0 /dev/$vtDM
|
||||
# fi
|
||||
|
||||
set_ventoy_hook_finish
|
||||
else
|
||||
vtlog "##### INOTIFYD: $2/$3 is created (NO)..."
|
||||
|
@@ -19,7 +19,7 @@
|
||||
|
||||
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||
|
||||
$SED "s#printf\(.*\)\$CMDLINE#printf\1\$CMDLINE root=/dev/dm-0#" -i /lib/dracut-lib.sh
|
||||
$SED "s#printf\(.*\)\$CMDLINE#printf\1\$CMDLINE root=/dev/ventoy#" -i /lib/dracut-lib.sh
|
||||
|
||||
$BUSYBOX_PATH/rm -f /usr/lib/systemd/system-generators/systemd-fstab-generator /lib/systemd/system-generators/systemd-fstab-generator
|
||||
|
||||
|
@@ -35,7 +35,8 @@ if is_inotify_ventoy_part $3; then
|
||||
blkdev_num=$($VTOY_PATH/tool/dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1:\2/')
|
||||
vtDM=$(ventoy_find_dm_id ${blkdev_num})
|
||||
|
||||
mount -t iso9660 /dev/$vtDM /sysroot
|
||||
cp -a /dev/$vtDM /dev/ventoy
|
||||
mount -t iso9660 /dev/ventoy /sysroot
|
||||
|
||||
set_ventoy_hook_finish
|
||||
else
|
||||
|
@@ -59,7 +59,7 @@ if is_inotify_ventoy_part $3; then
|
||||
$BUSYBOX_PATH/cp -a $BUSYBOX_PATH/blkid /sbin/blkid
|
||||
$BUSYBOX_PATH/mkdir -p /dev/mapper
|
||||
ln -s /dev/$vtDM /dev/mapper/ventoy
|
||||
/sbin/mgalive-root /dev/dm-0
|
||||
/sbin/mgalive-root /dev/$vtDM
|
||||
fi
|
||||
|
||||
set_ventoy_hook_finish
|
||||
|
@@ -25,13 +25,19 @@ else
|
||||
for vtParam in $($CAT /proc/cmdline); do
|
||||
if echo $vtParam | $GREP -q 'inst.ks=hd:LABEL='; then
|
||||
vtRawKs=$(echo $vtParam | $AWK -F: '{print $NF}')
|
||||
VTKS="inst.ks=hd:/dev/dm-0:$vtRawKs"
|
||||
VTKS="inst.ks=hd:/dev/ventoy:$vtRawKs"
|
||||
break
|
||||
fi
|
||||
|
||||
if echo $vtParam | $GREP -q '^ks=.*:/'; then
|
||||
vtRawKs=$(echo $vtParam | $AWK -F: '{print $NF}')
|
||||
VTKS="ks=hd:/dev/dm-0:$vtRawKs"
|
||||
VTKS="ks=hd:/dev/ventoy:$vtRawKs"
|
||||
break
|
||||
fi
|
||||
|
||||
if echo $vtParam | $GREP -q '^inst.ks=.*:/'; then
|
||||
vtRawKs=$(echo $vtParam | $AWK -F: '{print $NF}')
|
||||
VTKS="inst.ks=hd:/dev/ventoy:$vtRawKs"
|
||||
break
|
||||
fi
|
||||
done
|
||||
@@ -54,9 +60,12 @@ if [ -f $VTOY_PATH/ventoy_persistent_map ]; then
|
||||
$BUSYBOX_PATH/rm -rf $VTOY_PATH/selinuxfs
|
||||
fi
|
||||
|
||||
|
||||
echo "VTKS=$VTKS VTOVERLAY=$VTOVERLAY" >> $VTLOG
|
||||
|
||||
if [ -n "$vtRawKs" ]; then
|
||||
echo "$vtRawKs" > $VTOY_PATH/ventoy_ks_rootpath
|
||||
fi
|
||||
|
||||
if ls $VTOY_PATH | $GREP -q 'ventoy_dud[0-9]'; then
|
||||
for vtDud in $(ls $VTOY_PATH/ventoy_dud*); do
|
||||
vtInstDD="$vtInstDD inst.dd=file:$vtDud"
|
||||
@@ -64,7 +73,7 @@ if ls $VTOY_PATH | $GREP -q 'ventoy_dud[0-9]'; then
|
||||
fi
|
||||
echo "vtInstDD=$vtInstDD" >> $VTLOG
|
||||
|
||||
$SED "s#printf\(.*\)\$CMDLINE#printf\1\$CMDLINE inst.stage2=hd:/dev/dm-0 $VTKS $vtInstDD#" -i /lib/dracut-lib.sh
|
||||
$SED "s#printf\(.*\)\$CMDLINE#printf\1\$CMDLINE inst.stage2=hd:/dev/ventoy $VTKS $VTOVERLAY $vtInstDD#" -i /lib/dracut-lib.sh
|
||||
|
||||
ventoy_set_inotify_script openEuler/ventoy-inotifyd-hook.sh
|
||||
|
||||
|
@@ -35,19 +35,23 @@ if is_inotify_ventoy_part $3; then
|
||||
|
||||
$BUSYBOX_PATH/sh $VTOY_PATH/hook/default/udev_disk_hook.sh $3
|
||||
|
||||
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})
|
||||
|
||||
if [ "$vtDM" = "dm-0" ]; then
|
||||
vtlog "This is dm-0, OK ..."
|
||||
else
|
||||
vtlog "####### This is $vtDM ####### this is abnormal ..."
|
||||
ventoy_swap_device /dev/dm-0 /dev/$vtDM
|
||||
blkdev_num_mknod=$($VTOY_PATH/tool/dmsetup ls | $GREP ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1 \2/')
|
||||
$BUSYBOX_PATH/mknod -m 660 /dev/ventoy b $blkdev_num_mknod
|
||||
$BUSYBOX_PATH/modprobe isofs >/dev/null 2>&1
|
||||
vtlog "mknod /dev/ventoy $blkdev_num_mknod"
|
||||
|
||||
if [ -f $VTOY_PATH/ventoy_ks_rootpath ]; then
|
||||
vt_ks_rootpath=$(cat $VTOY_PATH/ventoy_ks_rootpath)
|
||||
vtlog "ks rootpath <$vt_ks_rootpath>"
|
||||
if [ -e /sbin/fetch-kickstart-disk ]; then
|
||||
vtlog "fetch-kickstart-disk ..."
|
||||
/sbin/fetch-kickstart-disk /dev/ventoy "$vt_ks_rootpath"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -e /sbin/anaconda-diskroot ]; then
|
||||
vtlog "set anaconda-diskroot ..."
|
||||
/sbin/anaconda-diskroot /dev/dm-0
|
||||
vtlog "set anaconda-diskroot ..."
|
||||
/sbin/anaconda-diskroot /dev/ventoy
|
||||
fi
|
||||
|
||||
set_ventoy_hook_finish
|
||||
|
@@ -19,17 +19,24 @@
|
||||
|
||||
. /ventoy/hook/ventoy-hook-lib.sh
|
||||
|
||||
if ! [ -e /dev/mapper/ventoy ]; then
|
||||
vtlog "link to /dev/mapper/ventoy"
|
||||
ln -s /dev/dm-0 /dev/mapper/ventoy
|
||||
if [ ! -e /dev/dm-0 ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
VTLABEL=$($BUSYBOX_PATH/blkid /dev/dm-0 | $SED 's/.*LABEL="\([^"]*\)".*/\1/')
|
||||
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})
|
||||
|
||||
if ! [ -e /dev/mapper/ventoy ]; then
|
||||
vtlog "link /dev/$vtDM to /dev/mapper/ventoy"
|
||||
ln -s /dev/$vtDM /dev/mapper/ventoy
|
||||
fi
|
||||
|
||||
VTLABEL=$($BUSYBOX_PATH/blkid /dev/$vtDM | $SED 's/.*LABEL="\([^"]*\)".*/\1/')
|
||||
vtlog "VTLABEL=$VTLABEL"
|
||||
|
||||
if [ -n "$VTLABEL" ]; then
|
||||
if ! [ -e "/dev/disk/by-label/$VTLABEL" ]; then
|
||||
vtlog "link to /dev/disk/by-label/$VTLABEL"
|
||||
ln -s /dev/dm-0 "/dev/disk/by-label/$VTLABEL"
|
||||
vtlog "link /dev/$vtDM to /dev/disk/by-label/$VTLABEL"
|
||||
ln -s /dev/$vtDM "/dev/disk/by-label/$VTLABEL"
|
||||
fi
|
||||
fi
|
||||
|
@@ -23,12 +23,23 @@ vtlog "##### $0 $* ..."
|
||||
|
||||
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||
|
||||
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})
|
||||
if [ ! -e /dev/ventoy ]; then
|
||||
blkdev_num_mknod=$(dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1 \2/')
|
||||
mknod -m 660 /dev/ventoy b $blkdev_num_mknod
|
||||
fi
|
||||
|
||||
if [ -f $VTOY_PATH/ventoy_ks_rootpath ]; then
|
||||
vt_ks_rootpath=$(cat $VTOY_PATH/ventoy_ks_rootpath)
|
||||
vtlog "ks rootpath <$vt_ks_rootpath>"
|
||||
if [ -e /sbin/fetch-kickstart-disk ]; then
|
||||
vtlog "fetch-kickstart-disk ..."
|
||||
/sbin/fetch-kickstart-disk /dev/ventoy "$vt_ks_rootpath"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -e /sbin/anaconda-diskroot ]; then
|
||||
vtlog "set anaconda-diskroot ..."
|
||||
/sbin/anaconda-diskroot /dev/dm-0
|
||||
vtlog "set anaconda-diskroot /dev/ventoy ..."
|
||||
/sbin/anaconda-diskroot /dev/ventoy
|
||||
fi
|
||||
|
||||
PATH=$VTPATH_OLD
|
||||
|
@@ -21,5 +21,12 @@
|
||||
|
||||
$BUSYBOX_PATH/mkdir /dev
|
||||
|
||||
$SED '/Detecting *PrimeOS/a\ ROOT=$(cat /ventoy/rootdev)' -i /init
|
||||
$SED "/Detecting *PrimeOS/a\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/primeos/ventoy-disk.sh" -i /init
|
||||
if $GREP -q 'Detecting *PrimeOS' /init; then
|
||||
$SED '/Detecting *PrimeOS/a\ ROOT=$(cat /ventoy/rootdev)' -i /init
|
||||
$SED "/Detecting *PrimeOS/a\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/primeos/ventoy-disk.sh" -i /init
|
||||
elif $GREP -q 'Detecting *PRIMEOS' /init; then
|
||||
$SED '/Detecting *PRIMEOS/a\ ROOT=$(cat /ventoy/rootdev)' -i /init
|
||||
$SED "/Detecting *PRIMEOS/a\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/primeos/ventoy-disk.sh" -i /init
|
||||
else
|
||||
echo "not detecting found" >> $VTLOG
|
||||
fi
|
||||
|
@@ -28,13 +28,19 @@ else
|
||||
for vtParam in $($CAT /proc/cmdline); do
|
||||
if echo $vtParam | $GREP -q 'inst.ks=hd:LABEL='; then
|
||||
vtRawKs=$(echo $vtParam | $AWK -F: '{print $NF}')
|
||||
VTKS="inst.ks=hd:/dev/dm-0:$vtRawKs"
|
||||
VTKS="inst.ks=hd:/dev/ventoy:$vtRawKs"
|
||||
break
|
||||
fi
|
||||
|
||||
if echo $vtParam | $GREP -q '^ks=.*:/'; then
|
||||
vtRawKs=$(echo $vtParam | $AWK -F: '{print $NF}')
|
||||
VTKS="ks=hd:/dev/dm-0:$vtRawKs"
|
||||
VTKS="ks=hd:/dev/ventoy:$vtRawKs"
|
||||
break
|
||||
fi
|
||||
|
||||
if echo $vtParam | $GREP -q '^inst.ks=.*:/'; then
|
||||
vtRawKs=$(echo $vtParam | $AWK -F: '{print $NF}')
|
||||
VTKS="inst.ks=hd:/dev/ventoy:$vtRawKs"
|
||||
break
|
||||
fi
|
||||
done
|
||||
@@ -58,9 +64,12 @@ if [ -f $VTOY_PATH/ventoy_persistent_map ]; then
|
||||
$BUSYBOX_PATH/rm -rf $VTOY_PATH/selinuxfs
|
||||
fi
|
||||
|
||||
|
||||
echo "VTKS=$VTKS VTOVERLAY=$VTOVERLAY" >> $VTLOG
|
||||
|
||||
if [ -n "$vtRawKs" ]; then
|
||||
echo "$vtRawKs" > $VTOY_PATH/ventoy_ks_rootpath
|
||||
fi
|
||||
|
||||
if ls $VTOY_PATH | $GREP -q 'ventoy_dud[0-9]'; then
|
||||
for vtDud in $(ls $VTOY_PATH/ventoy_dud*); do
|
||||
vtInstDD="$vtInstDD inst.dd=file:$vtDud"
|
||||
@@ -69,9 +78,9 @@ fi
|
||||
echo "vtInstDD=$vtInstDD" >> $VTLOG
|
||||
|
||||
if $GREP -q 'root=live' /proc/cmdline; then
|
||||
$SED "s#printf\(.*\)\$CMDLINE#printf\1\$CMDLINE root=live:/dev/dm-0 $VTKS $VTOVERLAY $vtInstDD#" -i /lib/dracut-lib.sh
|
||||
$SED "s#printf\(.*\)\$CMDLINE#printf\1\$CMDLINE root=live:/dev/ventoy $VTKS $VTOVERLAY $vtInstDD#" -i /lib/dracut-lib.sh
|
||||
else
|
||||
$SED "s#printf\(.*\)\$CMDLINE#printf\1\$CMDLINE inst.stage2=hd:/dev/dm-0 $VTKS $VTOVERLAY $vtInstDD#" -i /lib/dracut-lib.sh
|
||||
$SED "s#printf\(.*\)\$CMDLINE#printf\1\$CMDLINE inst.stage2=hd:/dev/ventoy $VTKS $VTOVERLAY $vtInstDD#" -i /lib/dracut-lib.sh
|
||||
fi
|
||||
|
||||
ventoy_set_inotify_script rhel7/ventoy-inotifyd-hook.sh
|
||||
|
@@ -29,14 +29,7 @@ if is_inotify_ventoy_part $3; then
|
||||
|
||||
vtlog "##### INOTIFYD: $2/$3 is created (YES) ..."
|
||||
|
||||
vtGenRulFile='/etc/udev/rules.d/99-live-squash.rules'
|
||||
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
|
||||
else
|
||||
vtlog "$vtGenRulFile not exist..."
|
||||
fi
|
||||
|
||||
|
||||
vtlog "find ventoy partition ..."
|
||||
|
||||
@@ -47,19 +40,32 @@ if is_inotify_ventoy_part $3; then
|
||||
|
||||
$BUSYBOX_PATH/sh $VTOY_PATH/hook/default/udev_disk_hook.sh $3 $vtReplaceOpt
|
||||
|
||||
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})
|
||||
blkdev_num_mknod=$($VTOY_PATH/tool/dmsetup ls | $GREP ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1 \2/')
|
||||
$BUSYBOX_PATH/mknod -m 660 /dev/ventoy b $blkdev_num_mknod
|
||||
$BUSYBOX_PATH/modprobe isofs >/dev/null 2>&1
|
||||
vtlog "mknod /dev/ventoy $blkdev_num_mknod"
|
||||
|
||||
if [ "$vtDM" = "dm-0" ]; then
|
||||
vtlog "This is dm-0, OK ..."
|
||||
vtGenRulFile='/etc/udev/rules.d/99-live-squash.rules'
|
||||
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
|
||||
else
|
||||
vtlog "####### This is $vtDM ####### this is abnormal ..."
|
||||
ventoy_swap_device /dev/dm-0 /dev/$vtDM
|
||||
vtlog "$vtGenRulFile not exist..."
|
||||
fi
|
||||
|
||||
if [ -f $VTOY_PATH/ventoy_ks_rootpath ]; then
|
||||
vt_ks_rootpath=$(cat $VTOY_PATH/ventoy_ks_rootpath)
|
||||
vtlog "ks rootpath <$vt_ks_rootpath>"
|
||||
if [ -e /sbin/fetch-kickstart-disk ]; then
|
||||
vtlog "fetch-kickstart-disk ..."
|
||||
/sbin/fetch-kickstart-disk /dev/ventoy "$vt_ks_rootpath"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -e /sbin/anaconda-diskroot ]; then
|
||||
vtlog "set anaconda-diskroot ..."
|
||||
/sbin/anaconda-diskroot /dev/dm-0
|
||||
vtlog "set anaconda-diskroot ..."
|
||||
/sbin/anaconda-diskroot /dev/ventoy
|
||||
fi
|
||||
|
||||
set_ventoy_hook_finish
|
||||
|
@@ -19,17 +19,24 @@
|
||||
|
||||
. /ventoy/hook/ventoy-hook-lib.sh
|
||||
|
||||
if ! [ -e /dev/mapper/ventoy ]; then
|
||||
vtlog "link to /dev/mapper/ventoy"
|
||||
ln -s /dev/dm-0 /dev/mapper/ventoy
|
||||
if [ ! -e /dev/dm-0 ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
VTLABEL=$($BUSYBOX_PATH/blkid /dev/dm-0 | $SED 's/.*LABEL="\([^"]*\)".*/\1/')
|
||||
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})
|
||||
|
||||
if ! [ -e /dev/mapper/ventoy ]; then
|
||||
vtlog "link /dev/$vtDM to /dev/mapper/ventoy"
|
||||
ln -s /dev/$vtDM /dev/mapper/ventoy
|
||||
fi
|
||||
|
||||
VTLABEL=$($BUSYBOX_PATH/blkid /dev/$vtDM | $SED 's/.*LABEL="\([^"]*\)".*/\1/')
|
||||
vtlog "VTLABEL=$VTLABEL"
|
||||
|
||||
if [ -n "$VTLABEL" ]; then
|
||||
if ! [ -e "/dev/disk/by-label/$VTLABEL" ]; then
|
||||
vtlog "link to /dev/disk/by-label/$VTLABEL"
|
||||
ln -s /dev/dm-0 "/dev/disk/by-label/$VTLABEL"
|
||||
vtlog "link /dev/$vtDM to /dev/disk/by-label/$VTLABEL"
|
||||
ln -s /dev/$vtDM "/dev/disk/by-label/$VTLABEL"
|
||||
fi
|
||||
fi
|
||||
|
@@ -23,12 +23,23 @@ vtlog "##### $0 $* ..."
|
||||
|
||||
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||
|
||||
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})
|
||||
if [ ! -e /dev/ventoy ]; then
|
||||
blkdev_num_mknod=$(dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1 \2/')
|
||||
mknod -m 660 /dev/ventoy b $blkdev_num_mknod
|
||||
fi
|
||||
|
||||
if [ -f $VTOY_PATH/ventoy_ks_rootpath ]; then
|
||||
vt_ks_rootpath=$(cat $VTOY_PATH/ventoy_ks_rootpath)
|
||||
vtlog "ks rootpath <$vt_ks_rootpath>"
|
||||
if [ -e /sbin/fetch-kickstart-disk ]; then
|
||||
vtlog "fetch-kickstart-disk ..."
|
||||
/sbin/fetch-kickstart-disk /dev/ventoy "$vt_ks_rootpath"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -e /sbin/anaconda-diskroot ]; then
|
||||
vtlog "set anaconda-diskroot ..."
|
||||
/sbin/anaconda-diskroot /dev/dm-0
|
||||
vtlog "set anaconda-diskroot /dev/ventoy ..."
|
||||
/sbin/anaconda-diskroot /dev/ventoy
|
||||
fi
|
||||
|
||||
PATH=$VTPATH_OLD
|
||||
|
@@ -32,7 +32,8 @@ ventoy_os_install_dmsetup_by_fuse() {
|
||||
|
||||
mount -t iso9660 $VTOY_PATH/mnt/fuse/ventoy.iso $VTOY_PATH/mnt/iso
|
||||
|
||||
mount -t squashfs $VTOY_PATH/mnt/iso/system/squashfs_sys.img $VTOY_PATH/mnt/squashfs
|
||||
[ -f $VTOY_PATH/mnt/iso/system/squashfs_sys.img ] && mount -t squashfs $VTOY_PATH/mnt/iso/system/squashfs_sys.img $VTOY_PATH/mnt/squashfs
|
||||
[ -f $VTOY_PATH/mnt/iso/system/squashfs.img ] && mount -t squashfs $VTOY_PATH/mnt/iso/system/squashfs.img $VTOY_PATH/mnt/squashfs
|
||||
|
||||
KoName=$(ls $VTOY_PATH/mnt/squashfs/lib/modules/$2/kernel/drivers/md/dm-mod.ko*)
|
||||
vtlog "insmod $KoName"
|
||||
|
@@ -350,10 +350,12 @@ ventoy_dm_patch() {
|
||||
fi
|
||||
|
||||
#step1: modify vermagic/mod crc/relocation
|
||||
vtlog "$VTOY_PATH/tool/vtoykmod -u $VTOY_PATH/tool/$vtKoName $VTOY_PATH/$vtModName $vtDebug"
|
||||
$VTOY_PATH/tool/vtoykmod -u $VTOY_PATH/tool/$vtKoName $VTOY_PATH/$vtModName $vtDebug
|
||||
|
||||
#step2: fill parameters
|
||||
vtPgsize=$($VTOY_PATH/tool/vtoyksym -p)
|
||||
vtlog "$VTOY_PATH/tool/vtoykmod -f $VTOY_PATH/tool/$vtKoName $vtPgsize 0x$printk_addr 0x$ro_addr 0x$rw_addr $get_addr $get_size $put_addr $put_size 0x$kprobe_reg_addr 0x$kprobe_unreg_addr $vtDebug"
|
||||
$VTOY_PATH/tool/vtoykmod -f $VTOY_PATH/tool/$vtKoName $vtPgsize 0x$printk_addr 0x$ro_addr 0x$rw_addr $get_addr $get_size $put_addr $put_size 0x$kprobe_reg_addr 0x$kprobe_unreg_addr $vtDebug
|
||||
|
||||
$BUSYBOX_PATH/insmod $VTOY_PATH/tool/$vtKoName
|
||||
|
@@ -27,8 +27,8 @@ vtlog "####### $0 $* ########"
|
||||
|
||||
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||
|
||||
$BUSYBOX_PATH/insmod $VTOY_PATH/modules/dax.ko
|
||||
$BUSYBOX_PATH/insmod $VTOY_PATH/modules/dm-mod.ko
|
||||
[ -f $VTOY_PATH/modules/dax.ko ] && $BUSYBOX_PATH/insmod $VTOY_PATH/modules/dax.ko
|
||||
[ -f $VTOY_PATH/modules/dm-mod.ko ] && $BUSYBOX_PATH/insmod $VTOY_PATH/modules/dm-mod.ko
|
||||
|
||||
wait_for_usb_disk_ready
|
||||
|
||||
|
@@ -93,7 +93,10 @@ ventoy_get_os_type() {
|
||||
# Fedora : do the same process with rhel7
|
||||
elif $GREP -q '\.fc[0-9][0-9]\.' /proc/version; then
|
||||
echo 'rhel7'; return
|
||||
|
||||
|
||||
elif $GREP -q 'euleros' /proc/version; then
|
||||
echo 'rhel7'; return
|
||||
|
||||
# SUSE
|
||||
elif $GREP -q 'SUSE' /proc/version; then
|
||||
echo 'suse'; return
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
INSTALL/EFI/BOOT/mmx64.efi
Normal file
BIN
INSTALL/EFI/BOOT/mmx64.efi
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -111,12 +111,18 @@ function ventoy_show_help {
|
||||
function get_os_type {
|
||||
set vtoy_os=Linux
|
||||
|
||||
for file in "efi/microsoft/boot/bcd" "sources/boot.wim" "boot/bcd" "bootmgr.efi" "boot/etfsboot.com" ; do
|
||||
if vt_file_exist_nocase (loop)/$file; then
|
||||
if vt_str_begin "$vt_volume_id" "DLC Boot"; then
|
||||
if [ -f (loop)/DLCBoot.exe ]; then
|
||||
set vtoy_os=Windows
|
||||
break
|
||||
fi
|
||||
done
|
||||
else
|
||||
for file in "efi/microsoft/boot/bcd" "sources/boot.wim" "boot/bcd" "bootmgr.efi" "boot/etfsboot.com" ; do
|
||||
if vt_file_exist_nocase (loop)/$file; then
|
||||
set vtoy_os=Windows
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "$vtoy_os" = "Linux" ]; then
|
||||
if vt_strstr "$vt_system_id" "FreeBSD"; then
|
||||
@@ -206,6 +212,15 @@ function distro_specify_wim_patch_phase2 {
|
||||
if [ -f (loop)/boot/boot.wim ]; then
|
||||
vt_windows_collect_wim_patch wim /boot/boot.wim
|
||||
fi
|
||||
|
||||
if vt_str_begin "$vt_volume_id" "DLC Boot"; then
|
||||
for vwfile in "/DLC1/WinPE/W11x64.wim" "/DLC1/WinPE/W10x64.wim" "/DLC1/WinPE/W10x86.wim"; do
|
||||
if [ -f (loop)/$vwfile ]; then
|
||||
vt_windows_collect_wim_patch wim $vwfile
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -364,7 +379,8 @@ function distro_specify_initrd_file_phase2 {
|
||||
vt_linux_specify_initrd_file /initrd0.img
|
||||
elif [ -f (loop)/sysresccd/boot/i686/sysresccd.img ]; then
|
||||
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
|
||||
|
||||
fi
|
||||
}
|
||||
@@ -1037,7 +1053,11 @@ function legacy_windows_menu_func {
|
||||
|
||||
if [ -n "$vtoy_chain_mem_addr" ]; then
|
||||
ventoy_acpi_param ${vtoy_chain_mem_addr} 2048
|
||||
linux16 $vtoy_path/ipxe.krn ${vtdebug_flag} ibft mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}
|
||||
if [ "$ventoy_compatible" = "NO" ]; then
|
||||
linux16 $vtoy_path/ipxe.krn ${vtdebug_flag} mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}
|
||||
else
|
||||
linux16 $vtoy_path/ipxe.krn ${vtdebug_flag} ibft mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}
|
||||
fi
|
||||
boot
|
||||
else
|
||||
echo "chain empty failed"
|
||||
@@ -1281,7 +1301,7 @@ function iso_common_menuentry {
|
||||
unset vt_system_id
|
||||
unset vt_volume_id
|
||||
|
||||
vt_chosen_img_path vt_chosen_path vt_chosen_size
|
||||
vt_chosen_img_path vt_chosen_path vt_chosen_size vt_chosen_name
|
||||
|
||||
vt_parse_iso_volume "${vtoy_iso_part}${vt_chosen_path}" vt_system_id vt_volume_id vt_volume_space
|
||||
if [ $vt_volume_space -ne $vt_chosen_size ]; then
|
||||
@@ -1329,10 +1349,17 @@ function iso_common_menuentry {
|
||||
elif vt_iso_vd_id_begin 0 1 "KolibriOS"; then
|
||||
set vtMemDiskBoot=1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#For iKuai8 (<64MB)
|
||||
if [ $vt_chosen_size -le 67108864 ]; then
|
||||
if vt_str_begin "$vt_chosen_name" "iKuai"; then
|
||||
set vtMemDiskBoot=1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
vt_iso_vd_id_clear
|
||||
|
||||
|
||||
|
||||
if [ "$grub_platform" = "pc" ]; then
|
||||
if [ -n "$vtMemDiskBoot" ]; then
|
||||
@@ -1445,22 +1472,22 @@ function efi_common_menuentry {
|
||||
vt_vlnk_dst="${vtoy_iso_part}${vt_chosen_path}"
|
||||
fi
|
||||
|
||||
vt_concat_efi_iso "${vt_vlnk_dst}" vtoy_iso_buf
|
||||
|
||||
ventoy_debug_pause
|
||||
|
||||
ventoy_cli_console
|
||||
|
||||
unset vtoy_dotefi_retry
|
||||
chainloader ${vtoy_path}/ventoy_${VTOY_EFI_ARCH}.efi memdisk env_param=${env_param} dotefi isoefi=on ${vtdebug_flag} mem:${vtoy_iso_buf_addr}:size:${vtoy_iso_buf_size}
|
||||
ventoy_cli_console
|
||||
|
||||
#first try with chainload
|
||||
set vtOldRoot=$root
|
||||
set root=$vtoy_iso_part
|
||||
chainloader "${vt_vlnk_dst}"
|
||||
boot
|
||||
|
||||
if [ -n "$vtoy_dotefi_retry" ]; then
|
||||
unset vtoy_dotefi_retry
|
||||
chainloader "${vt_vlnk_dst}"
|
||||
boot
|
||||
fi
|
||||
|
||||
|
||||
#retry with isoboot
|
||||
set root=$vtOldRoot
|
||||
vt_concat_efi_iso "${vt_vlnk_dst}" vtoy_iso_buf
|
||||
chainloader ${vtoy_path}/ventoy_${VTOY_EFI_ARCH}.efi memdisk env_param=${env_param} dotefi isoefi=on ${vtdebug_flag} mem:${vtoy_iso_buf_addr}:size:${vtoy_iso_buf_size}
|
||||
boot
|
||||
|
||||
ventoy_gui_console
|
||||
}
|
||||
|
||||
@@ -1640,7 +1667,9 @@ function ventoy_img_easyos {
|
||||
|
||||
if [ -n "$vt_module_ver" ]; then
|
||||
for mod in "kernel/drivers/md/dm-mod.ko" "kernel/drivers/dax/dax.ko"; do
|
||||
vt_img_extra_initrd_append (easysfs)/lib/modules/$vt_module_ver/$mod
|
||||
if [ -e (easysfs)/lib/modules/$vt_module_ver/$mod ]; then
|
||||
vt_img_extra_initrd_append (easysfs)/lib/modules/$vt_module_ver/$mod
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -2113,7 +2142,7 @@ function img_unsupport_menuentry {
|
||||
#############################################################
|
||||
#############################################################
|
||||
|
||||
set VENTOY_VERSION="1.0.73"
|
||||
set VENTOY_VERSION="1.0.75"
|
||||
|
||||
#ACPI not compatible with Window7/8, so disable by default
|
||||
set VTOY_PARAM_NO_ACPI=1
|
||||
|
BIN
INSTALL/tool/aarch64/Plugson
Normal file
BIN
INSTALL/tool/aarch64/Plugson
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
INSTALL/tool/aarch64/vlnk
Normal file
BIN
INSTALL/tool/aarch64/vlnk
Normal file
Binary file not shown.
Binary file not shown.
BIN
INSTALL/tool/i386/Plugson
Normal file
BIN
INSTALL/tool/i386/Plugson
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
INSTALL/tool/i386/vlnk
Normal file
BIN
INSTALL/tool/i386/vlnk
Normal file
Binary file not shown.
Binary file not shown.
BIN
INSTALL/tool/mips64el/Plugson
Normal file
BIN
INSTALL/tool/mips64el/Plugson
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
INSTALL/tool/mips64el/vlnk
Normal file
BIN
INSTALL/tool/mips64el/vlnk
Normal file
Binary file not shown.
Binary file not shown.
BIN
INSTALL/tool/x86_64/Plugson
Normal file
BIN
INSTALL/tool/x86_64/Plugson
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
INSTALL/tool/x86_64/vlnk
Normal file
BIN
INSTALL/tool/x86_64/vlnk
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -616,10 +616,9 @@ static void ventoy_dump_chain(ventoy_chain_head *chain)
|
||||
printf("os_param->vtoy_disk_part_type=%u\n", chain->os_param.vtoy_disk_part_type);
|
||||
printf("os_param->vtoy_img_path=<%s>\n", chain->os_param.vtoy_img_path);
|
||||
printf("os_param->vtoy_img_size=<%llu>\n", chain->os_param.vtoy_img_size);
|
||||
printf("os_param->vtoy_reserve[0]=<%u>\n", vtoy_reserve[0]);
|
||||
printf("os_param->vtoy_reserve[1]=<%u>\n", vtoy_reserve[1]);
|
||||
printf("os_param->vtoy_reserve[2]=<%u>\n", vtoy_reserve[2]);
|
||||
printf("os_param->vtoy_reserve[3]=<%u>\n", vtoy_reserve[3]);
|
||||
printf("os_param->vtoy_reserve[ ]=<%u %u %u %u %u %u %u>\n",
|
||||
vtoy_reserve[0], vtoy_reserve[1], vtoy_reserve[2], vtoy_reserve[3],
|
||||
vtoy_reserve[4], vtoy_reserve[5], vtoy_reserve[6]);
|
||||
printf("os_param->vtoy_img_location_addr=<0x%llx>\n", chain->os_param.vtoy_img_location_addr);
|
||||
printf("os_param->vtoy_img_location_len=<%u>\n", chain->os_param.vtoy_img_location_len);
|
||||
ventoy_debug_pause();
|
||||
|
@@ -1441,7 +1441,12 @@ unsigned int ventoy_int13_hook (ventoy_chain_head *chain)
|
||||
natural_drive = 0xE0; /* just set a cdrom drive number 224 */
|
||||
}
|
||||
|
||||
if (chain->disk_drive >= 0x80 && chain->drive_map >= 0x80)
|
||||
if (chain->os_param.vtoy_reserved[6])
|
||||
{
|
||||
g_drive_map1 = 0x80;
|
||||
g_drive_map2 = 0x81;
|
||||
}
|
||||
else if (chain->disk_drive >= 0x80 && chain->drive_map >= 0x80)
|
||||
{
|
||||
g_drive_map1 = chain->disk_drive;
|
||||
g_drive_map2 = chain->drive_map;
|
||||
|
@@ -86,7 +86,7 @@ typedef struct ventoy_os_param
|
||||
grub_uint64_t vtoy_img_location_addr;
|
||||
grub_uint32_t vtoy_img_location_len;
|
||||
|
||||
grub_uint64_t vtoy_reserved[4]; // Internal use by ventoy
|
||||
grub_uint8_t vtoy_reserved[32]; // Internal use by ventoy
|
||||
|
||||
grub_uint8_t vtoy_disk_signature[4];
|
||||
|
||||
|
@@ -171,8 +171,8 @@
|
||||
"STR_PART_RESIZE_SUCCESS":"축하합니다!#@Ventoy 비파괴 설치가 완료되었습니다.",
|
||||
"STR_PART_RESIZE_FAILED":"비파괴 설치에 실패했습니다. 자세한 내용은 log.txt를 확인하십시오.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"일부 조건을 충족할 수 없기 때문에 Ventoy 비파괴 설치가 중지되었습니다. 자세한 내용은 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":"경고: 데이터가 손실됩니다!",
|
||||
"STR_INSTALL_YES_TIP2":"업그레이드 대신 새로 설치할지 확인하려면 아래 입력란에 YES를 입력하십시오.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -400,15 +400,15 @@
|
||||
"STR_WEB_SERVICE_BUSY":"Usługa jest zajęta, spróbuj ponownie później.",
|
||||
"STR_MENU_VTSI_CREATE":"Wygeneruj plik VTSI",
|
||||
"STR_VTSI_CREATE_TIP":"Tym razem nie napisze do urządzenia ale tylko wygeneruje plik VTSI#@Kontynuować?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"Pomyślnie wygenerowane plik VTSI!#@Możesz teraz użyć Rufus'a(3.15+) aby napisać go na urządzenie by dokończyć instlację Ventoy.",
|
||||
"STR_VTSI_CREATE_SUCCESS":"Pomyślnie wygenerowane plik VTSI!#@Możesz teraz użyć Rufus'a(3.15+) aby napisać go na urządzenie by dokończyć instalację Ventoy.",
|
||||
"STR_VTSI_CREATE_FAILED":"Generacja pliku VTSI nie powiodła się.",
|
||||
"STR_MENU_PART_RESIZE":"Nieniszcząsa instalacja",
|
||||
"STR_MENU_PART_RESIZE":"Nieniszcząca instalacja",
|
||||
"STR_PART_RESIZE_TIP":"Ventoy spróbuje nieniszczącej instalacji jeśli jest możliwa. #@Kontynuować?",
|
||||
"STR_PART_RESIZE_SUCCESS":"Gratulacje!#@Nieniszcząca instlacja Ventoy zakończyła się pomyślnie.",
|
||||
"STR_PART_RESIZE_FAILED":"Nieniszcząca instalacja nie powiodła się, sprawdz log.txt po szczegóły.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Nieniszcząca instalacja Ventoy została zatrzymana ponieważ niektóre wymagania nie zostały spełnione. Sprawdz log.txt po szczegóły.",
|
||||
"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":"Gratulacje!#@Nieniszcząca instalacja Ventoy zakończyła się pomyślnie.",
|
||||
"STR_PART_RESIZE_FAILED":"Nieniszcząca instalacja nie powiodła się, sprawdź log.txt po szczegóły.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Nieniszcząca instalacja Ventoy została zatrzymana, ponieważ niektóre wymagania nie zostały spełnione. Sprawdź log.txt po szczegóły.",
|
||||
"STR_INSTALL_YES_TIP1":"Ostrzeżenie: Dane zostaną utracone!",
|
||||
"STR_INSTALL_YES_TIP2":"Wpisz YES w poniższym polu tekstowym, aby potwierdzić, że naprawdę chcesz przeprowadzić nową instalację zamiast aktualizacji.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -686,24 +686,24 @@
|
||||
"STR_MENU_PART_STYLE":"Type de partition",
|
||||
"STR_DISK_2TB_MBR_ERROR":"Sélectionnez le type GPT pour les disques de plus de 2 To",
|
||||
"STR_SHOW_ALL_DEV":"Afficher tous les périphériques",
|
||||
"STR_PART_ALIGN_4KB":"Alignez les partitions sur 4 ko",
|
||||
"STR_PART_ALIGN_4KB":"Alignez les partitions sur 4 Ko",
|
||||
"STR_WEB_COMMUNICATION_ERR":"Erreur de communication :",
|
||||
"STR_WEB_REMOTE_ABNORMAL":"Erreur de communication : anomalie sur le serveur",
|
||||
"STR_WEB_REQUEST_TIMEOUT":"Erreur de communication : délai d'attente dépassé",
|
||||
"STR_WEB_SERVICE_UNAVAILABLE":"Erreur de communication : service inaccessible",
|
||||
"STR_WEB_TOKEN_MISMATCH":"Statut du démon mis à jour, veuillez réessayer plus tard.",
|
||||
"STR_WEB_SERVICE_BUSY":"Service surchargé, veuillez réessayer plus tard.",
|
||||
"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":"Générer un fichier VTSI",
|
||||
"STR_VTSI_CREATE_TIP":"N'écrira pas sur le périphérique cette fois-ci, mais générera uniquement un fichier VTSI#@Continuer ?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"Fichier VTSI créé avec succès!#@Vous pouvez utiliser Rufus (3.15+) pour l'écrire sur le périphérique afin de terminer l'installation de Ventoy.",
|
||||
"STR_VTSI_CREATE_FAILED":"La création du fichier VTSI a échoué.",
|
||||
"STR_MENU_PART_RESIZE":"Installation non destructive",
|
||||
"STR_PART_RESIZE_TIP":"Si possible, Ventoy essaiera une installation non destructive. #@Continuer ?",
|
||||
"STR_PART_RESIZE_SUCCESS":"Félicitations !#@L'installation non destructive de Ventoy s'est terminée avec succès.",
|
||||
"STR_PART_RESIZE_FAILED":"L'installation non destructive a échoué, consultez log.txt pour plus de détails.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"L'installation non destructive de Ventoy s'est arrêtée car certaines conditions ne peuvent pas être remplies. Consultez log.txt pour plus de détails.",
|
||||
"STR_INSTALL_YES_TIP1":"Attention : les données seront perdues !",
|
||||
"STR_INSTALL_YES_TIP2":"Veuillez saisir YES dans la zone de texte ci-dessous pour confirmer que vous souhaitez bien effectuer une nouvelle installation au lieu d'une mise à niveau.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -845,9 +845,9 @@
|
||||
"STR_INSTALL_TIP":"El dispositivo será formateado y todos los datos se perderán.#@¿Continuar?",
|
||||
"STR_INSTALL_TIP2":"El dispositivo será formateado y todos los datos se perderán.#@¿Continuar? (Doble Comprobación)",
|
||||
"STR_INSTALL_SUCCESS":"¡Felicitaciones!#@Ventoy ha sido instalado exitosamente en el dispositivo.",
|
||||
"STR_INSTALL_FAILED":"Ocurrió un error durante la instalación. Puedes reconectar el dispositivo USB e intentar de nuevo. Comprueba log.txt para detalle.",
|
||||
"STR_INSTALL_FAILED":"Ocurrió un error durante la instalación. Puedes reinsertar el dispositivo USB e intentar de nuevo. Comprueba log.txt para detalles. Si siempre falla, consulta las PF en el sitio web oficial.",
|
||||
"STR_UPDATE_SUCCESS":"¡Felicitaciones!#@Ventoy ha sido actualizado exitosamente en el dispositivo.",
|
||||
"STR_UPDATE_FAILED":"Ocurrió un error durante la actualización. Puedes reconectar el dispositivo USB e intentar de nuevo. Comprueba log.txt para detalle.",
|
||||
"STR_UPDATE_FAILED":"Ocurrió un error durante la actualización. Puedes reinsertar el dispositivo USB e intentar de nuevo. Comprueba log.txt para detalles. Si siempre falla, consulta las PF en el sitio web oficial.",
|
||||
"STR_WAIT_PROCESS":"Un hilo está ejecutándose, por favor espera...",
|
||||
"STR_MENU_OPTION":"Opción",
|
||||
"STR_MENU_SECURE_BOOT":"Soporte De Arranque Seguro",
|
||||
@@ -858,7 +858,7 @@
|
||||
"STR_SPACE_VAL_INVALID":"Valor inválido para espacio reservado",
|
||||
"STR_MENU_CLEAR":"Limpiar Ventoy",
|
||||
"STR_CLEAR_SUCCESS":"Ventoy ha sido removido exitosamente desde el dispositivo.",
|
||||
"STR_CLEAR_FAILED":"Ocurrió un error al limpiar Ventoy desde el dispositivo. Puedes reconectar el dispositivo USB e intentar de nuevo. Comprueba log.txt para detalle.",
|
||||
"STR_CLEAR_FAILED":"Ocurrió un error al remover Ventoy del dispositivo. Puedes reinsertar el dispositivo USB e intentar de nuevo. Comprueba log.txt para detalles.",
|
||||
"STR_MENU_PART_STYLE":"Estilo De Partición",
|
||||
"STR_DISK_2TB_MBR_ERROR":"Por favor selecciona GPT para dispositivos sobre 2TB",
|
||||
"STR_SHOW_ALL_DEV":"Mostrar Todos Los Dispositivos",
|
||||
@@ -873,13 +873,13 @@
|
||||
"STR_VTSI_CREATE_TIP":"Esta vez no se escribirá al dispositivo, pero solo generará un archivo VTSI#@¿Continuar?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"¡Archivo VTSI creado exitosamente!#@Puedes usar Rufus(3.15+) para escribirlo al dispositivo a fin de completar la instalación de Ventoy.",
|
||||
"STR_VTSI_CREATE_FAILED":"Fallo en el archivo VTSI creado.",
|
||||
"STR_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_PART_RESIZE":"Instalación no destructiva",
|
||||
"STR_PART_RESIZE_TIP":"Ventoy intentará una instalación no destructiva si es posible. #@¿Continuar?",
|
||||
"STR_PART_RESIZE_SUCCESS":"¡Felicitaciones!#@La instalación no destructiva de Ventoy a finalizado exitosamente.",
|
||||
"STR_PART_RESIZE_FAILED":"Instalación no destructiva fallida, Comprueba log.txt para detalles.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Instalación no destructiva de Ventoy detenida porque algunas condiciones no se pueden cumplir. Comprueba log.txt para detalles.",
|
||||
"STR_INSTALL_YES_TIP1":"Advertencia: ¡Los datos se perderán!",
|
||||
"STR_INSTALL_YES_TIP2":"Por favor ingresa YES en el cuadro de texto a continuación para confirmar que realmente quieres realizar una instalación nueva en vez de actualizar.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -1199,9 +1199,9 @@
|
||||
"STR_INSTALL_TIP":"選択した機器は完全に初期化され、保存されたデータは二度と復元できません。#@続行しますか?",
|
||||
"STR_INSTALL_TIP2":"選択した機器は完全に初期化され、保存されたデータは二度と復元できません。#@続行しますか?(再確認)",
|
||||
"STR_INSTALL_SUCCESS":"おめでとうございます。#@Ventoyの導入は正常に行われました。",
|
||||
"STR_INSTALL_FAILED":"導入中にエラーが発生しました。機器を再接続してもう一度やり直してください。詳細な記録は log.txt にあります。",
|
||||
"STR_INSTALL_FAILED":"導入中にエラーが発生しました。機器を再接続してもう一度やり直してください。詳細な記録はlog.txtにあります。",
|
||||
"STR_UPDATE_SUCCESS":"おめでとうございます。#@Ventoyの更新は正常に行われました。",
|
||||
"STR_UPDATE_FAILED":"更新中にエラーが発生しました。機器を再接続してもう一度やり直してください。詳細な記録は log.txt にあります。",
|
||||
"STR_UPDATE_FAILED":"更新中にエラーが発生しました。機器を再接続してもう一度やり直してください。詳細な記録はlog.txtにあります。",
|
||||
"STR_WAIT_PROCESS":"スレッドが稼動しています。お待ちください...",
|
||||
"STR_MENU_OPTION":"設定",
|
||||
"STR_MENU_SECURE_BOOT":"セキュアブート",
|
||||
@@ -1209,10 +1209,10 @@
|
||||
"STR_BTN_OK":"了解",
|
||||
"STR_BTN_CANCEL":"取消",
|
||||
"STR_PRESERVE_SPACE":"機器の最後に領域を確保する",
|
||||
"STR_SPACE_VAL_INVALID":"確保する領域の値が無効です",
|
||||
"STR_SPACE_VAL_INVALID":"確保する領域の値が正しくありません",
|
||||
"STR_MENU_CLEAR":"Ventoyを削除",
|
||||
"STR_CLEAR_SUCCESS":"Ventoyが機器から削除されました。",
|
||||
"STR_CLEAR_FAILED":"Ventoyを機器から削除できませんでした。機器を再接続してもう一度やり直してください。詳細な記録は log.txt にあります。",
|
||||
"STR_CLEAR_FAILED":"Ventoyを機器から削除できませんでした。機器を再接続してもう一度やり直してください。詳細な記録はlog.txtにあります。",
|
||||
"STR_MENU_PART_STYLE":"区画の構成方式",
|
||||
"STR_DISK_2TB_MBR_ERROR":"2TB以上の機器にはGPTを使用してください。",
|
||||
"STR_SHOW_ALL_DEV":"すべての機器を表示",
|
||||
@@ -1230,10 +1230,10 @@
|
||||
"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":"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":"Ventoyを非破壊的に導入できませんでした。詳細な記録はlog.txtにあります。",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoyを非破壊的に導入できませんでした。非破壊的導入にあたっての要件が満たされていません。詳細な記録はlog.txtにあります。",
|
||||
"STR_INSTALL_YES_TIP1":"警告: データが消去されます",
|
||||
"STR_INSTALL_YES_TIP2":"Ventoyを更新するのではなく新規に導入するということを確認するために,下の入力欄に「YES」と入力してください。",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -1291,8 +1291,8 @@
|
||||
"STR_PART_RESIZE_SUCCESS":"Congratulazioni!#@Installazione non distruttiva di Ventoy completata.",
|
||||
"STR_PART_RESIZE_FAILED":"Installazione non distruttiva fallita.#@Per i dettagli controlla il file log.txt.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"L'installazione non distruttiva di Ventoy è stata interrotta perché alcune condizioni non possono essere soddisfatte.#@Per i dettagli controlla il file 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":"Attenzione: i dati verranno persi!",
|
||||
"STR_INSTALL_YES_TIP2":"Digita YES nella casella di testo qui sotto per confermare che vuoi davvero eseguire un'installazione pulita anziché un aggiornamento.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -1414,7 +1414,7 @@
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
{
|
||||
{
|
||||
"name":"Traditional Chinese(正體中文)",
|
||||
"FontFamily":"新細明體",
|
||||
"FontSize":14,
|
||||
@@ -1468,8 +1468,8 @@
|
||||
"STR_PART_RESIZE_SUCCESS":"恭喜!#@Ventoy 已完成無損安裝。",
|
||||
"STR_PART_RESIZE_FAILED":"Ventoy 無損安裝失敗。詳細訊息請檢視 log.txt 檔案。",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy 無損安裝已中止因為未滿足部分條件。詳細訊息請檢視 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":"警告:資料將會遺失!",
|
||||
"STR_INSTALL_YES_TIP2":"請在下方的文字輸入框輸入 YES 來證實您想要進行全新安裝取代升級。",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -2057,8 +2057,8 @@
|
||||
"STR_PART_RESIZE_SUCCESS":"Selamat!#@Pemasangan tanpa merusakkan Ventoy berhasil.",
|
||||
"STR_PART_RESIZE_FAILED":"Pemasangan tanpa merusakkan gagal, periksa berkas log.txt untuk detil.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Pemasangan tanpa merusakkan Ventoy terhenti karena beberapa kondisi yang tidak mendukung. Periksa berkas log.txt untuk detil.",
|
||||
"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":"Peringatan: Data akan hilang!",
|
||||
"STR_INSTALL_YES_TIP2":"Silakan ketik YES pada kotak tulis di bawah untuk meyakinkan bahwa anda memang untuk melakukan pemasangan baru ketimbang memperbaruinya",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -2318,15 +2318,15 @@
|
||||
"STR_UPDATE_TIP":"Varna nadgradnja. ISO datoteke ne bodo spremenjene.#@Nadaljujem?",
|
||||
"STR_INSTALL_TIP":"Ta disk bo formatiran in vsi podatki bodo izbrisani.#@Nadaljujem?",
|
||||
"STR_INSTALL_TIP2":"Ta disk bo formatiran in vsi podatki bodo izbrisani.#@Nadaljujem? (Druga potrditev)",
|
||||
"STR_INSTALL_SUCCESS":"Čestitamo!#@ventoy je bil uspešno nameščen na napravo.",
|
||||
"STR_INSTALL_SUCCESS":"Čestitamo!#@Ventoy je bil uspešno nameščen na napravo.",
|
||||
"STR_INSTALL_FAILED":"Med namestitvijo je prišlo do napake. Iztaknite in ponovno priklopite USB. Preverite log.txt za podrobnosti.",
|
||||
"STR_UPDATE_SUCCESS":"Čestitamo!#@ventoy na napravi je bil uspešno posodobljen.",
|
||||
"STR_UPDATE_SUCCESS":"Čestitamo!#@Ventoy na napravi je bil uspešno posodobljen.",
|
||||
"STR_UPDATE_FAILED":"Prišlo je do napake med nadgradnjo. Iztaknite in ponovno priklopite USB. Preverite log.txt za podrobnosti.",
|
||||
"STR_WAIT_PROCESS":"Proces teče, prosimo počakajte, ...",
|
||||
"STR_MENU_OPTION":"Nastavitve",
|
||||
"STR_MENU_SECURE_BOOT":"Podpora Secure Boot",
|
||||
"STR_MENU_PART_CFG":"Konfiguracija particij",
|
||||
"STR_BTN_OK":"V redu",
|
||||
"STR_BTN_OK":"Vredu",
|
||||
"STR_BTN_CANCEL":"Prekliči",
|
||||
"STR_PRESERVE_SPACE":"Ohrani nekaj prostora na koncu particije",
|
||||
"STR_SPACE_VAL_INVALID":"Nepravilna vrednost za rezerviran prostor",
|
||||
@@ -2343,17 +2343,17 @@
|
||||
"STR_WEB_SERVICE_UNAVAILABLE":"Napaka v komunikaciji: storitev ni na voljo",
|
||||
"STR_WEB_TOKEN_MISMATCH":"Zahteva storitve je potekla, prosim poskusite kasneje.",
|
||||
"STR_WEB_SERVICE_BUSY":"Storitev je zasedena, prosim poskusite kasneje.",
|
||||
"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":"Ustvari VTSI datoteko",
|
||||
"STR_VTSI_CREATE_TIP":"Spremembe na napravi ne bo, generirala se bo samo VTSI datoteka#@Nadaljujem?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"VTSI datoteka ustvarjena uspešno!#@Uporabi naj se Rufus(3.15+) za zapis na napravo in uspešno zaključeno inštalacijo Ventoy-a.",
|
||||
"STR_VTSI_CREATE_FAILED":"Ustvarjanje VTSI datoteke ni uspelo.",
|
||||
"STR_MENU_PART_RESIZE":"Inštalacija brez brisanja.",
|
||||
"STR_PART_RESIZE_TIP":"Ventoy bo poskusil inštalacijo brez brisanja podatkov. #@Nadaljujem?",
|
||||
"STR_PART_RESIZE_SUCCESS":"Čestitke!#@Ventoy je bil uspešno nameščen.",
|
||||
"STR_PART_RESIZE_FAILED":"Inštalacija ni uspela, preveri log.txt za podrobnosti.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy je ustavil inštalacijo ker nekateri pogoji niso zadostni. Preveri log.txt a podrobnosti.",
|
||||
"STR_INSTALL_YES_TIP1":"Pozor: Podatki bodo izbrisani!",
|
||||
"STR_INSTALL_YES_TIP2":"Prosim vtipkajte YES v spodnje okno da potrdite čisto inštalacijo in ne zgolj nadgradnje.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
|
@@ -164,11 +164,40 @@ end:
|
||||
return mount;
|
||||
}
|
||||
|
||||
static int ventoy_mount_path_escape(char *src, char *dst, int len)
|
||||
{
|
||||
int i = 0;
|
||||
int n = 0;
|
||||
|
||||
dst[len - 1] = 0;
|
||||
|
||||
for (i = 0; i < len - 1; i++)
|
||||
{
|
||||
if (src[i] == '\\' && src[i + 1] == '0' && src[i + 2] == '4' && src[i + 3] == '0')
|
||||
{
|
||||
dst[n++] = ' ';
|
||||
i += 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
dst[n++] = src[i];
|
||||
}
|
||||
|
||||
if (src[i] == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ventoy_try_umount_disk(const char *devpath)
|
||||
{
|
||||
int rc;
|
||||
int len;
|
||||
char line[512];
|
||||
char line[1024];
|
||||
char mntpt[1024];
|
||||
char *pos1 = NULL;
|
||||
char *pos2 = NULL;
|
||||
FILE *fp = NULL;
|
||||
@@ -193,14 +222,15 @@ int ventoy_try_umount_disk(const char *devpath)
|
||||
*pos2 = 0;
|
||||
}
|
||||
|
||||
rc = umount(pos1 + 1);
|
||||
ventoy_mount_path_escape(pos1 + 1, mntpt, sizeof(mntpt));
|
||||
rc = umount(mntpt);
|
||||
if (rc)
|
||||
{
|
||||
vdebug("umount %s %s [ failed ] error:%d\n", devpath, pos1 + 1, errno);
|
||||
vdebug("umount <%s> <%s> [ failed ] error:%d\n", devpath, mntpt, errno);
|
||||
}
|
||||
else
|
||||
{
|
||||
vdebug("umount %s %s [ success ]\n", devpath, pos1 + 1);
|
||||
vdebug("umount <%s> <%s> [ success ]\n", devpath, mntpt);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -210,7 +240,6 @@ int ventoy_try_umount_disk(const char *devpath)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int ventoy_read_file_to_buf(const char *FileName, int ExtLen, void **Bufer, int *BufLen)
|
||||
{
|
||||
int FileSize;
|
||||
|
@@ -495,6 +495,7 @@ static int VentoyProcSecureBoot(int SecureBoot)
|
||||
fl_remove("/EFI/BOOT/grubx64.efi");
|
||||
fl_remove("/EFI/BOOT/grubx64_real.efi");
|
||||
fl_remove("/EFI/BOOT/MokManager.efi");
|
||||
fl_remove("/EFI/BOOT/mmx64.efi");
|
||||
fl_remove("/ENROLL_THIS_KEY_IN_MOKMANAGER.cer");
|
||||
|
||||
file = fl_fopen("/EFI/BOOT/BOOTX64.EFI", "wb");
|
||||
@@ -685,6 +686,7 @@ static int ventoy_write_gpt_part_table(int fd, uint64_t disksize, VTOY_GPT_INFO
|
||||
static void * ventoy_update_thread(void *data)
|
||||
{
|
||||
int fd;
|
||||
int updateMBR;
|
||||
ssize_t len;
|
||||
off_t offset;
|
||||
MBR_HEAD MBR;
|
||||
@@ -742,17 +744,32 @@ static void * ventoy_update_thread(void *data)
|
||||
len = write(fd, disk->vtoydata.rsvdata, sizeof(disk->vtoydata.rsvdata));
|
||||
vlog("Writing reserve data offset:%llu len:%llu ...\n", (_ull)offset, (_ull)len);
|
||||
|
||||
updateMBR = 0;
|
||||
memcpy(&MBR, &(disk->vtoydata.gptinfo.MBR), 512);
|
||||
|
||||
if (disk->vtoydata.partition_style == 0 && MBR.PartTbl[0].Active == 0)
|
||||
{
|
||||
MBR.PartTbl[0].Active = 0x80;
|
||||
MBR.PartTbl[1].Active = 0;
|
||||
MBR.PartTbl[2].Active = 0;
|
||||
MBR.PartTbl[3].Active = 0;
|
||||
|
||||
updateMBR = 1;
|
||||
vlog("set MBR partition 1 active flag enabled\n");
|
||||
}
|
||||
|
||||
if (MBR.BootCode[0x190] != 0x56 || MBR.BootCode[0x191] != 0x54)
|
||||
{
|
||||
vlog("set VT data %02x %02x\n", MBR.BootCode[0x190], MBR.BootCode[0x191]);
|
||||
MBR.BootCode[0x190] = 0x56;
|
||||
MBR.BootCode[0x191] = 0x54;
|
||||
updateMBR = 1;
|
||||
}
|
||||
|
||||
if (updateMBR)
|
||||
{
|
||||
offset = lseek(fd, 0, SEEK_SET);
|
||||
len = write(fd, &MBR, 512);
|
||||
vlog("set MBR partition 1 active flag enabled offset:%llu len:%llu\n", (_ull)offset, (_ull)len);
|
||||
vlog("update MBR offset:%llu len:%llu\n", (_ull)offset, (_ull)len);
|
||||
}
|
||||
|
||||
g_current_progress = PT_SYNC_DATA1;
|
||||
|
@@ -303,6 +303,58 @@ static int read_pid_cmdline(long pid, char *Buffer, int BufLen)
|
||||
return read_file_1st_line(path, Buffer, BufLen);
|
||||
}
|
||||
|
||||
static int is_dir_exist(const char *fmt, ...)
|
||||
{
|
||||
va_list arg;
|
||||
struct stat st;
|
||||
char path[4096];
|
||||
|
||||
va_start(arg, fmt);
|
||||
vsnprintf(path, sizeof(path), fmt, arg);
|
||||
va_end(arg);
|
||||
|
||||
memset(&st, 0, sizeof(st));
|
||||
if (stat(path, &st) < 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (st.st_mode & S_IFDIR)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void touch_new_file(char *filename)
|
||||
{
|
||||
char *pos = NULL;
|
||||
FILE *fp = NULL;
|
||||
|
||||
if (access(filename, F_OK) == -1)
|
||||
{
|
||||
for (pos = filename; *pos; pos++)
|
||||
{
|
||||
if (*pos == '/')
|
||||
{
|
||||
*pos = 0;
|
||||
if (!is_dir_exist("%s", filename))
|
||||
{
|
||||
mkdir(filename, 0755);
|
||||
}
|
||||
*pos = '/';
|
||||
}
|
||||
}
|
||||
|
||||
fp = fopen(filename, "w+");
|
||||
if (fp)
|
||||
{
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int find_exe_path(const char *exe, char *pathbuf, int buflen)
|
||||
{
|
||||
int i;
|
||||
@@ -1250,8 +1302,12 @@ int main(int argc, char **argv)
|
||||
{
|
||||
if (argv[i] && argv[i + 1] && strcmp(argv[i], "-l") == 0)
|
||||
{
|
||||
touch_new_file(argv[i + 1]);
|
||||
snprintf(g_log_file, sizeof(g_log_file), "%s", argv[i + 1]);
|
||||
break;
|
||||
}
|
||||
else if (argv[i] && argv[i + 1] && strcmp(argv[i], "-i") == 0)
|
||||
{
|
||||
touch_new_file(argv[i + 1]);
|
||||
}
|
||||
else if (argv[i] && strcmp(argv[i], "--xdg") == 0)
|
||||
{
|
||||
@@ -1259,14 +1315,36 @@ int main(int argc, char **argv)
|
||||
if (env)
|
||||
{
|
||||
g_xdg_log = 1;
|
||||
snprintf(g_log_file, sizeof(g_log_file), "%s/ventoy.log", env);
|
||||
snprintf(g_log_file, sizeof(g_log_file), "%s/ventoy/ventoy.log", env);
|
||||
touch_new_file(g_log_file);
|
||||
}
|
||||
else
|
||||
{
|
||||
env = getenv("HOME");
|
||||
if (env && is_dir_exist("%s/.cache", env))
|
||||
{
|
||||
g_xdg_log = 1;
|
||||
snprintf(g_log_file, sizeof(g_log_file), "%s/.cache/ventoy/ventoy.log", env);
|
||||
touch_new_file(g_log_file);
|
||||
}
|
||||
}
|
||||
|
||||
env = getenv("XDG_CONFIG_HOME");
|
||||
if (env)
|
||||
{
|
||||
g_xdg_ini = 1;
|
||||
snprintf(g_ini_file, sizeof(g_ini_file), "%s/Ventoy2Disk.ini", env);
|
||||
snprintf(g_ini_file, sizeof(g_ini_file), "%s/ventoy/Ventoy2Disk.ini", env);
|
||||
touch_new_file(g_ini_file);
|
||||
}
|
||||
else
|
||||
{
|
||||
env = getenv("HOME");
|
||||
if (env && is_dir_exist("%s/.config", env))
|
||||
{
|
||||
g_xdg_ini = 1;
|
||||
snprintf(g_ini_file, sizeof(g_ini_file), "%s/.config/ventoy/Ventoy2Disk.ini", env);
|
||||
touch_new_file(g_ini_file);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1 +1 @@
|
||||
20220108 22:41:02
|
||||
20220430 13:06:42
|
@@ -723,7 +723,7 @@
|
||||
|
||||
<footer class="main-footer">
|
||||
<div class="pull-right hidden-xs">
|
||||
<b id="plugson_build_date">20220311 21:24:51</b>
|
||||
<b id="plugson_build_date">20220430 13:06:42</b>
|
||||
</div>
|
||||
<strong><a href="https://www.ventoy.net" target="_blank">https://www.ventoy.net</a></strong>
|
||||
</footer>
|
||||
|
@@ -195,7 +195,7 @@
|
||||
$('input:text[id=id_tip_text_top]').val(data.top);
|
||||
$('input:text[id=id_tip_text_color]').val(data.color);
|
||||
|
||||
FillTipTable(data);
|
||||
FillTipTable(data.tips);
|
||||
}
|
||||
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
}
|
||||
|
||||
current_tab_index = index;
|
||||
VtoyFillCurrentPageItem(m_data_tip[index].tips);
|
||||
VtoyFillCurrentPageItem(m_data_tip[index]);
|
||||
}
|
||||
|
||||
//Main process
|
||||
@@ -332,8 +332,9 @@
|
||||
|
||||
$('input:text[id=id_tip_text_left]').change(function() {
|
||||
var value = $('input:text[id=id_tip_text_left]').val();
|
||||
if (ventoy_check_percent(value)) {
|
||||
if (ventoy_check_percent(value)) {
|
||||
VtoySaveCurrentPage();
|
||||
m_data_tip[current_tab_index].left = value;
|
||||
} else {
|
||||
Message.error(g_vtoy_cur_language.STR_INVALID_PERCENT);
|
||||
$('input:text[id=id_tip_text_left]').val(m_data_tip[current_tab_index].left);
|
||||
@@ -343,6 +344,7 @@
|
||||
var value = $('input:text[id=id_tip_text_top]').val();
|
||||
if (ventoy_check_percent(value)) {
|
||||
VtoySaveCurrentPage();
|
||||
m_data_tip[current_tab_index].top = value;
|
||||
} else {
|
||||
Message.error(g_vtoy_cur_language.STR_INVALID_PERCENT);
|
||||
$('input:text[id=id_tip_text_top]').val(m_data_tip[current_tab_index].top);
|
||||
@@ -353,6 +355,7 @@
|
||||
if (value.length > 0) {
|
||||
if (ventoy_check_color(value)) {
|
||||
VtoySaveCurrentPage();
|
||||
m_data_tip[current_tab_index].color = value;
|
||||
} else {
|
||||
Message.error(g_vtoy_cur_language.STR_INVALID_COLOR);
|
||||
$('input:text[id=id_tip_text_color]').val(m_data_tip[current_tab_index].color);
|
||||
|
@@ -18,7 +18,7 @@ You can also browse ISO/WIM/IMG/VHD(x)/EFI files in local disk and boot them.<br
|
||||
x86 Legacy BIOS, IA32 UEFI, x86_64 UEFI, ARM64 UEFI and MIPS64EL UEFI are supported in the same way.<br/>
|
||||
Both MBR and GPT partition style are supported in the same way.<br/>
|
||||
Most type of OS supported(Windows/WinPE/Linux/Unix/ChromeOS/Vmware/Xen...) <br/>
|
||||
830+ ISO files are tested (<a href="https://www.ventoy.net/en/isolist.html">List</a>). 90%+ distros in <a href="https://distrowatch.com/">distrowatch.com</a> supported (<a href="https://www.ventoy.net/en/distrowatch.html">Details</a>). <br/>
|
||||
880+ ISO files are tested (<a href="https://www.ventoy.net/en/isolist.html">List</a>). 90%+ distros in <a href="https://distrowatch.com/">distrowatch.com</a> supported (<a href="https://www.ventoy.net/en/distrowatch.html">Details</a>). <br/>
|
||||
<br/>Official Website: <a href=https://www.ventoy.net>https://www.ventoy.net</a>
|
||||
</h4>
|
||||
|
||||
@@ -70,7 +70,7 @@ A GUI Ventoy plugin configurator. [VentoyPlugson](https://www.ventoy.net/en/plug
|
||||
* FAT32/exFAT/NTFS/UDF/XFS/Ext2(3)(4) supported for main partition
|
||||
* ISO files larger than 4GB supported
|
||||
* Native boot menu style for Legacy & UEFI
|
||||
* Most types of OS supported, 830+ iso files tested
|
||||
* Most types of OS supported, 880+ iso files tested
|
||||
* Linux vDisk boot supported
|
||||
* Not only boot but also complete installation process
|
||||
* Menu dynamically switchable between List/TreeView mode
|
||||
@@ -88,7 +88,7 @@ A GUI Ventoy plugin configurator. [VentoyPlugson](https://www.ventoy.net/en/plug
|
||||
|
||||
|
||||
# Installation Instructions
|
||||
See [https://www.ventoy.net/en/doc_start.html](https://www.ventoy.net/en/doc_start.html) for detail
|
||||
See [https://www.ventoy.net/en/doc_start.html](https://www.ventoy.net/en/doc_start.html) for detailed instructions.
|
||||
|
||||
# Compile Instructions
|
||||
Please refer to [BuildVentoyFromSource.txt](DOC/BuildVentoyFromSource.txt)
|
||||
|
@@ -727,6 +727,7 @@ int VentoyProcSecureBoot(BOOL SecureBoot)
|
||||
fl_remove("/EFI/BOOT/grubx64.efi");
|
||||
fl_remove("/EFI/BOOT/grubx64_real.efi");
|
||||
fl_remove("/EFI/BOOT/MokManager.efi");
|
||||
fl_remove("/EFI/BOOT/mmx64.efi");
|
||||
fl_remove("/ENROLL_THIS_KEY_IN_MOKMANAGER.cer");
|
||||
|
||||
file = fl_fopen("/EFI/BOOT/BOOTX64.EFI", "wb");
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user