How to Mount LUKS2-Encrypted Storage on Arch Linux

a) Decrypting Partition

In this example, the /dev/sda device has the partition /dev/sda1 which is LUKS2-encrypted. Now, decrypt it. You will be prompted to enter the passphrase.
sudo cruptsetup luksOpen /dev/sda1 Target_Name
The target can be named anything.

b) Creating Mount Point

Create a mount point by either:
sudo mkdir /run/media/$USER/ and
sudo mkdir /run/media/$USER/Mount_Point
or:
sudo mkdir /mnt/Mount_Point

c) Mounting Partition

sudo mount /dev/mapper/Target_Name /run/media/$USER/Mount_Point
or
sudo mount /dev/mapper/Target_Name /mnt/Mount_Point

d) Fixing Permission

If you are unable to access the mounted partition, you can try the following approach, although it may be a bad practice.
sudo chown -R $USER /run/media/$USER/Mount_Point
or
sudo chown -R $USER /mnt/Mount_Point


Enjoy encryption!


Documentations

Abdullah As-Sadeed
Abdullah As-Sadeed

Prefers coding from scratch. Loves the Linux kernel.

Leave a Reply