Clean OS (Debian), OpenMediaVault and other "firmwares"

Thejack here again.

I can create a recovery tool that reinstalls the correct firmware on the MyCloud EX2 Ultra, but for that, I need the data from the flash memory (I do not have it anymore).

Can somebody please hook up a root shell to a MyCloud EX2 ultra, and execute the following commands
dd if=/dev/mtdblock1 of=mtdblock1
dd if=/dev/mtdblock2 of=mtdblock2
dd if=/dev/mtdblock3 of=mtdblock3
dd if=/dev/mtdblock4 of=mtdblock4
dd if=/dev/mtdblock5 of=mtdblock5
dd if=/dev/mtdblock6 of=mtdblock6
dd if=/dev/mtdblock7 of=mtdblock7

This will create 7 files, which I need to create a recovery tool for the EX2 Ultra. These files contain parts of the original recovery firmware, which I - sadly - bricked on my device.

Yours sincerly, Jack

NAND layout (partitions)

/dev/mtdblock0 - "U-Boot"
/dev/mtdblock1 - "uImage"
/dev/mtdblock2 - "uRamdisk"
/dev/mtdblock3 - "image.cfs"
/dev/mtdblock4 - "rescue fw"
/dev/mtdblock5 - "config"
/dev/mtdblock6 - "reserve1"
/dev/mtdblock7 - "reserve2"

So, just use this tool: Fox_exe file archive
for unpack original firmware and get uImage, uRamdisk, image.cfs (rootfs) and config.tar.gz
First 3 - just “dd” into flash.
But for config - need create ubifs partition in /dev/mtdblock5 and upload config.tar.gz into this partition (overwrite all files)

On mtdblock7 (ubifs partition) you can find mac address and serial number (as files)

1 Like


Thanks for the pointers, I have used this script GitHub - michaelroland/wdnas-firmware-modding: Firmware Modding for Western Digital My Cloud DL2100 NAS Systems to extractthe firmware, but it creates faulty binaries. Yours does no, thanks for that.

I have created one at /dev/mtd5, but how should I name the volume?

However, I am stuck creating the ubifs, can you please give me some pointers here?
After that, I think it would be possible for me to create a script that reinstalls WD’s firmware, as it has been adressed multiple times here.

I am still interested in a copy of /dev/mtdblock4, this device includes the recovery firmware. This would allow me to create an even better recovery tool, since it would also fix any broken recovery firmware.

Try to mount and analyze 6 and 7 partitions (Its Ubifs too). Config partition must be same.

Hi Fox,

just to confirm
I have downloaded teh firmware for EX2 unpacked it and i got 4 files

  • config.tgz
  • rootfs.cfs
  • uImage.bin
  • uRamdisk.bin

the MTD devices on WDMyCloud-Ex2 not the ultra are the following

  1. mtdblock0
  2. mtdblock1
  3. mtdblock2
  4. mtdblock3
  5. mtdblock4
  6. mtdblock5
  7. mtdblock6

to restore I should do the following

  1. ssh to my EX2 with the DSM firmware and do the following
  2. dd if=uImage.bin of=/dev/mtdblock1
  3. dd if=uRamdisk.bin of=/dev/mtdblock1
  4. dd if=root.cfs of=/dev/mtdblock3
  • any update on the steps above needed
  • Question : how do I create the ubifs Partion on /dev/mtdblock5 to put the config file

Yes, all is right.
I think Ubifs already present, but contains wrong or damaged configs. Just mount it and extract config.tar.gz into it.

ubiattach /dev/ubi_ctrl -m 5 -O 2048
mkdir /mnt/config
mount -t ubifs ubi0:config /mnt/config

There is example of creating ubifs image (and test in Nand emulator). Not for our device, but there is all useful commands:

thanks for your reply one last question
Ubiattach command is not available on DSM version any idea how to get it on DSM
also when i try to mount the ubifs i get the following error
mount: unknown filesystem type ‘ubifs’

is it possible to use this revert method
======== REVERT =========
dd if=/dev/zero of=/dev/mtdblock1
reboot -f

After this WDMC runs in “Rescue” mode. Go to webgui and upload original firmware file (.bin)


It seems like you figured it out, however, I am not able to trigger the Safe Mode, because the /dev/mtdblock4 is corrupted.

Could you please hand me a copy of it? It would be much appreciated.

Thanks again, Jack

Hi Jack
My Box is EX2 not EX2 Ultra
I am not sure if the copy from it will work on your box they have deferent HW
my recommendations is to get the correct image for your Box EX2 Ultra
HW Specifications

Dump partition (dd) and open it on PC (Ubuntu/Debian + apt install mtd-tools), update, then - reupload back to WD.

I installed this:, it worked. I did the debian and OMV update. Unfortunately, now I only have SSH access. OMV does not start. Reloading does nothing. Please help. How Restore my Wd My Cloud Home?

Dear Fox!

Thanks again for your help, I really appreciate that.
I have now dd’ed uImage.bin to mtdblock1, uRamdisk.bin to mtdblock2, rootfs.cfs to mtdblock3, and executed the following commands on mtdblock5:
ubiformat on /dev/mtd5, then i have created an ubifs volume with the name config, that fills the whole device, and extracted config.tgz onto it.

Still, the device does not boot.

Any pointers?

UPDATE: I have it, thanks to this:

Method works with any MyCloud EX2 Ultra

@thejack, Please, dumpt the 5th partition and upload here (For easy flash if someone have same problems).
I make my own dumps, but can’t test: Fox_exe file archive

This is the one you need to flash :wink:

Cool. I analyse this file and get some interesting info:
Header contains same data as Firmware file (model code, version, build version, something like CRC32)
And two files: uImage + uRamdisk
If i’m right - we can write this two files in mtd1 and mtd2 and device will boot into recovery (Force recovery mode)
All files and some info here: Fox_exe file archive

I successfully installed Debian 9 and OMV 4 on my WD My Cloud Mirror Gen2, see

I currently running kernel 3.10.70.

What is the latest kernel I can use?

1 Like


So I only need to unpack libs-4.15.0+.tar.xz and bring uImage and uRamdisk in place?

libs - to rootfs
uImage and uRamdisk - to mtdblock’s 1 and 2.

1 Like