You are not logged in.

#1 2023-12-02 11:18:24

farnsworth
Member
From: /home/farnsworth
Registered: 2012-01-28
Posts: 28

[SOLVED] TPM2 pin code / Numlock not activating at boot time

Hello,
I'm facing troubles with numlock on boot with systemd-boot.
I've enrolled a TPM2 pin code to unlock my luks container, unfortunately when the kernel is asking for the pin code numlock is not activated (I can of course activate it manually by pressing the numlock key but that requires too much effort wink ).
I tried:
- mkinitcpio-numlock AUR package with udev HOOKS
- putting the 2 files from https://bbs.archlinux.org/viewtopic.php?id=283252 + systemd HOOKS

second configuration is the one I'm currently running, HOOKS variable contains:
HOOKS=(systemd keyboard plymouth modconf block numlock sd-vconsole sd-encrypt filesystems btrfs)

do you have any idea what is wrong and how I could solve this issue ?
Thanks for your help

Last edited by farnsworth (2024-01-01 11:21:40)

Offline

#2 2023-12-08 13:30:31

farnsworth
Member
From: /home/farnsworth
Registered: 2012-01-28
Posts: 28

Re: [SOLVED] TPM2 pin code / Numlock not activating at boot time

Hello,
Any hint ?

Offline

#3 2023-12-11 16:39:35

Soultrigger
Member
From: Brazil
Registered: 2021-11-04
Posts: 107

Re: [SOLVED] TPM2 pin code / Numlock not activating at boot time

About the numlock I dont have the skills to help you...

But the PIN for TPM2 is just any password, it doesnt need to be only numbers if that helps.

There are commands to remove the tpm2 key and its tokens if you want. Or if you have avaliable slots you can just add another password with PCR 0+7.

Offline

#4 2023-12-16 19:36:36

farnsworth
Member
From: /home/farnsworth
Registered: 2012-01-28
Posts: 28

Re: [SOLVED] TPM2 pin code / Numlock not activating at boot time

Thank you,
I have no problem changing it, but I want to keep numbers, and I'd like to have the numlock activated, on my previous laptop it was perfectly working, but I don't own it anymore and I have no idea how I did that wink

Offline

#5 2023-12-17 11:35:40

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,069

Re: [SOLVED] TPM2 pin code / Numlock not activating at boot time

Sounds like tpm2 kicks in before the numlock hook is activated.

Description=Numlock before LUKS
Before=cryptsetup-pre.target

I know almost nothing about tpm2, but suggest you search for a systemd target that relates to it and try that instead of cryptsetup-pre.target .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#6 2023-12-17 11:40:09

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,512
Website

Re: [SOLVED] TPM2 pin code / Numlock not activating at boot time

I don't do encryption so I have no personal experience of this but there is systemd-tpm2-setup-early.service, which could be used to control the order.

https://man.archlinux.org/man/systemd-t … .service.8

See also

apropos tpm2 | grep systemd

Freedom for Öcalan!

Offline

#7 2023-12-31 15:12:10

farnsworth
Member
From: /home/farnsworth
Registered: 2012-01-28
Posts: 28

Re: [SOLVED] TPM2 pin code / Numlock not activating at boot time

Hi,
I was finally able to have the numlock activated, no idea what I was doing wrong, I switched to the zen kernel (not especially for the numlock) and it was ok, I was using the linux kernel before, I did not try to switch back to check if it was ok hmm
here is my configuration:
the 2 files from https://bbs.archlinux.org/viewtopic.php … 0#p2126890 and the HOOKS in mkinitcpio.conf:
HOOKS=(systemd keyboard plymouth modconf block sd-vconsole numlock sd-encrypt filesystems btrfs)
and that's all
thanks

Offline

Board footer

Powered by FluxBB