How to encrypt your USB extarnal devices
based and thanks to http://feraga.com/node/51
FIRST: detect your device name using dmesg (you should be familiar with this). For example, in my company they bought a comstar 160GB usb external device, and I see it under /dev/sdc1
# Install cryptsetup with LUKS (under linux2.6)
apt-get install cryptsetup
# Create the encrypted partition
cryptsetup luksFormat /dev/sdc1
# Map it to a device mapper
cryptsetup luksOpen /dev/sdc1 comstar
# Give it a FS of your choice
mkfs.ext3 /dev/mapper/comstar
# Make the mount point and mount the device
mkdir /media/comstar
mount /dev/mapper/comstar /media/comstar
# That’s all? -yes. Now, just for test:
# Umount the device
umount /media/comstar
# Close the encrypted partition
cryptsetup luksClose /dev/mapper/comstar
# Open and mount again, etc…
cryptsetup luksOpen /dev/sdc1 comstar
mount /dev/mapper/comstar /media/comstar
Tags: encryption, filesystem, linux