[Pkg-cryptsetup-devel] PATCH: cryptsetup 2:1.0.4+svn29-1 - enable swap on startup

Jonas Meurer jonas at freesources.org
Mon May 28 13:35:59 UTC 2007


On 21/05/2007 Lubomir Host wrote:
> Hi,
> my encrypted swap is not enabled on startup. Simple patch follows:
> [...]
> Is my patch correct?

Hey Lubomir,

a rather common praxis is to add your encrypted swap device to
/etc/fstab. this way the mount bootscripts enable the swap
automatically.

If you have for example /dev/sda3 as encrypted swap, this might look
like the following in your /etc/crypttab:

# <target>  <source>   <key file>   <options>
crypt_swap  /dev/sda3  /dev/random  swap,cipher=aes-cbc-plain,size=128,hash=ripemd160

then you would add it to /etc/fstab this way:

# <file system> <mount point> <type>  <options>     <dump>  <pass>
/dev/mapper/crypt_swap  none  swap    defaults      0       0



enabling swap is really a job for the mount script, not for cryptsetup.

...
 jonas



More information about the Pkg-cryptsetup-devel mailing list