dietpi-drive_manager possible bug

MichaIng

I have just run dietpi-drive_manager and exited without doing anything and it removed a custom line in /etc/fstab I use to mount an ecryptfs folder. Repeated with same result.

Latest version 6.22.3 but looking through my backups it occurred earlier than this.

John

Just found you were aware of this

https://github.com/MichaIng/DietPi/issues/2078

I’ve had ecryptfs running for ages - do you need to remove the line from /etc/fstab? It means I have to manally restore it if I use dietpi-drive_manager.

John

Yeah indeed that is nasty. I will add this to v6.23 milestone (ah it is already).

Is there a way to check existing/active encryptfs mounts outside of fstab? As df does not indicate whether it’s encryptfs or something else. blkid and lsblk do not show it because it’s no block device.

Ah df -T shows it in the Type column, right?

MichaIng

On v 6.24.1 on Z83 - used dietpi-drive_manager and it again removed the ecryptfs entry in /etc/fstab - which I note had been fixed in 6.23 changelog?

Yes df -T shows it.

John

johnvick
Hmm how does the fstab entry for the encryptfs mount look like?

I assumed something like this:
/mnt/point /mnt/point ecryptfs defaults 0 0

This line should be caught by:

grep -E '^[[:blank:]]*[^#].*([[:blank:],]bind[[:blank:],]|[[:blank:]](encryptfs|vboxsf)[[:blank:]])' /etc/fstab

… damn found it: encryptfs vs ecryptfs …

To fix:

sed -i 's/encryptfs/ecryptfs/g' /DietPi/dietpi/dietpi-drive_manager

Fixed for v6.25: https://github.com/MichaIng/DietPi/commit/e9604be306d88cb90c9f3873638ca6ae269936c6
Changelog: https://github.com/MichaIng/DietPi/commit/f08888ecac9fb39f63f75356f839359bdb5af5f2

Always read it with an “n” :roll_eyes:, sometimes copy&paste makes sense…

MichaIng

Thanks for fixing.

For reference my line is:

#Ecryptfs
/home/john/crypt /home/john/crypt ecryptfs defaults,noatime,nofail 0 0

Thanks, okay with the removed “n” this will be detected and preserved now.