Hello there!

I ran into what seems to be the same problem as well and I think I may
have found a solution. Interestingly, the problem occurs only on one in
six/seven (identical, at least in theory) devices.

I stumbled upon 
https://salsa.debian.org/installer-team/grub-installer/-/commit/5eada0008eede06c97d55adca1a9eb1eb9447aee
and noticed that the actual script which is called by debian-installer
was not touched, so I came up with the following patch:

diff --git a/grub-installer b/grub-installer
index b824cab8..3380e6fc 100755
--- a/grub-installer
+++ b/grub-installer
@@ -64,6 +64,11 @@ if [ "$(udpkg --print-os)" = "linux" ] && [ ! -d 
"$ROOT/run/udev" ]; then
        mount --bind /run $ROOT/run
 fi

+# Sometimes we need to manually mount efivarfs: https://bugs.debian.org/933523
+if [ "$(udpkg --print-os)" = "linux" ] && [ -z $(ls 
"$ROOT/sys/firmware/efi/efivars/") ]; then
+       mount -t efivarfs efivarfs $ROOT/sys/firmware/efi/efivars || error 
"Mounting efivars failed"
+fi
+
 get_serial_console() {
        # Get the last 'console=' entry (if none, the whole string is returned)
        local defconsole="$(sed -e 's/.*\(console=[^ ]*\).*/\1/' /proc/cmdline)"
@@ -1429,6 +1434,10 @@ fi
 db_progress STEP 1
 db_progress STOP

+if [ "$(udpkg --print-os)" = "linux" ] && ! umount 
$ROOT/sys/firmware/efi/efivars; then
+       info "Failed to unmount /sys/firmware/efi/efivars in $ROOT"
+fi
+
 if [ "$(udpkg --print-os)" = "linux" ] && ! umount $ROOT/run; then
        info "Failed to unmount /run in $ROOT"
 fi

I'll create a merge request as soon as my account on salsa.debian.org is
approved. :-)


Cheers!

PizZaKatZe

Reply via email to