From 71bb652c81af01b5b324e11f66714f22244c086f Mon Sep 17 00:00:00 2001
From: Holger Paradies <retabell@gmx.de>
Date: Tue, 31 Oct 2023 13:24:20 +0100
Subject: Fix Uefi install

hint https://michael-prokop.at/blog/2021/06/09/efivars-is-gone-with-debian-bullseye-newinbullseye/
---
 backend/modules/install_configure | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/backend/modules/install_configure b/backend/modules/install_configure
index dbb86bb..f24be35 100644
--- a/backend/modules/install_configure
+++ b/backend/modules/install_configure
@@ -55,6 +55,14 @@ EOF
 	rm -f $TARGET/tmp 2>/dev/null
 	mkdir -p $TARGET/tmp
 	chmod 1777 $TARGET/tmp
+	
+	# create file to mount efivars (needed since bullseye)
+	cat <<EOF >$TARGET/tmp/fixmount
+#!/bin/sh
+modprobe efivarfs
+mount -t efivarfs efivarfs /sys/firmware/efi/efivars
+EOF
+	chmod ugo+x $TARGET/tmp/fixmount
 
 	# create /etc/mtab as a regular file
 	rm -f $TARGET/etc/mtab
@@ -156,6 +164,11 @@ function configure_target_purge_live_only_stuff()
 	if [ -d /run/live/medium/debian ]; then
 	DEBIAN_FRONTEND=noninteractive chroot_it dpkg -R -i /tmp
 	fi
+	
+	# execute above configured fix for efi (new since bullseye)
+	if [ -d /sys/firmware/efi/efivars ]; then
+	chroot_it /tmp/fixmount
+	fi
 
         # remove kde-config-touchpad if no touchpad is available
         [ "$(su "$FLL_LIVE_USER" -c "qdbus org.kde.synaptiks /modules/synaptiks org.kde.Synaptiks.isTouchpadAvailable")" = true ] && \
-- 
cgit v1.0