Just to add a solution for anyone that wants to autostart a script or executable (you can do this to start the chrooted env automatically on boot and do whatever you want):
Gen 2 MyCloud uses a ramdisk AND crfs (squashfs), which basically means every reboot you will lose any changes you make. Long way to get around this is to get on a linux vm, download the GPL source for this device (FW 2.XX), extract, go to firmware/module folder and inside you’ll see a folder called crfs. This is the folder that makes the image.cfs which is mounted as squashfs (loop device) to /usr/local/modules on boot every time.
What you need to do is get inside the crfs folder here, go to script folder, and edit the system_init file. Add a line at the bottom pointing to whatever script or executable you want to run at boot. Save, go back to the “module” folder and run the create_image script. It should make a new my-image.cfs file, rename that to image.cfs and finally overwrite the image.cfs in the /boot/boot partition of your mycloud.
Make a backup of that file first! You could brick your mycloud if you mess this up!
Here’s the modules folder with the script to pack it with squashfs. Literally all it does is take the modules folder and make a compressed file system. Download this, extract, edit the system_init file, run the script and overwrite the default image.cfs in /boot/boot
I’m trying to make a debootsrapped clean debian for gen2, but getting it to compile has been a pain…
Thanks for making it such a pain to do such a trivial task, would a real init system have been too much of a bother WD?