REQ: eCryptfs

Tried to install this manually using this guide:

https://www.howtoforge.com/tutorial/how-to-encrypt-directories-and-partitions-with-ecryptfs-on-debian/

Installs OK but when trying to mount an encrypted folder I get this error:

Unable to get the version number of the kernel
module. Please make sure that you have the eCryptfs
kernel module loaded, you have sysfs mounted, and
the sysfs mount point is in /etc/mtab. This is
necessary so that the mount helper knows which
kernel options are supported.

Researching this it seems a module is missing from the kernel.

Would it be possible to have this implemented in dietpi-software?

John

Just investigated this further and it seems to be device dependent - the above was on an XU4.

I tried it on a Banana Pi M1 and it worked.

So apparently the XU4 kernel is lacking the module required.

Just checking. Has this been fixed in the XU4 yet?

Thanks!

— UPDATE

Yes, it does work on XU4 now:

sudo apt-get -y install ecryptfs-utils
sudo mount -t ecryptfs /tmp/test /tmp/test

As FYI, I’m currently stuck on DietPi 159 with:
Linux myXU4 3.10.106+ #1 SMP PREEMPT Fri Nov 24 16:26:38 CET 2017 armv7l GNU/Linux

Interesting my XU4 is v6.25.3. Kernel Linux Odroid 4.14.66+

But:
root@Odroid:~# modprobe ecryptfs
modprobe: FATAL: Module ecryptfs not found in directory /lib/modules/4.14.66+

I have it working on a Z83 device so don’t need it on the XU4 now.

John

‘modprobe ecryptfs’ does not return an error for me. And I have:

$ ls -la /lib/modules/3.10.106+/kernel/fs/ecryptfs/ecryptfs.ko
-rw-r--r-- 1 root root 118188 Nov 24  2017 /lib/modules/3.10.106+/kernel/fs/ecryptfs/ecryptfs.ko

Seems like a mystery on your end. Anyway, working well here!

It must be in some kernels but not others.

John

matt22207 johnvick
Very strange indeed that the older kernel has it but the newer not. Or perhaps it is a kernel built-in on 4.14, so no separate module?

RPi kernel 4.19 has it as module at least:

2019-07-07 00:43:41 root@micha:/run# modinfo ecryptfs
filename:       /lib/modules/4.19.50-v7+/kernel/fs/ecryptfs/ecryptfs.ko