Install Debian on WD My Cloud home

Hello, you can make a clean root base with debootstrap. Right now debian 10 works very well, but have some problems installing things like docker. I manage to even edit the emmc to have more space, and even running the os from 1 of the sata disks, but the method that i publish is messy and dangerous if you don’t know what you are doing. Right know the original author of omv for the cloud home bought an home duo, and is working on it; (unlike me) he knows what he is doing and i’m confident that he can managed to make an easier and safer method to install debian

Does anyone know how to switch back to the original firmware? It’s fine also if that require to lose all data. If you know how to, please tell me.

Regards

How do you installed debian with debootstrap (never used, if you can tell me how to or give me a link to a guide or video will help thx)?

Best regards

Hello, right now I’m not home, i can share a clean image of debian when i’m there (after the weekend), i use this guide http://forum.banana-pi.org/t/bpi-r2-how-to-build-an-ubuntu-debian-sd-image-from-scratch/6805 , for going back to original firmware, you only need to boot from usb with the rescue files, and use “busybox dd” command to copy your backup image to the emmc

(Talking about My Cloud Home - not duo)

Thank you very much for you answer. For the guide I’ll take a closer look later, because it’s the first time for me with this “unusual” installation. For restoring I didn’t get how to manage the backup I’ve made some months ago. I would be grateful if you could write a guide on how to restore the backup, also to help others because there is still no guide on how to do it.

Right now I’ve only a folder with this content:
01-fwtable.backup
04-rootfs_b.backup
06-ftd_b.backup
08-kernel_b.backup
11-afw_b.backup
bootConfig
data.backup.tar
system_b.backup.tar
and idk how to use dd (sorry for bothering you, but I didn’t found anything about this procedure, and now I’ve found someone who knows how to). Will this erase all my data?

Thanks you, very appreciated.

Sorry, I think that you were talking about the duo. For restoring your firmware look in to the files from fox_exe (Clean OS (Debian), OpenMediaVault and other "firmwares") there you have instructions on how to restore your original firmware (the installer makes an automated backup, the files that you have with a backup extension are what you need), and if you use the installer of omv, you automatically get debian + omv, if you only want debian enter with ssh and remove omv with apt command. I don’t know if you are going to loose any data, I only have the cloud home duo and works in a different way (mine has 4 gb emmc where the OS resides, and the cloud home with one disk has the OS on the sata disk)

Thanks you so much. Anyway the process of “making” the linux installer still be the same?

is not an installer, is a image. the installer is what forth32 make for installing omv on the home cloud (the files I think you use, and create that backup files). the method that I was talking about (debootstrap) is to make a clean image and maybe works on yours, you just need to tar the “var”, “usr” and “root”, and then untar it on the respective partitions (because you can not modified the partitions on the disk, unless you know how to edit the fwtable file), please be careful with all that i tell you, because i dont understand very much about this myself, if you want to know exactly what the installer do, and how you can revert or modify the OS, I recommend you decompress the rescue.root.sata.cpio.gz_pad.img (is a gz file) and view the rc file on the etc folder

This is very interesting. As I understood I can use debootstrap from the USB with rescue files which gives me a ssh. At that point we have to use the debootstrap to download the files into the right place. Another thing that I didn’t understand is bootloader (grub) and the kernel. It seems that we don’t have grub and the kernel is the prebuilt one taken (maybe modified) from android. I suppose that because while russing apt update I never saw any kernel update in 5/6 months.

is easier using debootstrap on and image on a pc, the usb rescue linux doesn’t have the necessary files to run debootstrap. you dont need to create boot partitions, change the kernel or install grub. in fact you can not (unless you understand about embedded systems and how to change the sources) I used that guide only to make the root filesystem, nothing more, with a working ssh to access the system. You can change only the base system (all the folders and config files on the root “/”) and adapt it to the partitions that you had (unless you know how to edit fwtable, or how to change your bootloader). The kernel, has to stay the same, and you can not use grub. in the cloud home the bases system i’m talking about is the “root” “var” and “usr” tar files that are inside debian installer, they are divided like that because of space and to maintain the partitions

So what all we have to do (just to know, in case in the future devs will leave development) is just create system folder using debootstrap (root, var, urs) and put them into usb with rescue files. Using ssh, delete those folder inside the MCH and than move files from usb folders to MCH partitions (which were just wiped)?

Maybe we should write a github page with details and how-to (step by step) for everyone interested in modding their MCH (single and duo). This will hopefully help users to solv problem themselves and help devs in future.

1 Like

something like that, but not exactly. Just look at the script that i tell you before, you just need to recreate the commands of the script depending of what you want, if you don’t know what a command do, just search on the web, all are basic linux commands from busybox

1 Like

I have to say that I’m much impressed by this conversation and the whole thread. It helped me transform the user-adverse WD My Cloud Home device into a neat useful NAS.

The only thing I don’t quite understand is why there’s so much Android stuff on the /DATA directory - do I need all that? Does it serve any purpose? Would be great to de-clutter the directory.
Thanks to all above!

Hello, if you installed debian+omv on your device, the data directory has not android files, only debian. if i remember correctly (I’m not home and had no access to a pc), the debian installer format data partition to use as usr(on linux). Basically the installer do the following: format system_b, cache and data partitions to use it as root, var and usr respectively. Make backups of everything, and change kernel, rootfs (initram), dtb and fwtable to their respective partitions. So you cannot touch that partition, its vital for the system

Hi @zeusjan
this is what the Windows Explorer shows on /data, which is on root/sharedfolders. What do I need them for? The rest of your instructions is beyond me, I’m afraid.

I’ve checked the rc file and seems easy to flash backup. As I got the script mount partitions, backup them, wipe them and than move files into partitions.

You installed openmediavault or ENTWARE? I think I can not help you because i don’t have the cloud home (I have the duo), what i can tell you is that your device has a lot of partitions, some are for backups, maybe that is one of them, if you installed entware, then is normal that you have the android files (you still had android) but if you installed openmediavault, in theory you cannot have thise files, only on backup files, but maybe i’m wrong, the structures of cloud home and cloud home duo are different

@zeusjan

Talking for MCH single bay

echo create filesystems
make_ext4fs -L debian /dev/sataa20
make_ext4fs -L var    /dev/sataa21
make_ext4fs -L usr    /dev/sataa22

This is for debian, but do you know which was the stock one?

The “installer” also change /dev/sataa24/data (/dev/sataa24 is mounted as /mnt/data) permissions to 777

chmod -R 777 /mnt/data/data

Does someone know the original permission?

Seems that the “installer” doesn’t make a backup of /dev/sataa21 (mounted as /mnt/var) before wiping it. Should I suppose that was empty and not necessary for restoring android?

Does someone even know the drive path where stock firmware put files sent over smb (and permissions if possible)?

Those are backups from the previous installation.

Also for anyone new tryimg it and want to preserve the data in Plex directory, move the files over to a non encypted location like samba/share.
The installation removed the files from Plex directories and created a new dir called restsdk for me. All the file names are changed and extensions removed.
Now only if someone can figure how to decrypt those.

The script for reverting seems good at me, want to test it later. But for know I don’ t know how to repack rescue.root.sata.cpio.gz_pad.img. For extracting it I’ve used https://www.freefileconvert.com/archive-converter (rescue.root.sata.cpio.gz_pad.img > rootfs.cpio > files). If someone tell me how to repack I can test the “recover” script.

Thank you.