LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   encrypting my xfs partition (https://www.linuxquestions.org/questions/debian-26/encrypting-my-xfs-partition-841226/)

htamayo 10-29-2010 01:41 PM

encrypting my xfs partition
 
Hi, i have all my personal data in a separated partition that is xfs, I chose that fstype cause I want to encrypt the data, so, my question is:

1. what steps i have to follow to encrypt all data in that partition?
2. how the process work? everytime I logon the data should be decrypted? when logoff the data will be encrypted? this process is managed by kernel?

I'm apologize to ask you for the steps but I don't have clear the way the XFS and the encryption works, so, I you have some urls o howtos are welcome

regards

stress_junkie 10-30-2010 12:58 PM

First you must choose which encryption software to use. I use Truecrypt but it is not especially convenient to use on Linux. I recommend using the encryption that comes with Linux called cyptsetup because it can be set up to mount encrypted partitions during system startup. The way that I use Truecrypt is to log on as root when the computer finishes its startup, then I manually mount the /home partition which is encrypted with Truecrypt.

Here is a link to a tutorial on cryptsetup.
http://techpulp.com/2009/02/how-to-e...yptsetup-tool/

1. First you must back up all of the data that is currently on the partition. The encryption process will wipe out any data that is currently stored there. Then you encrypt the partition. Then you mount the partition. Then you copy data back onto the partition.

2. Both Truecrypt and cryptsetup use on-the-fly encryption. That means that the data is always encrypted on the disk. It is decrypted when you read the disk. New data is encrypted when it is written to the disk.

Note that both of these methods only work on the encrypted partition. If you read a file into memory and if Linux then writes that file into its swap partition the file will be decrypted in the swap partition. You can solve this problem if you encrypt your swap partition.

You can find more tutorials by searching Google or some other search engine for "cryptsetup howto".


All times are GMT -5. The time now is 01:01 AM.