Bug 2128485 - GRUB errors out on boot due to TPM module errors
Summary: GRUB errors out on boot due to TPM module errors
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Javier Martinez Canillas
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2282245 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-20 18:13 UTC by allaeddine
Modified: 2025-02-06 16:34 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-02-06 16:34:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description allaeddine 2022-09-20 18:13:51 UTC
Description of problem:
grub errors out on boot with a TPM error after September 17 update for f37 , the error was present for some time in f35

Version-Release number of selected component (if applicable):


How reproducible:
on every boot 

Steps to Reproduce:
1.reboot

Actual results:
TPM error press any key to continue

Expected results:
boots normally

Additional info:
a quick workaround (not really a solution) :
on boot keep smashing up or down arrows for the grub menu to show
press "c"
type these commands
rmmod tpm
normal
the menu will show again but now it will boot properly

Comment 1 Timothée Ravier 2022-09-21 11:03:26 UTC
You need to provide much more info: Which hardware do you have/laptop/brand, motherboard brand and type, ifis this an EFI or Bios boot, etc.

Comment 2 allaeddine 2022-09-22 09:23:19 UTC
laptop : asus zenbook 310u 
cpu : intel i7 7500u
gpu : intel hd graphics 620
ram : 8GB ddr4 
ssd : 250gb M.2 sata
boot : EFI
secure boot : the issue appears with both secure boot on and off , i'm keeping it off until the issue gets resolved
os : fedora silverblue 37 

if there are any logs i can send give me the commands i can use to get them``

the error message :

```
../../grub-core/commands/efi/tpm.c:148:Unknown TPM error.
../../grub-core/commands/efi/tpm.c:148:Unknown TPM error.
../../grub-core/commands/efi/tpm.c:148:Unknown TPM error.
../../grub-core/commands/efi/tpm.c:148:Unknown TPM error.
../../grub-core/commands/efi/tpm.c:148:Unknown TPM error.
../../grub-core/loader/i386/efi/linux.c:258:you need to load the kernel first.
Press any key to continue..._
```

when i run ```rmmod tpm``` this error shows up ```../../grub-core/commands/efi/tpm.c:148:Unknown TPM error.``` but the removal of the module works .

Comment 3 Paul DeStefano 2022-11-01 17:43:09 UTC
I think I'm experiencing this too.  Identical symptoms.  ASUS Zenbook UX305F.  Workaround didn't work for me, though.  Without TMP module, GRUB2 will not offer any fedora boot entries.  But disabling Secure Boot in BIOS solves the problem.

How do I get back to Secure Boot Enabled?

Comment 4 QuarkSolution 2022-11-06 18:51:27 UTC
Same issue on Fedora 36 (after an update back in September, if I'm not wrong).

It does not matter if I keep Secure Boot disabled, if the TPM is available this error is thrown.

The workaround to get the system to boot is to electronically turn the TMP module off in BIOS, on top of having secure boot turned off.

Comment 5 QuarkSolution 2022-11-06 18:57:31 UTC
Laptop: HP ZBook G6
CPU: Intel i7-7700HQ
GPU: Intel HD 630
GPU: NVIDIA Quadro M1200 (kernel modules signed by custom key, and registered using MOKutils)
BOOT: UEFI
TPM: TPM2.0 (needs to be electronically turned off for the OS to boot)
OS: Fedora KDE Plasma 36

ERROR MSG:

../../grub-core/commands/efi/tpm.c:148:Unknown TPM error.
../../grub-core/commands/efi/tpm.c:148:Unknown TPM error.
../../grub-core/commands/efi/tpm.c:148:Unknown TPM error.
../../grub-core/commands/efi/tpm.c:148:Unknown TPM error.
../../grub-core/commands/efi/tpm.c:148:Unknown TPM error.
../../grub-core/loader/i386/efi/linux.c:258:you need to load the kernel first.

Press any key to continue..._

Comment 6 Timothée Ravier 2023-01-04 15:25:22 UTC
I'm using the following workaround on Silverblue/Kinoite:

```
$ cat /etc/grub.d/02_notpm 
#!/usr/bin/sh -e
cat << EOF
rmmod tpm
EOF
```

Then update the system and the GRUB config will be regenerated.

Comment 7 QuarkSolution 2023-02-13 02:42:15 UTC
This is resolved after kernel 6.1.10 in Fedora 37

Comment 8 Robbie Harwood 2023-02-13 18:21:05 UTC
Thank you for following up, and I'm glad it's working now.

Comment 9 Rick White 2023-02-19 14:29:57 UTC
This is not resolved on 6.1.10 or 6.1.11 on Fedora Silverblue 37.  I wouldn't think the kernel would fix this; this should be a grub2 issue.  I still require Timothée Ravier's workaround above.

Comment 10 QuarkSolution 2023-02-20 01:50:08 UTC
You are right, Rick. 

After updating to UEFI dbx 217 from UEFI dbx 77, on kernel 6.1.11, this issue shows up, but it is not critical.

I get the same message as before (../../grub-core/commands/efi/tpm.c:150:Unknown TPM error.), but if I do not do anything, the laptop restarts without any issue even with Secure Boot enabled (I have even Clevis taking care of LUKS drives using TPM).

I checked my UEFI dbx version. It did update successfully to 217. I do have 268 lines. I do not have dual boot, and all my EFI files are signed, I verified using sbverify.

Comment 11 Rick White 2023-07-17 14:35:49 UTC
This is still an issue on Fedora (Silverblue) 38, even on a new install.  I don't think the underlying grub issue with older Asus Zenbook TPMs is fixed.

Comment 12 Timothée Ravier 2023-07-17 17:43:07 UTC
Reopening based on previous comment.

Comment 13 Aoife Moloney 2024-05-07 15:50:12 UTC
This message is a reminder that Fedora Linux 38 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 38 on 2024-05-21.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '38'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 38 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 14 Rick White 2024-05-14 17:07:02 UTC
This is still present in Fedora 40.

Comment 15 Aoife Moloney 2024-05-21 14:18:29 UTC
Fedora Linux 38 entered end-of-life (EOL) status on 2024-05-21.

Fedora Linux 38 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 16 Rick White 2024-05-21 19:29:26 UTC
I refiled for f40 in https://bugzilla.redhat.com/show_bug.cgi?id=2282245.

Comment 17 Timothée Ravier 2024-05-23 09:08:06 UTC
*** Bug 2282245 has been marked as a duplicate of this bug. ***

Comment 18 Timothée Ravier 2024-05-23 09:09:17 UTC
Can you try the instructions from https://github.com/fedora-silverblue/issue-tracker/issues/543#issuecomment-2048350047 to update GRUB and see if this helps? Thanks

Comment 19 Rick White 2024-05-23 18:56:21 UTC
Yes, I've been trying that every week or so, but still hitting the same issue.

Comment 20 thomas 2024-07-27 19:50:29 UTC
Hi, been hit by this issue after changing GRUB_ENABLE_BLSCFG=false in /etc/default/grub and grub2-mkconfig -o /etc/grub2-efi.cfg.

Thanks for the rmmod tpm tip, that helped me booting into the OS (although typing this command threw up the same error which initially made me think that it failed); then reverting the change, which fixed the issue.

I then tried again to switch to GRUB_ENABLE_BLSCFG=false and re-installing grub after which did work.

This is on f40 with a system built from scratch.

Comment 21 Timothée Ravier 2025-02-06 16:34:25 UTC
According to https://github.com/fedora-silverblue/issue-tracker/issues/353, this is now fixed. Thanks


Note You need to log in before you can comment on or make changes to this bug.