How to mount LUKS encrypted partitions manually
In the last days I played a bit with Slackware Linux on my netbook. But I play a bit too much and I had to recover some important files from my home folder but it is encrypted. The system wasn’t able to boot successfully. I had to boot from an usb-stick. But the problem was to decrypt the partition with my home folder.
H0nk3ym0nk3y wrote a post How to mount a LUKS encrypted partition on boot. But I had to do it manually and the solution is surprisingly easy:
The first step is to get the name of the encrypted partition, with the following command:
blkid | grep crypto
/dev/sda2: UUID="VERY LONG NUMBER" TYPE="crypto_LUKS"
Now we know the name of the partition
/dev/sda2. The next step is to open the partition and set up a mapping name:
cryptsetup luksOpen /dev/sda2/ crypthome
You have to enter the passphrase to decrypt the partition. Feel free to change the mapping name
crypthome to whatever you want. The mapped partition is now available in
/dev/mapper/crypthome but it isn’t mounted. The last step is create a mount point and to mount the mapped partition:
mkdir /mnt/crypthome && mount /dev/mapper/crypthome /mnt/crypthome
Now the partition is decrypted and mounted and you are able to access your files.
Last update: 14.06.2015
Posted on October 29, 2012, in Command-Line, Cryptography, Security, Troubleshooting and tagged blkid, cryptsetup, encrypted partition, linux, linux command line, LUKS, mount, recovery, Slackware, troubleshoot. Bookmark the permalink. 17 Comments.