Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/174'
Browse files Browse the repository at this point in the history
  • Loading branch information
mika committed May 31, 2021
2 parents 9ae6b12 + d91d9f3 commit e11e7b2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
10 changes: 10 additions & 0 deletions chroot-script
Expand Up @@ -595,8 +595,18 @@ efi_setup() {
echo "Mounting $EFI on /boot/efi"
mount "$EFI" /boot/efi || return 1

# if efivarfs kernel module is loaded, but efivars isn't,
# then we need to mount efivarfs for efibootmgr usage
if ! ls /sys/firmware/efi/efivars/* &>/dev/null ; then
echo "Mounting efivarfs on /sys/firmware/efi/efivars"
mount -t efivarfs efivarfs /sys/firmware/efi/efivars
fi

echo "Invoking efibootmgr"
efibootmgr || return 1

umount /sys/firmware/efi/efivars &>/dev/null || true

}

# grub configuration/installation {{{
Expand Down
5 changes: 5 additions & 0 deletions grml-debootstrap
Expand Up @@ -996,9 +996,14 @@ format_efi_partition() {
# check for EFI support or try to enable it {{{
efi_support() {
local efivars_loaded=false
# this is for kernels versions before v3.10, which didn't provide efivarfs yet
if modprobe efivars &>/dev/null ; then
efivars_loaded=true
fi
# kernel versions v3.10 and newer usually provide efivarfs
if modprobe efivarfs &>/dev/null ; then
efivars_loaded=true
fi

if [ -d /sys/firmware/efi ] ; then
einfo "EFI support detected." ; eend 0
Expand Down

0 comments on commit e11e7b2

Please sign in to comment.