summaryrefslogtreecommitdiffstats
path: root/resources/grub
diff options
context:
space:
mode:
Diffstat (limited to 'resources/grub')
-rw-r--r--resources/grub/config/menuentries/common.cfg27
1 files changed, 18 insertions, 9 deletions
diff --git a/resources/grub/config/menuentries/common.cfg b/resources/grub/config/menuentries/common.cfg
index 20abd54..a375315 100644
--- a/resources/grub/config/menuentries/common.cfg
+++ b/resources/grub/config/menuentries/common.cfg
@@ -1,14 +1,23 @@
menuentry 'Load Operating System' {
- if search --file --set /boot/grub/libreboot_grub.cfg ; then
- configfile /boot/grub/libreboot_grub.cfg
- elif search --file --set /grub/libreboot_grub.cfg ; then
- configfile /grub/libreboot_grub.cfg
- else
- set root='ahci0,msdos1'
- linux /vmlinuz root=/dev/sda1 rw
- if [ -f "/initrd.img" ] ; then
- initrd /initrd.img
+ insmod regexp
+ insmod ahci
+ insmod part_msdos
+ insmod part_gpt
+ for x in (ahci0,*); do
+ if [ -f "$x/grub/libreboot_grub.cfg" ] ; then
+ set root=$x
+ configfile /grub/libreboot_grub.cfg
fi
+ if [ -f "$x/boot/grub/libreboot_grub.cfg" ] ; then
+ set root=$x
+ configfile /boot/grub/libreboot_grub.cfg
+ fi
+ done
+
+ set root='ahci0,1'
+ linux /vmlinuz root=/dev/sda1 rw
+ if [ -f "/initrd.img" ] ; then
+ initrd /initrd.img
fi
}
menuentry 'Parse ISOLINUX menu (USB)' {