summaryrefslogtreecommitdiffstats
path: root/resources/grub/config
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2015-09-22 07:54:10 (EDT)
committer Francis Rowe <info@gluglug.org.uk>2015-09-22 07:54:10 (EDT)
commit03409abe1196e85f5c72e20448dec135b35b9287 (patch)
treee3df0a1b7d984d4e3379e5be9547e0f5b8907f13 /resources/grub/config
parentd9b63be109dd591e23c2f6b7b0000a84266d11c1 (diff)
downloadlibreboot-03409abe1196e85f5c72e20448dec135b35b9287.zip
libreboot-03409abe1196e85f5c72e20448dec135b35b9287.tar.gz
libreboot-03409abe1196e85f5c72e20448dec135b35b9287.tar.bz2
grub.cfg: RAID support (note: ugly hack. TODO: re-write)
Diffstat (limited to 'resources/grub/config')
-rw-r--r--resources/grub/config/menuentries/common.cfg26
1 files changed, 19 insertions, 7 deletions
diff --git a/resources/grub/config/menuentries/common.cfg b/resources/grub/config/menuentries/common.cfg
index 0f51bae..8e14c3b 100644
--- a/resources/grub/config/menuentries/common.cfg
+++ b/resources/grub/config/menuentries/common.cfg
@@ -31,14 +31,26 @@ menuentry 'Load Operating System' {
done
# Last resort, otherwise go to GRUB shell
- set root='ahci0,1'
- for p in "/" "/boot/"; do
- if [ -f "${p}vmlinuz" ] ; then
- linux ${p}vmlinuz root=/dev/sda1 rw
- if [ -f "${p}initrd.img" ] ; then
- initrd ${p}initrd.img
+ for devname in "md/0" "ahci0"; do
+ case ${devname} in
+ ahci0)
+ rootdev="/dev/sda1"
+ set root='ahci0,1'
+ ;;
+ *)
+ rootdev="/dev/md0"
+ set root='md/0'
+ ;;
+ esac
+
+ for p in "/" "/boot/"; do
+ if [ -f "${p}vmlinuz" ] ; then
+ linux ${p}vmlinuz root=${rootdev} rw
+ if [ -f "${p}initrd.img" ] ; then
+ initrd ${p}initrd.img
+ fi
fi
- fi
+ done
done
}
menuentry 'Parse ISOLINUX menu (SATA)' {