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

Remove all uDev rules for eth0 (/etc/udev.d/).
But better - Use UART for see whole boot process and access to local console.

Thank you, Fox, for your kind response. The problem is I do not have Hw neither knowledge to acess using UART, so I must keep with the SSH access.
rules.d is empty after the update/upgrade and when I reboot, I loose the contact with the piece

@Fox_exe
For beginners, which files should one be using for a clean install of Debian on the first gen? There are a number of files in the Clean Debain folder (on Google Drive). Not clear which one people should use to start with.

1 Like

Use this
http://anionix.ddns.net/WDMyCloud/WDMyCloud-Gen1/Clean%20debian/CleanDebian-Jessie.tgz
Punt in a folder
And then
http://anionix.ddns.net/WDMyCloud/WDMyCloud-Gen1/Autoinstall/Autoinstall.zip
Substitute the same named files with those provided in the latter if equal.
Copy to a folder in the drive
edit /etc/apt/sources.list to the proper ones
go to that folder in ssh
Chmod 777 install.sh (just in case)
./Install.sh
Then reboot
run_me _after…
Done

Thanks for the info/directions.

Ran into a problem however that seems to be a somewhat common one. After running through the steps and doing an apt-get update everything worked and was upgraded to Debian 9.9. Then had a problem after doing a apt-get upgrade then apt-get dist-upgrade then rebooting. Like others no network access to the unit.

Reflashed backups of the (My Cloud) partitions and am restarting from scratch.

While able to get Clean Debain (CleanDebian-Jessie.tgz) installed on a first gen single bay My Cloud. Never could get Open Media Vault to install. Tried the OMV Erasmus and OMV Arrakis versions. Both throw errors during install about packages have unmet dependencies. Errors were similar to those mentioned in this post by someone else in another thread. Tried to force install (apt-get -f install) with no luck. Also tried removing unused packages which didn’t have any impact. Did an apt-get dist-upgrade which caused the My Cloud to fail to boot properly when restarted. There are a number of packages that simply don’t get updated. Gave up and went back to the WD v4.x firmware for the time being. :frowning:

Try to upgrade kernel to 3.2.68 if it not updated (Look into /dev folder).
Check if “pfe.ko” module present in /etc/modules
Check /etc/network/interfaces (2 strings for “eth0”)
And remove all rules for network from /etc/udev.d/ if it present.

If it not help - We need UART console and watch boot log…

Still unable to install OMV to Clean Debain. The error at the end of the OMV install. Posted edited to clean up processed used and updated with a few error/other messages:

unbrick used personal v4.x backup
boot
Dashboard > Settings > Utilities > Quick Restore (fix front red LED)
Dashboard > Settings > Network > SSH enable
Extract Autoinstall.zip to Public
Extract CleanDebian-Jessie.tgz to Public
Access My Cloud using SSH.
cd /DataVolume/shares/Public
cat /etc/issue (get Debian version)
uname -r (get kernel version)
Current My Cloud v4.x Debian version: 7, kernel 3.2.26

chmod +x install.sh
./install.sh
Script will run and reboot the My Cloud. Could take up to 10 minutes.

After reboot access My Cloud using SSH (username: root, password: mycloud)
cat /etc/issue (get Debian version)
uname -r (get kernel version)
Debian version: 8, kernel 3.2.68

nano /etc/apt/sources.list
Orig:
deb http://ftp.debian.org/debian stable main contrib non-free
deb http://ftp.debian.org/debian stable-updates main contrib non-free
deb http://security.debian.org/ stable/updates main contrib non-free

New:
deb http://ftp.us.debian.org/debian jessie main contrib non-free
deb http://ftp.us.debian.org/debian jessie-updates main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free

nano /etc/modules
pfe.ko (added)

cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0
iface eth0 inet dhcp

reboot 
(bunch of following similar messages displayed after issuing reboot command prior to actual unit reboot.)
----------------------------------
Got message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=JobNew cookie=58 reply_cookie=0 error=n/a
Got D-Bus request: org.freedesktop.systemd1.Manager.JobNew() on /org/freedesktop/systemd1
----------------------------------
Access My Cloud using SSH.
cd ..
chmod +x ./run_me_after_reboot.sh
./run_me_after_reboot.sh

Package Configuration Configuring mdamd: exit (only option)
Configuring mdadm: OK (only option)

change system language: y
en_US.UTF-8 UTF-8
Default loale for the system enviroment
en_US.UTF-8
change time zone: y
US
Eastern

During update run lots of these kinds of messages appeared:
----------------------------------
Sent message type=method_call sender=n/a destination=org.freedesktop.systemd1 object=/org/freedesktop/systemd1/unit/mdadm_2draid_2eservice interface=org.freedesktop.DBus.Properties member=Get cookie=3 reply_cookie=0 error=n/a
Adding /org/freedesktop/systemd1/job/537 to the set
Got message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=JobNew cookie=2 reply_cookie=0 error=n/a
Got D-Bus request: org.freedesktop.systemd1.Manager.JobNew() on /org/freedesktop/systemd1
----------------------------------

When issuing apt-get update command the following warning/error happens at the end:
----------------------------------
W: Failed to fetch http://ftp.us.debian.org/debian/dists/jessie-updates/InRelease  Unable to find expected entry 'main/binary-armhf/Packages' in Release file (Wrong sources.list entry or malformed file)
E: Some index files failed to download. They have been ignored, or old ones used instead.
----------------------------------

cat /etc/issue (get Debian version)
uname -r (get kernel version)
Debian version: 8, kernel 3.2.68

Install OMV:
echo "deb http://packages.openmediavault.org/public erasmus main" > /etc/apt/sources.list.d/openmediavault.list
echo "127.0.1.1		MyCloud.localdomain MyCloud" >> /etc/hosts
apt-get update
apt-get install openmediavault-keyring postfix
Install this package without verification? y
# choose "No configuration"
(More messages similar to those above.)
apt-get update
apt-get install openmediavault
Package configuration - Configuring console-setup: UTF-8
Configuring console-setup: Guess optimal character set
ProFTPD configuration: standalone

----------------------------------
Errors were encountered while processing:
 collectd
 openmediavault
E: Sub-process /usr/bin/dpkg returned an error code (1)
----------------------------------

omv-initsystem
----------------------------------
/usr/sbin/omv-initsystem: 24: .: Can't open /etc/default/openmediavault
----------------------------------

Greetings,

I’ve recently installed without any difficulties Debian on my WD My Cloud EX2 Ultra using your images Fox_exe.
I’m currently using the Kernel 4.15.0-rc6 and installed OMV version 4.1.22-1.

Using the OMV-Extras plugin, I’m trying to install Docker via the Docker CE repository.
Unfortunately the installation fails when trying to start the docker service.

I’m desperately trying to find how to install it properly, wanting to install a variety of containers (Wordpress, Plex…)
Here’s the logs :

Setting up docker-ce-cli (5:18.09.6~3-0~debian-stretch) …
Setting up docker-ce (5:18.09.6~3-0~debian-stretch) …
update-alternatives: using /usr/bin/dockerd-ce to provide /usr/bin/dockerd (dockerd) in auto mode
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service.
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.
Job for docker.service failed because the control process exited with error code.
See “systemctl status docker.service” and “journalctl -xe” for details.
invoke-rc.d: initscript docker, action “start” failed.
docker.service - Docker Application Container Engine
** Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)**
** Active: activating (auto-restart) (Result: exit-code) since Sun 2019-05-26 22:51:20 CEST; 38ms ago**
** Docs: https://docs.docker.com**
** Process: 6561 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)**
** Main PID: 6561 (code=exited, status=1/FAILURE)**
** CPU: 453ms**
May 26 22:51:20 wdmc systemd[1]: docker.service: Unit entered failed state.
May 26 22:51:20 wdmc systemd[1]: docker.service: Failed with result ‘exit-code’.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package docker-ce (–configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of openmediavault-docker-gui:
openmediavault-docker-gui depends on docker-ce (>= 5:18.09); however:
Package docker-ce is not configured yet.
openmediavault-docker-gui depends on docker-ce (<< 5:18.10); however:
Package docker-ce is not configured yet.

Using "journalctl -xe, I have the following :

– Unit docker.service has begun starting up.
May 28 21:43:10 wdmc dockerd[10870]: time=“2019-05-28T21:43:10.870603728+02:00” level=info msg=“parsed scheme: "unix"” module=grpc
May 28 21:43:10 wdmc dockerd[10870]: time=“2019-05-28T21:43:10.872123352+02:00” level=info msg=“scheme "unix" not registered, fallback to default scheme” module=grpc
May 28 21:43:10 wdmc dockerd[10870]: time=“2019-05-28T21:43:10.873299716+02:00” level=info msg=“parsed scheme: "unix"” module=grpc
May 28 21:43:10 wdmc dockerd[10870]: time=“2019-05-28T21:43:10.874253567+02:00” level=info msg=“scheme "unix" not registered, fallback to default scheme” module=grpc
May 28 21:43:10 wdmc dockerd[10870]: time=“2019-05-28T21:43:10.880025432+02:00” level=info msg=“ccResolverWrapper: sending new addresses to cc: [{unix:///run/containerd/containerd.sock 0 }]” module=grpc
May 28 21:43:10 wdmc dockerd[10870]: time=“2019-05-28T21:43:10.881384215+02:00” level=info msg=“ClientConn switching balancer to "pick_first"” module=grpc
May 28 21:43:10 wdmc dockerd[10870]: time=“2019-05-28T21:43:10.882578782+02:00” level=info msg=“pickfirstBalancer: HandleSubConnStateChange: 0x1359f080, CONNECTING” module=grpc
May 28 21:43:10 wdmc dockerd[10870]: time=“2019-05-28T21:43:10.894580091+02:00” level=info msg=“ccResolverWrapper: sending new addresses to cc: [{unix:///run/containerd/containerd.sock 0 }]” module=grpc
May 28 21:43:10 wdmc dockerd[10870]: time=“2019-05-28T21:43:10.895838269+02:00” level=info msg=“ClientConn switching balancer to "pick_first"” module=grpc
May 28 21:43:10 wdmc dockerd[10870]: time=“2019-05-28T21:43:10.897251953+02:00” level=info msg=“pickfirstBalancer: HandleSubConnStateChange: 0x1373c580, CONNECTING” module=grpc
May 28 21:43:10 wdmc dockerd[10870]: time=“2019-05-28T21:43:10.900990454+02:00” level=info msg=“pickfirstBalancer: HandleSubConnStateChange: 0x1373c580, READY” module=grpc
May 28 21:43:10 wdmc dockerd[10870]: time=“2019-05-28T21:43:10.898691438+02:00” level=info msg=“[graphdriver] using prior storage driver: overlay2”
May 28 21:43:10 wdmc dockerd[10870]: time=“2019-05-28T21:43:10.895274994+02:00” level=info msg=“pickfirstBalancer: HandleSubConnStateChange: 0x1359f080, READY” module=grpc
May 28 21:43:11 wdmc dockerd[10870]: time=“2019-05-28T21:43:11.007494610+02:00” level=info msg=“Graph migration to content-addressability took 0.00 seconds”
May 28 21:43:11 wdmc dockerd[10870]: time=“2019-05-28T21:43:11.008251016+02:00” level=warning msg=“Your kernel does not support cgroup blkio weight”
May 28 21:43:11 wdmc dockerd[10870]: time=“2019-05-28T21:43:11.008350644+02:00” level=warning msg=“Your kernel does not support cgroup blkio weight_device”
May 28 21:43:11 wdmc dockerd[10870]: time=“2019-05-28T21:43:11.008415895+02:00” level=warning msg=“Your kernel does not support cgroup blkio throttle.read_bps_device”
May 28 21:43:11 wdmc dockerd[10870]: time=“2019-05-28T21:43:11.008474725+02:00” level=warning msg=“Your kernel does not support cgroup blkio throttle.write_bps_device”
May 28 21:43:11 wdmc dockerd[10870]: time=“2019-05-28T21:43:11.008529558+02:00” level=warning msg=“Your kernel does not support cgroup blkio throttle.read_iops_device”
May 28 21:43:11 wdmc dockerd[10870]: time=“2019-05-28T21:43:11.008587879+02:00” level=warning msg=“Your kernel does not support cgroup blkio throttle.write_iops_device”
May 28 21:43:11 wdmc dockerd[10870]: time=“2019-05-28T21:43:11.008879971+02:00” level=warning msg=“mountpoint for pids not found”
May 28 21:43:11 wdmc dockerd[10870]: time=“2019-05-28T21:43:11.009662879+02:00” level=info msg=“Loading containers: start.”
May 28 21:43:11 wdmc dockerd[10870]: Error starting daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables --wait -t nat -N DOCKER: iptables v1.6.0: can’t initialize iptables table `nat’: Table does not exist (do you need to insmod?)
May 28 21:43:11 wdmc dockerd[10870]: Perhaps iptables or your kernel needs to be upgraded.
May 28 21:43:11 wdmc dockerd[10870]: (exit status 3)
May 28 21:43:11 wdmc systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
May 28 21:43:11 wdmc systemd[1]: Failed to start Docker Application Container Engine.

The problem comes from iptables, and most specifically the NAT table.
I’m barely knowing enough things about Linux to use ssh and use some basic commands.

What are your thoughts about this problem ? Is a kernel upgrade necessary or something else ?

Thank you for reading and for your help.

Need recompile kernel with this options + Full iptables support (In my kernel its only partial support).
You can use official linux kernel and my DTS files. All instructions - on my website (fox-exe.ru or goole drive mirror)

Hi,

I’ve successfully compiled a new kernel using your tutorials, but when I installed the new uImage and libs, my WD My Cloud Ex2 Ultra won’t boot anymore.
The blue LED blinks rapidly forever without allowing me to have any access to WEBGUI.

I’ve tried using a uImage and uRamdisk on a usb stick, pressing the reset button while booting for 40 sec, nothing works.

Is there someway to restore the NAS ? Thank you.

Reset buttong (And “40-second resset”) works only on original firmware (Because its not in bootloader. Its just software reset… Very stupid realization).

Try to extract all disks and boot again from USB (You got “Telnet mode”/Recovery.).
If it works - restore previous kernel, then (When device boot to normal OS) - check dmesg and other logs. Mybe kernel can boot, but can’t start some software.
But better - use UART and just see what’s happend while kernel boot.

Hi Fox_exe

I want to install in my My Cloud GEN 2, the OMV software but I need to know if the HDD spin down correctly or has problems with that?

For correct Sleep mode need disable all statistics and apply few triks for reduce HDD usage (Move cron jobs, place logs and caches to ram).
You can look at OMV forums for info about this.

Thank you! @Fox_exe
Is it possible to use OMV Arrakis instead of Erasmus taking Debian exactly as your instructions say? Do you need a special Kernel?

Hi! HELP!
After installing debian and before installing omv, I did the reboot but lost connection SSH and Telnet. I do not know how to connect now, I lost all kinds of access. How do I solve it?

I’ve got the same issue. I had to shut it down after a long time (I had to move it to different location) and now all day I’m rebooting it again and again and trying to connect to it again. I don’t know what’s causing it and I don’t how to solve it. I just know it behave like that from the beginning. Only last time it rebooted corectly on second or third time and today like 20th time and still nothing. I’m starting to be a little bit nervous…

Okay. After approximately 30th reboot, it finally booted correctly! No I simply can’t shut it down again, otherwise who knows…

Did somebody of you recently built a kernel for the WD MyClound Gen 2 (1Bay) ?. I tried different Kernel Versions but none of the uImage Kernel will start.

Mostly i get this error

3624007 bytes read in 108 ms (32 MiB/s)
2679902 bytes read in 57 ms (44.8 MiB/s)
## Booting image at 00a00000 ...
## Booting kernel from Legacy Image at 00a00000 ...
   Image Name:   armada-375-wdmc-gen2
   Created:      2019-08-11  12:12:50 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3623943 Bytes = 3.5 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 00f00000 ...
   Image Name:   Ramdisk
   Created:      2016-05-22  11:44:54 UTC
   Image Type:   ARM Linux RAMDisk Image (lzma compressed)
   Data Size:    2679838 Bytes = 2.6 MiB
   Load Address: 00e00000
   Entry Point:  00e00000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

So if someone has a known working version of the kernel (i need the sources) + a working .config File and maybe the commands to build the uImage

Best regards

Florian

Just a little Google: Fox_exe file archive | Contents of /WDMyCloud/WDMyCloud-Gen2/Developing/Kernel-4.14.4/

Try to remove btrfs support from config (And play with different options of iptables/netfilter)