You are not logged in.
SOLVED: see my last message on the forum!
My issue was my laptop sending a couple of enter keypresses null char when booting while plugged into power.
---
So, my issue is this.
I proceed with the Arch Linux installation, almost identical to the Arch Wiki Installation guide, with the only differences being:
- I encrypt my root partition with crypttab (following the Arch wiki encryption guide, apart from the kernel cmdline part)
- I use UKIs for booting, and efibootmgr to create the entries.
- I don't have a swap (I removed it to make the setup simpler and see if it solved the issue, but I tried with swap too).
- I don't have an /etc/fstab, because automounting!
The thing is, automounting should work with LUKS, and as long as I proceed with the installation with automounting, and without encrypting my root partition, I can boot and login normally.
If I decide to encrypt my root partition however, then it stops working: everything starts booting normally, up until I get the prompt for the root partition password. Then in 5 or so seconds, the error message
[FAILED] Failed to start Cryptography setup for root.
appears, and I get dropped to emergency shell, unable to login though, so I can't even check the journal.
After the timeout for auto-root runs out I also get some other messages, in their entirety they become:
[FAILED] Failed to start Cryptography setup for root.
See `systemctl systemd-cryptsetup@root.service` for details.
[ TIME ] Timed out waiting for device /dev/gpt-auto-root.
[DEPEND] Dependency failed for Initrd Root Device.
[DEPEND] Dependency failed for Root Partition.
[DEPEND] Dependency failed for Initrd Root File System.
[DEPEND] Dependency failed for File System Check on /dev/gpt-auto-root.
No other error message appears.
I feel like this may be a systemd bug, but I'm not entirely sure so I'm posting here too (along with opening an issue with systemd)
Any info or help will be highly appreciated!
EDIT: it's worth noting that I can boot from an iso and chroot into the unlocked and mounted root partition with no problem, so it's not an issue with the encryption.
Last edited by engel_1998 (2025-07-24 17:08:13)
Offline
Small update on the issue: it seems that if I'm fast enough the root partition gets unlocked but soon after it unlocks it gets stuck at
[FAILED] Failed to start Switch Root.
Last edited by engel_1998 (2025-07-24 14:04:19)
Offline
- I encrypt my root partition with crypttab (following the Arch wiki encryption guide, apart from the kernel cmdline part)
Do you mean you're using /etc/crypttab.initramfs?
Post its contents and also the output of:
$ lsblk -o +PARTTYPE
Offline
Do you mean you're using /etc/crypttab.initramfs?
No, I'm entirely relying on the Discoverable Partitions Specification, no /etc/fstab, no /etc/crypttab, no /etc/crypttab.initramfs, and no kernel cmdline parameters for none of the partitions...
I can get everything to work no problem with fstab and crypttab, I was trying to get rid of them using automounting though...
Offline
BTW, it's starting to seem like a bug with systemd.
The Switch Root error I mentioned before didn't appear again after reinstalling, probably something I tried and forgot while testing stuff.
The issue now is, after a fresh reinstall, if I'm very fast at typing the password it unlocks with no problem, if I'm not, it halts with the error in the first post.
I tried changing the timeout option with luks, but it seems to take have no effect.
Last edited by engel_1998 (2025-07-24 14:07:21)
Offline
Apparently my laptop (A Thinkpad T14 gen 1 AMD) sends a couple of enter keystrokes null chars when it is plugged in... And it happened right after the password prompt appeared, hence the unlocking didn't work because it was like I had written the wrong password...
In case someone else has a similar issue, this is how I noticed it:
First of all, when booting the arch installation media, a couple of characters (namely "^@^@") appeared right after ":: triggering uevents". (it's a hardware thing, so it may happen at a different time for some other device, but for mine, no matter when I plug in the laptop, it happens always and only there when booting the arch iso).
Then, if I was fast enough at writing the root partition password, but didn't press the enter key, the partition unlocked nonetheless. (same here, If I start the laptop already plugged in, or plug it in an instant before the password prompt appears, the enter keystrokes get sent always at the same time).
I put two and two together, then tried unplugging the power cable (I remembered something about random keystrokes and laptops being plugged in, I don't know how or where I remembered this from).
And the issue disappeared, entirely.
Also, if I plug the power in after boot no keystroke null char gets sent.
Hope nobody needs this, but at least now I know...
Last edited by engel_1998 (2025-07-24 17:09:31)
Offline