[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Encrypted swap fails in initramfs



Hi,

this week I installed Debiana bullseye using the current debian
installer and then upgraded to sid. Now I get a lot of warnings in the
beginning of the boot process which are ugly and delay the boot process.
When booting has finished, the encrypted swap is available as intended.
The problem is restricted to the initramfs phase, it seems.

Manual transcription of the error message:

| Failed to find logical volume "vg0-arpeggi/swap-enc_crypt"
| cryptsetup: WARNING: vg0--arpeggi-swap--enc_crypt: couldn't determine device type, assuming default (plain)
| cryptsetup: Waiting for encrypted source device /dev/mapper/vg0--arpeggi-swap--enc...

In d-i I chose manual partitioning and set up encrypted swap on an LVM
volume.  The setup looks like this and I think I did not change it after
the installation process:

# lvs -a | grep swap
  swap-enc vg0-arpeggi -wi-ao----   <4.66g

# lsblk  | grep -B1 SWAP
  ├─vg0--arpeggi-swap--enc         254:1    0   4.7G  0 lvm   
  │ └─vg0--arpeggi-swap--enc_crypt 254:3    0   4.7G  0 crypt [SWAP]

# grep swap /etc/crypttab 
vg0--arpeggi-swap--enc_crypt /dev/mapper/vg0--arpeggi-swap--enc        /dev/urandom cipher=aes-xts-plain64,size=256,swap,discard

# grep swap /etc/fstab
/dev/mapper/vg0--arpeggi-swap--enc_crypt none            swap    sw              0       0


It looks like cryptsetup is started before LVM. That probably makes
sense in other setups, but not mine. How do I change this?

As a sidenote: I contemplated replacing the /dev/mapper path in
/etc/crypttab with a UUID, but, to my surprise, the underlying LVM
volume does not have a UUID. Other LVM volumes (one unencrypted /, one
LUKS container for /home) do have UUIDs. Why is that?

Regards,
Jochen.
-- 
If politics is the blind leading the blind, entertainment is the fucked-
up leading the hypnotised.
[Agree]   [Disagree]
                 <http://archive.slowlydownward.com/NODATA/data_enter2.html>

Attachment: signature.asc
Description: PGP signature


Reply to: