summaryrefslogtreecommitdiffstats
path: root/resources/grub/config/menuentries/common.cfg
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2015-01-21 22:53:02 (EST)
committer Francis Rowe <info@gluglug.org.uk>2015-01-22 19:39:14 (EST)
commit9ab4f43d845b65d6b939d2cc39f4713c9bd7a3f4 (patch)
treef004de75428618bfcff0e9540241dafead62c93d /resources/grub/config/menuentries/common.cfg
parent66dc18b0b4d33bda7e77f24c1f4f3864924bcce3 (diff)
downloadlibreboot-9ab4f43d845b65d6b939d2cc39f4713c9bd7a3f4.zip
libreboot-9ab4f43d845b65d6b939d2cc39f4713c9bd7a3f4.tar.gz
libreboot-9ab4f43d845b65d6b939d2cc39f4713c9bd7a3f4.tar.bz2
grub.cfg: In default entry, search for libreboot_grub.cfg on disk
If not found, fall back to the previous behavior.
Diffstat (limited to 'resources/grub/config/menuentries/common.cfg')
-rw-r--r--resources/grub/config/menuentries/common.cfg14
1 files changed, 10 insertions, 4 deletions
diff --git a/resources/grub/config/menuentries/common.cfg b/resources/grub/config/menuentries/common.cfg
index eebfbc2..20abd54 100644
--- a/resources/grub/config/menuentries/common.cfg
+++ b/resources/grub/config/menuentries/common.cfg
@@ -1,8 +1,14 @@
menuentry 'Load Operating System' {
- set root='ahci0,msdos1'
- linux /vmlinuz root=/dev/sda1 rw
- if [ -f "/initrd.img" ] ; then
- initrd /initrd.img
+ 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
+ fi
fi
}
menuentry 'Parse ISOLINUX menu (USB)' {