]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
1.0.30 release v1.0.30
authorlongpanda <admin@ventoy.net>
Sat, 12 Dec 2020 09:42:45 +0000 (17:42 +0800)
committerlongpanda <admin@ventoy.net>
Sat, 12 Dec 2020 09:42:45 +0000 (17:42 +0800)
18 files changed:
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_def.h
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_plugin.c
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_windows.c
INSTALL/EFI/BOOT/BOOTAA64.EFI
INSTALL/EFI/BOOT/grubia32_real.efi
INSTALL/EFI/BOOT/grubx64_real.efi
INSTALL/Ventoy2Disk.exe
INSTALL/grub/arm64-efi/moddep.lst
INSTALL/grub/grub.cfg
INSTALL/grub/i386-efi/moddep.lst
INSTALL/grub/i386-pc/core.img
INSTALL/grub/i386-pc/moddep.lst
INSTALL/grub/x86_64-efi/moddep.lst
INSTALL/tool/VentoyWorker.sh
INSTALL/ventoy/ventoy.cpio
INSTALL/ventoy/vtloopex.cpio
README.md

index f7fd5903a0964aae08ce51fe7feb06bf2af4de01..feacbe0be12bbf47cd35a843f051d64f2a0b17c4 100644 (file)
@@ -42,6 +42,7 @@
 #include <grub/video.h>
 #include <grub/acpi.h>
 #include <grub/charset.h>
+#include <grub/crypto.h>
 #include <grub/ventoy.h>
 #include "ventoy_def.h"
 
@@ -59,6 +60,7 @@ int g_sort_case_sensitive = 0;
 int g_tree_view_menu_style = 0;
 static grub_file_t g_old_file;
 static int g_ventoy_last_entry_back;
+static grub_uint32_t g_ventoy_plat_data;
 
 char g_iso_path[256];
 char g_img_swap_tmp_buf[1024];
@@ -973,7 +975,7 @@ static grub_err_t ventoy_cmd_check_compatible(grub_extcmd_context_t ctxt, int ar
 
     for (i = 0; i < (int)ARRAY_SIZE(files); i++)
     {
-        grub_snprintf(buf, sizeof(buf) - 1, "[ -e %s/%s ]", args[0], files[i]);
+        grub_snprintf(buf, sizeof(buf) - 1, "[ -e \"%s/%s\" ]", args[0], files[i]);
         if (0 == grub_script_execute_sourcecode(buf))
         {
             debug("file %s exist, ventoy_compatible YES\n", buf);
@@ -1351,6 +1353,32 @@ static int ventoy_colect_img_files(const char *filename, const struct grub_dirho
     return 0;
 }
 
+static int ventoy_arch_mode_init(void)
+{
+    #ifdef GRUB_MACHINE_EFI
+    if (grub_strcmp(GRUB_TARGET_CPU, "i386") == 0)
+    {
+        g_ventoy_plat_data = VTOY_PLAT_I386_UEFI;
+        grub_snprintf(g_arch_mode_suffix, sizeof(g_arch_mode_suffix), "%s", "ia32");
+    }
+    else if (grub_strcmp(GRUB_TARGET_CPU, "arm64") == 0)
+    {
+        g_ventoy_plat_data = VTOY_PLAT_ARM64_UEFI;
+        grub_snprintf(g_arch_mode_suffix, sizeof(g_arch_mode_suffix), "%s", "aa64");
+    }
+    else
+    {
+        g_ventoy_plat_data = VTOY_PLAT_X86_64_UEFI;
+        grub_snprintf(g_arch_mode_suffix, sizeof(g_arch_mode_suffix), "%s", "uefi");
+    }
+#else
+    g_ventoy_plat_data = VTOY_PLAT_X86_LEGACY;
+    grub_snprintf(g_arch_mode_suffix, sizeof(g_arch_mode_suffix), "%s", "legacy");
+#endif
+
+    return 0;
+}
+
 int ventoy_fill_data(grub_uint32_t buflen, char *buffer)
 {
     int len = GRUB_UINT_MAX;
@@ -1402,11 +1430,7 @@ int ventoy_fill_data(grub_uint32_t buflen, char *buffer)
 
     grub_memcpy(guidstr, &guid, sizeof(guid));
 
-    #if defined (GRUB_MACHINE_EFI)
-    puint2[0] = grub_swap_bytes32(0x55454649);
-    #else
-    puint2[0] = grub_swap_bytes32(0x42494f53);
-    #endif
+    puint2[0] = grub_swap_bytes32(g_ventoy_plat_data);    
 
     /* Easter egg :) It will be appreciated if you reserve it, but NOT mandatory. */
     #pragma GCC diagnostic push
@@ -1427,6 +1451,55 @@ int ventoy_fill_data(grub_uint32_t buflen, char *buffer)
     return len;
 }
 
+int ventoy_check_password(const vtoy_password *pwd, int retry)
+{
+    int offset;
+    char input[256];
+    grub_uint8_t md5[16];
+
+    while (retry--)
+    {
+        grub_memset(input, 0, sizeof(input));
+
+        grub_printf("Enter password: ");
+        grub_refresh();
+        
+        if (pwd->type == VTOY_PASSWORD_TXT)
+        {
+            grub_password_get(input, 128);
+            if (grub_strcmp(pwd->text, input) == 0)
+            {
+                return 0;
+            }
+        }
+        else if (pwd->type == VTOY_PASSWORD_MD5)
+        {
+            grub_password_get(input, 128);
+            grub_crypto_hash(GRUB_MD_MD5, md5, input, grub_strlen(input));
+            if (grub_memcmp(pwd->md5, md5, 16) == 0)
+            {
+                return 0;
+            }
+        }
+        else if (pwd->type == VTOY_PASSWORD_SALT_MD5)
+        {
+            offset = (int)grub_snprintf(input, 128, "%s", pwd->salt);
+            grub_password_get(input + offset, 128);
+            
+            grub_crypto_hash(GRUB_MD_MD5, md5, input, grub_strlen(input));
+            if (grub_memcmp(pwd->md5, md5, 16) == 0)
+            {
+                return 0;
+            }
+        }
+        
+        grub_printf("Invalid password!\n\n");
+        grub_refresh();
+    }
+
+    return 1;
+}
+
 static img_info * ventoy_get_min_iso(img_iterator_node *node)
 {
     img_info *minimg = NULL;
@@ -3771,14 +3844,14 @@ int ventoy_is_file_exist(const char *fmt, ...)
     char *pos = NULL;
     char buf[256] = {0};
 
-    grub_snprintf(buf, sizeof(buf), "%s", "[ -f ");
-    pos = buf + 5;
+    grub_snprintf(buf, sizeof(buf), "%s", "[ -f \"");
+    pos = buf + 6;
 
     va_start (ap, fmt);
     len = grub_vsnprintf(pos, 255, fmt, ap);
     va_end (ap);
 
-    grub_strncpy(pos + len, " ]", 2);
+    grub_strncpy(pos + len, "\" ]", 3);
 
     debug("script exec %s\n", buf);
 
@@ -3797,14 +3870,14 @@ int ventoy_is_dir_exist(const char *fmt, ...)
     char *pos = NULL;
     char buf[256] = {0};
 
-    grub_snprintf(buf, sizeof(buf), "%s", "[ -d ");
-    pos = buf + 5;
+    grub_snprintf(buf, sizeof(buf), "%s", "[ -d \"");
+    pos = buf + 6;
 
     va_start (ap, fmt);
     len = grub_vsnprintf(pos, 255, fmt, ap);
     va_end (ap);
 
-    grub_strncpy(pos + len, " ]", 2);
+    grub_strncpy(pos + len, "\" ]", 3);
 
     debug("script exec %s\n", buf);
 
@@ -3961,23 +4034,8 @@ GRUB_MOD_INIT(ventoy)
     cmd_para *cur = NULL;
 
     ventoy_env_init();
-    
-#ifdef GRUB_MACHINE_EFI
-    if (grub_strcmp(GRUB_TARGET_CPU, "i386") == 0)
-    {
-        grub_snprintf(g_arch_mode_suffix, sizeof(g_arch_mode_suffix), "%s", "ia32");
-    }
-    else if (grub_strcmp(GRUB_TARGET_CPU, "arm64") == 0)
-    {
-        grub_snprintf(g_arch_mode_suffix, sizeof(g_arch_mode_suffix), "%s", "aa64");
-    }
-    else
-    {
-        grub_snprintf(g_arch_mode_suffix, sizeof(g_arch_mode_suffix), "%s", "uefi");
-    }
-#else
-    grub_snprintf(g_arch_mode_suffix, sizeof(g_arch_mode_suffix), "%s", "legacy");
-#endif
+
+    ventoy_arch_mode_init();
     
     for (i = 0; i < ARRAY_SIZE(ventoy_cmds); i++)
     {
index 9c7ac64a64b7521b2e058fb145cd5a366fe9d96d..2a79d4e861864a0f73712adc7807cc9348035f17 100644 (file)
 
 #define VTOY_WARNING  "!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!"
 
+#define VTOY_PLAT_I386_UEFI     0x49413332
+#define VTOY_PLAT_ARM64_UEFI    0x41413634
+#define VTOY_PLAT_X86_64_UEFI   0x55454649
+#define VTOY_PLAT_X86_LEGACY    0x42494f53
+
 #define VTOY_PWD_CORRUPTED(err) \
 {\
     grub_printf("\n\n Password corrupted, will reboot after 5 seconds.\n\n"); \
@@ -830,14 +835,28 @@ typedef struct image_list
     struct image_list *next;
 }image_list;
 
+#define VTOY_PASSWORD_NONE       0
+#define VTOY_PASSWORD_TXT        1
+#define VTOY_PASSWORD_MD5        2
+#define VTOY_PASSWORD_SALT_MD5   3
+
 typedef struct vtoy_password
+{
+    int type;
+    char text[128];
+    char salt[64];
+    grub_uint8_t md5[16];
+}vtoy_password;
+
+typedef struct menu_password
 {
     int pathlen;
     char isopath[256];
-    grub_uint8_t sha256[32];
 
-    struct vtoy_password *next;
-}vtoy_password;
+    vtoy_password password;
+
+    struct menu_password *next;
+}menu_password;
 
 extern int g_ventoy_menu_esc;
 extern int g_ventoy_suppress_esc;
@@ -914,7 +933,7 @@ grub_err_t ventoy_cmd_load_vhdboot(grub_extcmd_context_t ctxt, int argc, char **
 grub_err_t ventoy_cmd_patch_vhdboot(grub_extcmd_context_t ctxt, int argc, char **args);
 grub_err_t ventoy_cmd_raw_chain_data(grub_extcmd_context_t ctxt, int argc, char **args);
 grub_err_t ventoy_cmd_get_vtoy_type(grub_extcmd_context_t ctxt, int argc, char **args);
-int ventoy_check_password(const grub_uint8_t *pwdsha256, int retry);
+int ventoy_check_password(const vtoy_password *pwd, int retry);
 
 #endif /* __VENTOY_DEF_H__ */
 
index da0e9f56b0a933df7841f666bed09244e29c1184..ef0474a60dc301364f882f5420026e067591576e 100644 (file)
@@ -42,11 +42,10 @@ GRUB_MOD_LICENSE ("GPLv3+");
 
 char g_arch_mode_suffix[64];
 static char g_iso_disk_name[128];
-static grub_uint8_t g_boot_pwd = 0;
-static grub_uint8_t g_boot_sha256[32];
+static vtoy_password g_boot_pwd;
 static install_template *g_install_template_head = NULL;
 static dud *g_dud_head = NULL;
-static vtoy_password *g_pwd_head = NULL;
+static menu_password *g_pwd_head = NULL;
 static persistence_config *g_persistence_head = NULL;
 static menu_alias *g_menu_alias_head = NULL;
 static menu_class *g_menu_class_head = NULL;
@@ -700,18 +699,120 @@ static int ventoy_plugin_dud_entry(VTOY_JSON *json, const char *isodisk)
     return 0;
 }
 
+static int ventoy_plugin_parse_pwdstr(char *pwdstr, vtoy_password *pwd)
+{
+    int i;
+    int len;
+    char ch;
+    char *pos;
+    char bytes[3];
+    vtoy_password tmpPwd;
+    
+    len = (int)grub_strlen(pwdstr);
+    if (len > 64)
+    {
+        if (NULL == pwd) grub_printf("Password too long %d\n", len);
+        return 1;
+    }
+
+    grub_memset(&tmpPwd, 0, sizeof(tmpPwd));
+
+    if (grub_strncmp(pwdstr, "txt#", 4) == 0)
+    {
+        tmpPwd.type = VTOY_PASSWORD_TXT;
+        grub_snprintf(tmpPwd.text, sizeof(tmpPwd.text), "%s", pwdstr + 4);
+    }
+    else if (grub_strncmp(pwdstr, "md5#", 4) == 0)
+    {
+        if ((len - 4) == 32)
+        {
+            for (i = 0; i < 16; i++)
+            {
+                bytes[0] = pwdstr[4 + i * 2];
+                bytes[1] = pwdstr[4 + i * 2 + 1];
+                bytes[2] = 0;
+                
+                if (grub_isxdigit(bytes[0]) && grub_isxdigit(bytes[1]))
+                {
+                    tmpPwd.md5[i] = (grub_uint8_t)grub_strtoul(bytes, NULL, 16);
+                }
+                else
+                {
+                    if (NULL == pwd) grub_printf("Invalid md5 hex format %s %d\n", pwdstr, i);
+                    return 1;
+                }
+            }
+            tmpPwd.type = VTOY_PASSWORD_MD5;
+        }
+        else if ((len - 4) > 32)
+        {
+            pos = grub_strchr(pwdstr + 4, '#');
+            if (!pos)
+            {
+                if (NULL == pwd) grub_printf("Invalid md5 password format %s\n", pwdstr);
+                return 1;
+            }
+
+            if (len - 1 - (int)(long)(pos - pwdstr) != 32)
+            {
+                if (NULL == pwd) grub_printf("Invalid md5 salt password format %s\n", pwdstr);
+                return 1;
+            }
+        
+            ch = *pos;
+            *pos = 0;
+            grub_snprintf(tmpPwd.salt, sizeof(tmpPwd.salt), "%s", pwdstr + 4);
+            *pos = ch;
+
+            pos++;
+            for (i = 0; i < 16; i++)
+            {
+                bytes[0] = pos[i * 2];
+                bytes[1] = pos[i * 2 + 1];
+                bytes[2] = 0;
+                
+                if (grub_isxdigit(bytes[0]) && grub_isxdigit(bytes[1]))
+                {
+                    tmpPwd.md5[i] = (grub_uint8_t)grub_strtoul(bytes, NULL, 16);
+                }
+                else
+                {
+                    if (NULL == pwd) grub_printf("Invalid md5 hex format %s %d\n", pwdstr, i);
+                    return 1;
+                }
+            }
+
+            tmpPwd.type = VTOY_PASSWORD_SALT_MD5;
+        }
+        else
+        {
+            if (NULL == pwd) grub_printf("Invalid md5 password format %s\n", pwdstr);
+            return 1;
+        }
+    }
+    else
+    {
+        if (NULL == pwd) grub_printf("Invalid password format %s\n", pwdstr);
+        return 1;
+    }
+
+    if (pwd)
+    {
+        grub_memcpy(pwd, &tmpPwd, sizeof(tmpPwd));
+    }
+
+    return 0;
+}
+
 static int ventoy_plugin_pwd_entry(VTOY_JSON *json, const char *isodisk)
 {
-    int i = 0;
-    int len = 0;
     const char *iso = NULL;
     const char *pwd = NULL;
     VTOY_JSON *pNode = NULL;
     VTOY_JSON *pCNode = NULL;
-    vtoy_password *node = NULL;
-    vtoy_password *tail = NULL;
-    vtoy_password *next = NULL;
-    char bytes[3];
+    menu_password *node = NULL;
+    menu_password *tail = NULL;
+    menu_password *next = NULL;
 
     (void)isodisk;
 
@@ -736,18 +837,7 @@ static int ventoy_plugin_pwd_entry(VTOY_JSON *json, const char *isodisk)
     {
         if (pNode->pcName && grub_strcmp("bootpwd", pNode->pcName) == 0)
         {
-            len = (int)grub_strlen(pNode->unData.pcStrVal);
-            if (len == 64)
-            {
-                g_boot_pwd = 1;
-                for (i = 0; i < 32; i++)
-                {
-                    bytes[0] = pNode->unData.pcStrVal[i * 2];
-                    bytes[1] = pNode->unData.pcStrVal[i * 2 + 1];
-                    bytes[2] = 0;
-                    g_boot_sha256[i] = (grub_uint8_t)grub_strtoul(bytes, NULL, 16);
-                }
-            }
+            ventoy_plugin_parse_pwdstr(pNode->unData.pcStrVal, &g_boot_pwd);
         }
         else if (pNode->pcName && grub_strcmp("menupwd", pNode->pcName) == 0)
         {
@@ -762,24 +852,16 @@ static int ventoy_plugin_pwd_entry(VTOY_JSON *json, const char *isodisk)
                 pwd = vtoy_json_get_string_ex(pCNode->pstChild, "pwd");
                 if (iso && pwd && iso[0] == '/')
                 {
-                    node = grub_zalloc(sizeof(vtoy_password));
+                    node = grub_zalloc(sizeof(menu_password));
                     if (node)
                     {
                         node->pathlen = grub_snprintf(node->isopath, sizeof(node->isopath), "%s", iso);
-                        len = (int)grub_strlen(pwd);
-                        if (len != 64)
+
+                        if (ventoy_plugin_parse_pwdstr((char *)pwd, &(node->password)))
                         {
                             grub_free(node);
                             continue;
                         }
-                        
-                        for (i = 0; i < 32; i++)
-                        {
-                            bytes[0] = pwd[i * 2];
-                            bytes[1] = pwd[i * 2 + 1];
-                            bytes[2] = 0;
-                            node->sha256[i] = (grub_uint8_t)grub_strtoul(bytes, NULL, 16);
-                        }
 
                         if (g_pwd_head)
                         {
@@ -801,7 +883,6 @@ static int ventoy_plugin_pwd_entry(VTOY_JSON *json, const char *isodisk)
 
 static int ventoy_plugin_pwd_check(VTOY_JSON *json, const char *isodisk)
 {
-    int len = 0;
     const char *iso = NULL;
     const char *pwd = NULL;
     VTOY_JSON *pNode = NULL;
@@ -817,18 +898,18 @@ static int ventoy_plugin_pwd_check(VTOY_JSON *json, const char *isodisk)
     {
         if (pNode->pcName && grub_strcmp("bootpwd", pNode->pcName) == 0)
         {
-            len = (int)grub_strlen(pNode->unData.pcStrVal);
-            if (len != 64)
+            if (0 == ventoy_plugin_parse_pwdstr(pNode->unData.pcStrVal, NULL))
             {
-                grub_printf("Invalid bootpwd len :%d\n", len);
+                grub_printf("bootpwd:<%s>\n", pNode->unData.pcStrVal);
             }
             else
             {
-                grub_printf("bootpwd:<%s>\n", pNode->unData.pcStrVal);                                
+                grub_printf("Invalid bootpwd.\n");
             }
         }
         else if (pNode->pcName && grub_strcmp("menupwd", pNode->pcName) == 0)
         {
+            grub_printf("\n");
             for (pCNode = pNode->pstChild; pCNode; pCNode = pCNode->pstNext)
             {
                 if (pCNode->enDataType != JSON_TYPE_OBJECT)
@@ -844,21 +925,24 @@ static int ventoy_plugin_pwd_check(VTOY_JSON *json, const char *isodisk)
                     {
                         pwd = vtoy_json_get_string_ex(pCNode->pstChild, "pwd");
 
-                        len = (int)grub_strlen(pwd);
-                        if (len != 64)
+                        if (0 == ventoy_plugin_parse_pwdstr((char *)pwd, NULL))
                         {
-                            grub_printf("Invalid sha256 len <%d>\n", len);
+                            grub_printf("file:<%s> [OK]\n", iso);
+                            grub_printf("pwd:<%s>\n\n", pwd);
                         }
                         else
                         {
-                            grub_printf("file:<%s> [OK]\n", iso);
-                            grub_printf("pwd:<%s>\n\n", pwd);
+                            grub_printf("Invalid password for <%s>\n", iso);
                         }
                     }
+                    else
+                    {
+                        grub_printf("<%s%s> not found\n", isodisk, iso);
+                    }
                 }
                 else
                 {
-                    grub_printf("No file found\n");
+                    grub_printf("No file item found in json.\n");
                 }
             }
         }
@@ -1385,7 +1469,7 @@ static int ventoy_plugin_conf_replace_check(VTOY_JSON *json, const char *isodisk
             {
                 grub_printf("iso:<%s> [OK]\n", isof);
                 
-                grub_snprintf(cmd, sizeof(cmd), "loopback vtisocheck %s%s", isodisk, isof);
+                grub_snprintf(cmd, sizeof(cmd), "loopback vtisocheck \"%s%s\"", isodisk, isof);
                 grub_script_execute_sourcecode(cmd);
 
                 file = ventoy_grub_file_open(VENTOY_FILE_TYPE, "(vtisocheck)/%s", orgf);
@@ -1695,10 +1779,10 @@ grub_err_t ventoy_cmd_load_plugin(grub_extcmd_context_t ctxt, int argc, char **a
 
     grub_free(buf);
 
-    if (g_boot_pwd)
-    {
-        grub_printf("\n\n\n\n");
-        if (ventoy_check_password(g_boot_sha256, 3))
+    if (g_boot_pwd.type)
+    {        
+        grub_printf("\n\n======= %s ======\n\n", grub_env_get("VTOY_TEXT_MENU_VER"));
+        if (ventoy_check_password(&g_boot_pwd, 3))
         {
             grub_printf("\n!!! Password check failed, will exit after 5 seconds. !!!\n");
             grub_refresh();
@@ -2105,10 +2189,10 @@ int ventoy_plugin_load_dud(dud *node, const char *isopart)
     return 0;
 }
 
-static const grub_uint8_t * ventoy_plugin_get_password(const char *isopath)
+static const vtoy_password * ventoy_plugin_get_password(const char *isopath)
 {
     int len;
-    vtoy_password *node = NULL;
+    menu_password *node = NULL;
 
     if ((!g_pwd_head) || (!isopath))
     {
@@ -2120,54 +2204,25 @@ static const grub_uint8_t * ventoy_plugin_get_password(const char *isopath)
     {
         if (node->pathlen == len && grub_strncmp(isopath, node->isopath, len) == 0)
         {
-            return node->sha256;
+            return &(node->password);
         }
     }
 
     return NULL;
 }
 
-int ventoy_check_password(const grub_uint8_t *pwdsha256, int retry)
-{
-    char input[128];
-    grub_uint8_t sha256[32];
-
-    while (retry--)
-    {
-        grub_memset(input, 0, sizeof(input));
-
-        grub_printf("Enter password: ");
-        grub_refresh();
-        grub_password_get(input, sizeof(input));
-        
-        grub_crypto_hash(GRUB_MD_SHA256, sha256, input, grub_strlen(input));
-
-        if (grub_memcmp(pwdsha256, sha256, 32) == 0)
-        {
-            return 0;
-        }
-        else
-        {
-            grub_printf("Invalid password!\n\n");
-            grub_refresh();
-        }
-    }
-
-    return 1;
-}
-
 grub_err_t ventoy_cmd_check_password(grub_extcmd_context_t ctxt, int argc, char **args)
 {
     int ret;
-    const grub_uint8_t *sha256 = NULL;
+    const vtoy_password *pwd = NULL;
     
     (void)ctxt;
     (void)argc;
 
-    sha256 = ventoy_plugin_get_password(args[0]);
-    if (sha256)
+    pwd = ventoy_plugin_get_password(args[0]);
+    if (pwd)
     {
-        if (0 == ventoy_check_password(sha256, 1))
+        if (0 == ventoy_check_password(pwd, 1))
         {
             ret = 1;
         }
index 3f7612be5776d7eb015c6785bff7daf8c59e8543..109087eadf4f901317a87ac933abdb22c51a88cf 100644 (file)
@@ -1492,7 +1492,7 @@ static grub_uint32_t ventoy_get_wim_iso_offset(const char *filepath)
     grub_file_t file;
     char cmdbuf[128];
     
-    grub_snprintf(cmdbuf, sizeof(cmdbuf), "loopback wimiso %s", filepath);
+    grub_snprintf(cmdbuf, sizeof(cmdbuf), "loopback wimiso \"%s\"", filepath);
     grub_script_execute_sourcecode(cmdbuf);
 
     file = ventoy_grub_file_open(VENTOY_FILE_TYPE, "%s", "(wimiso)/boot/boot.wim");
index 87bda1c2eaa5b6eeec3fd64216c7ec50acc831d6..9098523892e005bdae94a7ec849879897176b201 100644 (file)
Binary files a/INSTALL/EFI/BOOT/BOOTAA64.EFI and b/INSTALL/EFI/BOOT/BOOTAA64.EFI differ
index 342c6dba0def7d240d53ccf0f74876b811fddd6e..eb989570cc17c897ba9539e7df9759dbab2dfcea 100644 (file)
Binary files a/INSTALL/EFI/BOOT/grubia32_real.efi and b/INSTALL/EFI/BOOT/grubia32_real.efi differ
index 2cd4d27ea0a9814a1c3b22fee3dba4c5e0cce21a..5d5336505547a201f2a971acaa72f8799ac76490 100644 (file)
Binary files a/INSTALL/EFI/BOOT/grubx64_real.efi and b/INSTALL/EFI/BOOT/grubx64_real.efi differ
index ea535544ce1e8f46a0dd28d12270b2d69dc222b7..42a328cb713d0b1a807ec6af8459cba3b256b239 100644 (file)
Binary files a/INSTALL/Ventoy2Disk.exe and b/INSTALL/Ventoy2Disk.exe differ
index c9ea0add5a7cec782111b52ae1d4e9cf0baccf35..7816acfdc552322c1165554b9dec53031060f4a2 100644 (file)
@@ -92,7 +92,7 @@ terminal:
 div:
 crypto:
 part_bsd: part_msdos
-ventoy: ext2 fshelp font crypto exfat udf extcmd normal video gcry_sha256 gcry_sha1 iso9660
+ventoy: ext2 fshelp font crypto gcry_md5 exfat udf extcmd normal video gcry_sha1 iso9660
 gcry_sha512: crypto
 password: crypto normal
 fshelp:
index 0540d462162a81619279932604ed33f5335b6784..895a9b5305ec2b2146926ab9de59d56e56a0822d 100644 (file)
@@ -106,13 +106,13 @@ function get_os_type {
     fi
 
     if [ -n "${vtdebug_flag}" ]; then
-        echo ISO is $vtoy_os
+        echo ISO is "$vtoy_os"
     fi
 }
 
 function vt_check_compatible_pe {
     #Check for PE without external tools
-    if [ -f $1/HBCD_PE.ini ]; then
+    if [ -f "$1/HBCD_PE.ini" ]; then
         set ventoy_compatible=YES        
     fi
 }
@@ -1382,15 +1382,15 @@ function img_common_menuentry {
         ventoy_img_easyos
     elif [ -e (vtimghd,1)/volumio.initrd ]; then
         ventoy_img_volumio
-    elif vt_str_begin $vtImgHd1Label "LAKKA"; then
+    elif vt_str_begin "$vtImgHd1Label" "LAKKA"; then
         ventoy_img_openelec lakka
-    elif vt_str_begin $vtImgHd1Label "LIBREELEC"; then
+    elif vt_str_begin "$vtImgHd1Label" "LIBREELEC"; then
         ventoy_img_openelec LibreELEC
-    elif vt_str_begin $vtImgHd1Label "paldo-live"; then
+    elif vt_str_begin "$vtImgHd1Label" "paldo-live"; then
         ventoy_img_paldo
-    elif vt_str_begin $vtImgHostname "freedombox"; then
+    elif vt_str_begin "$vtImgHostname" "freedombox"; then
         ventoy_img_freedombox
-    elif vt_str_begin $vtImgHd1Label "BATOCERA"; then
+    elif vt_str_begin "$vtImgHd1Label" "BATOCERA"; then
         ventoy_img_batocera
     elif [ "$vtImgHd2Label" = "RECALBOX" ]; then
         ventoy_img_recalbox
@@ -1453,14 +1453,16 @@ set VTOY_F6_CMD="ventoy_ext_menu"
 
 if [ "$grub_platform" = "pc" ]; then
     set VTOY_TEXT_MENU_VER="Ventoy $VENTOY_VERSION BIOS  www.ventoy.net"
-else
-    set VTOY_TEXT_MENU_VER="Ventoy $VENTOY_VERSION UEFI  www.ventoy.net"    
+else    
     if [ "$grub_cpu" = "i386" ]; then
         set VTOY_EFI_ARCH=ia32
+        set VTOY_TEXT_MENU_VER="Ventoy $VENTOY_VERSION IA32  www.ventoy.net"
     elif [ "$grub_cpu" = "arm64" ]; then
         set VTOY_EFI_ARCH=aa64
+        set VTOY_TEXT_MENU_VER="Ventoy $VENTOY_VERSION AA64  www.ventoy.net"
     else
         set VTOY_EFI_ARCH=x64
+        set VTOY_TEXT_MENU_VER="Ventoy $VENTOY_VERSION UEFI  www.ventoy.net"    
     fi
 fi
 
@@ -1505,6 +1507,7 @@ vt_load_part_table $vtoydev
 if [ -f $vtoy_iso_part/ventoy/ventoy.json ]; then
    clear
    vt_load_plugin $vtoy_iso_part
+   clear
 fi
 
 if [ -n "$VTOY_MENU_TIMEOUT" ]; then
index d12b0a47fd1177b19424da8b13d7f80dd1f613b4..157a53d8675bfc06716d95155cbafc3afe4136ec 100644 (file)
@@ -119,7 +119,7 @@ ehci: cs5536 usb boot
 crypto:
 part_bsd: part_msdos
 cs5536:
-ventoy: ext2 fshelp font crypto exfat udf extcmd normal video gcry_sha256 gcry_sha1 iso9660
+ventoy: ext2 fshelp font crypto gcry_md5 exfat udf extcmd normal video gcry_sha1 iso9660
 gcry_sha512: crypto
 password: crypto normal
 fshelp:
index f6e80657913c7b331e8fa5501465bc49e4fa865b..f542bded980a3a6f490d2e61d6ae9968c7f87fff 100644 (file)
Binary files a/INSTALL/grub/i386-pc/core.img and b/INSTALL/grub/i386-pc/core.img differ
index d10d9e511bb70e04d74bde059117c4b4124457f3..a7a263c7fd472136bd6dedf6388b15b43cf79e81 100644 (file)
@@ -122,7 +122,7 @@ crypto:
 part_bsd: part_msdos
 cs5536: pci
 biosdisk:
-ventoy: ext2 fshelp font crypto exfat udf extcmd normal video gcry_sha256 gcry_sha1 iso9660 acpi
+ventoy: ext2 fshelp font crypto gcry_md5 exfat udf extcmd normal video gcry_sha1 iso9660 acpi
 lsapm:
 gcry_sha512: crypto
 password: crypto normal
index 765848593f1a565465a2301dfe539ac07f239e1c..ddff8c42c7ea9baa3c38c109f6b619a6f0c4d9b9 100644 (file)
@@ -119,7 +119,7 @@ ehci: cs5536 usb boot
 crypto:
 part_bsd: part_msdos
 cs5536:
-ventoy: ext2 fshelp font crypto exfat udf extcmd normal video gcry_sha256 gcry_sha1 iso9660
+ventoy: ext2 fshelp font crypto gcry_md5 exfat udf extcmd normal video gcry_sha1 iso9660
 gcry_sha512: crypto
 password: crypto normal
 fshelp:
index d353c45e75a63967115ce0072432cc605040d7ca..a83625a9b5e978ecb47180330600b460158bc2cc 100644 (file)
@@ -422,7 +422,8 @@ else
     dd status=none conv=fsync if=${DISK} skip=2040 bs=512 count=8 of=./rsvdata.bin
 
     if [ "$PART1_TYPE" = "EE" ]; then
-        vtdebug "This is GPT partition style ..."        
+        vtdebug "This is GPT partition style ..."    
+        echo -en '\x22' | dd status=none of=$DISK conv=fsync bs=1 count=1 seek=92
         xzcat ./boot/core.img.xz | dd status=none conv=fsync of=$DISK bs=512 count=2014 seek=34
         echo -en '\x23' | dd of=$DISK conv=fsync bs=1 count=1 seek=17908 status=none
     else
index 20b623e69e264027c93fd7c8bcbc1086b7520279..35d8203ec48c2ebe38325db98be77ac3d9679506 100644 (file)
Binary files a/INSTALL/ventoy/ventoy.cpio and b/INSTALL/ventoy/ventoy.cpio differ
index cc28971af82d97ae767b33182c83c65d10cf1469..cda156edda411d307940b266353b7f7c260497af 100644 (file)
Binary files a/INSTALL/ventoy/vtloopex.cpio and b/INSTALL/ventoy/vtloopex.cpio differ
index 16307a568913362fbaea434d30a43b751fdfc46e..b6b36e6dbbb5424b9ae2a212d344082cd448b96c 100644 (file)
--- a/README.md
+++ b/README.md
@@ -31,12 +31,13 @@ Most type of OS supported(Windows/WinPE/Linux/Unix/Vmware/Xen...) <br/>
 * UEFI Secure Boot supported (1.0.07+)
 * Persistence supported (1.0.11+)
 * Windows/Linux auto installation supported (1.0.09+)
+* FAT32/exFAT/NTFS/UDF/XFS/Ext2(3)(4) supported for main partition
 * ISO files larger than 4GB supported
 * Native boot menu style for Legacy & UEFI
 * Most type of OS supported, 580+ iso files tested
 * Linux vDisk boot supported
 * Not only boot but also complete installation process
-* Menu can be switched between List mode and TreeView mode dynamically
+* Menu dynamically switchable between List/TreeView mode
 * "Ventoy Compatible" concept
 * Plugin Framework
 * Injection files to runtime enviroment