From f3e267a09e22f9f2db70a04b81a30fefe0824bbe Mon Sep 17 00:00:00 2001 From: longpanda Date: Tue, 19 Oct 2021 23:07:27 +0800 Subject: [PATCH] support ALT rescue --- GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_linux.c | 6 ++++++ INSTALL/grub/grub.cfg | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_linux.c b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_linux.c index 560355ab..98296f76 100644 --- a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_linux.c +++ b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_linux.c @@ -978,6 +978,12 @@ static grub_err_t ventoy_linux_locate_initrd(int filt, int *filtcnt) } } + /* skip hdt.img */ + if (file->size <= VTOY_SIZE_1MB && grub_strcmp(node->name, "/boot/hdt.img") == 0) + { + continue; + } + if (grub_strcmp(file->fs->name, "iso9660") == 0) { node->iso_type = 0; diff --git a/INSTALL/grub/grub.cfg b/INSTALL/grub/grub.cfg index 103b4c51..b77b1255 100644 --- a/INSTALL/grub/grub.cfg +++ b/INSTALL/grub/grub.cfg @@ -247,7 +247,8 @@ function distro_specify_initrd_file { vt_linux_specify_initrd_file /boot/initramfs-x86_64.img elif [ -f (loop)/boot/isolinux/initramfs_data64.cpio.gz ]; then vt_linux_specify_initrd_file /boot/isolinux/initramfs_data64.cpio.gz - + elif [ -f (loop)/boot/initrd.img ]; then + vt_linux_specify_initrd_file /boot/initrd.img fi