I was testing dm-crypt to make an encrypted partition on my computer.
I made it, mounted it tested it, umounted, remounted etc etc to test it.
Then I wondered what happens if my computer breaks and I need to get the data from that partition? Can I put it in another computer, and just mount it, like I normally did.
It seems that iwth dm-crypt, you need to make the loop everytime you reboot, before you can mount it:
cryptsetup.sh -c aes -h ripemd160 -y -b `blockdev --getsize /dev/hdb2` create cryptvol1 /dev/hdb2
you then mount it with:
# mount /dev/mapper/cryptvol1 /mnt/crypt
To test if I could just move the drive to a new computer, I used Gentoo LiveCD. When I ran the above command, which should make the encrypted filesystem on /dev/hdb2, I used the same passphrase which I had set up the system with.
the I tried to mount it (as above), but I was told that I needed to say a filesystem. I tried ext3, but it didn't like that.
It seemed that it didn't want to be mounted.
Does anyone have experience of this? Is i possible to move the hard drive to a new machine?