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

I installed OMV with Bullseye on my WD My Cloud Ex2 device.
kernel v5.10.109
I prepared a guide.
There is no need to flash the native UBoot; you can load the new kernel on demand or by default keeping the original fw as it is, for safety and rollback procedure.

Guide and repository is on github /gisab WDMC-Ex2
#WDUserRewards

In reply to @Fox_exe 's first post: People are very judgemental these days. I don’t hate you. I live in a country where my government embarrasses me all the time too. It’s not your fault. Don’t let hate people make you bad.
Peace.

No, please don’t say that.
You shouldn’t be pessimistic.
I just created an account on this site when I was just browsing for possible future things that I’d buy, and found your post and I got really sad.

Although personally I am 100% against any kind of military operation, it is never on countries or people in it. We can only blame the leader who makes a bad decision but not the people.

Please cheer up and just remember that your part in the community is really important and valuable and a lot of people (might) depend on you.

2 Likes

Edit: adding a guide since i figured this out. All the credit goes to abskmj and @Fox_exe.

Clean Debian Install && OMV 3 Install

Firstly open the WD My Cloud box and unplug the HardDrive from the main board and then connect it to a linux computer.

Partiton drive
Run parted on the WD drive

parted /dev/sd*

Remove all partitions on the drive (DATA LOSS)

rm 1
rm 2
rm 3
rm 4
rm 5
rm 6
rm 7
rm 8

Recreate all needed partitions

mklabel gpt
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

Quit parted

q

Format data partition
Note: -O ^metadata_csum is needed since new versions of mkfs insert this feature, wich its not supported on older systems.

mkfs -t ext4 -O ^metadata_csum /dev/sd*4

Create swap partition

mkswap /dev/sd*3

Mound raid partions

mdadm --stop /dev/md*
mdadm -A /dev/md0 /dev/sd*1 /dev/sd*2

Mound data partitions

mount -t ext4 /dev/sd*4 /mnt
cd /mnt

Download the Clean Debian package and extract it

wget https://github.com/abskmj/wd-mycloud-gen1/releases/download/packages/clean-debian-jessie.tgz

tar zxvf clean-debian-jessie.tgz

Copy images to partitions

dd if=kernel.img of=/dev/sd*5
dd if=kernel.img of=/dev/sd*6
dd if=config.img of=/dev/sd*7
dd if=config.img of=/dev/sd*8
dd if=rootfs.img of=/dev/md0

Reconnect WD drive to My Cloud board. Power it on and connect a LAN cable
Connect to it with: ssh root@192.168.X.XXX
The default password for the root user is mycloud

First change root password with passwd and follow the prompt

Remove all lines in sources.list with
nano /etc/apt/sources.list
and paste this inside

deb http://ftp.us.debian.org/debian/  jessie main contrib non-free
deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free
deb http://packages.openmediavault.org/public erasmus main

Run the following commands. Ignore the warnings.

apt-get update
apt-get install --force-yes openmediavault-keyring
apt-get update
apt-get upgrade
apt-get install openmediavault

At the mdadm prompt choose none and leave the rest as is.

Finish the install with this command

omv-initsystem

Now we need to label the data partition, since OMV uses labels to identify storage devices.

e2label /dev/sd*4 DATA

Reboot the system

reboot

Once the system is up and running you can login to the web interface at port 80 with the credentials admin and openmediavault as password

Go to System > General Settings > Web Administrator Password and change the admin password

Now go to Storage > File Systems and check that the data partition (/dev/sd*4) has the previously given label.

If everything is all right we can move on to the creation of a Shared Folder and a new User under Access Rights Management.

Lastly choose your preferred protocol between the ones available and enjoi your newly updated NAS.

2 Likes

When I mount raid partitions appears:

superblock on /dev/sda2 doesn't match others - assembly aborted

OK, I dealt with it:

mdadm --assemble /dev/md0 /dev/sda1
mdadm --add /dev/md0 /dev/sda2

But unfortunately I can’t connect to board via SSH - no route to host. The led on the board is yellow, not blinking

Is this a way to go back to the old system when I already installed omv ?

Do I need to install anything after installation to connect via SSH? I did everything according to these instructions, but the device is not visible in the network, I cannot connect via SSH, the LED is green.

I have an error after installation of OMV:

Errors were encountered while processing:
collectd
openmediavault
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@MyCloud:~# omv-initsystem
/usr/sbin/omv-initsystem: 24: .: Can’t open /etc/default/openmediavault

1 Like

Is it possible to install OMV or DSM on my cloud EX2 Ultra if so how do i do it?

I had same issue. Just change your hostname (in /etc/hosts and /etc/hostname), reboot and rerun apt-get upgrade. That solved my problem :slight_smile:

2 Likes

@Fox_exe your post was a big help…more than once in rescuing my nas…and I am sure there were hundreds of others like me…maybe thousands…you responded on our comments when we needed help…and even that you have deleted your files now…I would still say many many thanks for being such a kind person…and rest all…is ugly politics!!

2 Likes

Thank you for this guide! I followed this 100% multiple times from a dedicated nix laptop and a VM and once everything was done I could not connect to the drive via SSH no matter what. I actually just went through the “unbricking” process and it’s up and running again. Really hoping I can get this working but not sure what else to try. LED was solid white and nothing else.

which kernel version would this be running on?

Totally untrue. It’s not your fault Putin’s being a total jerk.

Hi @Fox_exe

I am running into a similar issue as @evil77 where I have gone through the Debian deployment steps, but after I reboot then I can’t connect via SSH. Scanning the IP with nmap, I can see that the WDMC (Gen2) is not listening on port 22… I have manually cycled power (unplug power, plug it back in) 3 times with no luck. I have deployed the Jessie image saved to wd.hides.su (where somebody backed up your work after it was deleted) three times already with no change. I even created an Alpine Linux from your instructions and followed 1Demon in post 1436, but no luck. Please see nmap out put below:
image

Here are the instructions I followed and I get stuck at trying to SSH in to set up OMV:
https://wd.hides.su/fox_exe/WDMyCloud-Gen2/Debian/_howto_en.txt

Can you please help figure out how to SSH in?

Also please see proof that the mentioned IP is that of the WDMC:
image

Hi @Fox_exe ;

I noticed that your web-page is back with all WD-files that you had published before. I had tried to get in touch with you, with no luck. Somewhere I read that you will not be developing any Updates. That is very sad, but understandable.

Would you mind sharing a guide how someone could take on your project and develop Updates? I am specifically looking for a newer release of Debian for my EX4100. I am also looking for a current and working guide. And if I should remove the spinning disks from the enclosure before I start or if I can just leave them in.

It would be great if you find the time to answer. (anyone else who knows is welcome to answer as well)

Thank you,
Rudy

Hi there, I need some help if anyone could.

I own WD My Cloud Home DUO 8tb model and I followed the Debian + OMV installation method from 4pda forum (that one specifc for the DUO); installation works good using “install-omv.sh” script but when i reboot the machine nothing happens: no sound from the disks, no NAS ip on my network, fixed front led on.

I tried everything related with the DUO model, even the gentoo installation, but nothing loads after reboot -f. Removing disks from the NAS and attaching directly to my pc, in the linux partition there is nothing in /var/logs, probably because the system did never run.

The NAS is not bricked because I can always use “restore-emmc.sh” script with original backups I made and I can restore the original working but crappy “WD My Cloud NAS”.

Maybe a firmware limitation in newer models preventing me to boot non-original os?

@Fox_exe : i tried to put my contribute on your paypal (but it seems blocked :confused: and I sadly wonder why…) because I wanted to thank you in advance (and for all the work you did, of course): it’s too difficult to find a path to follow on russian forum; automatic translation lacks thread tools and i cannot even register because the cirillic captcha :sweat_smile:. Unluckily I didn’t find any other issues like mine in any english language forum.

Has anyone created and posted an image file of Debian and OMV installed on a My Cloud Gen 1?

I can’t make mine boot from USB.

I restored to factory settings, but when I plug in the power with the USB stick in and the reset button pushed, the yellow light flashes once, goes solid and then eventually goes blue after the device is booted to factory settings.

hi! im having the exact same problem with a 6TB DUO model. after the script that runs fine its seems that the box doesnt run at all. sadly i didnt check for the backup emmc.sh and the files needed, can i ask you to send me those files to see if at least can restore the old sistem?