Alternative Firmware (Debian Jessie, Synology DSM6)

Time to give up. This isn’t even remotely fit as a daily driver. IPV4 is broken, and mediavault barely runs.

I got mediavault installed (plenty of errors during install about random things). I did manage to log in. Randomly it popped up with very vague “there is an error” messages whilst in the web interface). After rebooting, in the hope it would settle down. I have never been able to connect to it al all. Not via ssh, browser, IPv4 or IPv6.

The instructions provided here are vague at best, and skip out some major things, like making sure your system date/time and timezone is correct before even starting (mine wasn’t, it was Jan 1970, and this caused me extra headaches until I spotted it)

It now seems as though the mediavault has “helpfully” disabled ssh, as I can’t even connect to it anymore. even when I connect directly to it from my PC. Anyone know how to progress now, how do I get this back working with ANYTHING, when I can’t even connect to it?

I would suggest to others to think VERY carefully about wasting your time going this route in it’s current state.

clashcityrocker

Attach a UART connection to motherboard of device

I got in via bootloader telnet and overwrite the mtd partition and then recovered using the WD recovery.

1 Like

Clashcityrocker

Awesome job

Please write a “How to” for the rest of us who have not used Telnet.

Thanks

I have a My Cloud EX4 which errors during boot, would like to connect to it, but I have not been able to determine UART port location and pin logic…

I pushed the reset on boot and got it to the 2x purple LEDs I could then telnet into it (using Windows telnet )

The tricky part for me, was how to find the IP address. I used a local LAN connection to my PC, the PC had a static IP address, and I ran DHCPD server on my direct connection LAN interface, and then did a network scan to get the ip address.

Once in, did the following:

dd if=/dev/zero of=/dev/mtdblock1
reboot -f

Then you get the western digital recovery page, and you can upload the full western digital firmware bin file. This got it back to standard.

The problems I encountered are very weird. I noticed many things. Like the MAC address (which should be fixed and not changeable) changes between the debian base and the WD base. There is also alot of networking differences. My standard WD MyCloudMirror connects faultlessly to my router normally, but under this Debian, it was very problematic. The ifconfig tells me there are lots of changes…

WD:

egiga0 Link encap:Ethernet HWaddr 00:90:A9:F2:C1:9B
inet addr:192.168.1.17 Bcast:192.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:390971 errors:0 dropped:0 overruns:0 frame:0
TX packets:381379 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:532
RX bytes:43681667 (41.6 MiB) TX bytes:1156994999 (1.0 GiB)
Interrupt:10

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:13651 errors:0 dropped:0 overruns:0 frame:0
TX packets:13651 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1873676 (1.7 MiB) TX bytes:1873676 (1.7 MiB)

Debian:

eth0 Link encap:Ethernet HWaddr 00:50:43:02:00:00
inet addr:192.168.1.17 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fd00::1:250:43ff:fe02:0/64 Scope:Global
inet6 addr: fe80::250:43ff:fe02:0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:160439 errors:0 dropped:0 overruns:0 frame:0
TX packets:35558 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:532
RX bytes:214017022 (204.1 MiB) TX bytes:8610522 (8.2 MiB)
Interrupt:10

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:400 errors:0 dropped:0 overruns:0 frame:0
TX packets:400 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:122872 (119.9 KiB) TX bytes:122872 (119.9 KiB)

2 Likes

Say “thanx” to WD (Marvell?) dev’s… egiga0 for network device? Seriously? What a mess…
But its not full problem - in CPU we have 2 (or3?) network adapters. In WD firmware enabled 2 of them… And “Real” one - is egiga1 (!), so while boot original firmware its egiga1 and 0 was changed between both…
I don’t know, what should be an ■■■■■ that to think up it…

So… I change network setup to normal - egiga0 disabled, egiga1 recognized as eth0.

About MAC address - WD devs make something stupid here again…
Normally kernel get MAC from u-boot (preloader, like BIOS in PC). But there is default mac, not real. WD get real mac while boot OS from different place…

Push and hold until I saw both purple leds

1 Like

What device? Mine is a gen1 my cloud mirror

Liuhangcheng

On my Gen 2, I had a hard drive installed and set up, plus a USB attached with the proper images, and then started the device with the reset button pressed for 40 seconds.

It boot to recovery mode, but I had to hunt for the IP address.

Sandisk Cruzer Blade 8GB

For Mirror Gen2 - Need empty disks, no need to press reset button - disks will formatted from DSM web-installer.

For fan control possible to use gpio pins (Its control fan power directly):
https://ftp.anionix.ru/WDMyCloud/Other/gpio_fan_manual.sh

  • gpio pins - from mirror gen1, but im think in gen2 its same.
1 Like

Sooooo,…finally I would say my plain debian for MyCloudMirror gen2 / Ex2 Ultra is BETA :slight_smile: and good for testing.

!!Everything is to use at your own risk!!

You can find in my Dropbox:

WD Folder

  • Ramdisk / uInitrd (uInitrd_ex2u)
  • Mainline 4.8.6 Kernel (uImage-4.8.6_ex2u)
  • Rootfs (MCMgen2-jessie-basic-armhf.tar.xz)

Short howto:

  • Create a partiton labeled “rootfs” and extract rootfs as root or sudo
sudo tar -xJvf MCMgen2-jessie-basic-armhf.tar.xz
sync

You can use USB-Drive or HDD;
ext3/4, btrfs, xfs are supported

Attach drive to NAS

  • Load uInitrd and Kernel via tftp from uBoot or flash it to Nand
    e.g. for temporary uBoot load:
set ipaddr 192.168.0.180; set serverip 192.168.0.104; tftp 1200000 uImage-4.8.6_ex2u tftp 2000000 uInitrd; bootm 0x1200000 0x2000000

+Debian should boot, get IP via dhcp and you can acess it via ssh

hostname: WDebian
user: root
passwd: root

#####################

What is working:
+Debian - Kernel 4.8.6
+Network with WD-MAC
+fancontrol works

What is not working:

  • LED’s and Reset-Button
  • WoL
  • reboot / shutdown / halt (buggy: most of the time NAS is just shutting down and don’t reboot)
  • booting from raid (working but not automatic - fix should be easy)
  • booting from encrypted part.
  • Initrd recovery still buggy / ssh work but you can’t log in :-/

What I’m not happy with:

  • MCU (fan, power) control how this working: nativ kernel module would be great but will be lots and lots of work
  • Fancontrol only off/low/full (stepless is possible)
  • Initrd rescue

I’m happy for every input, feedback and help

I’ll update my sources to github later this week

thanks to:
Fox_exe - https://anionix.ru/
A. Boehler - Linux on the D-Link DNS-320L [Andreas Böhler]

2 Likes

Short Version:
You need a uart/serial/ftdi cable, a tftp server.

When your serial is connect (boudrate 115200), you can interrupt than the bootprocess with pressing “1” (for MCM gen2 /ex2u).

Then just use my command with your ip’s

1 Like

WD should just buy Synology and throw it on their devices.

I think need start separate thread (For Ex2/MG2).
How you fix boot mainline kernel? All time i get stuck on booting kernel (No console output).

Own thread might be a good Idea.

Same way like yours: uBoot → custom initrd → Debian

No, what you change in kernel?
Marvell kernel works good, but official (kernel.org) - wont - Just stuck on “Uncompressing linux… Done. Boot kernel…” (Or similar).
I think its wrong console options, and add code for change LED while booting kernel… But led still white, so kernel not boot…
… Or jsut provide me a .diff / .patch file from your kernel?

I just generated a new *.dts. Its now in my dropbox too

Did enyone tried to install XPEnology on My Cloud Ex2 Ultra? It would be wonderful due to all the plugins they have.

Because kernel for Mirror G2 not fully ported - only basic things (Hardware-depend code, network setup, boot commands/scripts).
There is no driver for internal flash chip, so /dev/mtdblock not present.
No Led, Fan, Buttons control.

I dont have this device, so i cant do my researchs and experements.
Work in “Blind method” - not my style.

Ex2 Ultra = Mirror Gen2. DSM6 already exist/work (“Alpha” build).
XPEnology = DSM for PC. Mine is more like “Original” DSM (Only kernel modifications, 100% original OS/file system/packages/partitions layout)