summaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorAlbin Söderqvist <albin@member.fsf.org>2016-02-03 07:21:49 (EST)
committer Francis Rowe <info@gluglug.org.uk>2016-02-03 10:40:54 (EST)
commit1de6fcf679ef485de5395f97767989993bcd9f1d (patch)
treec88d1e05195a4d888274a39268639d2bf4ac132c /resources
parent33d259035c1d138a369e7b400ef76dd804c4b60a (diff)
downloadlibreboot-1de6fcf679ef485de5395f97767989993bcd9f1d.zip
libreboot-1de6fcf679ef485de5395f97767989993bcd9f1d.tar.gz
libreboot-1de6fcf679ef485de5395f97767989993bcd9f1d.tar.bz2
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.
Diffstat (limited to 'resources')
-rw-r--r--resources/grub/config/menuentries/common.cfg46
1 files changed, 33 insertions, 13 deletions
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' {