3

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?

1 Answer 1

0

Use lsblk to find the partition you have LUKS encryption on

$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0 931.5G  0 disk 
├─sda1        8:1    0 232.9G  0 part 
├─sda2        8:2    0   1.9G  0 part 
├─sda3        8:3    0    94M  0 part /boot/efi
├─sda4        8:4    0  93.1G  0 part 
... and so on

Suppose you have LUKS block on sda1, then you enter the following entry on /etc/crypttab:

$ sudo nano /etc/crypttab
<name>    /dev/sda1    <password file path>

Here, the 'name' will be from the /dev/mapper/<name> path but without the '/dev/mapper' part. Then it will be followed by the device path. After that, the path of the password file (the password must be in plaintext and not followed by new , if you want to automatically unlock the partition during bootup. Otherwise, if you don't give that path, a password prompt will appear during bootup.

Now, enter the partition entry to /etc/fstab:

/dev/<name> /mnt/mountpoint auto <options> 0 0

Now reboot your machine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .