From 1f9d2d8086d059045bb5e183a088c7fa741fe8c8 Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Mon, 24 Nov 2014 01:10:50 +0000 Subject: grub.cfg: Add more path checks to isolinux parser Should make more ISO's work --- resources/grub/config/menuentries/common.cfg | 34 ++++++++++++++++++---------- 1 file changed, 22 insertions(+), 12 deletions(-) (limited to 'resources/grub/config') diff --git a/resources/grub/config/menuentries/common.cfg b/resources/grub/config/menuentries/common.cfg index 62457d55..eebfbc29 100644 --- a/resources/grub/config/menuentries/common.cfg +++ b/resources/grub/config/menuentries/common.cfg @@ -7,21 +7,31 @@ menuentry 'Load Operating System' { } menuentry 'Parse ISOLINUX menu (USB)' { set root='usb0' - syslinux_configfile -i (usb0)/isolinux/isolinux.cfg + if [ -f "/menu.cfg" ] ; then + syslinux_configfile -i /menu.cfg + elif [ -f "/txt.cfg" ] ; then + syslinux_configfile -i /txt.cfg + elif [ -f "/isolinux/menu.cfg" ] ; then + syslinux_configfile -i /isolinux/menu.cfg + elif [ -f "/isolinux/txt.cfg" ] ; then + syslinux_configfile -i /isolinux/txt.cfg + elif [ -f "/isolinux/isolinux.cfg" ] ; then + syslinux_configfile -i /isolinux/isolinux.cfg + fi } menuentry 'Parse ISOLINUX menu (CD)' { set root='ata0' - syslinux_configfile -i (ata0)/isolinux/isolinux.cfg -} -menuentry 'Load Trisquel netinstall (USB)' { - set root='usb0' - linux /linux - initrd /initrd.gz -} -menuentry 'Load Trisquel netinstall (CD)' { - set root='ata0' - linux /linux - initrd /initrd.gz + if [ -f "/menu.cfg" ] ; then + syslinux_configfile -i /menu.cfg + elif [ -f "/txt.cfg" ] ; then + syslinux_configfile -i /txt.cfg + elif [ -f "/isolinux/menu.cfg" ] ; then + syslinux_configfile -i /isolinux/menu.cfg + elif [ -f "/isolinux/txt.cfg" ] ; then + syslinux_configfile -i /isolinux/txt.cfg + elif [ -f "/isolinux/isolinux.cfg" ] ; then + syslinux_configfile -i /isolinux/isolinux.cfg + fi } menuentry 'Switch to grubtest.cfg' { set root='cbfsdisk' -- cgit v1.2.3-70-g09d2