Hello,
On a *Dell Inspiron 3593* (BIOS 1.30.0, 03/07/2024) with *Kubuntu 26.10*
(GRUB 2.14-2ubuntu3, kernel 7.3.0-10-generic, Secure Boot on), GRUB
intermittently prints 12 times *"error: command failed"*, followed by *"error:
you need to load the kernel first"*. The boot then fails, and selecting the
menu entry repeats the errors. *Sometimes the next boot works even though
nothing was changed.*
*Setup:* full-disk encryption (LUKS). Layout: unencrypted EFI partition,
separate unencrypted /boot (ext4), encrypted root (btrfs) and a
separate encrypted /home (btrfs). dracut is used instead of
initramfs-tools,
with TPM2 auto-unlock (systemd-cryptenroll, PCR 7). I wanted
the TPM
to unlock both the root and home partitions; root unlocks
automatically.
Other users of the same models have been reporting this for years:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1883785
*Workaround that fixed it for me:*
1. Create a script that outputs "rmmod tpm":
* sudo tee /etc/grub.d/06_notpm >/dev/null <<'EOF' #!/bin/sh echo
'rmmod tpm' EOF sudo chmod +x /etc/grub.d/06_notpm*
2. Regenerate the config:
* sudo update-grub*
3. Check that the line is in the config:
* sudo grep -n "rmmod tpm" /boot/grub/grub.cfg*
*Result:* 8 of 8 boots were clean (4 cold boots and 4 reboots). The TPM
remained usable from the OS (TPM2 LUKS unlock bound to PCR 7 still works).
I do not know whether the fault is in GRUB's tpm module or in the firmware
returning an error to its TCG2 calls. Could the module handle such an error
without failing the following commands, for example linux and initrd? I can
test patches or provide more output
if useful.
Thank you.