Persistent mount for luks with unlock Key

Categories: Linux, Security, tech

creating a encrypted disk with luks

our  Little problem here to mount a encrypted disk  automatically on boot

so no need to enter the pass for mounting but this risky if the machine theft happen because we will use a key inside the system and it will be leaked if our machine stolen

so lets do it first we have to create a key and add it  our partition

to create a key

don’t forget it to set key permission to be 600

now we need to tell our luks partition to use this key


now we need to make it available in device mapper

to use encrypted disks while boot there is a crypt tab

the second one is the disk partition

third is the key file

as u can see we put the device mapper name  that we used it in crypttab file and normal mount

reboot the system and enjoy it


    Leave a Reply

    Your email address will not be published. Required fields are marked *


    This site uses Akismet to reduce spam. Learn how your comment data is processed.