From 66edb3ec63f7744cf2f114550328c32afc327b50 Mon Sep 17 00:00:00 2001 From: Gen Li Date: Tue, 4 Jul 2017 14:22:09 +0800 Subject: [PATCH] Update fedora.sh --- boot/grub/distro/fedora.sh | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/boot/grub/distro/fedora.sh b/boot/grub/distro/fedora.sh index f353195a..dd9db1d4 100644 --- a/boot/grub/distro/fedora.sh +++ b/boot/grub/distro/fedora.sh @@ -7,19 +7,21 @@ if test -f (loop)/images/pxeboot/vmlinuz*; then linux (loop)/images/pxeboot/vmlinuz* boot=images quiet iso-scan/filename="$isofile" inst.stage2=hd:UUID="$loopuuid"; initrd (loop)/images/pxeboot/initrd*; } -fi -menuentry $"Boot Fedora Live From ISO (Live CD)" --class $icon{ - set kcmdline="rd.live.image quiet"; - linux $vmlinuz_img $kcmdline $linux_extra; - initrd $initrd_img; -} -menuentry $"Boot Fedora From ISO (Live CD, Fail Safe)" --class $icon{ - set kcmdline="rd.live.image nomodeset"; - linux $vmlinuz_img $kcmdline $linux_extra; - initrd $initrd_img; -} -menuentry $"Boot Fedora From ISO (Live CD, Rescue)" --class $icon{ - set kcmdline="rd.live.image rescue"; - linux $vmlinuz_img $kcmdline $linux_extra; - initrd $initrd_img; -} \ No newline at end of file +fi; +if test -f $vmlinuz_img -a -f $initrd_img; then + menuentry $"Boot Fedora From ISO (Live CD)" --class $icon{ + set kcmdline="rd.live.image quiet"; + linux $vmlinuz_img $kcmdline $linux_extra; + initrd $initrd_img; + } + menuentry $"Boot Fedora From ISO (Live CD, Fail Safe)" --class $icon{ + set kcmdline="rd.live.image nomodeset"; + linux $vmlinuz_img $kcmdline $linux_extra; + initrd $initrd_img; + } + menuentry $"Boot Fedora From ISO (Live CD, Rescue)" --class $icon{ + set kcmdline="rd.live.image rescue"; + linux $vmlinuz_img $kcmdline $linux_extra; + initrd $initrd_img; + } +fi; \ No newline at end of file