X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=chroot-script;h=e59b829a175896046fbf03f676e3e26029e0548d;hp=b0737ca77275963cb43a20d9db493619e3b7a84e;hb=b1008a63920208df5814d8c10543f1a7032187da;hpb=5db946a930ef1cdf9d8e8da8111072faa37383d5 diff --git a/chroot-script b/chroot-script index b0737ca..e59b829 100755 --- a/chroot-script +++ b/chroot-script @@ -595,6 +595,13 @@ 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 } @@ -715,6 +722,8 @@ finalize() { [ -n "$POLICYRCD" ] && rm -f /usr/sbin/policy-rc.d + umount /sys/firmware/efi/efivars &>/dev/null || true + umount /sys >/dev/null 2>/dev/null || true umount /proc >/dev/null 2>/dev/null || true }