Friday, June 21, 2013

Upgrading from loop-aes to dmcrypt


Once upon a time, I had an encrypted external disk that I would mount thus:

# losetup -e AES128 /dev/loop1 /dev/sdb1
# fsck /dev/loop1
# mount /dev/loop1 /mnt/wd
# ls /wd


There are those that say that the modern way to do this is:

# apt-get install cryptsetup
# cryptsetup -c aes-plain -s 128 -h sha256 create wd /dev/sdb1
# fsck /dev/mapper/wd
# mount /dev/mapper/wd /mnt/wd

You can then remove the mount with

# umount /mnt/wd
# cryptsetup remove wd

No comments:

Post a Comment