From: Michael Prokop Date: Wed, 9 Jun 2021 16:40:12 +0000 (+0200) Subject: grml-chroot: support efivarfs in EFI environments X-Git-Tag: v2.10.0~1^2 X-Git-Url: http://git.grml.org/?p=grml-scripts.git;a=commitdiff_plain;h=7bbfe5432568c69c9e4641466b52b9f6dcb6ee4e grml-chroot: support efivarfs in EFI environments CONFIG_EFI_VARS is no longer available since Debian kernel's git commit 20146398c4, and therefore efivars (the older interface handled from within /sys) is gone with the kernel version shipped as of Debian/bullseye (kernel >=5.10). Only the newer efivarfs interface is supported, this requires explicit mounting of /sys/firmware/efi/efivars though. Therefore, whenever /sys/firmware/efi/efivars is available, we are running in EFI mode and might need EFI support also in the chroot. Accordingly mount it then. This is related to the corresponding change in grml-debootstrap: https://github.com/grml/grml-debootstrap/pull/174 --- diff --git a/usr_sbin/grml-chroot b/usr_sbin/grml-chroot index 3b27505..e8ed430 100755 --- a/usr_sbin/grml-chroot +++ b/usr_sbin/grml-chroot @@ -98,6 +98,9 @@ else mountit "sysfs" "sys" mountit "/dev" "dev" "--bind" mountit "devpts" "dev/pts" + if [ -d /sys/firmware/efi/efivars ] ; then + mountit "efivarfs" "sys/firmware/efi/efivars" + fi if [ -d "$DEST_"/run/udev ] && [ -d /run/udev ] ; then mountit "/run/udev" "/run/udev" "--bind" fi