[PLUG] Setting up encrypted file system
Fri Dec 8 03:42:11 PST 2006
Answering query from a friend and in general reference for others and
On Thursday 07 December 2006 16:56, you wrote:
> enc filesystem ???
Note that, in the dd step, zeroing the device is not secure enough. Ideally
one should use /dev/urandom instead of /dev/zero but that would take couple
of days to clear a 5-10GB partition with truely random data instead 5-10
minutes for /dev/zero.
An intermediate could be creating a file of 1-2M with /dev/urandom and
overwriting the partition with that data. The actual commands are left as an
exercise to the reader.
Of course replace the variables as required. And remember, these steps are
highly destructive. Know before you do. You have been warned.
# modprobe cryptoloop
# time dd if=/dev/zero of=/dev/hdc7 bs=1M
# losetup -e blowfish /dev/loop0 /dev/hdc7
# mkfs -t ext2 /dev/loop0
# mount -t ext2 /dev/loop0 /mnt3
# umount /mnt3
# losetup -d /dev/loop0
Add following to /etc/fstab for permanent effect.
/dev/hdc7 /mnt3 ext2 users,noauto,encryption=blowfish
More information about the plug-mail