From 32107ec02a2ea4781c0033602ad2c58605540500 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sat, 3 Mar 2012 23:15:18 +0100 Subject: [PATCH] * util/grub-install.in: Load efivars unconditionally. --- ChangeLog | 4 ++++ util/grub-install.in | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/ChangeLog b/ChangeLog index ffb568afb..36fc62209 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-03-03 Vladimir Serbinenko + + * util/grub-install.in: Load efivars unconditionally. + 2012-03-03 Vladimir Serbinenko * po/Rules-piglatin: Change suffix from .po-update-en to diff --git a/util/grub-install.in b/util/grub-install.in index c34c25722..adf76b4b9 100644 --- a/util/grub-install.in +++ b/util/grub-install.in @@ -272,11 +272,29 @@ if [ x$source_dir = x ]; then x"ia64"*) target="ia64-efi";; x"x86_64"* | x"amd64"*) + # On Linux, we need the efivars kernel modules. + # If no EFI is available this module just does nothing + # besides a small hello and if we detect efi we'll load it + # anyway later. So it should be safe to + # try to load it here. + case "$host_os" in + linux*) + modprobe -q efivars 2>/dev/null || true ;; + esac if [ -d /sys/firmware/efi ]; then target="x86_64-efi" fi target=i386-pc;; x"i"?"86"*) + # On Linux, we need the efivars kernel modules. + # If no EFI is available this module just does nothing + # besides a small hello and if we detect efi we'll load it + # anyway later. So it should be safe to + # try to load it here. + case "$host_os" in + linux*) + modprobe -q efivars 2>/dev/null || true ;; + esac if [ -d /sys/firmware/efi ]; then target="i386-efi" fi