You are not logged in.

#1 2019-03-31 08:47:59

Lockheed
Member
Registered: 2010-03-16
Posts: 1,521

Unlock multiple encrypted devices?

I have a setup with encrypted root. I want to add hibernation ability and it requires swap to be available at the same time as root in boot process. To do this I need to create second encrypted device, because first one is occupied 100% by ZFS and I am unable to shrink it nor transfer out and back in at this moment.

Is it possible to use "cryptdevice=" (or anything else) to unlock more than one partition from kernel line?

Offline

#2 2019-03-31 12:38:23

frostschutz
Member
Registered: 2013-11-15
Posts: 1,417

Re: Unlock multiple encrypted devices?

the encrypt hook only handles a single device, you'd have to edit or duplicate the hook or write your own in the first place. if you search around you should be able to find several such encrypt hook modifications floating about in the forums.

otherwise use systemd sd-encrypt instead of regular hooks, it handles multiple devices through crypttab(.initramfs) (see mkinitcpio -H systemd, -H sd-encrypt).

hibernation (suspend to disk) can be dangerous, if you change your setup (new kernel, new initramfs, different partitioning, etc.) reboot normally first before you hibernate/resume.

if suspend to ram is an option, use that instead. much safer at the cost of some energy consumption (depends on hardware).

Offline

Board footer

Powered by FluxBB