Instead of encrypting a partition I encrypted an entire drive (cryptsetup -luksFormat...). Don't ask why. I created a partition and a filesystem on that partition. Let's call the encrypted virtual block device datacrypt. When I created the filesystem I also got a datacrypt1 which denoted the partition. I copied a lot of data onto it and it ran perfectly fine.

However after reboot the datacrypt1 doesn't appear! After unlocking the disk I can use parted on the virtual block device, the partition is there, everything looks fine. parted -l does find it and so does fdisk -l (reporting it as /dev/mapper/datacrypt-part1). But no /dev/mappar/datacrypt-part1 appears in the filesystem and I cannot mount it.

How can I mount the partition on virtual block device? Please help!

  • parttab did the trick! – user2052153 May 9 '19 at 14:23

You may have to declare it in /etc/crypttab so that it get mapped. https://www.freedesktop.org/software/systemd/man/crypttab.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.