From 1de6fcf679ef485de5395f97767989993bcd9f1d Mon Sep 17 00:00:00 2001 From: Albin Söderqvist Date: Wed, 03 Feb 2016 07:21:49 -0500 Subject: Fix the menu entry "Search for GRUB configuration" On at least the MacBook2,1 the "Search..." menu entry couldn't load existing configuration files, for example that of the GuixSD USB installer. This commit reverts a part of ee9f1bd4dc64786026c34267919441266c49c039. --- diff --git a/resources/grub/config/menuentries/common.cfg b/resources/grub/config/menuentries/common.cfg index 63f57ac..980a1a5 100644 --- a/resources/grub/config/menuentries/common.cfg +++ b/resources/grub/config/menuentries/common.cfg @@ -104,19 +104,39 @@ menuentry 'Switch to grubtest.cfg [t]' --hotkey='t' { configfile /grubtest.cfg } menuentry 'Search for GRUB configuration (grub.cfg) outside of CBFS [s]' --hotkey='s' { - for i in usb0 usb1 ahci0; do - for j in 1 2 3 4 5 6 7 8 9; do - x=${i},${j} - for p in "grub" "boot/grub" "grub2" "boot/grub2"; do - if [ -f "${x}/${p}/grub.cfg" ]; then - submenu "Load Config from ${x}" ${x} { - root=$2 - source /${p}/grub.cfg - unset superusers - } - fi - done - done + insmod ahci + insmod usbms + insmod part_msdos + insmod part_gpt + for x in (ahci0,1) (ahci0,2) (ahci0,3) (ahci0,4) (usb0) (usb0,1) (usb0,2) (usb0,3) (usb0,4); do + if [ -f "$x/grub/grub.cfg" ] ; then + submenu "Load Config from $x" $x { + root=$2 + source /grub/grub.cfg + unset superusers + } + fi + if [ -f "$x/boot/grub/grub.cfg" ] ; then + submenu "Load Config from $x" $x { + root=$2 + source /boot/grub/grub.cfg + unset superusers + } + fi + if [ -f "$x/grub2/grub.cfg" ] ; then + submenu "Load Config from $x" $x { + root=$2 + source /grub2/grub.cfg + unset superusers + } + fi + if [ -f "$x/boot/grub2/grub.cfg" ] ; then + submenu "Load Config from $x" $x { + root=$2 + source /boot/grub2/grub.cfg + unset superusers + } + fi done } menuentry 'Poweroff [p]' --hotkey='p' { -- cgit v0.9.1