From 740e6fdfc06378bde16d7e95ce7fbaec0bb4d088 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Tue, 21 May 2024 18:25:51 +0200 Subject: [PATCH] - mount efivars when running under EFI firmware --- rc.d/rc.sysinit | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index 826b435..e84b247 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -383,7 +383,10 @@ if ! is_yes "$VSERVER" && [[ "$container" != lxc* ]]; then grep -Fq sysfs /proc/filesystems && mount -n -o gid=17 -t sysfs sysfs /sys fi if grep -Fq securityfs /proc/filesystems; then - mount -n -o gid=17 -t securityfs securityfs /sys/kernel/security + mount -n -t securityfs securityfs /sys/kernel/security + fi + if [ -d /sys/firmware/efi ] && ! is_fsmounted efivarfs /sys/firmware/efi/efivars; then + mount -n -o rw -t efivarfs efivarfs /sys/firmware/efi/efivars fi init_selinux @@ -655,6 +658,9 @@ if ! is_yes "$VSERVER" && [[ "$container" != lxc* ]]; then if is_fsmounted securityfs /sys/kernel/security ; then mount -f -t securityfs securityfs /sys/kernel/security 2> /dev/null fi + if [ -d /sys/firmware/efi ] && is_fsmounted efivarfs /sys/firmware/efi/efivars ; then + mount -f -t efivarfs efivarfs /sys/firmware/efi/efivars 2> /dev/null + fi fi if is_fsmounted selinuxfs /selinux; then -- 2.45.2