Mainline kernel (>=4.11.x) for WD My Cloud Gen2


#61

I don’t have much experience with comipling kernel. I was just trying to do something different hoping it may make minidlna work. Next time I am thinking to have your dts and play with .config file.


#62

Not being familiar with .dts and .dtb files. Why is your .dts file different that the My Cloud .dts file used on the gen2?


#63

The 3.10.70 dts file isn’t compatible with the new kernel 4.xx.
I used the 375 development board ./arch/arm/boot/dts/armada-375-db.dts and changed, what in the 3.10.70 dts for gen 2 was different.

The armada-375-wdmc-gen2.dts should be correct. Only thing i’m not sure, if it is correct working, is the hardware crypto engine.

Johns


#64

I wonder if that is why when using your dts file. The module jnk.ko panics. But the system boots and seems to work. I assume it just means that it won’t mount a ntfs USB device.


#65

Compare mine and the 3.xx.x. If I made any failure.
Get the latest from git, I made a spelling error, pci-e lines was not disabled, but this shouldn’t be any problem.

Johns


#66

very interesting project…
I search on alpine forum but I cant find this thread.
Anyone who has apline …Can you post your test …smb speed etc etc…or is it too early to ask.

Alpine and acf for gen2 wdmc…awesome


#67

I followed all the steps as described.
And, when I insert the usb, the front led goes to “steady blue.”
I checked the ip address of my cloud, and tried to ssh, but with no success.
It shows “Network error : connection refused.”

When I ping the my cloud ip address, it shows like this.

PING 192.168.1.228 (192.168.1.228) 56(84) bytes of data.
64 bytes from 192.168.1.228: icmp_seq=1 ttl=64 time=1.33 ms
64 bytes from 192.168.1.228: icmp_seq=2 ttl=64 time=0.762 ms
64 bytes from 192.168.1.228: icmp_seq=3 ttl=64 time=0.673 ms

When I tried ‘the other alphine-linux USB’, I could ssh into “My Cloud” with different my cloud ip address, and see the HDD drive with a command fdisk.

Could you guess what is the problem with SSH?


#68

USB 3.0 pendrive is not well supported, USB 2.0 works fine. If you are using USB 3.0 insert it when you get blinking blue light on reboot.


#69

I tried that also. But, no success.

I found that you have compiled 4.12.2 kernel for my cloud.
Can I replace that uimage in the “/boot” in the first fat32 partion of USB from johns98’s instruction?


#70

It won’t help much, If you are not able to boot with johns kernel (which is actually better one). I was just experimenting with compilation. My kernel does not support mycloud leds.

Are you running original firmware or debian on your box?

If you are running original firmware I am not sure if you can boot from USB, ( I was running clean debian when I used USB to install alpine). As per Fox_exe’s guide I had replaced uImage/uramdisk on wd harddisk before I was able to install from USB.

Note: I may have forgotten few things as I have done this install before few months.


#71

Thank you for your reply.

Actually, I’m now trying to set-up a new HDD within MY Cloud.
So, In-box HDD don’t have any firmware.

What I’m trying to do,

  1. Connect New HDD to WD My Cloud board.
  2. Boot from USB following john’s instruction.
  3. install Fox_exe’s clean debian from USB according to his instruction.

And, if it is possible to run WD My Cooud from USB, I’m also considering using internal HDD for ‘only-data’ Drive.

From, john’s instructions, I thought that this would be possible.
From https://github.com/Johns-Q/wdmc-gen2,

uRamdisk modified (Original from AllesterFox)
Can boot original firmware, debian from AllesterFox, alpine linux. It looks for a linux part as 2nd on usb stick and boots from there. If there is none, it boots from 3rd partition on SATA drive. Copy to /boot on 1st partition of the usb stick or to 3rd partition of the harddrive.

Am I mistaking something?


#72

How did you tried to ssh, “ssh root@” followed by password:mycloud

I don’t see anything wrong in what you are doing, maybe your USB drive is faulty or files are corrupted?

What is that ‘other alpine-linux USB’?


#73

I tried to ssh through ‘putty’ under winodws 10.
I guess that if ssh connection was successful, it would ask me of id/password.

That’s from John’s github.

I followed his guide. And, I succeeded in ssh with ‘putty’ as he described.
And, I check the disk status with ‘fdisk -l’, and it showed that my new HDD was there.
But, I found that there isn’t enough packages in his alpine-linux system for my purpose
I found It doesn’t have parted and mkfs.ext4 which are necessary to install Fox_exe’s debian image.
Because I tried to install the above packages from alphine linux site, I couldn’t get those package installed in my alphine-linux USB.

alpine linux diskless image
alpine-wdmc-gen2-3.6.2-armhf.tar.gz
contains a complete bootable diskless image of alpine linux. modified to ignore “root=”. “root” is not setable on WD My Cloud. And enabled SSH daemon, you can ssh to it after booting. root account has no password. Kernel 4.12 is included, but no modules.
alpine initramfs image with ssh (without password!)
install
Use an USB 2.0 stick! I had the problem, that usb 3.0 sticks aren’t always booting. If you have only an usb 3.0 stick, remove stick, turn wdmc2 on, when the blue light blinks insert usb stick fast, using this i could boot from usb 3.0 sick.
make a dos partition table (not gpt) on usb stick.
make a partition “W95 FAT32 (LBA)” numeric 0x0C on usb stick
make a FAT32 filesystem on usb stick.
extact alpine-wdmc-gen2-3.6.2-armhf.tar.gz to the root of the usb stick.


#74

You can install them with alpine linux, with

  1. add repos to /etc/apk/repositories

http://dl-4.alpinelinux.org/alpine/edge/main http://dl-4.alpinelinux.org/alpine/edge/community http://dl-4.alpinelinux.org/alpine/edge/testing
2. update/upgrade

apk update apk upgrade

  1. install desired packages, mkfs.ext4 is provided by e2fsprogs

apk add e2fsprogs parted

also read post 43, of John’s


#75

I finally succeeded to partition a new hdd after booting from alpine linux usb stick.

Thank you for the kind explanation.


#76

I build kernel 4.14.4 for Gen2
Looks good, but have strange problem with network (Networking service cant run and exited by timeout (5min), but networks starts fine.)
USB speed: - 90/60 via samba (140/75 internal)
SMB speed: 110/80 MB/s (Download/Upload). Without any tuning of samba!
Also new kernel provided better “neon” instructions support (Faster cryptography, media conversion for MiniDLNA).


#77

What does it mean?

With the kernel 4.14.4_002.tar.xz for Gen2, (without deleting “/etc/udev/rules.d/70-persistent-net.rules”)
I get the steady green LED, but it doesn’t show up in router client list.

When I deleted “/etc/udev/rules.d/70-persistent-net.rules” according to johns98’s instruction in post #35,
wdmc appeared in router client list, but I couldn’t ssh into the wdmc address.(I got “port 22: Connection refused” message.)

My overall procedures are like these.

  1. make FAT32 (LBA) partition and EXT4 partion in the same usb stick.
  2. make /boot on the FAT32 partition and copy “john’s uRamdisk/uImage” into /boot
  3. extract “jessie-rootfs.tar.gz” in the root of EXT4 partition.
  4. remove /etc/udev/rules.d/70-persistent-net.rules from the EXT4 partition
  5. extract “Debian-kernel-bin_4.14.4_002.tar.xz” in the root of EXT4 partition.

It would be great if you give me any hint I can try.

PS : On the wdmc HDD, wd’s original firmware(recently published) is installed.


#78

Check /etc/network/interfaces and remove all ipv6 stuff (Last 3 lines)


#79

By commenting out the last 3 lines in "etc/network/interfaces’, I finally succeeded in SSH.
Thank you veeeery much.


#80

I finally succeeded in poweing up my wdmc from USB Flash drive.

After several attempts with different wdmc HDD connections,
I guess that the 2nd partition of wdmc HDD is critical for ‘USB-booted Debian’.

To put it in another way,

  1. HDD with partition structures of ‘original firmware’ or ‘Clean Debian’ to wdmc board. --> SSH Success (solid Green LED)
    ( /dev/sda2 is mounted as /home after booting)
  2. HDD with only 1 partition (usually to be used for Back-up Drive) --> SSH Fail. (solid Bule LED)

I guess that USB-debian looks for /dev/sda2.
If it is a reasonable guess, Is there any method to redirect ‘/home’ to ‘/dev/sda1’, or any alternative solutiion to fix the above #2 issue?

What I want to do is…

  1. Connect USB-hub to wdmc USB3.0 port.
  2. ‘Debian USB flash drive’ to one of ports in USB-hub.
  3. Connect a first 1-partition HDD (NTFS file system) to wdmc board. (to use as a Data drive)
  4. Connect a second 1-partition HDD (NTFS file system) to one of ports in USB-hud (to use as a Back-Up drive for Data Drive)

=================================
Solved by commenting out the following lines of /etc/fstab in USB.

#/dev/sda1 swap swap defaults 0 0
#/dev/sda2 /home ext4 defaults,noatime,nodiratime 0 0