grml-chroot: support efivarfs in EFI environments
authorMichael Prokop <mika@grml.org>
Wed, 9 Jun 2021 16:40:12 +0000 (18:40 +0200)
committerMichael Prokop <mika@grml.org>
Wed, 9 Jun 2021 16:52:15 +0000 (18:52 +0200)
commit7bbfe5432568c69c9e4641466b52b9f6dcb6ee4e
tree0b5c4b57e39dc613fb3e1b67b266185f2ec8475d
parent7b5dd59f29586fea9d65d68ca4054d14c9f4c155
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
usr_sbin/grml-chroot