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

unbricking with USB as described in
http://anionix.ddns.net/WDMyCloud/WDMyCloud-Gen2/_Unbricking_en.txt
does not work.
tried two different usb 2.0 sticks, i only get a yellow light instead of the blue one when i swticht my cloud gen 2 on, but it seems to boot the system from harddrive. No telnet, still ssh with permission denied.


The USB-stick only works if the OS on HD is not bootable

startet fresh and changed hostname on debian 8 jessie with this manual:

change your hostname in:
nano /etc/hostname

added the line “127.0.0.1 whitey” in:
nano /etc/hosts

run this command:
/etc/init.d/hostname.sh start

change hostname with
hostname newname

check new hostname with:
hostname

reboot and see if it works

You are sure its a gen2

Yes, it is a gen2

Noob here - just to be clear, by changing firmware on Gen1 or Gen2 mycloud, I lose ability to remote access it via files.mycloud.com, right? I am tempted to change the firmware to clean Debian since I need autossh and screen (on gen2 at least) but am willing to know all the “catches” before I proceed :slight_smile:

@cloudmaniac, yes. Using alternative firmware you loose all WD functional, but get access to almost all Linux software (OwnCloud, SyncThing, GSync, OneDriveSync and many other “Cloud” stuff).
But need install and configure all of it manually…

@Fox_exe Yes, was thinking its like that. I am ok with “pure” linux. Currently wd cloud access is cool since not all drives I have are behind public accessible IP - WD does all the relaying :wink: If I switch firmware, relaying is up to me :sweat_smile:

Hello all.
I just get an old WD MyCloud Ex2 for free. I have the newest Firmware.
I wanted to install Debian and OMV but i get the Purple LEDs.

I downloaded the file for My Cloud Mirror Gen1 and Install the “debian-jessie-firmware-test” via the webgui. (via Manual Firmware upload?!?). After Reboot i get the Purple LEDs.

Du i have to push the reset button while reboot? Or do i have to push it anyway?

Thanks for help and Sorry for my english.

@Fox_exe Could you please make the new kernel for the EX2 Ultra with BTRFS Support? I don’t find any kernel that support is…not the 4.14, 4.15, neither the 3.10. That would be really fantastic!

@Fox_exe Hey there!
I have a problem with step 2 (After reboot - device get new IP address, find it and connect via Telnet) on My Cloud EX2 Ultra.

After flashing bin file I have waited few minutes but couldn’t get an IP, so I have turned it off and on.
Right now my device is blinking Blue led, HDD leds are off and fan is working very loudly.
Maybe it’s a problem with subnet? My network is on 192.168.1.0/24.

EDIT: I coudln’t get correct IP, looks almost like DHCP client on NAS was broken… I had to connect via serial, and set static IP address. Everything else, went just fine.

The DHCP Client is a bit special, with my professional DHCP Server it could not get an IP, with my AVM FritzBox DHCP it worked. Didn’t figured out why, but it could be a Problem that the professional DHCP Server works with DHCP Relay and some extended features…

Indeed!
DHCP client from Busybox have only basic functional and not support extended features.
Its works good with consumer routers, but, seems have problems with more complex software (hardware).

Again the question: Could you make a kernel with btrfs support build in? I don’t find the current compile settings for the running kernel.

@martin80 Follow instructions in /WDMyCloud/Other/Official_linux_kernel/_HowTo_en.txt file.

Below I have left a snipped with correct packages and fixed few typos for ubuntu-18.04.2-live-server-amd64.iso.

# install ubuntu-18.04.2-live-server-amd64.iso on VM

sudo apt update && sudo apt upgrade -y
sudo apt install build-essential u-boot-tools libncurses5-dev git apt \
gcc-5-cross-base flex bison gcc-5-cross-base lib32z1-dev gcc-arm-linux-gnueabi \
make git-core ncurses-dev libssl-dev  # some of those packages might not be needed

cd ~

wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.19.37.tar.xz
tar xf linux-4.19.37.tar.xz && rm linux-4.19.37.tar.xz && cd linux-4.19.37

curl http://fox-exe.ru/WDMyCloud/Other/Official_linux_kernel/kernel.config -o .config
curl http://fox-exe.ru/WDMyCloud/Other/Official_linux_kernel/armada-385-wdmc-Ex2-Ultra.dts -o arch/arm/boot/dts/armada-385-wdmc-Ex2-Ultra.dts  # download dts for owned hardware

export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabi-
export DIR_RESULT=../output
export DTS_FILE=armada-385-wdmc-Ex2-Ultra  # use dts for owned hardware
mkdir -p $DIR_RESULT

make menuconfig  # make your changes here

make zImage && make $DTS_FILE.dtb && make modules && make INSTALL_MOD_PATH=$DIR_RESULT modules_install

cat arch/arm/boot/zImage arch/arm/boot/dts/$DTS_FILE.dtb > zImage_and_dtb
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n $DTS_FILE -d zImage_and_dtb $DIR_RESULT/uImage
rm zImage_and_dtb

cd ~/output
tar cJf libs-4.19.37.tar.xz lib/

You’ll get 2 files libs-4.19.37.tar.xz and uImage.
I didn’t tested it yet, in case it’s failing to boot, download same version of kernel that @Fox_exe has used.

@martin80 and @Fox_exe thanks for confirming, I was using DHCP on OpenWRT and the one you have provided in Recovery.zip package. In second case this might be caused by firewall or just Windows 10 :slight_smile:

Hello all.
Need some guidance, as I have been fighting the whole weekend with a 1 Gen 4TB piece without success.
My target: Have an “standard” ubuntu piece as close as possible to be able to install from the usual repos, running:
A decent UI (OMV?)
Samba
Tranmission.
I am completelly confused as in the 1st post there are 3 versions of OMV compressed files, one of them in russian and when update/upgrade, there are broken repositories.
Also, if I use a clean debian Jessie (which Update/upgrade with no issues as far as I undestand) and installs prefectly samba, fails installing OMV…
Could somebody point me to the right combinations and steps (explained to idiots) to have that minimal platform?
And, just in case… Could sb tell me how to change partition size once in Ubuntu?
Thank you in advance

No, i can’t: With btrfs support kernel won’t boot. And idk why.

parted (Resize partition) + resize2fs (Expand file system to whole partition).
Or just use GUI version - gparted.

Use latest version of OMV (Index of /public/dists)
Also - upgrade debian to “Stretch” (Latest version for now):
apt update && apt upgrade && apt dist-upgrade

Thank you very much, sir.

Oh ■■■■. Thanks for the try. Can you upload the make config?

Well. Applying Clean debian Jessie, run_after_install and then apt update && apt upgrade && apt dist-upgrade.
Some warnings aboy perl and ifconiguration. Checked /etc/network/interfaces prior to rebbot after dist-upgrade. Everyting ok.
I perform ifdown eth0 and ifup eth0. Nothing wrong. Same IP, but after rebooting I lose the cloud. If I scan the lan, no devices in the usual ranges and no way to recover the ssh
Green led.
Any hint?
Thank you in advance