Compare commits

..

51 Commits

Author SHA1 Message Date
longpanda
025425f260 1.0.75 release 2022-05-31 19:22:02 +08:00
longpanda
b4120c4079 Update Super UEFIinSecureBoot Disk v3-2 2022-05-31 18:58:37 +08:00
longpanda
7f2f845a68 Auto use memdisk mode when booting iKuai OS. 2022-05-31 17:39:54 +08:00
longpanda
2cd22da8fb Fix a bug when booting latest Alpine linux. 2022-05-31 16:42:41 +08:00
longpanda
7b70a5278a Support programs loading for DLC Boot PE. (#1647) 2022-05-31 14:11:24 +08:00
M
f8b1f98304 Update Polish translation (#1637)
Fix typos and add new translations
2022-05-29 23:21:42 +08:00
longpanda
ddf0617d83 Fix the bug when booting ALT Linux in UEFI mode. (#1645) 2022-05-28 22:33:36 +08:00
longpanda
9b14b418b4 Fix a bug when UEFI booting KaOS-2022.04-x86_64.iso 2022-05-20 23:22:37 +08:00
longpanda
fe137522ad Fix a bug when boot in F2 browser mode if the computer has more than one disks with same size. 2022-05-08 11:41:12 +08:00
孟武.尼德霍格.龍
121d927367 Update Traditional Chinese Strings (#1615) 2022-05-07 17:35:17 +08:00
longpanda
75f3e4c5ee Add EDK debug info. 2022-05-06 14:44:10 +08:00
longpanda
fcf10deff3 Merge branch 'master' of https://github.com/ventoy/Ventoy 2022-05-05 19:12:15 +08:00
longpanda
4d4f958429 Fix the hardcoded dev/dm-0 2022-05-05 19:11:55 +08:00
e667233994 [l10n/jp] modify jp localization (#1608)
- Corrected no-need spaces (e.g. spaces after punctuation).
- Newly translated untranslated strings.
2022-05-04 16:55:05 +08:00
bovirus
57944520e5 Update italian language (#1598)
@ventoy 

Please check and merge. Thanks.
2022-05-04 16:54:56 +08:00
Urajmal
4544e221d3 Updated Slovenian language (#1597)
I did an update on Slovenian language, you can check out any problems.
2022-05-04 16:54:43 +08:00
longpanda
3263b64b8a Reduce required low memory. 2022-05-03 19:13:29 +08:00
longpanda
69da3a59d8 Reduce the required low memory. 2022-05-03 18:41:16 +08:00
longpanda
75c6c7257f Add debug info fix 2022-05-03 08:54:52 +08:00
longpanda
d4d8736620 Add debug info 2022-05-02 21:05:58 +08:00
longpanda
63f9331c31 Fix the bug when booting ATLAS Windows ISO. 2022-05-02 20:19:54 +08:00
longpanda
e1d161af4f Fix a issue when booting easyos 3.4.3+ 2022-05-02 18:21:30 +08:00
longpanda
9baa95359c Fix a bug in menu tip plugin webpage of VentoyPlugson. (#1602) 2022-04-30 14:52:00 +08:00
longpanda
5f3d7f3823 Fix the bug when booting linx iso (#1600) 2022-04-29 19:57:04 +08:00
longpanda
3d1dc81fda fix lvm issue 2022-04-29 01:13:04 +08:00
longpanda
3ebc610e7d fix the lvm issue 2022-04-29 00:51:56 +08:00
longpanda
60588c8442 1.0.74 release 2022-04-28 22:27:52 +08:00
longpanda
c4c05fc073 Add support for EulerOS 2022-04-28 22:18:02 +08:00
longpanda
0984f5ba58 Fix a bug that Windows ISO in local disk can not install when boot through F2 browser mode in Legacy BIOS mode. 2022-04-28 22:07:30 +08:00
longpanda
fd0d335eb6 Fix a bug when install Ventoy if the USB already mounted at a path that contains space. 2022-04-27 10:25:44 +08:00
Mastiggia
12a284b543 Update French translation (#1589) 2022-04-26 16:25:04 +08:00
longpanda
9e2e4ec0a9 Fix a bug for Linux GUI program when update from old release. (#1590) 2022-04-26 14:49:07 +08:00
longpanda
480afee1a7 Update FUNDING.yml 2022-04-25 22:14:13 +08:00
longpanda
1305945bc0 Update FUNDING.yml 2022-04-25 22:09:28 +08:00
longpanda
2feb148982 --xdg improvement 2022-04-25 10:38:16 +08:00
longpanda
5eec535391 --xdg improvement 2022-04-24 20:14:26 +08:00
longpanda
33a562c273 support inst.ks=cdrom:/xxx for CentOS 7 2022-04-24 15:28:32 +08:00
longpanda
75517039a1 Firstly try to use chainload to boot .efi files. 2022-04-20 12:19:47 +08:00
longpanda
620229508b Show the directory path in the return menu for TreeView mode and Browser mode. 2022-04-19 15:34:31 +08:00
Lyrx997
5553dd4fc4 Updated Italian language (#1574) 2022-04-18 17:53:11 +08:00
longpanda
89addae48f Fix the issue when booting Prime OS 2.1.0 (#1580) 2022-04-18 13:43:38 +08:00
longpanda
682e8cdc42 Fixe the boot issue for Fedora when VTOY_LINUX_REMOUNT=1 2022-04-16 22:17:23 +08:00
Ida Bagus
1882cfcce2 Update indonesian (#1573) 2022-04-12 10:32:52 +08:00
ShalokShalom
b8be46f0dc Update README.md (#1570) 2022-04-11 09:03:40 +08:00
longpanda
07693bf840 cc 2022-04-09 18:07:04 +08:00
longpanda
b4a059dd68 Add missing file 2022-04-08 17:21:36 +08:00
longpanda
858eec99a1 Fix the log/ini owner for VentoyGUI in linux. 2022-04-08 15:35:22 +08:00
VenusGirl❤
8180382fe1 Update languages.json (#1564)
Korean Update
2022-04-07 15:12:09 +08:00
MELERIX
a5d9b1fd43 Update Spanish Translation (#1566) 2022-04-07 09:04:05 +08:00
VenusGirl❤
8b76e06f6d Update languages.json (#1565)
Korean Update
2022-04-07 09:03:23 +08:00
VenusGirl❤
ecb133ed5e Update languages.json (#1563)
Korean Update
2022-04-06 22:06:33 +08:00
101 changed files with 670 additions and 243 deletions

2
.github/FUNDING.yml vendored
View File

@@ -2,11 +2,11 @@
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username 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 ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 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 community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: Ventoy liberapay: Ventoy
open_collective: ventoy
issuehunt: # Replace with a single IssueHunt username issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie 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'] 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']

View File

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

View File

@@ -577,7 +577,8 @@ STATIC EFI_STATUS EFIAPI ventoy_find_iso_disk(IN EFI_HANDLE ImageHandle)
continue; 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; pMBR = (MBR_HEAD *)pBuffer;
if (g_os_param_reserved[6] == 0 && pMBR->PartTbl[0].FsFlag != 0xEE) 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], Handles[i],
EFI_OPEN_PROTOCOL_GET_PROTOCOL); 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)); ConvertDevicePathToText(gBlockData.pDiskDevPath, FALSE, FALSE));
break; break;
} }

View File

@@ -98,7 +98,9 @@ typedef struct ventoy_os_param
UINT64 vtoy_reserved[4]; // Internal use by ventoy UINT64 vtoy_reserved[4]; // Internal use by ventoy
UINT8 reserved[31]; UINT8 vtoy_disk_signature[4];
UINT8 reserved[27];
}ventoy_os_param; }ventoy_os_param;
#pragma pack() #pragma pack()

View File

@@ -155,7 +155,8 @@ STATIC EFI_STATUS EFIAPI ventoy_read_iso_sector
ventoy_override_chunk *pOverride = g_override_chunk; ventoy_override_chunk *pOverride = g_override_chunk;
EFI_BLOCK_IO_PROTOCOL *pRawBlockIo = gBlockData.pRawBlockIo; 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; ReadStart = Sector * 2048;
ReadEnd = (Sector + Count) * 2048; ReadEnd = (Sector + Count) * 2048;
@@ -1444,7 +1445,7 @@ STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_open
AsciiSPrint(TmpName, sizeof(TmpName), "%s", Name); AsciiSPrint(TmpName, sizeof(TmpName), "%s", Name);
for (j = 0; j < 4; j++) 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); g_original_fclose(*New);
*New = &g_efi_file_replace.WrapperHandle; *New = &g_efi_file_replace.WrapperHandle;

View File

@@ -49,6 +49,12 @@ static grub_efi_uintn_t finish_desc_size;
static grub_efi_uint32_t finish_desc_version; static grub_efi_uint32_t finish_desc_version;
int grub_efi_is_finished = 0; 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 need to roll back EFI allocations on exit. Remember allocations that
* we'll free on exit. * we'll free on exit.
@@ -614,6 +620,22 @@ grub_efi_mm_init (void)
else if (required_pages > BYTES_TO_PAGES (MAX_HEAP_SIZE)) else if (required_pages > BYTES_TO_PAGES (MAX_HEAP_SIZE))
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 /* Sort the filtered descriptors, so that GRUB can allocate pages
from smaller regions. */ from smaller regions. */
sort_memory_map (filtered_memory_map, desc_size, filtered_memory_map_end); 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; return GRUB_ERR_NONE;
} }
#endif #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;
}

View File

@@ -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) if (g_tree_view_menu_style == 0)
{ {
browser_ssprintf(&mbuf, "menuentry \"%-10s [../]\" --class=\"vtoyret\" VTOY_RET {\n " browser_ssprintf(&mbuf, "menuentry \"%-10s [(%s)%s/..]\" --class=\"vtoyret\" VTOY_RET {\n "
" echo 'return ...' \n}\n", "<--"); " echo 'return ...' \n}\n", "<--", args[0], g_menu_path_buf);
} }
else else
{ {
browser_ssprintf(&mbuf, "menuentry \"[../]\" --class=\"vtoyret\" VTOY_RET {\n " browser_ssprintf(&mbuf, "menuentry \"[(%s)%s/..]\" --class=\"vtoyret\" VTOY_RET {\n "
" echo 'return ...' \n}\n"); " echo 'return ...' \n}\n", args[0], g_menu_path_buf);
} }
for (i = 1; i >= 0; i--) for (i = 1; i >= 0; i--)

View File

@@ -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 = 0;
int g_conf_replace_new_len_align = 0; int g_conf_replace_new_len_align = 0;
int g_ventoy_disk_bios_id = 0;
ventoy_gpt_info *g_ventoy_part_info = NULL; ventoy_gpt_info *g_ventoy_part_info = NULL;
grub_uint64_t g_ventoy_disk_size = 0; grub_uint64_t g_ventoy_disk_size = 0;
grub_uint64_t g_ventoy_disk_part_size[2]; 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, vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos,
"menuentry \"[Return to ListView]\" --class=\"vtoyret\" VTOY_RET {\n " "menuentry \"[Return to ListView]\" --class=\"vtoyret\" VTOY_RET {\n "
" echo '%s ...' \n" " echo 'return ...' \n"
"}\n", "return"); "}\n");
} }
} }
@@ -2350,16 +2351,16 @@ static int ventoy_dynamic_tree_menu(img_iterator_node *node)
if (g_tree_view_menu_style == 0) if (g_tree_view_menu_style == 0)
{ {
vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos, 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" " echo 'return ...' \n"
"}\n", "<--"); "}\n", "<--", node->dir);
} }
else else
{ {
vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos, vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos,
"menuentry \"[../]\" --class=\"vtoyret\" VTOY_RET {\n " "menuentry \"[%s/..]\" --class=\"vtoyret\" VTOY_RET {\n "
" echo '%s ...' \n" " echo 'return ...' \n"
"}\n", "return"); "}\n", node->dir);
} }
} }
@@ -2397,7 +2398,7 @@ static int ventoy_dynamic_tree_menu(img_iterator_node *node)
if (node != &g_img_iterator_head) 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; node->done = 1;
@@ -2611,25 +2612,39 @@ static grub_err_t ventoy_cmd_chosen_img_path(grub_extcmd_context_t ctxt, int arg
{ {
char value[32]; char value[32];
char *pos = NULL; char *pos = NULL;
char *last = NULL;
const char *id = NULL; const char *id = NULL;
img_info *cur = NULL; img_info *cur = NULL;
(void)ctxt; (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); return grub_error(GRUB_ERR_BAD_ARGUMENT, "Usage: %s {var}", cmd_raw_name);
} }
if (g_fake_vlnk_src[0] && g_fake_vlnk_dst[0]) 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) if (argc > 1)
{ {
grub_snprintf(value, sizeof(value), "%llu", (ulonglong)(g_fake_vlnk_size)); grub_snprintf(value, sizeof(value), "%llu", (ulonglong)(g_fake_vlnk_size));
grub_env_set(args[1], value); 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; goto end;
} }
@@ -2658,6 +2673,12 @@ static grub_err_t ventoy_cmd_chosen_img_path(grub_extcmd_context_t ctxt, int arg
grub_env_set(args[1], value); 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: end:
g_svd_replace_offset = 0; 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_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_read(disk, 0, 0, sizeof(ventoy_gpt_info), g_ventoy_part_info);
grub_disk_close(disk); 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); 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) int ventoy_env_init(void)
{ {
char buf[64]; 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_clear", ventoy_iso_vd_id_clear, 0, NULL, "", "", NULL },
{ "vt_iso_vd_id_begin", ventoy_cmd_iso_vd_id_begin, 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_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) int ventoy_register_all_cmd(void)

View File

@@ -313,8 +313,8 @@ extern int g_ventoy_debug;
void ventoy_debug(const char *fmt, ...); void ventoy_debug(const char *fmt, ...);
#define debug(fmt, args...) if (g_ventoy_debug) ventoy_debug("[VTOY]: "fmt, ##args) #define debug(fmt, args...) if (g_ventoy_debug) ventoy_debug("[VTOY]: "fmt, ##args)
#define vtoy_ssprintf(buf, pos, fmt, ...) \ #define vtoy_ssprintf(buf, pos, fmt, args...) \
pos += grub_snprintf(buf + pos, VTOY_MAX_SCRIPT_BUF - pos, fmt, __VA_ARGS__) pos += grub_snprintf(buf + pos, VTOY_MAX_SCRIPT_BUF - pos, fmt, ##args)
#define browser_ssprintf(mbuf, fmt, args...) \ #define browser_ssprintf(mbuf, fmt, args...) \
(mbuf)->pos += grub_snprintf((mbuf)->buf + (mbuf)->pos, (mbuf)->max - (mbuf)->pos, 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 grub_uint8_t *g_conf_replace_new_buf;
extern int g_conf_replace_new_len; extern int g_conf_replace_new_len;
extern int g_conf_replace_new_len_align; 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_size;
extern grub_uint64_t g_ventoy_disk_part_size[2]; extern grub_uint64_t g_ventoy_disk_part_size[2];
extern grub_uint32_t g_ventoy_plat_data; extern grub_uint32_t g_ventoy_plat_data;

View File

@@ -1651,25 +1651,40 @@ static void ventoy_windows_fill_virt_data( grub_uint64_t isosize, ventoy_chai
return; 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; 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"); disk = grub_disk_open("hd1");
if (disk) if (disk)
{ {
grub_disk_close(disk); grub_disk_close(disk);
debug("drive map needed %p\n", disk); hd1 = 1;
chain->drive_map = 0x81; debug("BIOS hd1 exist\n");
} }
else else
{ {
debug("failed to open disk %s\n", "hd1"); debug("failed to open disk %s\n", "hd1");
} }
if (vlnk)
{
if (g_ventoy_disk_bios_id == 0x80 && hd1)
{
debug("drive map needed vlnk %p\n", disk);
chain->drive_map = 0x81;
}
}
else if (chain->disk_drive == 0x80)
{
if (hd1)
{
debug("drive map needed normal %p\n", disk);
chain->drive_map = 0x81;
}
} }
else 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) if (ventoy_is_efi_os() == 0)
{ {
ventoy_windows_drive_map(chain); ventoy_windows_drive_map(chain, file->vlnk);
} }
VENTOY_CMD_RETURN(GRUB_ERR_NONE); 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) if (ventoy_is_efi_os() == 0)
{ {
ventoy_windows_drive_map(chain); ventoy_windows_drive_map(chain, 0);
} }
grub_file_close(file); 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) if (ventoy_is_efi_os() == 0)
{ {
ventoy_windows_drive_map(chain); ventoy_windows_drive_map(chain, 0);
} }
grub_file_close(file); grub_file_close(file);

View 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_iso_buf) (grub_uint64_t size);
void * EXPORT_FUNC (grub_efi_allocate_chain_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, extern void (*EXPORT_VAR(grub_efi_net_config)) (grub_efi_handle_t hnd,
char **device, char **device,

View 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 */

View File

@@ -9,7 +9,7 @@ mkdir -p $VT_DIR/GRUB2/PXE
make install 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" 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"

View 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

View File

@@ -19,22 +19,17 @@
. /ventoy/hook/ventoy-hook-lib.sh . /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 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: # longpanda:
# Alpine initramfs doesn't contain dm-mod or fuse module, # 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 # 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 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) vtLine=$(grep '[-][-] modloop-lts ' $VTOY_PATH/iso_file_list)
sector=$(echo $vtLine | awk '{print $(NF-1)}') sector=$(echo $vtLine | awk '{print $(NF-1)}')
length=$(echo $vtLine | awk '{print $NF}') 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 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 mkdir -p $VTOY_PATH/mnt
mount /vt_modloop $VTOY_PATH/mnt mount /vt_modloop $VTOY_PATH/mnt

View File

@@ -19,6 +19,17 @@
. $VTOY_PATH/hook/ventoy-os-lib.sh . $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 PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
$CAT /etc/mdev.conf >> /mdev.conf
$BUSYBOX_PATH/mv /mdev.conf /etc/mdev.conf 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

View File

@@ -22,4 +22,4 @@
ventoy_set_inotify_script blackPanther/ventoy-inotifyd-hook.sh 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 $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

View File

@@ -33,10 +33,8 @@ if is_inotify_ventoy_part $3; then
$BUSYBOX_PATH/sh $VTOY_PATH/hook/default/udev_disk_hook.sh $3 noreplace $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/') 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/ventoy b $blkdev_num_dev
mknod -m 660 /dev/dm-0 b $blkdev_num_dev blackPanther-root /dev/ventoy
fi
blackPanther-root /dev/dm-0
set_ventoy_hook_finish set_ventoy_hook_finish
else else

View File

@@ -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 $SED "/^mount \/proc/a export file=$VTOY_PATH/autoinstall; export auto='true'; export priority='critical'" -i /init
fi fi
fi fi
# if [ -e /bin/check-missing-firmware ]; then
# $SED "/^#!/a\exit 0" -i /bin/check-missing-firmware
# fi
fi fi
#for ARMA aka Omoikane #for ARMA aka Omoikane

View File

@@ -138,6 +138,14 @@ else
fi fi
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 # OK finish
set_ventoy_hook_finish set_ventoy_hook_finish

View File

@@ -78,6 +78,9 @@ fi
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2" "noreplace" 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 PATH=$VTPATH_OLD

View File

@@ -19,5 +19,5 @@
. $VTOY_PATH/hook/ventoy-os-lib.sh . $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 $BUSYBOX_PATH/cp -a $VTOY_PATH/hook/easystartup/ventoy-initqueue.sh /initqueue/ventoy.sh

View File

@@ -31,16 +31,6 @@ if is_inotify_ventoy_part $3; then
vtlog "find ventoy partition $3 ..." vtlog "find ventoy partition $3 ..."
$BUSYBOX_PATH/sh $VTOY_PATH/hook/default/udev_disk_hook.sh $3 noreplace $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 set_ventoy_hook_finish
else else
vtlog "##### INOTIFYD: $2/$3 is created (NO)..." vtlog "##### INOTIFYD: $2/$3 is created (NO)..."

View File

@@ -19,7 +19,7 @@
. $VTOY_PATH/hook/ventoy-os-lib.sh . $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 $BUSYBOX_PATH/rm -f /usr/lib/systemd/system-generators/systemd-fstab-generator /lib/systemd/system-generators/systemd-fstab-generator

View File

@@ -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/') 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}) 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 set_ventoy_hook_finish
else else

View File

@@ -59,7 +59,7 @@ if is_inotify_ventoy_part $3; then
$BUSYBOX_PATH/cp -a $BUSYBOX_PATH/blkid /sbin/blkid $BUSYBOX_PATH/cp -a $BUSYBOX_PATH/blkid /sbin/blkid
$BUSYBOX_PATH/mkdir -p /dev/mapper $BUSYBOX_PATH/mkdir -p /dev/mapper
ln -s /dev/$vtDM /dev/mapper/ventoy ln -s /dev/$vtDM /dev/mapper/ventoy
/sbin/mgalive-root /dev/dm-0 /sbin/mgalive-root /dev/$vtDM
fi fi
set_ventoy_hook_finish set_ventoy_hook_finish

View File

@@ -25,13 +25,19 @@ else
for vtParam in $($CAT /proc/cmdline); do for vtParam in $($CAT /proc/cmdline); do
if echo $vtParam | $GREP -q 'inst.ks=hd:LABEL='; then if echo $vtParam | $GREP -q 'inst.ks=hd:LABEL='; then
vtRawKs=$(echo $vtParam | $AWK -F: '{print $NF}') vtRawKs=$(echo $vtParam | $AWK -F: '{print $NF}')
VTKS="inst.ks=hd:/dev/dm-0:$vtRawKs" VTKS="inst.ks=hd:/dev/ventoy:$vtRawKs"
break break
fi fi
if echo $vtParam | $GREP -q '^ks=.*:/'; then if echo $vtParam | $GREP -q '^ks=.*:/'; then
vtRawKs=$(echo $vtParam | $AWK -F: '{print $NF}') 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 break
fi fi
done done
@@ -54,9 +60,12 @@ if [ -f $VTOY_PATH/ventoy_persistent_map ]; then
$BUSYBOX_PATH/rm -rf $VTOY_PATH/selinuxfs $BUSYBOX_PATH/rm -rf $VTOY_PATH/selinuxfs
fi fi
echo "VTKS=$VTKS VTOVERLAY=$VTOVERLAY" >> $VTLOG 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 if ls $VTOY_PATH | $GREP -q 'ventoy_dud[0-9]'; then
for vtDud in $(ls $VTOY_PATH/ventoy_dud*); do for vtDud in $(ls $VTOY_PATH/ventoy_dud*); do
vtInstDD="$vtInstDD inst.dd=file:$vtDud" vtInstDD="$vtInstDD inst.dd=file:$vtDud"
@@ -64,7 +73,7 @@ if ls $VTOY_PATH | $GREP -q 'ventoy_dud[0-9]'; then
fi fi
echo "vtInstDD=$vtInstDD" >> $VTLOG 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 ventoy_set_inotify_script openEuler/ventoy-inotifyd-hook.sh

View File

@@ -35,19 +35,23 @@ if is_inotify_ventoy_part $3; then
$BUSYBOX_PATH/sh $VTOY_PATH/hook/default/udev_disk_hook.sh $3 $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/') blkdev_num_mknod=$($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}) $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 if [ -f $VTOY_PATH/ventoy_ks_rootpath ]; then
vtlog "This is dm-0, OK ..." vt_ks_rootpath=$(cat $VTOY_PATH/ventoy_ks_rootpath)
else vtlog "ks rootpath <$vt_ks_rootpath>"
vtlog "####### This is $vtDM ####### this is abnormal ..." if [ -e /sbin/fetch-kickstart-disk ]; then
ventoy_swap_device /dev/dm-0 /dev/$vtDM vtlog "fetch-kickstart-disk ..."
/sbin/fetch-kickstart-disk /dev/ventoy "$vt_ks_rootpath"
fi
fi fi
if [ -e /sbin/anaconda-diskroot ]; then if [ -e /sbin/anaconda-diskroot ]; then
vtlog "set anaconda-diskroot ..." vtlog "set anaconda-diskroot ..."
/sbin/anaconda-diskroot /dev/dm-0 /sbin/anaconda-diskroot /dev/ventoy
fi fi
set_ventoy_hook_finish set_ventoy_hook_finish

View File

@@ -19,17 +19,24 @@
. /ventoy/hook/ventoy-hook-lib.sh . /ventoy/hook/ventoy-hook-lib.sh
if ! [ -e /dev/mapper/ventoy ]; then if [ ! -e /dev/dm-0 ]; then
vtlog "link to /dev/mapper/ventoy" exit 0
ln -s /dev/dm-0 /dev/mapper/ventoy
fi 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" vtlog "VTLABEL=$VTLABEL"
if [ -n "$VTLABEL" ]; then if [ -n "$VTLABEL" ]; then
if ! [ -e "/dev/disk/by-label/$VTLABEL" ]; then if ! [ -e "/dev/disk/by-label/$VTLABEL" ]; then
vtlog "link to /dev/disk/by-label/$VTLABEL" vtlog "link /dev/$vtDM to /dev/disk/by-label/$VTLABEL"
ln -s /dev/dm-0 "/dev/disk/by-label/$VTLABEL" ln -s /dev/$vtDM "/dev/disk/by-label/$VTLABEL"
fi fi
fi fi

View File

@@ -23,12 +23,23 @@ vtlog "##### $0 $* ..."
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH 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/') if [ ! -e /dev/ventoy ]; then
vtDM=$(ventoy_find_dm_id ${blkdev_num}) 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 if [ -e /sbin/anaconda-diskroot ]; then
vtlog "set anaconda-diskroot ..." vtlog "set anaconda-diskroot /dev/ventoy ..."
/sbin/anaconda-diskroot /dev/dm-0 /sbin/anaconda-diskroot /dev/ventoy
fi fi
PATH=$VTPATH_OLD PATH=$VTPATH_OLD

View File

@@ -21,5 +21,12 @@
$BUSYBOX_PATH/mkdir /dev $BUSYBOX_PATH/mkdir /dev
$SED '/Detecting *PrimeOS/a\ ROOT=$(cat /ventoy/rootdev)' -i /init if $GREP -q 'Detecting *PrimeOS' /init; then
$SED "/Detecting *PrimeOS/a\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/primeos/ventoy-disk.sh" -i /init $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

View File

@@ -28,13 +28,19 @@ else
for vtParam in $($CAT /proc/cmdline); do for vtParam in $($CAT /proc/cmdline); do
if echo $vtParam | $GREP -q 'inst.ks=hd:LABEL='; then if echo $vtParam | $GREP -q 'inst.ks=hd:LABEL='; then
vtRawKs=$(echo $vtParam | $AWK -F: '{print $NF}') vtRawKs=$(echo $vtParam | $AWK -F: '{print $NF}')
VTKS="inst.ks=hd:/dev/dm-0:$vtRawKs" VTKS="inst.ks=hd:/dev/ventoy:$vtRawKs"
break break
fi fi
if echo $vtParam | $GREP -q '^ks=.*:/'; then if echo $vtParam | $GREP -q '^ks=.*:/'; then
vtRawKs=$(echo $vtParam | $AWK -F: '{print $NF}') 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 break
fi fi
done done
@@ -58,9 +64,12 @@ if [ -f $VTOY_PATH/ventoy_persistent_map ]; then
$BUSYBOX_PATH/rm -rf $VTOY_PATH/selinuxfs $BUSYBOX_PATH/rm -rf $VTOY_PATH/selinuxfs
fi fi
echo "VTKS=$VTKS VTOVERLAY=$VTOVERLAY" >> $VTLOG 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 if ls $VTOY_PATH | $GREP -q 'ventoy_dud[0-9]'; then
for vtDud in $(ls $VTOY_PATH/ventoy_dud*); do for vtDud in $(ls $VTOY_PATH/ventoy_dud*); do
vtInstDD="$vtInstDD inst.dd=file:$vtDud" vtInstDD="$vtInstDD inst.dd=file:$vtDud"
@@ -69,9 +78,9 @@ fi
echo "vtInstDD=$vtInstDD" >> $VTLOG echo "vtInstDD=$vtInstDD" >> $VTLOG
if $GREP -q 'root=live' /proc/cmdline; then 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 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 fi
ventoy_set_inotify_script rhel7/ventoy-inotifyd-hook.sh ventoy_set_inotify_script rhel7/ventoy-inotifyd-hook.sh

View File

@@ -29,14 +29,7 @@ if is_inotify_ventoy_part $3; then
vtlog "##### INOTIFYD: $2/$3 is created (YES) ..." 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 ..." 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 $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/') blkdev_num_mknod=$($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}) $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 vtGenRulFile='/etc/udev/rules.d/99-live-squash.rules'
vtlog "This is dm-0, OK ..." 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 else
vtlog "####### This is $vtDM ####### this is abnormal ..." vtlog "$vtGenRulFile not exist..."
ventoy_swap_device /dev/dm-0 /dev/$vtDM 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 fi
if [ -e /sbin/anaconda-diskroot ]; then if [ -e /sbin/anaconda-diskroot ]; then
vtlog "set anaconda-diskroot ..." vtlog "set anaconda-diskroot ..."
/sbin/anaconda-diskroot /dev/dm-0 /sbin/anaconda-diskroot /dev/ventoy
fi fi
set_ventoy_hook_finish set_ventoy_hook_finish

View File

@@ -19,17 +19,24 @@
. /ventoy/hook/ventoy-hook-lib.sh . /ventoy/hook/ventoy-hook-lib.sh
if ! [ -e /dev/mapper/ventoy ]; then if [ ! -e /dev/dm-0 ]; then
vtlog "link to /dev/mapper/ventoy" exit 0
ln -s /dev/dm-0 /dev/mapper/ventoy
fi 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" vtlog "VTLABEL=$VTLABEL"
if [ -n "$VTLABEL" ]; then if [ -n "$VTLABEL" ]; then
if ! [ -e "/dev/disk/by-label/$VTLABEL" ]; then if ! [ -e "/dev/disk/by-label/$VTLABEL" ]; then
vtlog "link to /dev/disk/by-label/$VTLABEL" vtlog "link /dev/$vtDM to /dev/disk/by-label/$VTLABEL"
ln -s /dev/dm-0 "/dev/disk/by-label/$VTLABEL" ln -s /dev/$vtDM "/dev/disk/by-label/$VTLABEL"
fi fi
fi fi

View File

@@ -23,12 +23,23 @@ vtlog "##### $0 $* ..."
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH 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/') if [ ! -e /dev/ventoy ]; then
vtDM=$(ventoy_find_dm_id ${blkdev_num}) 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 if [ -e /sbin/anaconda-diskroot ]; then
vtlog "set anaconda-diskroot ..." vtlog "set anaconda-diskroot /dev/ventoy ..."
/sbin/anaconda-diskroot /dev/dm-0 /sbin/anaconda-diskroot /dev/ventoy
fi fi
PATH=$VTPATH_OLD PATH=$VTPATH_OLD

View File

@@ -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 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*) KoName=$(ls $VTOY_PATH/mnt/squashfs/lib/modules/$2/kernel/drivers/md/dm-mod.ko*)
vtlog "insmod $KoName" vtlog "insmod $KoName"

View File

@@ -350,10 +350,12 @@ ventoy_dm_patch() {
fi fi
#step1: modify vermagic/mod crc/relocation #step1: modify vermagic/mod crc/relocation
vtlog "$VTOY_PATH/tool/vtoykmod -u $VTOY_PATH/tool/$vtKoName $VTOY_PATH/$vtModName $vtDebug"
$VTOY_PATH/tool/vtoykmod -u $VTOY_PATH/tool/$vtKoName $VTOY_PATH/$vtModName $vtDebug $VTOY_PATH/tool/vtoykmod -u $VTOY_PATH/tool/$vtKoName $VTOY_PATH/$vtModName $vtDebug
#step2: fill parameters #step2: fill parameters
vtPgsize=$($VTOY_PATH/tool/vtoyksym -p) vtPgsize=$($VTOY_PATH/tool/vtoyksym -p)
vtlog "$VTOY_PATH/tool/vtoykmod -f $VTOY_PATH/tool/$vtKoName $vtPgsize 0x$printk_addr 0x$ro_addr 0x$rw_addr $get_addr $get_size $put_addr $put_size 0x$kprobe_reg_addr 0x$kprobe_unreg_addr $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 $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 $BUSYBOX_PATH/insmod $VTOY_PATH/tool/$vtKoName

View File

@@ -27,8 +27,8 @@ vtlog "####### $0 $* ########"
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
$BUSYBOX_PATH/insmod $VTOY_PATH/modules/dax.ko [ -f $VTOY_PATH/modules/dax.ko ] && $BUSYBOX_PATH/insmod $VTOY_PATH/modules/dax.ko
$BUSYBOX_PATH/insmod $VTOY_PATH/modules/dm-mod.ko [ -f $VTOY_PATH/modules/dm-mod.ko ] && $BUSYBOX_PATH/insmod $VTOY_PATH/modules/dm-mod.ko
wait_for_usb_disk_ready wait_for_usb_disk_ready

View File

@@ -94,6 +94,9 @@ ventoy_get_os_type() {
elif $GREP -q '\.fc[0-9][0-9]\.' /proc/version; then elif $GREP -q '\.fc[0-9][0-9]\.' /proc/version; then
echo 'rhel7'; return echo 'rhel7'; return
elif $GREP -q 'euleros' /proc/version; then
echo 'rhel7'; return
# SUSE # SUSE
elif $GREP -q 'SUSE' /proc/version; then elif $GREP -q 'SUSE' /proc/version; then
echo 'suse'; return 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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -111,12 +111,18 @@ function ventoy_show_help {
function get_os_type { function get_os_type {
set vtoy_os=Linux set vtoy_os=Linux
if vt_str_begin "$vt_volume_id" "DLC Boot"; then
if [ -f (loop)/DLCBoot.exe ]; then
set vtoy_os=Windows
fi
else
for file in "efi/microsoft/boot/bcd" "sources/boot.wim" "boot/bcd" "bootmgr.efi" "boot/etfsboot.com" ; do 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_file_exist_nocase (loop)/$file; then
set vtoy_os=Windows set vtoy_os=Windows
break break
fi fi
done done
fi
if [ "$vtoy_os" = "Linux" ]; then if [ "$vtoy_os" = "Linux" ]; then
if vt_strstr "$vt_system_id" "FreeBSD"; 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 if [ -f (loop)/boot/boot.wim ]; then
vt_windows_collect_wim_patch wim /boot/boot.wim vt_windows_collect_wim_patch wim /boot/boot.wim
fi 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 vt_linux_specify_initrd_file /initrd0.img
elif [ -f (loop)/sysresccd/boot/i686/sysresccd.img ]; then elif [ -f (loop)/sysresccd/boot/i686/sysresccd.img ]; then
vt_linux_specify_initrd_file /sysresccd/boot/i686/sysresccd.img 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 fi
} }
@@ -1037,7 +1053,11 @@ function legacy_windows_menu_func {
if [ -n "$vtoy_chain_mem_addr" ]; then if [ -n "$vtoy_chain_mem_addr" ]; then
ventoy_acpi_param ${vtoy_chain_mem_addr} 2048 ventoy_acpi_param ${vtoy_chain_mem_addr} 2048
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} linux16 $vtoy_path/ipxe.krn ${vtdebug_flag} ibft mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}
fi
boot boot
else else
echo "chain empty failed" echo "chain empty failed"
@@ -1281,7 +1301,7 @@ function iso_common_menuentry {
unset vt_system_id unset vt_system_id
unset vt_volume_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 vt_parse_iso_volume "${vtoy_iso_part}${vt_chosen_path}" vt_system_id vt_volume_id vt_volume_space
if [ $vt_volume_space -ne $vt_chosen_size ]; then if [ $vt_volume_space -ne $vt_chosen_size ]; then
@@ -1330,6 +1350,13 @@ function iso_common_menuentry {
set vtMemDiskBoot=1 set vtMemDiskBoot=1
fi 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 fi
vt_iso_vd_id_clear vt_iso_vd_id_clear
@@ -1445,21 +1472,21 @@ function efi_common_menuentry {
vt_vlnk_dst="${vtoy_iso_part}${vt_chosen_path}" vt_vlnk_dst="${vtoy_iso_part}${vt_chosen_path}"
fi fi
vt_concat_efi_iso "${vt_vlnk_dst}" vtoy_iso_buf
ventoy_debug_pause ventoy_debug_pause
ventoy_cli_console ventoy_cli_console
unset vtoy_dotefi_retry #first try with chainload
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} set vtOldRoot=$root
boot set root=$vtoy_iso_part
if [ -n "$vtoy_dotefi_retry" ]; then
unset vtoy_dotefi_retry
chainloader "${vt_vlnk_dst}" chainloader "${vt_vlnk_dst}"
boot 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 ventoy_gui_console
} }
@@ -1640,7 +1667,9 @@ function ventoy_img_easyos {
if [ -n "$vt_module_ver" ]; then if [ -n "$vt_module_ver" ]; then
for mod in "kernel/drivers/md/dm-mod.ko" "kernel/drivers/dax/dax.ko"; do for mod in "kernel/drivers/md/dm-mod.ko" "kernel/drivers/dax/dax.ko"; do
if [ -e (easysfs)/lib/modules/$vt_module_ver/$mod ]; then
vt_img_extra_initrd_append (easysfs)/lib/modules/$vt_module_ver/$mod vt_img_extra_initrd_append (easysfs)/lib/modules/$vt_module_ver/$mod
fi
done done
fi 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 #ACPI not compatible with Window7/8, so disable by default
set VTOY_PARAM_NO_ACPI=1 set VTOY_PARAM_NO_ACPI=1

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
INSTALL/tool/aarch64/vlnk Normal file

Binary file not shown.

Binary file not shown.

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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
INSTALL/tool/mips64el/vlnk Normal file

Binary file not shown.

Binary file not shown.

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

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.

View File

@@ -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_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_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_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[ ]=<%u %u %u %u %u %u %u>\n",
printf("os_param->vtoy_reserve[1]=<%u>\n", vtoy_reserve[1]); vtoy_reserve[0], vtoy_reserve[1], vtoy_reserve[2], vtoy_reserve[3],
printf("os_param->vtoy_reserve[2]=<%u>\n", vtoy_reserve[2]); vtoy_reserve[4], vtoy_reserve[5], vtoy_reserve[6]);
printf("os_param->vtoy_reserve[3]=<%u>\n", vtoy_reserve[3]);
printf("os_param->vtoy_img_location_addr=<0x%llx>\n", chain->os_param.vtoy_img_location_addr); 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); printf("os_param->vtoy_img_location_len=<%u>\n", chain->os_param.vtoy_img_location_len);
ventoy_debug_pause(); ventoy_debug_pause();

View File

@@ -1441,7 +1441,12 @@ unsigned int ventoy_int13_hook (ventoy_chain_head *chain)
natural_drive = 0xE0; /* just set a cdrom drive number 224 */ 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_map1 = chain->disk_drive;
g_drive_map2 = chain->drive_map; g_drive_map2 = chain->drive_map;

View File

@@ -86,7 +86,7 @@ typedef struct ventoy_os_param
grub_uint64_t vtoy_img_location_addr; grub_uint64_t vtoy_img_location_addr;
grub_uint32_t vtoy_img_location_len; 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]; grub_uint8_t vtoy_disk_signature[4];

View File

@@ -171,8 +171,8 @@
"STR_PART_RESIZE_SUCCESS":"축하합니다!#@Ventoy 비파괴 설치가 완료되었습니다.", "STR_PART_RESIZE_SUCCESS":"축하합니다!#@Ventoy 비파괴 설치가 완료되었습니다.",
"STR_PART_RESIZE_FAILED":"비파괴 설치에 실패했습니다. 자세한 내용은 log.txt를 확인하십시오.", "STR_PART_RESIZE_FAILED":"비파괴 설치에 실패했습니다. 자세한 내용은 log.txt를 확인하십시오.",
"STR_PART_RESIZE_UNSUPPORTED":"일부 조건을 충족할 수 없기 때문에 Ventoy 비파괴 설치가 중지되었습니다. 자세한 내용은 log.txt를 확인하십시오.", "STR_PART_RESIZE_UNSUPPORTED":"일부 조건을 충족할 수 없기 때문에 Ventoy 비파괴 설치가 중지되었습니다. 자세한 내용은 log.txt를 확인하십시오.",
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!", "STR_INSTALL_YES_TIP1":"경고: 데이터가 손실됩니다!",
"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_TIP2":"업그레이드 대신 새로 설치할지 확인하려면 아래 입력란에 YES를 입력하십시오.",
"STRXXX":"" "STRXXX":""
}, },
@@ -400,15 +400,15 @@
"STR_WEB_SERVICE_BUSY":"Usługa jest zajęta, spróbuj ponownie później.", "STR_WEB_SERVICE_BUSY":"Usługa jest zajęta, spróbuj ponownie później.",
"STR_MENU_VTSI_CREATE":"Wygeneruj plik VTSI", "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_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_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_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_SUCCESS":"Gratulacje!#@Nieniszcząca instalacja 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_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. 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. Sprawdź log.txt po szczegóły.",
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!", "STR_INSTALL_YES_TIP1":"Ostrzeżenie: Dane zostaną utracone!",
"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_TIP2":"Wpisz YES w poniższym polu tekstowym, aby potwierdzić, że naprawdę chcesz przeprowadzić nową instalację zamiast aktualizacji.",
"STRXXX":"" "STRXXX":""
}, },
@@ -686,24 +686,24 @@
"STR_MENU_PART_STYLE":"Type de partition", "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_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_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_COMMUNICATION_ERR":"Erreur de communication :",
"STR_WEB_REMOTE_ABNORMAL":"Erreur de communication : anomalie sur le serveur", "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_REQUEST_TIMEOUT":"Erreur de communication : délai d'attente dépassé",
"STR_WEB_SERVICE_UNAVAILABLE":"Erreur de communication : service inaccessible", "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_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_WEB_SERVICE_BUSY":"Service surchargé, veuillez réessayer plus tard.",
"STR_MENU_VTSI_CREATE":"Generate VTSI File", "STR_MENU_VTSI_CREATE":"Générer un fichier VTSI",
"STR_VTSI_CREATE_TIP":"This time will not write to the device, but only generate a VTSI file#@Continue?", "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":"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_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":"VTSI file created failed.", "STR_VTSI_CREATE_FAILED":"La création du fichier VTSI a échoué.",
"STR_MENU_PART_RESIZE":"Non-destructive Install", "STR_MENU_PART_RESIZE":"Installation non destructive",
"STR_PART_RESIZE_TIP":"Ventoy will try non-destructive installation if possible. #@Continue?", "STR_PART_RESIZE_TIP":"Si possible, Ventoy essaiera une installation non destructive. #@Continuer ?",
"STR_PART_RESIZE_SUCCESS":"Congratulations!#@Ventoy non-destructive installation successfully finished.", "STR_PART_RESIZE_SUCCESS":"Félicitations !#@L'installation non destructive de Ventoy s'est terminée avec succès.",
"STR_PART_RESIZE_FAILED":"Non-destructive installation failed, Check log.txt for details.", "STR_PART_RESIZE_FAILED":"L'installation non destructive a échoué, consultez log.txt pour plus de détails.",
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy non-destructive installation stopped because some conditions cannot be met. Check log.txt for details.", "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":"Warning: Data will be lost!", "STR_INSTALL_YES_TIP1":"Attention : les données seront perdues !",
"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_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":"" "STRXXX":""
}, },
@@ -845,9 +845,9 @@
"STR_INSTALL_TIP":"El dispositivo será formateado y todos los datos se perderán.#@¿Continuar?", "STR_INSTALL_TIP":"El dispositivo será formateado y todos los datos se perderán.#@¿Continuar?",
"STR_INSTALL_TIP2":"El dispositivo será formateado y todos los datos se perderán.#@¿Continuar? (Doble Comprobación)", "STR_INSTALL_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_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_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_WAIT_PROCESS":"Un hilo está ejecutándose, por favor espera...",
"STR_MENU_OPTION":"Opción", "STR_MENU_OPTION":"Opción",
"STR_MENU_SECURE_BOOT":"Soporte De Arranque Seguro", "STR_MENU_SECURE_BOOT":"Soporte De Arranque Seguro",
@@ -858,7 +858,7 @@
"STR_SPACE_VAL_INVALID":"Valor inválido para espacio reservado", "STR_SPACE_VAL_INVALID":"Valor inválido para espacio reservado",
"STR_MENU_CLEAR":"Limpiar Ventoy", "STR_MENU_CLEAR":"Limpiar Ventoy",
"STR_CLEAR_SUCCESS":"Ventoy ha sido removido exitosamente desde el dispositivo.", "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_MENU_PART_STYLE":"Estilo De Partición",
"STR_DISK_2TB_MBR_ERROR":"Por favor selecciona GPT para dispositivos sobre 2TB", "STR_DISK_2TB_MBR_ERROR":"Por favor selecciona GPT para dispositivos sobre 2TB",
"STR_SHOW_ALL_DEV":"Mostrar Todos Los Dispositivos", "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_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_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_VTSI_CREATE_FAILED":"Fallo en el archivo VTSI creado.",
"STR_MENU_PART_RESIZE":"Non-destructive Install", "STR_MENU_PART_RESIZE":"Instalación no destructiva",
"STR_PART_RESIZE_TIP":"Ventoy will try non-destructive installation if possible. #@Continue?", "STR_PART_RESIZE_TIP":"Ventoy intentará una instalación no destructiva si es posible. #@¿Continuar?",
"STR_PART_RESIZE_SUCCESS":"Congratulations!#@Ventoy non-destructive installation successfully finished.", "STR_PART_RESIZE_SUCCESS":"¡Felicitaciones!#@La instalación no destructiva de Ventoy a finalizado exitosamente.",
"STR_PART_RESIZE_FAILED":"Non-destructive installation failed, Check log.txt for details.", "STR_PART_RESIZE_FAILED":"Instalación no destructiva fallida, Comprueba log.txt para detalles.",
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy non-destructive installation stopped because some conditions cannot be met. Check log.txt for details.", "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":"Warning: Data will be lost!", "STR_INSTALL_YES_TIP1":"Advertencia: ¡Los datos se perderán!",
"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_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":"" "STRXXX":""
}, },
@@ -1199,9 +1199,9 @@
"STR_INSTALL_TIP":"選択した機器は完全に初期化され、保存されたデータは二度と復元できません。#@続行しますか?", "STR_INSTALL_TIP":"選択した機器は完全に初期化され、保存されたデータは二度と復元できません。#@続行しますか?",
"STR_INSTALL_TIP2":"選択した機器は完全に初期化され、保存されたデータは二度と復元できません。#@続行しますか?(再確認)", "STR_INSTALL_TIP2":"選択した機器は完全に初期化され、保存されたデータは二度と復元できません。#@続行しますか?(再確認)",
"STR_INSTALL_SUCCESS":"おめでとうございます。#@Ventoyの導入は正常に行われました。", "STR_INSTALL_SUCCESS":"おめでとうございます。#@Ventoyの導入は正常に行われました。",
"STR_INSTALL_FAILED":"導入中にエラーが発生しました。機器を再接続してもう一度やり直してください。詳細な記録は log.txt にあります。", "STR_INSTALL_FAILED":"導入中にエラーが発生しました。機器を再接続してもう一度やり直してください。詳細な記録はlog.txtにあります。",
"STR_UPDATE_SUCCESS":"おめでとうございます。#@Ventoyの更新は正常に行われました。", "STR_UPDATE_SUCCESS":"おめでとうございます。#@Ventoyの更新は正常に行われました。",
"STR_UPDATE_FAILED":"更新中にエラーが発生しました。機器を再接続してもう一度やり直してください。詳細な記録は log.txt にあります。", "STR_UPDATE_FAILED":"更新中にエラーが発生しました。機器を再接続してもう一度やり直してください。詳細な記録はlog.txtにあります。",
"STR_WAIT_PROCESS":"スレッドが稼動しています。お待ちください...", "STR_WAIT_PROCESS":"スレッドが稼動しています。お待ちください...",
"STR_MENU_OPTION":"設定", "STR_MENU_OPTION":"設定",
"STR_MENU_SECURE_BOOT":"セキュアブート", "STR_MENU_SECURE_BOOT":"セキュアブート",
@@ -1209,10 +1209,10 @@
"STR_BTN_OK":"了解", "STR_BTN_OK":"了解",
"STR_BTN_CANCEL":"取消", "STR_BTN_CANCEL":"取消",
"STR_PRESERVE_SPACE":"機器の最後に領域を確保する", "STR_PRESERVE_SPACE":"機器の最後に領域を確保する",
"STR_SPACE_VAL_INVALID":"確保する領域の値が無効です", "STR_SPACE_VAL_INVALID":"確保する領域の値が正しくありません",
"STR_MENU_CLEAR":"Ventoyを削除", "STR_MENU_CLEAR":"Ventoyを削除",
"STR_CLEAR_SUCCESS":"Ventoyが機器から削除されました。", "STR_CLEAR_SUCCESS":"Ventoyが機器から削除されました。",
"STR_CLEAR_FAILED":"Ventoyを機器から削除できませんでした。機器を再接続してもう一度やり直してください。詳細な記録は log.txt にあります。", "STR_CLEAR_FAILED":"Ventoyを機器から削除できませんでした。機器を再接続してもう一度やり直してください。詳細な記録はlog.txtにあります。",
"STR_MENU_PART_STYLE":"区画の構成方式", "STR_MENU_PART_STYLE":"区画の構成方式",
"STR_DISK_2TB_MBR_ERROR":"2TB以上の機器にはGPTを使用してください。", "STR_DISK_2TB_MBR_ERROR":"2TB以上の機器にはGPTを使用してください。",
"STR_SHOW_ALL_DEV":"すべての機器を表示", "STR_SHOW_ALL_DEV":"すべての機器を表示",
@@ -1230,10 +1230,10 @@
"STR_MENU_PART_RESIZE":"非破壊的導入", "STR_MENU_PART_RESIZE":"非破壊的導入",
"STR_PART_RESIZE_TIP":"Ventoyを可能であれば非破壊的に導入します。#@続行しますか?", "STR_PART_RESIZE_TIP":"Ventoyを可能であれば非破壊的に導入します。#@続行しますか?",
"STR_PART_RESIZE_SUCCESS":"おめでとうございます。#@Ventoyの非破壊的導入は正常に行われました。", "STR_PART_RESIZE_SUCCESS":"おめでとうございます。#@Ventoyの非破壊的導入は正常に行われました。",
"STR_PART_RESIZE_FAILED":"Ventoyを非破壊的に導入できませんでした。詳細な記録は log.txt にあります。", "STR_PART_RESIZE_FAILED":"Ventoyを非破壊的に導入できませんでした。詳細な記録はlog.txtにあります。",
"STR_PART_RESIZE_UNSUPPORTED":"Ventoyを非破壊的に導入できませんでした。非破壊的導入にあたっての要件が満たされていません。詳細な記録は log.txt にあります。", "STR_PART_RESIZE_UNSUPPORTED":"Ventoyを非破壊的に導入できませんでした。非破壊的導入にあたっての要件が満たされていません。詳細な記録はlog.txtにあります。",
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!", "STR_INSTALL_YES_TIP1":"警告: データが消去されます",
"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_TIP2":"Ventoyを更新するのではなく新規に導入するということを確認するために下の入力欄に「YES」と入力してください。",
"STRXXX":"" "STRXXX":""
}, },
@@ -1291,8 +1291,8 @@
"STR_PART_RESIZE_SUCCESS":"Congratulazioni!#@Installazione non distruttiva di Ventoy completata.", "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_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_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_TIP1":"Attenzione: i dati verranno persi!",
"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_TIP2":"Digita YES nella casella di testo qui sotto per confermare che vuoi davvero eseguire un'installazione pulita anziché un aggiornamento.",
"STRXXX":"" "STRXXX":""
}, },
@@ -1468,8 +1468,8 @@
"STR_PART_RESIZE_SUCCESS":"恭喜!#@Ventoy 已完成無損安裝。", "STR_PART_RESIZE_SUCCESS":"恭喜!#@Ventoy 已完成無損安裝。",
"STR_PART_RESIZE_FAILED":"Ventoy 無損安裝失敗。詳細訊息請檢視 log.txt 檔案。", "STR_PART_RESIZE_FAILED":"Ventoy 無損安裝失敗。詳細訊息請檢視 log.txt 檔案。",
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy 無損安裝已中止因為未滿足部分條件。詳細訊息請檢視 log.txt 檔案。", "STR_PART_RESIZE_UNSUPPORTED":"Ventoy 無損安裝已中止因為未滿足部分條件。詳細訊息請檢視 log.txt 檔案。",
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!", "STR_INSTALL_YES_TIP1":"警告:資料將會遺失!",
"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_TIP2":"請在下方的文字輸入框輸入 YES 來證實您想要進行全新安裝取代升級。",
"STRXXX":"" "STRXXX":""
}, },
@@ -2057,8 +2057,8 @@
"STR_PART_RESIZE_SUCCESS":"Selamat!#@Pemasangan tanpa merusakkan Ventoy berhasil.", "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_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_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_TIP1":"Peringatan: Data akan hilang!",
"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_TIP2":"Silakan ketik YES pada kotak tulis di bawah untuk meyakinkan bahwa anda memang untuk melakukan pemasangan baru ketimbang memperbaruinya",
"STRXXX":"" "STRXXX":""
}, },
@@ -2318,15 +2318,15 @@
"STR_UPDATE_TIP":"Varna nadgradnja. ISO datoteke ne bodo spremenjene.#@Nadaljujem?", "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_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_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_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_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_WAIT_PROCESS":"Proces teče, prosimo počakajte, ...",
"STR_MENU_OPTION":"Nastavitve", "STR_MENU_OPTION":"Nastavitve",
"STR_MENU_SECURE_BOOT":"Podpora Secure Boot", "STR_MENU_SECURE_BOOT":"Podpora Secure Boot",
"STR_MENU_PART_CFG":"Konfiguracija particij", "STR_MENU_PART_CFG":"Konfiguracija particij",
"STR_BTN_OK":"V redu", "STR_BTN_OK":"Vredu",
"STR_BTN_CANCEL":"Prekliči", "STR_BTN_CANCEL":"Prekliči",
"STR_PRESERVE_SPACE":"Ohrani nekaj prostora na koncu particije", "STR_PRESERVE_SPACE":"Ohrani nekaj prostora na koncu particije",
"STR_SPACE_VAL_INVALID":"Nepravilna vrednost za rezerviran prostor", "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_SERVICE_UNAVAILABLE":"Napaka v komunikaciji: storitev ni na voljo",
"STR_WEB_TOKEN_MISMATCH":"Zahteva storitve je potekla, prosim poskusite kasneje.", "STR_WEB_TOKEN_MISMATCH":"Zahteva storitve je potekla, prosim poskusite kasneje.",
"STR_WEB_SERVICE_BUSY":"Storitev je zasedena, prosim poskusite kasneje.", "STR_WEB_SERVICE_BUSY":"Storitev je zasedena, prosim poskusite kasneje.",
"STR_MENU_VTSI_CREATE":"Generate VTSI File", "STR_MENU_VTSI_CREATE":"Ustvari VTSI datoteko",
"STR_VTSI_CREATE_TIP":"This time will not write to the device, but only generate a VTSI file#@Continue?", "STR_VTSI_CREATE_TIP":"Spremembe na napravi ne bo, generirala se bo samo VTSI datoteka#@Nadaljujem?",
"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_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":"VTSI file created failed.", "STR_VTSI_CREATE_FAILED":"Ustvarjanje VTSI datoteke ni uspelo.",
"STR_MENU_PART_RESIZE":"Non-destructive Install", "STR_MENU_PART_RESIZE":"Inštalacija brez brisanja.",
"STR_PART_RESIZE_TIP":"Ventoy will try non-destructive installation if possible. #@Continue?", "STR_PART_RESIZE_TIP":"Ventoy bo poskusil inštalacijo brez brisanja podatkov. #@Nadaljujem?",
"STR_PART_RESIZE_SUCCESS":"Congratulations!#@Ventoy non-destructive installation successfully finished.", "STR_PART_RESIZE_SUCCESS":"Čestitke!#@Ventoy je bil uspešno nameščen.",
"STR_PART_RESIZE_FAILED":"Non-destructive installation failed, Check log.txt for details.", "STR_PART_RESIZE_FAILED":"Inštalacija ni uspela, preveri log.txt za podrobnosti.",
"STR_PART_RESIZE_UNSUPPORTED":"Ventoy non-destructive installation stopped because some conditions cannot be met. Check log.txt for details.", "STR_PART_RESIZE_UNSUPPORTED":"Ventoy je ustavil inštalacijo ker nekateri pogoji niso zadostni. Preveri log.txt a podrobnosti.",
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!", "STR_INSTALL_YES_TIP1":"Pozor: Podatki bodo izbrisani!",
"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_TIP2":"Prosim vtipkajte YES v spodnje okno da potrdite čisto inštalacijo in ne zgolj nadgradnje.",
"STRXXX":"" "STRXXX":""
}, },

View File

@@ -164,11 +164,40 @@ end:
return mount; 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 ventoy_try_umount_disk(const char *devpath)
{ {
int rc; int rc;
int len; int len;
char line[512]; char line[1024];
char mntpt[1024];
char *pos1 = NULL; char *pos1 = NULL;
char *pos2 = NULL; char *pos2 = NULL;
FILE *fp = NULL; FILE *fp = NULL;
@@ -193,14 +222,15 @@ int ventoy_try_umount_disk(const char *devpath)
*pos2 = 0; *pos2 = 0;
} }
rc = umount(pos1 + 1); ventoy_mount_path_escape(pos1 + 1, mntpt, sizeof(mntpt));
rc = umount(mntpt);
if (rc) 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 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; return 0;
} }
int ventoy_read_file_to_buf(const char *FileName, int ExtLen, void **Bufer, int *BufLen) int ventoy_read_file_to_buf(const char *FileName, int ExtLen, void **Bufer, int *BufLen)
{ {
int FileSize; int FileSize;

View File

@@ -495,6 +495,7 @@ static int VentoyProcSecureBoot(int SecureBoot)
fl_remove("/EFI/BOOT/grubx64.efi"); fl_remove("/EFI/BOOT/grubx64.efi");
fl_remove("/EFI/BOOT/grubx64_real.efi"); fl_remove("/EFI/BOOT/grubx64_real.efi");
fl_remove("/EFI/BOOT/MokManager.efi"); fl_remove("/EFI/BOOT/MokManager.efi");
fl_remove("/EFI/BOOT/mmx64.efi");
fl_remove("/ENROLL_THIS_KEY_IN_MOKMANAGER.cer"); fl_remove("/ENROLL_THIS_KEY_IN_MOKMANAGER.cer");
file = fl_fopen("/EFI/BOOT/BOOTX64.EFI", "wb"); 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) static void * ventoy_update_thread(void *data)
{ {
int fd; int fd;
int updateMBR;
ssize_t len; ssize_t len;
off_t offset; off_t offset;
MBR_HEAD MBR; MBR_HEAD MBR;
@@ -742,17 +744,32 @@ static void * ventoy_update_thread(void *data)
len = write(fd, disk->vtoydata.rsvdata, sizeof(disk->vtoydata.rsvdata)); len = write(fd, disk->vtoydata.rsvdata, sizeof(disk->vtoydata.rsvdata));
vlog("Writing reserve data offset:%llu len:%llu ...\n", (_ull)offset, (_ull)len); vlog("Writing reserve data offset:%llu len:%llu ...\n", (_ull)offset, (_ull)len);
updateMBR = 0;
memcpy(&MBR, &(disk->vtoydata.gptinfo.MBR), 512); memcpy(&MBR, &(disk->vtoydata.gptinfo.MBR), 512);
if (disk->vtoydata.partition_style == 0 && MBR.PartTbl[0].Active == 0) if (disk->vtoydata.partition_style == 0 && MBR.PartTbl[0].Active == 0)
{ {
MBR.PartTbl[0].Active = 0x80; MBR.PartTbl[0].Active = 0x80;
MBR.PartTbl[1].Active = 0; MBR.PartTbl[1].Active = 0;
MBR.PartTbl[2].Active = 0; MBR.PartTbl[2].Active = 0;
MBR.PartTbl[3].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); offset = lseek(fd, 0, SEEK_SET);
len = write(fd, &MBR, 512); 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; g_current_progress = PT_SYNC_DATA1;

View File

@@ -303,6 +303,58 @@ static int read_pid_cmdline(long pid, char *Buffer, int BufLen)
return read_file_1st_line(path, Buffer, 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) static int find_exe_path(const char *exe, char *pathbuf, int buflen)
{ {
int i; int i;
@@ -1250,8 +1302,12 @@ int main(int argc, char **argv)
{ {
if (argv[i] && argv[i + 1] && strcmp(argv[i], "-l") == 0) 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]); 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) else if (argv[i] && strcmp(argv[i], "--xdg") == 0)
{ {
@@ -1259,14 +1315,36 @@ int main(int argc, char **argv)
if (env) if (env)
{ {
g_xdg_log = 1; 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"); env = getenv("XDG_CONFIG_HOME");
if (env) if (env)
{ {
g_xdg_ini = 1; 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);
}
} }
} }
} }

View File

@@ -1 +1 @@
20220108 22:41:02 20220430 13:06:42

View File

@@ -723,7 +723,7 @@
<footer class="main-footer"> <footer class="main-footer">
<div class="pull-right hidden-xs"> <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> </div>
<strong><a href="https://www.ventoy.net" target="_blank">https://www.ventoy.net</a></strong> <strong><a href="https://www.ventoy.net" target="_blank">https://www.ventoy.net</a></strong>
</footer> </footer>

View File

@@ -195,7 +195,7 @@
$('input:text[id=id_tip_text_top]').val(data.top); $('input:text[id=id_tip_text_top]').val(data.top);
$('input:text[id=id_tip_text_color]').val(data.color); $('input:text[id=id_tip_text_color]').val(data.color);
FillTipTable(data); FillTipTable(data.tips);
} }
@@ -208,7 +208,7 @@
} }
current_tab_index = index; current_tab_index = index;
VtoyFillCurrentPageItem(m_data_tip[index].tips); VtoyFillCurrentPageItem(m_data_tip[index]);
} }
//Main process //Main process
@@ -334,6 +334,7 @@
var value = $('input:text[id=id_tip_text_left]').val(); var value = $('input:text[id=id_tip_text_left]').val();
if (ventoy_check_percent(value)) { if (ventoy_check_percent(value)) {
VtoySaveCurrentPage(); VtoySaveCurrentPage();
m_data_tip[current_tab_index].left = value;
} else { } else {
Message.error(g_vtoy_cur_language.STR_INVALID_PERCENT); Message.error(g_vtoy_cur_language.STR_INVALID_PERCENT);
$('input:text[id=id_tip_text_left]').val(m_data_tip[current_tab_index].left); $('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(); var value = $('input:text[id=id_tip_text_top]').val();
if (ventoy_check_percent(value)) { if (ventoy_check_percent(value)) {
VtoySaveCurrentPage(); VtoySaveCurrentPage();
m_data_tip[current_tab_index].top = value;
} else { } else {
Message.error(g_vtoy_cur_language.STR_INVALID_PERCENT); Message.error(g_vtoy_cur_language.STR_INVALID_PERCENT);
$('input:text[id=id_tip_text_top]').val(m_data_tip[current_tab_index].top); $('input:text[id=id_tip_text_top]').val(m_data_tip[current_tab_index].top);
@@ -353,6 +355,7 @@
if (value.length > 0) { if (value.length > 0) {
if (ventoy_check_color(value)) { if (ventoy_check_color(value)) {
VtoySaveCurrentPage(); VtoySaveCurrentPage();
m_data_tip[current_tab_index].color = value;
} else { } else {
Message.error(g_vtoy_cur_language.STR_INVALID_COLOR); Message.error(g_vtoy_cur_language.STR_INVALID_COLOR);
$('input:text[id=id_tip_text_color]').val(m_data_tip[current_tab_index].color); $('input:text[id=id_tip_text_color]').val(m_data_tip[current_tab_index].color);

View File

@@ -18,7 +18,7 @@ You can also browse ISO/WIM/IMG/VHD(x)/EFI files in local disk and boot them.<br
x86 Legacy BIOS, IA32 UEFI, x86_64 UEFI, ARM64 UEFI and MIPS64EL UEFI are supported in the same way.<br/> x86 Legacy BIOS, IA32 UEFI, x86_64 UEFI, ARM64 UEFI and MIPS64EL UEFI are supported in the same way.<br/>
Both MBR and GPT partition style are supported in the same way.<br/> Both MBR and GPT partition style are supported in the same way.<br/>
Most type of OS supported(Windows/WinPE/Linux/Unix/ChromeOS/Vmware/Xen...) <br/> Most type of OS supported(Windows/WinPE/Linux/Unix/ChromeOS/Vmware/Xen...) <br/>
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> <br/>Official Website: <a href=https://www.ventoy.net>https://www.ventoy.net</a>
</h4> </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 * FAT32/exFAT/NTFS/UDF/XFS/Ext2(3)(4) supported for main partition
* ISO files larger than 4GB supported * ISO files larger than 4GB supported
* Native boot menu style for Legacy & UEFI * 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 * Linux vDisk boot supported
* Not only boot but also complete installation process * Not only boot but also complete installation process
* Menu dynamically switchable between List/TreeView mode * Menu dynamically switchable between List/TreeView mode
@@ -88,7 +88,7 @@ A GUI Ventoy plugin configurator. [VentoyPlugson](https://www.ventoy.net/en/plug
# Installation Instructions # 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 # Compile Instructions
Please refer to [BuildVentoyFromSource.txt](DOC/BuildVentoyFromSource.txt) Please refer to [BuildVentoyFromSource.txt](DOC/BuildVentoyFromSource.txt)

View File

@@ -727,6 +727,7 @@ int VentoyProcSecureBoot(BOOL SecureBoot)
fl_remove("/EFI/BOOT/grubx64.efi"); fl_remove("/EFI/BOOT/grubx64.efi");
fl_remove("/EFI/BOOT/grubx64_real.efi"); fl_remove("/EFI/BOOT/grubx64_real.efi");
fl_remove("/EFI/BOOT/MokManager.efi"); fl_remove("/EFI/BOOT/MokManager.efi");
fl_remove("/EFI/BOOT/mmx64.efi");
fl_remove("/ENROLL_THIS_KEY_IN_MOKMANAGER.cer"); fl_remove("/ENROLL_THIS_KEY_IN_MOKMANAGER.cer");
file = fl_fopen("/EFI/BOOT/BOOTX64.EFI", "wb"); file = fl_fopen("/EFI/BOOT/BOOTX64.EFI", "wb");

Some files were not shown because too many files have changed in this diff Show More