btrfs and LUKS when booting on nvme does not recognize LUKS partition and stops #3

Closed
opened 2026-05-21 18:40:54 +00:00 by M12O · 4 comments
M12O commented 2026-05-21 18:40:54 +00:00 (Migrated from codeberg.org)

btrfs and LUKS when booting on nvme does not recognize LUKS partition and stops

on Butterknife Trixie iso v0.2.1

maybe wrong UUID search in GRUB?

btrfs without LUKS is working fine

btrfs and LUKS when booting on nvme does not recognize LUKS partition and stops on Butterknife Trixie iso v0.2.1 maybe wrong UUID search in GRUB? btrfs without LUKS is working fine
justaguylinux commented 2026-05-22 02:01:55 +00:00 (Migrated from codeberg.org)

● Fixed in v0.2.2 — thanks for the report!

What was happening: with btrfs + LUKS, the installer wasn't telling the new system clearly enough that the disk was encrypted, so on boot it never asked for the passphrase and stalled. ext4 + LUKS and xfs + LUKS worked fine — btrfs is special in that it mounts the disk in multiple pieces (@, @home, @var_log, …), and that confused the auto-setup into not flagging the disk as needing an unlock prompt.

The fix is one extra option in /etc/crypttab (initramfs) that forces the flag regardless. Single-line change.

See the v0.2.2 release notes.

● Fixed in v0.2.2 — thanks for the report! What was happening: with btrfs + LUKS, the installer wasn't telling the new system clearly enough that the disk was encrypted, so on boot it never asked for the passphrase and stalled. ext4 + LUKS and xfs + LUKS worked fine — btrfs is special in that it mounts the disk in multiple pieces (`@`, `@home`, `@var_log`, …), and that confused the auto-setup into not flagging the disk as needing an unlock prompt. The fix is one extra option in `/etc/crypttab` (`initramfs`) that forces the flag regardless. Single-line change. See the [v0.2.2 release notes](https://codeberg.org/justaguylinux/butterknife/releases/tag/v0.2.2).
M12O commented 2026-05-23 10:21:05 +00:00 (Migrated from codeberg.org)

Unfortunately, still not good in v0.2.2, during installation one already sees an error when something is done (by apt) with initrd, this is the same error: device /dev/xxx is not a valid LUKS device

The same error is visible when rebooted after installation, see picture:

Unfortunately, still not good in v0.2.2, during installation one already sees an error when something is done (by apt) with initrd, this is the same error: device /dev/xxx is not a valid LUKS device The same error is visible when rebooted after installation, see picture:
justaguylinux commented 2026-05-23 19:35:16 +00:00 (Migrated from codeberg.org)

0.2.3 out. v0.2.2 didn't actually fix it, sorry.

Real bug: after the installer unlocks LUKS during install, lsblk lists
the mapper device alongside the partitions. The installer indexed
partitions by position and got shifted by one, so on UEFI the wrong
UUID (the unencrypted /boot) was written into /etc/crypttab. At boot,
initramfs resolved that UUID to /boot and tried to unlock it as LUKS.

The ,initramfs flag from 0.2.2 just embedded the wrong entry more
reliably. My earlier "ext4 + LUKS worked" claim was also wrong: same
bug, every filesystem, every disk. Confirmed fixed on SATA + btrfs +
LUKS.

v0.2.3 release notes. Please retest

0.2.3 out. v0.2.2 didn't actually fix it, sorry. Real bug: after the installer unlocks LUKS during install, lsblk lists the mapper device alongside the partitions. The installer indexed partitions by position and got shifted by one, so on UEFI the wrong UUID (the unencrypted /boot) was written into /etc/crypttab. At boot, initramfs resolved that UUID to /boot and tried to unlock it as LUKS. The ,initramfs flag from 0.2.2 just embedded the wrong entry more reliably. My earlier "ext4 + LUKS worked" claim was also wrong: same bug, every filesystem, every disk. Confirmed fixed on SATA + btrfs + LUKS. v0.2.3 release notes. Please retest
M12O commented 2026-05-23 20:37:25 +00:00 (Migrated from codeberg.org)

YES! You did it! ;-)

LUKS + btrfs works fine now, sway is cool too, this is written with using the new install

Thank you!

Some little warnings during install: "host butterknife not found", and once dpkg says something about stdin

YES! You did it! ;-) LUKS + btrfs works fine now, sway is cool too, this is written with using the new install Thank you! Some little warnings during install: "host butterknife not found", and once dpkg says something about stdin
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
drew/butterknife#3
No description provided.