Welcome! Log In Create A New Profile

Advanced

WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)

Posted by JanN 
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
December 17, 2017 03:32AM
user1231 Wrote:
-------------------------------------------------------
> Also, I've thrown together a script that downloads
> binaries from debian.org and replaces the ones in
> Carl's initrd, in case you're paranoid about
> running binaries from unknown sources. Not that I
> don't trust Carl, Martin and Fox_exe, but my
> employer doesn't... oh well.
> Let me know if anyone's interested and I'll share
> it here.
>
> Thanks for all the work you guys have put into
> this! Truly awesome!

I would appreciate it, if you can share this script. There is not only "the lack" of trust, with this script, it's easy to keep the binarey up to date.

And by the way with the latest ethernet-patch from bodhi wol works fine with a 4.13 kernel, maybe I should update my github. :-/

-------------------------------------------------------------------------
GitHub https://github.com/cschil
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
December 18, 2017 02:50PM
Here's the script. I've only tested it on debian stretch, for debian stretch.
Not much of any error handling in it either.
Attachments:
open | download - fetch_binaries.sh (1.9 KB)
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
December 18, 2017 02:51PM
As someone previously noted, you should modify initrd/bin/resume to use -e instead of -h to find "init", when you're on a linux dist that has init as a regular file instead of a symbolic link. Like stretch.
MM
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
February 11, 2018 06:49PM
Hi Carl,

Peacemaker Wrote:
-------------------------------------------------------
> And by the way with the latest ethernet-patch from
> bodhi wol works fine with a 4.13 kernel, maybe I
> should update my github. :-/


I'm trying to put a 4.14 kernel together.

I didn't get WOL working.

Can you elaborate, what you did? Which wakeup tool do you use, with which commandline? Are you setting flags with ethtool? Which patch do you use?

Thanks!

bye
MM
MM
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
February 12, 2018 08:50AM
I updated my mcm-daemon repo with patches and configs for newer kernels.

I got 4.14.18 running and fixed the missing ethernet. It was due to needed changes to the dts file.

I also added bodhi's ethernet and LED patch, but WOL still doesn't work for me, the LEDs are not yet tested.
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
February 13, 2018 08:36PM
MM Wrote:
-------------------------------------------------------
> I updated my
> mcm-daemon
> repo
with patches and configs for newer
> kernels.
>
> I got 4.14.18 running and fixed the missing
> ethernet. It was due to needed changes to the dts
> file.
>
> I also added bodhi's ethernet and LED patch, but
> WOL still doesn't work for me, the LEDs are not
> yet tested.

Thanks MM!

I think if hmartin can get this mcm-daemon to work on the WD My Cloud EX2100, it would be great!

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
March 14, 2018 03:07AM
MM: I was looking through the commit you did to your repo, 4f949e169b254b78ee76978e2e192525df36f330, which was the LED and WOL patch.
I'm not seeing any WOL based functionality added there, just a few debug prints. So perhaps that's why it's still not working for you?

Br
Yes, that's why I was asking which patch he used. I didn't find anything else.

The LEDs work fine by the way, thanks bodhi!
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
March 15, 2018 01:51PM
Hi MM,

The WOL did not really have any patch other than debug prints while we were trying it.

I recall that I've concluded that the network chip has WOL built in and all we need was using ethtools to activate it. So I left the the debug prints in there to see the progress. However, this has not been finalized, WOL still does not work on my NAS326 either.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
March 15, 2018 02:09PM
Hey,
I can have a look how I get WOL working within my "old 4.13" build, this weekend.
As it is working fine, after you activated WOL with ethtools.

Cheers Carl

-------------------------------------------------------------------------
GitHub https://github.com/cschil
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
March 15, 2018 02:22PM
Hi Carl,

> As it is working fine, after you activated WOL
> with ethtools.

Sounds great! wonder if we have the same chip on your WD box and my NAS326?

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
September 02, 2018 09:43AM
Hello everyone,
this is my first post and I'm a newbie to the topic of compiling a kernel and working with the arm toolchain.
I've read almost all the topic, the how to by MM and the topic by fox_exe in wd forum about the alternative firmwares.
I actually own a WD MyCloud Mirror Gen2 and I want to update to debian to install openmediavault or anything else better than the buggy and limited WD MyCloud.
I've read also the topic into the WD forum and considered the option to update to DSM, but I feel uncomfortable about the bugs and being a black box because I'll continue to use this device for Backups.

Anyway, I'm a little paranoid, and I would like to build everything by me. Also I want the ability to update when required and I would like to encrypt the drive using the hardware acceleration.
For these reason I think I'll follow the how to from MM trying to get think working.

I'm a bit confused about the dts provided in this forum being different with the one created by fox_exe on wd forum.
Also he provides an easy wd_to_debian binary upgrade and a Stretch rootfs, that I think would fit nicely in the nand but for some reason is fitted in the drive.

To avoid the drives being always on, there isn't any way to prevent the rootfs being written in the hard drives? Cannot fit in the nand? Cannot use an external usbdrive?

There wasn't any update from March. Is this topic abandoned?

In conclusion if the nand cannot contain a minimal debian install, I would like to chain the rootfs in the hard drive to the nand. Than, from the rootfs mount the raid with the password that I'll manually input after every reboot.

Thank you very much for your hard work!



Edited 2 time(s). Last edit at 09/02/2018 12:40PM by CyberPK.
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
September 06, 2018 06:53AM
Although there is some free space in the Nand flash I do not think that it is advisable to try to put your whole Debian in flash. The few GB you lose on the disk are not worth the effort.

Someone has described in this forum how to encrypt the whole disk using luks and he stored the pwd in flash. Asking for the password at each boot is problematic because at this stage you have no ssh available. Most probably it would be easy to put the password on an USB stick.
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
September 07, 2018 01:57PM
@ CyberPK,

I do agree with LinAdmin about not to put Debian on NAND flash.

However, to me it is more important that when you run your Linux distribution on NAND, it tends to be unsecure. IOW, you will not update your system to get security patches as often as when it is on USB or SATA.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
September 08, 2018 07:12PM
Thank you for answering.
As you have understood I'm not an expert.

Do you think is a good idea to run debian from an usb drive? This way I'll avoid the drive spinning all the time?
What about the differences in the dts file by this forum users and the fox_exe version?

At now, I've used the fox_exe binary to convert the wd to debian Stretch and flashed his rootfs. Then I've compiled the kernel 4.14.59 and flashed but can't go over the initrd (only recovery available). I've flashed also the initrd, with the same behaviour.
Initially the problem was the label of the partition was not "rootfs" but "ROOTFS".
Now, if I launch the 'resume' command, I get an error about the /dev is in use and the exec switch_root /mnt/root /sbin/init does not produce the expected result.
Actually the drive has 3 partition in raid: swap, rootfs, data. Maybe the md1 partition cannot be used?
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
September 08, 2018 09:09PM
CyberPK,

>
> Do you think is a good idea to run debian from an
> usb drive? This way I'll avoid the drive spinning
> all the time?

Yes. I have several plugs that are running 24/7 with USB rootfs. Some preparation suggestions to make sure the USB drive will not be worn out by constant write access:
https://forum.doozan.com/read.php?2,13702,13704#msg-13704

> What about the differences in the dts file by this
> forum users and the fox_exe version?

I can't comment on that since I did not work on this box. I think you need JanN, MM, and Peacemaker, perhaps others in this thread to chime in.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
September 16, 2018 11:31AM
Hello,

I've compiled the kernel by my own, but I cannot boot to debian installer with ssh.
Because I'm not able to find an usb to com adapter, I'm trying to use the network-console initrd modified with the preseed.cfg.
I'm able to boot from usb drive following the instruction from https://themm.net/public/ex2u/start but if I use the network-console initrd with or without the preseed, the wd starts and after about a minute reboots and keep the light flashing red.

These are the commands that I run to generate the uRamdisk:
wget http://ftp.debian.org/debian/dists/stretch/main/installer-armhf/current/images/network-console/initrd.gz
mkdir initrd; cd initrd
gzip -d < ../initrd.gz | cpio --extract --verbose --make-directories --no-absolute-filenames
cp ../preseed.cfg ./
find . | cpio -H newc --create --verbose | gzip -9 > ../initrd_preseed.gz
cd ..
mkimage -A arm -T ramdisk -n "debian stretch installer with preseed" -c gzip -d initrd_preseed.gz uRamdisk

this is my preseed.cfg:
d-i netcfg/disable_autoconfig boolean true
d-i netcfg/get_ipaddress string 192.168.1.42
d-i netcfg/get_netmask string 255.255.255.0
d-i netcfg/get_gateway string 192.168.1.1
d-i netcfg/get_nameservers string 8.8.8.8
d-i netcfg/confirm_static boolean true

d-i anna/choose_modules string network-console
d-i network-console/password password test
d-i network-console/password-again password test

Can you help me?
Keep in mind I cannot access the serial at thi point, otherwise I had already installed debian following themm instructions.

Regards

***EDIT***
The problem was caused by the kernel I've compiled (4.14.59 following the themm wiki). Using the precompiled one the setup has started correctly via ssh



Edited 2 time(s). Last edit at 09/16/2018 04:02PM by CyberPK.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: