I’m very interested in having my NAS (Currently running an ODroid XU4) encrypted.
There’s a rather old ticket open mentioning this feature, but nobody seems to care anymore.
→ https://github.com/Fourdee/DietPi/issues/245
Is there a tutorial, howto or something like that to have a fully encrypted RootFS?
(I’m more than willing to learn and invest time to achieve that)
The ideal solution for me would be having a PIN encrypted USB-Stick (there are several on the market) with a keyfile on it, plug that in at boottime and the NAS boots after reading the keyfile from it.
I looked at doing similar but the XU4 kernel does not contain the ecryptfs module so my research came to a dead end.
However the Banana Pi kernel does have this module. I used the following tutorial to set up an encrypted folder or virtual drive (not whole drive) and decryption/mounting is triggered by the insertion of a USB drive, using a udev rule and a custom script.
So it’s not even possible without recompiling the kernel?
What is dietpi based on? armbian? - maybe it’s more efficient to file a request on github for the base system to get this integrated.
I believe ecryptfs is in Armbian based DietPi distros’ kernels for some devices (Banana, Orange devices) but not the kernels used for XU4. But I’m not an authority on the subject, just a user.
You could maybe ask Meveric in the Odroid forums to include this module in next XU4 kernel update.
I daisychain this with my raid and put the rootfs onto my raid. I really have to test this.
EDIT: This won’t work with my cloudshell 2 - you cannot plug a USB 3.0 drive to the eSata port of the cipherchain. Just a USB device on the “host-port” to the XU4 - but that’s not enough…
The CipherUSB offered on the same page doesn’t fullfil my requirement to have some kind of second-factor auth (hardwarekey or pin input)
Found this tutorial - which could be used. it’s way to much work for me to adapt that to my actual needs. https://blog.getreu.net/_downloads/encrypted-raid1-nas.pdf
But I’m doing something else. I just want to protect my nextcloud data - so I’m trying a different approach. But I need a backup first, which could take a few days to get another harddrive and rsync the data to it.
But it just has a USB 2.0 passthrough hub, which will definitely decrease the speed of the harddrives. I don’t know how much - I’m trying to get that device via my workplace, but this will need a little.