Sample Header Ad - 728x90

Use fstab to mount luks encrypted drive to subfolder within home

5 votes
1 answer
2833 views
Fresh install of Lubuntu 20.04 on system with Windows 10 and Lubuntu installed on 256GB NVME drive to dual boot. Boot drive is /dev/nvme0n1p2 Home folder is therefore /dev/nvme0n1p2/home/username I have a 1TB HDD with two partitions: /dev/sda1 736GB encrypted ext4/LUKS /dev/sda2 195GB ntfs For context, the purpose of the ntfs partition is so that I can easily share files between my Lubuntu environment and Windows 10. My objective is to be able to: 1) Boot into Lubuntu 2) Log in 3) Open File Manager and navigate to /home/Filestore 4) Be prompted to enter password I have read this guide: https://www.linuxbabe.com/desktop-linux/how-to-automount-file-systems-on-linux And I can successfully automount the ntfs drive to /home/WindowsShare But I cannot mount the LUKS filesystem to /home/Filestore Using 'ext4' as the filesystem gives me this error message:
mount: /home/luke/Filestore: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error.
The entry for the partition in blkid is:
/dev/sda1: UUID="redacted" TYPE="crypto_LUKS" PARTUUID="redacted"
So I therefore tried using "crypto_LUKS" as the filesystem in fstab and got this:
mount: /home/luke/Filestore: unknown filesystem type 'crypto_LUKS'.
I have looked for guides on automounting encrypted filesystems and found numerous. Here is one: https://blog.tinned-software.net/automount-a-luks-encrypted-volume-on-system-start/ Everything I have found involves using a shared key to auto-decrypt the filesystem on boot. I don't want to do this as I don't have an encrypted area on my boot drive in order to store the key. Is my stated aim possible?
Asked by Luke Richards (81 rep)
Jan 17, 2021, 10:45 AM
Last activity: Jul 20, 2025, 02:03 AM