- Install cryptsetup: apt-get install cryptsetup
- Backup current /home contents and unmount the partition.
- Create encrypted LUKS partition: cryptsetup luksFormat /dev/sda2 (replace sda2 with your partion name).
- Open LUKS partition and map it to 'crhome' (this name can be arbitrary): cryptsetup luksOpen /dev/sda2 crhome
- Format encrypted partition, e.g.: mkfs.ext4 /dev/mapper/crhome
- Mount it: mount /dev/mapper/crhome /home
- Restore /home contents from the backup.
- Recreate initrd: update-initramfs -u
- Create /etc/crypttab entry for encrypted volume:
#
crhome /dev/sda2 none luks - Change /etc/fstab entry for /home, .e.g:
/dev/mapper/crhome /home ext4 defaults 0 2 - Reboot!
During system startup you will be prompted for password to access LUKS volume. If you have Plymouth installed, you'll see a nice graphical password prompt - see the screenshot. For more documentation, including Debian-specific docs, got to /usr/share/doc/cryptsetup and cryptsetup/crypttab man pages.