How to mount LUKS encrypted disk in Raspbian
Jul 27, 2017 · 1 min read
- Install cryptsetup:
sudo apt install cryptsetup - Find the full path of your device (e.g. /dev/sda1):
sudo fdisk -l - Unlock encrypted volume and create a mapper:
sudo cryptsetop luksOpen /dev/sda1 my_disk_mapper - You can find the status of the mapper created in previous step using following command:
sudo cryptsetup -v my_disk_mapper - Finally mount the mapper to gain access to your data:
sudo mount /dev/mapper/my_disk_mapper /your/mount_point
How to unmount and lock LUKS encrypted partition:
- First unmount the volume:
sudo umount /your/mount_point - Lock the partition using cryptsetup:
sudo cryptsetup luksClose /dev/mapper/my_disk_mapper
This post was originally written on my blog at https://www.amritanshu.in/how-to-mount-luks-encrypted-disk-in-raspbian/
