Re: encrypted swap
Russell Coker <russell@coker.com.au> writes:
> I added the following two lines to /etc/init.d/mountall.sh to give an
> encrypted swap device (and also set the swap device in /etc/fstab to
> be /dev/mapper/swap).
>
> Is there any way we could have some generic encrypted swap support in Debian?
> Maybe a script that searches for the swap device in /etc/fstab and then runs
> cryptsetup, mkswap, and swapon?
The init script in the cryptsetup package already calls mkswap if
/etc/crypttab is set up accordingly. There is no need to call swapon
in this init script, since swap is turned on later.
For example, I have the following in /etc/crypttab:
# <target> <source> <key file> <options>
a2 /dev/hda2 /dev/urandom swap
a3 /dev/hda3 /dev/urandom swap
That and modifying /etc/fstab to refer to /dev/mapper/a{2,3} was the
only thing I had to do to set this up.
Martin
(not a DD)
--
,--. ,= ,-_-. =.
/ ,- ) Martin Dickopp, Dresden, Germany ((_/)o o(\_))
\ `-' http://www.zero-based.org/ `-'(. .)`-'
`-. \_/
Reply to: