How to mount/decrypt ecryptfs folders?

Hi!
I migrated to Clear Linux due to odd issues with another distro and am mostly satisfied, save for lack of a Virtualbox package.
It seems I have forgotten to decrypt the home directory on that previous install. What way is there to either decrypt or mount it?
Suggestions from other threads don’t seem to help:

an@an-clearlinux~ $ lsmod
Module                  Size  Used by
ecryptfs               94208  0
(...)
an@an-clearlinux~ $ cat /lib/kernel/config-5.6.13-952.native | grep ecrypt -i
CONFIG_ECRYPT_FS=m
# CONFIG_ECRYPT_FS_MESSAGING is not set

an@an-clearlinux~ $ sudo mount -t ecryptfs /mnt/Mint/home/an/.ecryptfs /mnt/MintHome/
mount: /mnt/MintHome: wrong fs type, bad option, bad superblock on /mnt/Mint/home/an/.ecryptfs, missing codepage or helper program, or other error.

an@an-clearlinux~ $ sudo mount /mnt/Mint/home/an/.ecryptfs /mnt/MintHome
mount: /mnt/MintHome: special device /mnt/Mint/home/an/.ecryptfs does not exist.

OS/kernel version is as follows:

an@an-clearlinux~ $ swupd info
Distribution:      Clear Linux OS
Installed version: 33110
Version URL:       https://cdn.download.clearlinux.org/update
Content URL:       https://cdn.download.clearlinux.org/update

an@an-clearlinux~ $ uname -a
Linux an-clearlinux 5.6.13-952.native #1 SMP Thu May 14 00:03:35 PDT 2020 x86_64 GNU/Linux

Ecryptfs seems to be installed?

an@an-clearlinux~ $ sudo swupd search ecryptfs
Bundle with the best search result:
     sysadmin-basic                     - Run common utilities, useful for managing a system.  (108MB) (installed)

I am using a hyper-v kernel at the moment which doesn’t have ecryptfs support so I can’t validate this, but have you tried a ‘sudo modprobe ecryptfs’ first? It is possible (likely?) that the kernel module has not yet been loaded.

If that works then you should be able to try to create a directory /etc/modules-load.d/ and create a file ‘modules.conf’ in that directory with the single line ‘ecryptfs’. This is a standard path to define extra kernel modules to load during boot, but I haven’t verified this with CL so there may be a different method needed.

Hi, thanks for the suggestion! Before writing the lsmod I had already done the modprobe command. I’ve tried again just in case, with the same results.
Loading it at startup via /etc/modules-load.d didn’t seem to change anything, unfortunately.
But to answer your other doubt, it is documented as in use for Clear Linux :slight_smile:

sudo modprobe ecryptfs
an@an-clearlinux~ $ lsmod | grep ecryptfs
an@an-clearlinux~ $ sudo modprobe ecryptfs
an@an-clearlinux~ $ lsmod | grep ecryptfs 
ecryptfs               94208  0
encrypted_keys         20480  1 ecryptfs

an@an-clearlinux/etc/modules-load.d $ sudo mount -t ecryptfs /mnt/Mint/home/an/.ecryptfs  /mnt/MintHome/
mount: /mnt/MintHome: wrong fs type, bad option, bad superblock on /mnt/Mint/home/an/.ecryptfs, missing codepage or helper program, or other error.

Have a look at :

Good comparison :
https://nuetzlich.net/gocryptfs/comparison

1 Like

I’m afraid having built SiriKali, that it doesn’t help me here:


The other site is just a comparison between different encryption software. I don’t have use for it - I just want to access an already existing ecryptfs folder.