[ltp] Suspend with crypted swap?

Daniel Maier linux-thinkpad@linux-thinkpad.org
Wed, 5 Sep 2007 15:30:20 +0200


--azLHFNyN32YCQGCU
Content-Type: text/plain; charset=iso-8859-15
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Sep 04, 2007 at 02:45:21PM -0500, Christopher Singley wrote:
=20
> I created the encrypted containers with dm-crypt; I used the same passwor=
d for=20
> both root & swap.  It's very important to use a persistent key for swap,=
=20
> not /dev/random or whatever as many tutorials would have you do.

If you use on dm-crypt container and put lvm on top of of you will
have to type your password only once.

> You have to boot with an initramfs that contains dm-crypt, and a script t=
o=20
> handle the initial booting.  To do this, I created the /etc/initramfs=20
> directory, and inside that created /etc/initramfs/filelist.txt=20
> and /etc/initramfs/initscript.sh (which I've attached to this email,=20
> including comments indicating the sources from which I stole certain code=
, so=20
> you can check those out yourself too).

Once again:
Debian does handle all this stuff. There is absolutly no need to
fiddle with customized initramdisks.
Just make sure /etc/crypttab matches your configuration and run
update-initramfs. The generated initrd is able to setup both
dm-crypt and lvm and also resuming from crypted swap without any
resume=3D commandline parameters.

> In my /boot/grub/grub.conf, I pass these arguments to the kernel:
> kernel /vmlinuz root=3D/dev/hda6 swap=3D/dev/hda5 resume2=3D/dev/mapper/s=
wap=20
> video=3Dradeonfb:force_sleep=3D1

Is there any reason for having / plain but using crypted swap?

Regards, Daniel.

--azLHFNyN32YCQGCU
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG3q9sjcCaBV47tD0RAhY/AJoCk+wR/+fcDRQxMgqBAq7TrlExWACfXJn1
67JJOXR79Mz/rSIti5BV41I=
=FLbu
-----END PGP SIGNATURE-----

--azLHFNyN32YCQGCU--