PDA

View Full Version : [all variants] cryptsetup password asked twice at boot



Homer
December 22nd, 2015, 05:14 AM
Hello,

I just installed a new ubuntu 15.10 desktop system. For the first time, I configured cryptsetup in order to have my hard drive completely encrypted. I have 3 luks partitions (/, /home and swap). Everything work fine.

Problem is when I boot my computer, I have to enter the password twice (one time for the root partition, then another one for the swap partition). I'm not asked for the passphrase for the home partition. All partitions use the same passphrase. Why do I have to unlock the encrypted swap after unlocking the root partition?

TheFu
December 24th, 2015, 11:17 PM
Did you use LVM?
Please post the output of lsblk and please, please, please, use code tags so things line up and are easy to read. Doh!

See how the sda5 partition below is fully encrypted and LVM is used to have /, swap and /Stuff? 1 encrypted volume = 1 request for the password.

$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 119.2G 0 disk
├─sda1 8:1 0 243M 0 part /boot
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 119G 0 part
└─sda5_crypt (dm-0) 252:0 0 119G 0 crypt
├─c720--vg-root (dm-1) 252:1 0 51.9G 0 lvm /
├─c720--vg-lv--swap (dm-2) 252:2 0 4.1G 0 lvm [SWAP]
└─c720--vg-lv--Stuff (dm-3) 252:3 0 50G 0 lvm /Stuff

Anyway, hope this helps. LVM is slightly more complicated, but immensely more flexible.