From 1bdda30f49360eb55aa99cba9ff56ae16badc796 Mon Sep 17 00:00:00 2001
From: Andreas Loibl <andreas@andreas-loibl.de>
Date: Thu, 29 Sep 2011 10:55:03 +0200
Subject: check for efi before trying to load gfx modules

---
 config/binary_grub/grub.cfg                                | 10 +++++++---
 config/binary_local-includes/boot/grub/x86_64-efi/grub.cfg |  2 --
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/config/binary_grub/grub.cfg b/config/binary_grub/grub.cfg
index 7ea53d0..be60ad3 100644
--- a/config/binary_grub/grub.cfg
+++ b/config/binary_grub/grub.cfg
@@ -5,10 +5,14 @@ set boot_en='boot=live config utc=yes locales=us'
 set boot_de='boot=live config utc=no timezone=Europe/Berlin locales=de keyboard-layouts=de keyboard-variant=nodeadkeys'
 
 if loadfont /boot/grub/unicode.pf2 ; then
-  # set gfxmode=auto
   set gfxmode=800x600
-  insmod vbe
-  insmod vga
+  if [ $efi != 1 ] ; then
+    insmod vbe
+    insmod vga
+  else
+    insmod efi_gop
+    insmod efi_uga
+  fi
   insmod video_bochs
   insmod video_cirrus
   insmod gfxterm
diff --git a/config/binary_local-includes/boot/grub/x86_64-efi/grub.cfg b/config/binary_local-includes/boot/grub/x86_64-efi/grub.cfg
index 107a80e..bff7cab 100644
--- a/config/binary_local-includes/boot/grub/x86_64-efi/grub.cfg
+++ b/config/binary_local-includes/boot/grub/x86_64-efi/grub.cfg
@@ -6,7 +6,5 @@ insmod part_gpt
 insmod part_msdos
 insmod part_sun
 insmod part_sunpc
-insmod efi_gop
-insmod efi_uga
 set efi=1
 source /boot/grub/grub.cfg
-- 
cgit v1.0