From da35a99f7c2b7c5ba591014dc839732ae0991780 Mon Sep 17 00:00:00 2001 From: longpanda Date: Tue, 12 Jul 2022 12:13:24 +0800 Subject: [PATCH] Support Fedora CoreOS (#1727) --- IMG/cpio/ventoy/hook/rhel7/ventoy-hook.sh | 6 ++++++ INSTALL/grub/grub.cfg | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/IMG/cpio/ventoy/hook/rhel7/ventoy-hook.sh b/IMG/cpio/ventoy/hook/rhel7/ventoy-hook.sh index bc5bc5eb..a6e59d97 100644 --- a/IMG/cpio/ventoy/hook/rhel7/ventoy-hook.sh +++ b/IMG/cpio/ventoy/hook/rhel7/ventoy-hook.sh @@ -128,6 +128,12 @@ if [ -e /usr/sbin/anaconda-diskroot ]; then $SED 's/^mount $dev $repodir/mount -oro $dev $repodir/' -i /usr/sbin/anaconda-diskroot fi +#For Fedora CoreOS +if $GREP -i -q 'fedora.*coreos' /etc/os-release; then + $SED "s#isosrc=.*#isosrc=/dev/mapper/ventoy#" -i /lib/systemd/system-generators/live-generator + cp -a $VTOY_PATH/hook/rhel7/ventoy-make-link.sh /lib/dracut/hooks/pre-mount/99-ventoy-premount-mklink.sh +fi + if [ -f $VTOY_PATH/autoinstall ]; then cp -a $VTOY_PATH/hook/rhel7/ventoy-autoexp.sh /lib/dracut/hooks/pre-mount/99-ventoy-autoexp.sh fi diff --git a/INSTALL/grub/grub.cfg b/INSTALL/grub/grub.cfg index 5d7d5b5f..79287428 100644 --- a/INSTALL/grub/grub.cfg +++ b/INSTALL/grub/grub.cfg @@ -381,7 +381,9 @@ function distro_specify_initrd_file_phase2 { 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 - + elif [ -f (loop)/images/pxeboot/initrd.img ]; then + vt_linux_specify_initrd_file /images/pxeboot/initrd.img + fi }