15

I'm using (L)Ubuntu 16.04. I would like to backup my files on an external hard drive (sdd) with LUKS. There was no partition (sdd1, etc.) before the cryptsetup command.

#sudo cryptsetup -v --cipher aes-xts-plain64 --key-size 512 --hash sha512 --iter-time 2000 --use-random --verify-passphrase luksFormat /dev/sdd

Passphrase ok. It worked. But then :

#sudo mount /dev/sdd /mnt/
mount: unknown filesystem type 'crypto_LUKS'

How can it be unknown filesystem, as I used it just before ?

Thanks

aldaron
  • 513
  • 2
  • 5
  • 7

2 Answers2

16

To be able to access your files you have to decrypt them first

cryptsetup open /dev/sda1 backup

where sda1 is the encrypted partition and backup is the name of your partition (that is a very basic command, you can fix it according to your needs). Then type your password, and proceed to mount that unencrypted using

mount /dev/mapper/backup /mnt

Done! now visit the mounted partition

cd /mnt/backup
Joe
  • 711
0

I have not enough rep to comment on @Joe's succinct answer.

For me, something that took too long to work out was that the first command in Joe's answer resulted in the mapping /dev/mapper/backup to be created, and that is what needs to be mounted, hence mount /dev/mapper/backup /mnt

I had troubles as the drive was already mounted, but I wanted to remount it, so for unmounting I did not know the mapping name, I could have found it in the /dev/mappings directory

I finally managed to work out how to unmount with this command umount /dev/mapper/FALCON_1 (FALCON_1 being the peculiar name of where my HDD was mapped)

Hope it helps someone.