Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 1067  / 1 Year ago, tue, december 20, 2022, 12:44:27

I have installed 12.10 on a machine with two disks. The root partition is on one disk, the swap partition on the other. Both disks are encrypted and I have added the corresponding entries to /etc/crypttab.



During boot, it asks for the passphrase for the disk with the root filesystem. Then it continues booting and gets to the login screen before I get a chance to enter the passphrase for the other disk. After logging in, I verified that it was actually waiting for me to enter the passphrase for that second partition (askpass process is running). But at that point, I have no way of entering the passphrase anymore.



The manpage for crypttab suggests that the order in which the volumes are specified matters, so I changed it to have the swap disk first. I updated the initramfs and grub afterwards, but it didn't make any difference.



How can I specify the order in which the encrypted partitions are unlocked? I'm looking for a solution that either asks for the swap passphrase first or tells the system to wait until all encrypted partitions are unlocked before displaying the login screen.



Ideally I want to be able to use hibernation, i.e. neither use a random key for swap nor encode the key in crypttab.


More From » boot

 Answers
4

After some more digging, I found the decrypt_derived script. It allows to derive the passphrase from another encrypted partition. I set up the swap partition in this way, made the necessary changes to /etc/crypttab and it works! I only need to enter one passphrase, the second partition is unlocked automatically during boot and hibernation works.



More details e.g. here.


[#34660] Tuesday, December 20, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
steaocyte

Total Points: 345
Total Questions: 122
Total Answers: 121

Location: Spain
Member since Wed, Nov 23, 2022
1 Year ago
steaocyte questions
;