Managed Automount External Encrypted SSD using fstab, crypttab (no autox-systemd)
In this article, we will discuss how to manage automount of an external encrypted SSD without using autox-systemd. This process involves using fstab and crypttab.
Prerequisites
Before we begin, ensure that your encrypted SSD is properly mounted and can be accessed by the user.
Create Encrypted Filesystem
Create an encrypted filesystem on your external SSD using the following command:
cryptsetup luksFormat /dev/sdXN your_passphrase
mkfs.ext4 /dev/mapper/your_luks_device_name
Mount the Encrypted Filesystem
Mount the encrypted filesystem using the following commands:
cryptsetup open --type luks /dev/sdXN your_luks_device_name your_passphrase
mount /dev/mapper/your_luks_device_name /mnt/your_mount_point
Configure fstab and crypttab
To automount the encrypted filesystem at boot, edit the fstab and crypttab files:
# Edit /etc/fstab
UUID=your_luks_device_uuid /mnt/your_mount_point ext4 defaults 0 0
# Edit /etc/crypttab
your_luks_device_name = UUID=your_luks_device_uuid your_passphrase
Testing the Configuration
Test the configuration by rebooting your system. If the SSD is properly mounted, you should be able to access it using the Nemo file manager or any other file manager of your choice.
Troubleshooting
If you encounter any issues, ensure that the UUIDs in the fstab and crypttab files match and that the correct passphrase is used.
By following the steps outlined in this article, you can easily manage the automount of an external encrypted SSD without using autox-systemd.
- References:
- Book: "Linux System Administration Handbook" by Evi Nemeth, Garth Snyder, and Trent R. Hein
- Article: Cryptsetup Wiki
- Online Resource: Automatically Mount Encrypted Drives in Linux