Linux - Encrypt an External USB Drive (dm-crypt without LUKS) Date - February 10, 2011 Note - dm-crypt alone leaves no identifiable header on the partition (unlike dm-crypt with LUKS). ------------------------------------------------------- 1. Urandom the drive and then fdisk it. Example assumes /dev/sdc is external disk. dd if=/dev/urandom of=/dev/sdc bs=1M fdisk /dev/sdc 2. Initialize the encrypted partition, set the initial key and map the name (stick). cryptsetup --verbose --verify-passphrase create stick /dev/sdc1 3. Format the encrypted partition. mkfs.ext3 -j /dev/mapper/stick 4. Mount the encrypted partition. mkdir /mnt/stick mount /dev/mapper/stick /mnt/stick 5. Umount and close the encrypted partition umount /dev/mapper/stick cryptsetup remove stick ------------------------------------------------------- For day to day use To Mount cryptsetup create stick /dev/sdc1 && mount /dev/mapper/stick /mnt/stick To Unmount cd ~ && umount /dev/mapper/stick && cryptsetup remove stick ------------------------------------------------------- Copyright 2011 '16 Systems'. All rights reserved. End