summaryrefslogtreecommitdiff
path: root/config/binary_grub
diff options
context:
space:
mode:
authorAndreas Loibl <andreas@andreas-loibl.de>2012-05-21 13:22:13 +0200
committerAndreas Loibl <andreas@andreas-loibl.de>2012-05-21 13:22:13 +0200
commitc698750a1cee03b0cbb0f01ed9312bff49acee79 (patch)
tree045f172c9bb92407d9818e958a7726947ca76414 /config/binary_grub
parent2937f20f6973122c4c43d6b6f0c11e4c687cfbbf (diff)
downloadkanotix-c698750a1cee03b0cbb0f01ed9312bff49acee79.zip
kanotix-c698750a1cee03b0cbb0f01ed9312bff49acee79.tar.gz
updated EFI detection
Diffstat (limited to 'config/binary_grub')
-rw-r--r--config/binary_grub/grub.cfg32
1 files changed, 18 insertions, 14 deletions
diff --git a/config/binary_grub/grub.cfg b/config/binary_grub/grub.cfg
index 9aba770..1897c6b 100644
--- a/config/binary_grub/grub.cfg
+++ b/config/binary_grub/grub.cfg
@@ -7,12 +7,12 @@ set boot_de='boot=live config utc=no timezone=Europe/Berlin locales=de keyboard-
if loadfont /boot/grub/unicode.pf2 ; then
set gfxmode=800x600
- if [ $efi != 1 ] ; then
- insmod vbe
- insmod vga
- else
+ if [ "$grub_platform" == "efi" ]; then
insmod efi_gop
insmod efi_uga
+ else
+ insmod vbe
+ insmod vga
fi
insmod video_bochs
insmod video_cirrus
@@ -101,11 +101,7 @@ menuentry 'Start Kanotix EN (failsafe)' --class kanotix64 --class gnu-linux --cl
#####
-if [ $efi != 1 ] ; then
- menuentry 'Memtest86+' --class memtest {
- linux16 /live/memtest
- }
-else
+if [ "$grub_platform" == "efi" ]; then
if test -f /efi/boot/shellx64.efi ; then
menuentry 'EFI Shell x64' {
chainloader /efi/boot/shellx64.efi
@@ -116,11 +112,19 @@ else
chainloader /efi/boot/shellx86.efi
}
fi
- if search -nf /EFI/Microsoft/Boot/BOOTMGR.EFI ; then
- menuentry 'Microsoft Bootmgr' {
- search -sf /EFI/Microsoft/Boot/BOOTMGR.EFI
- chainloader /EFI/Boot/BOOTX64.EFI
+ insmod regexp
+ for bootmgfw in (*)/EFI/Microsoft/Boot/bootmgfw.efi; do
+ if [ -e "$bootmgfw" ]; then
+ regexp --set=device '(\(.*\))' "$bootmgfw"
+ menuentry "Boot Windows UEFI from device $device" "$device" "$bootmgfw" {
+ root="$2"
+ chainloader "$3"
}
- fi
+ fi
+ done
+else
+ menuentry 'Memtest86+' --class memtest {
+ linux16 /live/memtest
+ }
fi