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

hello guys, first post from me, have around 2 years enjoying OMV on myWDCloud Gen1. so first: thanks!
now I’m with a problem, a stupid thing I did on long night hours, clean Debian, OMV 3, lost /dev/sda4 yesterday, maybe some wrong type I did and red light is brilliant now.
i connect telnet for recovery and cant’t mount /dev/sda4 … so I’m stuck there.
opened from the case and used usb with not good luck, maybe because my Mac can’t read ext3 or ext4 or something like.
my English is not better, thx from now, any suggestions are welcome.
CamMx

#18 SMP Tue Nov 24 15:10:48 UTC 2015
Use this info for login:
Login: root
Password: mycloud

recovery login: root
Password:

BusyBox v1.23.2 (2015-10-10 12:34:21 UTC) built-in shell (ash)
Enter ‘help’ for a list of built-in commands.

~ # cd /dev
/dev # ls
autofs kmem pts ttyS1
bsg kmsg random ttyS2
bus mem rtc0 ttyS3
cachefiles network_latency sda ubi_ctrl
console network_throughput shm urandom
cpu_dma_latency null temp usbdev1.1
full port tty usbdev2.1
fuse ptmx ttyS0 zero
/dev # cd …
/ # mount /dev/sda4 /mnt
mount: mounting /dev/sda4 on /mnt failed: No such file or directory
/ #

well, when I was about to surrender debian live, gparted and testdisk give me back my data folder!
partitions was damaged and I could restore 2 of 4 … because data is here I guess will backup 3.6TB to another disk and will try DSM on next week.
anyway, if you think I can restore without risk these 2 partitions (check image) I can try. I’ve got 2 days suffering for my important data.
thanks again

@CamMty, check your hdd for bad blocks and SMART (apt install smartmontools, then smartctl -A /dev/sdc).
Use parted, repartition your disk:

rm 1
rm 2
mkpart primary 528M 2576M
mkpart primary 2576M 4624M
mkpart primary 16M 528M
mkpart primary 4828M 100%
mkpart primary 4624M 4724M
mkpart primary 4724M 4824M
mkpart primary 4824M 4826M
mkpart primary 4826M 4828M
set 1 raid on
set 2 raid on
q

then, try start raid: mdadm -As or
mdadm --assemble /dev/md0 /dev/sdb1 /dev/sdb2
and try to mount /dev/sdb4
** Change sdb to your hdd (wd)!

If all good - put hdd back to wd box and power on.

I think , I need to install librt.so.1 libdl.so.2 libstdc++.so.6 libm.so.6 libpthread.so.0 libc.so.6 .
How can I do it ?

mount /dav/sda4 /data !
May be here you can see something helpful ?

BEAUTIFUL
thx!

All libs as i see - from libc6 (Standart library, present in almost all linux distro include Debian), so - no external dependencies.

try strace:
strace ./gs-server | grep open
Or grep “error”. Or dont use grep for see full log.

I’ve successfully installed your Clean Debian(Not OMV) on wdmy gen 2 with New HDD.
(WDMyCloud-Gen2/Debian/Dev/Debian-kernel-bin_4.14.4_002.tar.xz)

It seems that my wdmc is working well.
The only problem(or question) is…

I’m not sure if wdmc is sleeping or not when it is definitely not used.

Like your instruction, “/etc/rc.local” includes the following lines.

I guess that LED shoud be Blue when HDD is in standby(or sleep) mode.

Usually LED is steady green. Sometimes when there is a hdd access, it blinks yellow.
Is there any log file to check if wdmc goes into sleep mode? or any method?

Why the Debian or the bash can`t see files ?
Have You got any idea ?

After apt-get install binutils strace I have got this.

I like Green as default led state. Change it to blue, if you want.
For “Sleep mode” - need some tuning: Move all logs and caches to RAM. I dont add this stuff, because my HDD wors all of the time.
Some info here: http://fox-exe.ru/WDMyCloud/Other/HDD%20Spindown%20and%20sleep%20mode.txt

@Fox_exe
I followed your unbrick guide but it will not upload the file in safe mode? Thoughts?

1 Like

@Fox_exe I looked into the inspect element and /cgi-bin/system_mgr.cgi is responding with a 404 error.

1 Like

I followed the installation instructions and all went smoothly. I have sda1 as swap sda3 as system and sda2 for my data. However when I try to create a shared folder no devices show in the drop down menu. I’ve tried unmounting and mounting sda2 and still no joy, Any help appreciated. I have a 2TB gen 2 mycloud. Thanks
James

SOLVED - deleted the sda2 partition and after recreating I was able to mount within gui and create shares on the sda2 partition. Not sure why it wasn’t working

@Fox_exe Hi Fox, thanks for your guide. Sadly I am completely lost. I have no idea where to start. I cannot find the autoinstall script.

Also, is there any step-by-step guide ?

I’m using a WD MyCloud Ext 2 Ultra

Looking forward to your help !

Installed Debian and OMV without any problem. But after reboot, i got no access to any service. no webinterface, no ssh, no smb. i can ping the device, but not more. testet usb recovery before i installed debian, worked ok, but now, the mycloud ignores my usb recovery stick, boots from HDD (sounds so) and the front light stays yellow. any ideas?

@applebenny

rm /etc/udev/rules.d/70-persistent-net.rules
sed '/ipv6/d' /etc/network/interfaces -i
sed '/inet6/d' /etc/network/interfaces -i

Can you tell me how to create a USB recovery stick?
Did you try the TFTP restore-method?
I used it last night to install clean debian.

So what can we actually do about held back packages on Debian Jessie?

The following packages have been kept back:
  apt apt-utils bind9-host dbus dnsutils gnupg ifupdown init init-system-helpers
  initscripts iproute2 isc-dhcp-client isc-dhcp-common kmod libdbus-1-3 libkmod2
  libpam-systemd libsystemd0 libudev1 libxml2 openssh-client openssh-server
  openssh-sftp-server procps systemd sysv-rc sysvinit-utils udev util-linux wget

Running apt-get dist-upgrade seems to brick the system (no ssh) and a restore is needed.

Do I need to run apt-get install <package> for every held back package?

I don’t want to restore again but the updates look important.

Hi Mr @Fox_exe , so I did install Debian on the MyCloud EX2 Ultra, but after having some issues with the network, I rebooted and yeah… The device doesn’t connect to the network anymore, please tell me that there is a way to save this device! :frowning:

@HRVSTR, Update kernel to 3.2.68 (On my website / g.drive folder).
Its a SystemD issue (No required modules in kernel, so systemd can’t update).

@rspy24, Extract HDD’s, poweron device. After ~1 min. insert HDD’s back and connect via Telnet.
Do:
mdadm -As
mount /dev/md1 /mnt/root
nano /mnt/root/etc/network/interfaces
Check this config or rewrite to default (Replace MAC address to actual/real):

source-directory /etc/network/interfaces.d

iface lo inet loopback

auto eth0
allow-hotplug eth0
iface eth0 inet dhcp
hwaddress ether 00:90:A9:00:00:00

save by [ctrl] + , then [y], then:
sync && reboot -f

1 Like