I'm no expert but since I couldn't find any instructions on the forums to easily encrypt swap I decided to make a quick guide.For the purpose of this guide, the swap partition will be /dev/sda3
Identitfy your own swap partition with this command :
To begin, open a root shell by pressing alt+F2
and typing konsole
or the name of your preferred terminal.
Switch to root user.
To start, close any unnecessary applications so you can proceed to turn off swap.
Create a file to tell PClinuxos that the swap partition should be encrypted. Use your favorite text editor to create a new file named /etc/crypttab
and enter the following data into it, separated by tabs:
swap /dev/sda3 /dev/random swap,cipher=aes-cbc-essiv:sha256
REMEMBER TO REPLACE /dev/sda3
with the location of your actual swap partition.
This will cause a new device /dev/mapper/swap to be created at next boot which uses the default AES encryption and highly random data for the encryption key. Each time you reboot, the swap space will be re-created using a different random key.
Finally, you need to edit /etc/fstab to point to the new encrypted swap device. you’ll find a line such as this:
/dev/sda3 swap swap defaults 0 0
Change it to this:
/dev/mapper/swap swap swap defaults 0 0