You are not logged in.

#1 2021-03-07 15:04:57

Hacktivista
Member
Registered: 2018-08-20
Posts: 12

[SOLVED] Broken LUKS initialization + unable to set GRUB cryptkey

Yesterday I updated my Arch (now using kernel 5.10.21-1-lts), and it broke my initialization with the following message:

[FAILED] Failed to mount /run/syste■a-eb-98-47f2-bc43-39bec9513730.
[DEPEND] Dependency failed for Cryp■a-eb-98-47f2-bc43-39bec9513730.
[DEPEND] Dependency failed for Local Encrypted Volumes.
[ TIME ] Timed out waiting for /device/dev/mapper/x230t_0_vg-root.

link to image

Well, I've figured out it had something to do with systemd, so I simply changed the mkinitcpio sd-encrypt hook to encrypt (with the other relevant hooks changes) and the relevant /etc/defaults/grub configuration.

It boots now, but it doesn't recognize the key from my pendrive as it's not able to mount it. It says:

mount: /ckey: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error.

link to image

Which I don't think is right, since it was recognized on my previous configuration with no problems.

Here are my configuration files previous update

/etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="rd.luks.uuid=you-dont-need-my-uuid-39bec9513780 rd.luks.key=you-dont-need-my-uuid-39bec9513790=/secret_file:UUID=A96F-A800 resume=/dev/mapper/vg-swap loglevel=3 quiet"

/etc/mkinitcpio.conf

HOOKS=(base systemd autodetect keyboard modconf block sd-encrypt lvm2 filesystems fsck)

And after I changed things when the update broke my boot

/etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="cryptdevice=UUID=you-dont-need-my-uuid-39bec9513780:cryptlvm cryptkey=UUID=A96F-A800:vfat:/secret_file resume=/dev/mapper/vg-swap loglevel=3 quiet"

/etc/mkinitcpio.conf

HOOKS=(base udev autodetect keyboard keymap consolefont modconf block encrypt lvm2 filesystems fsck)

I can boot by typing a password, but I'd prefer to have only a binary file for booting. How could I fix this?

Last edited by Hacktivista (2021-03-14 01:50:49)

Offline

#2 2021-03-07 15:45:29

Hacktivista
Member
Registered: 2018-08-20
Posts: 12

Re: [SOLVED] Broken LUKS initialization + unable to set GRUB cryptkey

I've been directed towards https://gitlab.com/cryptsetup/cryptsetup/-/issues/627

So, for systemd init the thing is to update the kernel, or wait for the patch. For busybox init though, pendrive initialization is still broken (for me at least).

Offline

#3 2021-03-07 17:03:50

loqs
Member
Registered: 2014-03-06
Posts: 17,310

Re: [SOLVED] Broken LUKS initialization + unable to set GRUB cryptkey

busybox init is still broken with linux-lts 5.10.21-1?

Offline

#4 2021-03-08 12:11:57

Hacktivista
Member
Registered: 2018-08-20
Posts: 12

Re: [SOLVED] Broken LUKS initialization + unable to set GRUB cryptkey

Indeed, at least for me, I don't think it's related to the bug with passphrase length. It can't mount the pendrive with the key (it's a completely different problem).

Offline

#5 2021-03-08 12:28:15

Hacktivista
Member
Registered: 2018-08-20
Posts: 12

Re: [SOLVED] Broken LUKS initialization + unable to set GRUB cryptkey

I've upgraded the kernel today and the problem persists on both, the busybox and systemd based images. So, I guess there's other bug still?

Offline

#6 2021-03-14 01:50:07

Hacktivista
Member
Registered: 2018-08-20
Posts: 12

Re: [SOLVED] Broken LUKS initialization + unable to set GRUB cryptkey

Fixed on last upgrade

Offline

Board footer

Powered by FluxBB