Document Actions

Using Filesystem Encryption on Gentoo

by David Hostetler [modified 20110104:16:10 (Tue)] [posted 20100816:09:14 (Mon)]

Links

dm-crypt article on gentoo wiki
dm-crypt article on gentoo wiki archive
LUKS article by Suno Ano
general security article by Suno Ano

 

Encrypting a single file

tbd

Encrypting a single partion

tbd

Encrypting swap and tmp

tbd

Encrypting root

tbd

Mounting an existing luks partition

  1. cryptsetup luksOpen /dev/sda1 <mapname>
  2. That makes a virtual device available as /dev/mapper/<mapname>
  3. Mount the virtual device just like you would any other partition.
  4. mount /dev/mapper/<mapname> /mnt/<mntname>

 

When you're done, just reverse the sequence:

  1. umount /mnt/<mntname>
  2. cryptsetup luksClose <mapname>

Managing dmcrypt settings and automating mounts

  1. Edit /etc/conf.d/dmcrypt.
  2. Add dmcrypt to boot services:
    • rc-update add dmcrypt default