diff --git a/GRUB2/MOD_SRC/grub-2.04/grub-core/lib/syslinux_parse.c b/GRUB2/MOD_SRC/grub-2.04/grub-core/lib/syslinux_parse.c
index 8c63c7a5..a75ecda7 100644
--- a/GRUB2/MOD_SRC/grub-2.04/grub-core/lib/syslinux_parse.c
+++ b/GRUB2/MOD_SRC/grub-2.04/grub-core/lib/syslinux_parse.c
@@ -51,8 +51,8 @@ struct syslinux_menuentry
char hotkey;
int make_default;
struct syslinux_say *say;
-
- enum { KERNEL_NO_KERNEL, KERNEL_LINUX, KERNEL_CHAINLOADER,
+
+ enum { KERNEL_NO_KERNEL, KERNEL_LINUX, KERNEL_CHAINLOADER,
KERNEL_BIN, KERNEL_PXE, KERNEL_CHAINLOADER_BPB,
KERNEL_COM32, KERNEL_COM, KERNEL_IMG, KERNEL_CONFIG, LOCALBOOT }
entry_type;
@@ -170,7 +170,7 @@ print_num (struct output_buffer *outbuf, int n)
{
char buf[20];
grub_snprintf (buf, sizeof (buf), "%d", n);
- return print (outbuf, buf, grub_strlen (buf));
+ return print (outbuf, buf, grub_strlen (buf));
}
static grub_err_t
@@ -233,7 +233,7 @@ kernel (const char *line, struct syslinux_menu *menu)
if (end - line >= 4 && grub_strcasecmp (end - 4, ".img") == 0)
menu->entries->entry_type = KERNEL_IMG;
-
+
return GRUB_ERR_NONE;
}
@@ -247,7 +247,7 @@ cmd_linux (const char *line, struct syslinux_menu *menu)
if (!menu->entries->kernel_file)
return grub_errno;
menu->entries->entry_type = KERNEL_LINUX;
-
+
return GRUB_ERR_NONE;
}
@@ -261,7 +261,7 @@ cmd_boot (const char *line, struct syslinux_menu *menu)
if (!menu->entries->kernel_file)
return grub_errno;
menu->entries->entry_type = KERNEL_CHAINLOADER;
-
+
return GRUB_ERR_NONE;
}
@@ -275,7 +275,7 @@ cmd_bss (const char *line, struct syslinux_menu *menu)
if (!menu->entries->kernel_file)
return grub_errno;
menu->entries->entry_type = KERNEL_CHAINLOADER_BPB;
-
+
return GRUB_ERR_NONE;
}
@@ -289,7 +289,7 @@ cmd_pxe (const char *line, struct syslinux_menu *menu)
if (!menu->entries->kernel_file)
return grub_errno;
menu->entries->entry_type = KERNEL_PXE;
-
+
return GRUB_ERR_NONE;
}
@@ -303,7 +303,7 @@ cmd_fdimage (const char *line, struct syslinux_menu *menu)
if (!menu->entries->kernel_file)
return grub_errno;
menu->entries->entry_type = KERNEL_IMG;
-
+
return GRUB_ERR_NONE;
}
@@ -317,7 +317,7 @@ cmd_comboot (const char *line, struct syslinux_menu *menu)
if (!menu->entries->kernel_file)
return grub_errno;
menu->entries->entry_type = KERNEL_COM;
-
+
return GRUB_ERR_NONE;
}
@@ -331,7 +331,7 @@ cmd_com32 (const char *line, struct syslinux_menu *menu)
if (!menu->entries->kernel_file)
return grub_errno;
menu->entries->entry_type = KERNEL_COM32;
-
+
return GRUB_ERR_NONE;
}
@@ -354,7 +354,7 @@ cmd_config (const char *line, struct syslinux_menu *menu)
return grub_errno;
}
menu->entries->entry_type = KERNEL_CONFIG;
-
+
return GRUB_ERR_NONE;
}
@@ -368,7 +368,7 @@ cmd_append (const char *line, struct syslinux_menu *menu)
menu->entries->append = grub_strdup (line);
if (!menu->entries->append)
return grub_errno;
-
+
return GRUB_ERR_NONE;
}
@@ -377,6 +377,8 @@ cmd_initrd (const char *line, struct syslinux_menu *menu)
{
struct initrd_list *ninitrd;
const char *comma;
+ char *pcPos;
+
if (!menu->entries)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "kernel without label");
@@ -393,6 +395,14 @@ cmd_initrd (const char *line, struct syslinux_menu *menu)
grub_free (ninitrd);
return grub_errno;
}
+
+ pcPos = grub_strstr(ninitrd->file, " quiet");
+ if (pcPos)
+ {
+ *pcPos = 0;
+ }
+
+
ninitrd->next = NULL;
if (menu->entries->initrds_last)
menu->entries->initrds_last->next = ninitrd;
@@ -406,7 +416,7 @@ cmd_initrd (const char *line, struct syslinux_menu *menu)
while (*line == ',')
line++;
}
-
+
return GRUB_ERR_NONE;
}
@@ -416,7 +426,7 @@ cmd_default (const char *line, struct syslinux_menu *menu)
menu->def = grub_strdup (line);
if (!menu->def)
return grub_errno;
-
+
return GRUB_ERR_NONE;
}
@@ -434,7 +444,7 @@ cmd_menudefault (const char *line __attribute__ ((unused)),
if (!menu->entries)
return grub_error (GRUB_ERR_BAD_ARGUMENT, "kernel without label");
- menu->entries->make_default = 1;
+ menu->entries->make_default = 1;
return GRUB_ERR_NONE;
}
@@ -457,7 +467,7 @@ cmd_localboot (const char *line,
if (!menu->entries->kernel_file)
return grub_errno;
menu->entries->entry_type = LOCALBOOT;
-
+
return GRUB_ERR_NONE;
}
@@ -485,7 +495,7 @@ cmd_extlabel (const char *line, struct syslinux_menu *menu)
*out++ = *in++;
}
*out = 0;
-
+
return GRUB_ERR_NONE;
}
@@ -548,7 +558,7 @@ syslinux_parse (const char *filename,
ret = syslinux_parse_real (menu);
if (ret == GRUB_ERR_FILE_NOT_FOUND
|| ret == GRUB_ERR_BAD_FILENAME)
- {
+ {
grub_errno = ret = GRUB_ERR_NONE;
add_comment (menu, "# File ", 0);
add_comment (menu, nf, 0);
@@ -761,7 +771,7 @@ syslinux_parse_real (struct syslinux_menu *menu)
}
static grub_err_t
-print_escaped (struct output_buffer *outbuf,
+print_escaped (struct output_buffer *outbuf,
const char *from, const char *to)
{
const char *ptr;
@@ -1037,7 +1047,7 @@ write_entry (struct output_buffer *outbuf,
case KERNEL_COM:
{
char *basename = NULL;
-
+
{
char *ptr;
for (ptr = curentry->kernel_file; *ptr; ptr++)
@@ -1244,8 +1254,8 @@ write_entry (struct output_buffer *outbuf,
if (grub_strcasecmp (basename, "whichsys.c32") == 0)
{
grub_syslinux_flavour_t flavour = GRUB_SYSLINUX_ISOLINUX;
- const char *flav[] =
- {
+ const char *flav[] =
+ {
[GRUB_SYSLINUX_ISOLINUX] = "iso",
[GRUB_SYSLINUX_PXELINUX] = "pxe",
[GRUB_SYSLINUX_SYSLINUX] = "sys"
@@ -1416,7 +1426,7 @@ free_menu (struct syslinux_menu *menu)
grub_free (initrd->file);
grub_free (initrd);
}
-
+
grub_free (entry->comments);
grub_free (entry->kernel_file);
grub_free (entry->label);
@@ -1455,7 +1465,7 @@ config_file (struct output_buffer *outbuf,
{
menu.timeout = 100;
}
-
+
err = syslinux_parse_real (&menu);
if (err)
return err;
@@ -1512,7 +1522,7 @@ config_file (struct output_buffer *outbuf,
print_string ("\n");
}
for (curentry = lentry; curentry; curentry = curentry->prev)
- {
+ {
print_string ("menuentry ");
err = print_escaped (outbuf,
curentry->extlabel ? : curentry->label, NULL);
diff --git a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_cmd.c b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_cmd.c
index 9b123425..790ffb53 100644
--- a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_cmd.c
+++ b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_cmd.c
@@ -4288,6 +4288,11 @@ static grub_err_t ventoy_cmd_check_mode(grub_extcmd_context_t ctxt, int argc, ch
}
else if (args[0][0] == '1')
{
+ if (argc == 2 && ventoy_check_mode_by_name(args[1], "vtcompat"))
+ {
+ return 0;
+ }
+
return g_ventoy_iso_raw ? 0 : 1;
}
else if (args[0][0] == '2')
@@ -6249,7 +6254,8 @@ static grub_err_t ventoy_cmd_need_secondary_menu(grub_extcmd_context_t ctxt, int
if (ventoy_check_mode_by_name(args[0], "vtgrub2") ||
ventoy_check_mode_by_name(args[0], "vtwimboot") ||
ventoy_check_mode_by_name(args[0], "vtmemdisk") ||
- ventoy_check_mode_by_name(args[0], "vtnormal")
+ ventoy_check_mode_by_name(args[0], "vtnormal") ||
+ ventoy_check_mode_by_name(args[0], "vtcompat")
)
{
return 1;
diff --git a/IMG/cpio/ventoy/hook/gentoo/ventoy-hook.sh b/IMG/cpio/ventoy/hook/gentoo/ventoy-hook.sh
index d0ba02a7..9d1c5181 100644
--- a/IMG/cpio/ventoy/hook/gentoo/ventoy-hook.sh
+++ b/IMG/cpio/ventoy/hook/gentoo/ventoy-hook.sh
@@ -30,6 +30,9 @@ elif $GREP -q 'setting up the root filesystem' /init; then
elif [ -d /etc/udev/rules.d ] || [ -d /lib/udev/rules.d ]; then
ventoy_systemd_udevd_work_around
ventoy_add_udev_rule "$VTOY_PATH/hook/default/udev_disk_hook.sh %k noreplace"
+elif $GREP -q 'NVIDIA CORPORATION' /init; then
+ $SED "s/while true; do/while false; do/" -i /init
+ $SED "/^FOUNDDEV=/a\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/gentoo/mats-hook.sh \"\${ROOTFS}/\${MNTNV}\"" -i /init
else
$SED "/mdev *-s/a\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/gentoo/disk_hook.sh" -i /init
fi
diff --git a/INSTALL/grub/grub.cfg b/INSTALL/grub/grub.cfg
index 07b50851..f66cce8c 100644
--- a/INSTALL/grub/grub.cfg
+++ b/INSTALL/grub/grub.cfg
@@ -414,7 +414,9 @@ function distro_specify_initrd_file_phase2 {
elif [ -f (loop)/initramfs-linux.img ]; then
vt_linux_specify_initrd_file /initramfs-linux.img
elif [ -f (loop)/boot/isolinux/initrd.gz ]; then
- vt_linux_specify_initrd_file /boot/isolinux/initrd.gz
+ vt_linux_specify_initrd_file /boot/isolinux/initrd.gz
+ elif [ -f (loop)/tiny/initrd ]; then
+ vt_linux_specify_initrd_file /tiny/initrd
elif vt_str_begin "$vt_volume_id" "AERYNOS"; then
vt_vcfg_pre_proc
@@ -861,6 +863,9 @@ function uefi_linux_menu_func {
elif [ -f (loop)/boot/syslinux/porteus.cfg ]; then
syslinux_configfile (loop)/boot/syslinux/porteus.cfg
set vtback_cfg_find=1
+ elif [ -f (loop)/syslinux.cfg ]; then
+ syslinux_configfile (loop)/syslinux.cfg
+ set vtback_cfg_find=1
fi
fi
@@ -1315,6 +1320,9 @@ function legacy_linux_menu_func {
elif [ -f (loop)/boot/syslinux/porteus.cfg ]; then
syslinux_configfile (loop)/boot/syslinux/porteus.cfg
set vtback_cfg_find=1
+ elif [ -f (loop)/syslinux.cfg ]; then
+ syslinux_configfile (loop)/syslinux.cfg
+ set vtback_cfg_find=1
fi
fi
diff --git a/VtoyTool/vtoydm.c b/VtoyTool/vtoydm.c
index 46de1726..6da6896a 100644
--- a/VtoyTool/vtoydm.c
+++ b/VtoyTool/vtoydm.c
@@ -7,12 +7,12 @@
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, see
<%llu>\n", disk, diskname, *part, (unsigned long long)(*offset));
snprintf(disk, len, "/dev/%s", diskname);
@@ -681,7 +785,7 @@ static int vtoydm_print_raw_linear_table(const char *img_map_file, const char *d
{
printf("0 %lu linear %s%d 0\n", (unsigned long)disk_sector_num, diskname, part);
}
-
+
return 0;
}
@@ -697,7 +801,7 @@ int vtoydm_main(int argc, char **argv)
char filepath[300] = {0};
char outfile[300] = {0};
- while ((ch = getopt(argc, argv, "s:l:o:d:f:v::i::p::r::c::h::e::E::")) != -1)
+ while ((ch = getopt(argc, argv, "s:l:o:d:f:v::i::p::r::c::h::e::E::C::")) != -1)
{
if (ch == 'd')
{
@@ -719,6 +823,10 @@ int vtoydm_main(int argc, char **argv)
{
cmd = CMD_CREATE_DM;
}
+ else if (ch == 'C')
+ {
+ cmd = CMD_COPY_ISO;
+ }
else if (ch == 'i')
{
cmd = CMD_DUMP_ISO_INFO;
@@ -764,11 +872,11 @@ int vtoydm_main(int argc, char **argv)
return 1;
}
- debug("cmd=%d file=<%s> disk=<%s> first_sector=%lu file_size=%llu\n",
+ debug("cmd=%d file=<%s> disk=<%s> first_sector=%lu file_size=%llu\n",
cmd, filepath, diskname, first_sector, file_size);
vtoydm_vlnk_convert(diskname, sizeof(diskname), &part, &offset);
-
+
switch (cmd)
{
case CMD_PRINT_TABLE:
@@ -795,6 +903,10 @@ int vtoydm_main(int argc, char **argv)
{
return vtoydm_print_extract_iso(filepath, diskname, first_sector, file_size, outfile);
}
+ case CMD_COPY_ISO:
+ {
+ return vtoydm_copy_iso(filepath, diskname, outfile);
+ }
default :
{
fprintf(stderr, "Invalid cmd \n");
diff --git a/VtoyTool/vtoytool.h b/VtoyTool/vtoytool.h
index e2ddce34..b90d8174 100644
--- a/VtoyTool/vtoytool.h
+++ b/VtoyTool/vtoytool.h
@@ -7,12 +7,12 @@
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, see