# How to swsusp2 + encrypted swap partition ???

## Master One

I just got the encryption of the swap partition up and running, using the new baselayout, but this disables the possibility to use swsusp2, since it's no longer /dev/hda2 used as swap-device, but /dev/mapper/crypt-swap.

To be able to use swsusp2 and an encrypted swap partition together, an advanced installation with an initrd is needed, but I am afraid I do not have the time and knowledge to perform that step.

The necessary hints are in the softwaresuspend howto.

All the swsusp2 stuff should be compiled as modules, and a proper initrd has to be setup.

Can someone explain in detail, how to set up this initrd and the necessary kernel-options, to make this work?

----------

## Master One

Noone any idea?

Where are the "initrd" specialists from this forum?  :Wink: 

If noone already has a ready-to-use solution, at least some hints would be appreciated (but I really wonder, because encrypting "swap" is very popular at the moment, you never can be safe enough, and I am sure there is also a growing swsusp2 fan circle arround, combining both leeds to the best result ever, I hope).

----------

## basquiat

 *Master One wrote:*   

> The necessary hints are in the softwaresuspend howto.
> 
> All the swsusp2 stuff should be compiled as modules, and a proper initrd has to be setup.
> 
> Can someone explain in detail, how to set up this initrd and the necessary kernel-options, to make this work?

 

As I'm thinking about encrypting my laptop's filesystems, I'd be very interested in this point. Encryption is pretty useless if one get's your laptop between suspend and resume and swap is "plain text".  :Wink: 

So did you get further with your work, Master one?

Regards,

basquiat

----------

## Master One

I don't have the time to get into it, so I skipped the idea of using swsusp and sticked with swap encryption the normal way using the latest ~x86 baselayout. If someone would come up with a howto including the steps to create the proper initrd image, I'd probably give it a try again, but on the other hand swsusp2 is still too experimental concerning driver handling (still no solution if using ATI's fglrx module and the intel_agp kernel module).

----------

## strerror

You might be interested in my HOWTO at:

http://www.disciplina.net/howto/HOWTO-lvm_dm-crypt_suspend2.html

----------

