Skip to content

luks

Mount Encrypted Drive

sudo lsblk
# sudo apt-get install cryptsetup
# crypsetup already installed on manjaro

# Create a new drive mount thing that is unencrypted
sudo cryptsetup luksOpen /dev/sda2 3TBDrive

# Take a look at things
ls -arlt /dev/mapper | tail

# Check mount folder empty
ls /mnt/3TBDrive

# Mount
sudo mount /dev/mapper/3TBDrive /mnt/3TBDrive

Managing password slots and automount

# Check password slots
sudo cryptsetup luksDump /dev/sda2

# Add password
cryptsetup luksAddKey /dev/sda2

# Delete
sudo cryptsetup -v luksKillSlot /dev/sda2 7

Set automount for LUKS

READ THEN COPY PASTE LINE

# Setup Automount
sudo dd if=/dev/random bs=32 count=1 of=/root/lukskey
sudo xxd /root/lukskey
sudo cryptsetup luksAddKey /dev/sda2 /root/lukskey

sudo vim /etc/crypttab
# PASTE THE BELOW LINE
secret  /dev/sda2  /root/lukskey


sudo reboot