on my machine running 11.04, I somehow managed to remove the partition which was used as swap, while I was repartitioning the hard drive. I then turned off swap and tried to reconfigure it with a different partition. (I had wanted to do that anyway.) "/etc/fstab" contained the following line:
/dev/mapper/cryptswap1 none swap sw 0 0
Looking at "/etc/crypttab", I found a reference to the old swap partition, sda7:
cryptswap1 /dev/sda7 /dev/urandom swap,cipher=aes-cbc-essiv:sha256
I changed the line to use the new partition /dev/sda2, which I had formatted as swap:
cryptswap1 /dev/sda2 /dev/urandom swap,cipher=aes-cbc-essiv:sha256
I then turned swap back on, and it seems to work. "free -m" now tells me I have the 4 GB free swap space available in the partition, even after restarting.
However, I am a little suspicious that it should be so easy to just rewire swap through one little file entry. Also, the Disk Utility does not show the partition as being used as swap; it says "Usage: -".
Have I missed something? Are there other or additional steps I should follow to properly reconfigure the swap partition?