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

Hi, Can you guide me how to install alpine linux on mycloud harddisk ?
When I run “setup-alpine” I get unsatisfiable contrains… EDIT: solved after adding repositories in the lisst

For our device better to use Armbian or modified Raspbian.

You have the alpine linux boot image already running.
I skip this step here.

Best is to test it with a 2nd partition on USB stick.

  • boot into alpine linux on usb stick

  • login as root

  • Use disk “none” during setup-alpine

  • setup-alpine # do it now, later is trouble

  • apk add e2fsprogs # install mkfs.ext4

  • mkfs.ext4 -L ALPINELINUX /dev/sdb2 # empty alpine partition

  • mount /dev/sdb2 /mnt/ # mount the partition for install

  • sed "s/acct linux-\$KERNEL_FLAVOR//" < /sbin/setup-disk > my-setup-disk

    we need no acct and linux-kernel, quick & dirty remove it

  • chmod +x my-setup-disk # make script executable

  • ./my-setup-disk /mnt/ # install alpine into mounted partition

    you can ignore the warnings about syslinux and extlinux

  • cp -a /dev/console /mnt/dev # devices need to boot

  • umount /mnt # we are ready

  • download my uRamdisk from GitHub - Johns-Q/wdmc-gen2: WD My Cloud Gen2 (Kernel / Distribution / Information) drop

  • mount -o remount,rw /media/usb/ # make DOS partition writeable

  • cp /media/usb/boot/uRamdisk /media/usb/boot/uRamdisk.alpine # backup ramdisk

  • cp uRamdisk /media/usb/boot

  • reboot

  • login as root

  • have fun

To install on the hard drive, prepare it like you want.
Important is that the 3rd partition is the boot/root partition.
The 3rd paritition type must be “Linux” and ext4 and it must
contain /boot/uRamdisk and /boot/uImage.

You can install alpine into it just use “/dev/sda3”.

Johns

1 Like

Thanks for all your basic work. It helped a lot.

Use what ever you want. None of these distributions have special support for our device, thay have no advantage for our device.

Johns

Thank for the guide, I was able to successfully install alpine on mycloud. I did installed and configure rysnc daemon, transmission-daemon, vim and minidlna.
Only issue now is minidlna server is not detected by my panasonic TV, (it is running as I can detect from my computer on it’s web gui). EDIT: probably issue with recent version of minidlna, will try downgrading later today. solved by downgrading to minidlna 1.1.5. Issue with minidlna was related with multicast traffic. I had to set “inotify_interval=10”, to work. It appears that alpine linux has some problem with multicast.

This sounds like a kernel problem. I’n not fit with minidlna, but you mean
“notify_interval” without “i”.

It could be a problem with the new kernel or a problem with the alpine libs.
Firewall should be none running. Try old “original” kernel with alpine or try new kernel with debian and minidlna same version.

Johns

Is this the noitify_interval in the minidlna.conf file?

Yes, notify_interval in minidlna.conf file.[quote=“johns98, post:46, topic:211143”]
Try old “original” kernel with alpine or try new kernel with debian and minidlna same version.
[/quote]

Will try old kernel with alpine and report here.

My minidlna.conf has the value set to 900. What value was it when if was failing?

Minidlna starts with any value at notify_interval (default is 895). But if value is higher dlna clients fails to connect with minidlna. The value basically is time interval at which minidlna announces itself to the network. If I set value at 895 clients only see minidlna at the interval of 895 seconds and then connection is lost.

Thats strange. I’ve been using minidlna for about 10 years now on my DNS-323 NAS. It has been set to 900 all that time. I’ve never lost the connection between the DNS-323 and my streaming device.

What you are having is normal minidlna. When dlna client needs it sends something called multicast request which will reach minidlna. So normally minidlna doesn’t need to announce itself every few seconds. In my case there is some problem with this multicast traffic which may be related to the kernel as suggested by johns98 or it may be due to alpine linux. I had no issues running minidlna with old v3 kernel in debian-jessie.

It is kernel issue indeed. I booted alpine with old v3.10 kernel and minidlna was working fine with default notify_interval=895.

Than it is a problem with the 4.12 kernel. I will look if it is any kernel config problem.

The speed iperf+linux-4.12 looks good

[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  1.07 GBytes   921 Mbits/sec  977             sender
[  4]   0.00-10.00  sec  1.07 GBytes   920 Mbits/sec                  receiver

I have run some speed test with iperf3

Linux wdmycloud 3.10.39 #2 SMP Wed Jul 20 18:50:01 YEKT 2016 armv7l Linux
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-120.00 sec  13.0 GBytes   930 Mbits/sec  810             sender
[  4]   0.00-120.00 sec  13.0 GBytes   930 Mbits/sec                  receiver

Linux wdmycloud 3.10.70+ #5 SMP Wed Jun 7 23:38:41 +05 2017 armv7l Linux
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-120.00 sec  13.0 GBytes   930 Mbits/sec  765             sender
[  4]   0.00-120.00 sec  13.0 GBytes   930 Mbits/sec                  receiver

Linux wdmycloud 4.12.0 #2 SMP Sun Jul 9 14:41:45 CEST 2017 armv7l Linux
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-120.00 sec  13.1 GBytes   937 Mbits/sec    0             sender
[  4]   0.00-120.00 sec  13.1 GBytes   937 Mbits/sec                  receiver

Old kernel seems to have some problems with retries and s little worser performance.

Johns

1 Like

Have you seen anything like this? I booted the system and it started looping on the following mount messages. After about a minute of so it stops and finishes the boot sequence. Not sure what it is trying to mount?

Adding 2097056k swap on /dev/md0. Priority:-1 extents:1 across:2097056k
mdadm: ‘1’ is an unusual number of drives for an array, so it is probably
a mistake. If you really mean it you will need to specify --force before
setting the number of drives.
EXT4-fs (sda4): mounted filesystem with ordered data mode. Opts: (null)
Usage: mount -V : print version
mount -h : print this help
mount : list mounted filesystems
mount -l : idem, including volume labels
So far the informational part. Next the mounting.
The command is `mount [-t fstype] something somewhere’.
Details found in /etc/fstab may be omitted.
mount -a [-t|-O] … : mount all stuff from /etc/fstab
mount device : mount device at the known place
mount directory : mount known device here
mount -t type dev dir : ordinary mount command
Note that one does not really mount a device, one mounts
a filesystem (of the given type) found on the device.
One can also mount an already visible directory tree elsewhere:
mount --bind olddir newdir
or move a subtree:
mount --move olddir newdir
One can change the type of mount containing the directory dir:
mount --make-shared dir
mount --make-slave dir
mount --make-private dir
mount --make-unbindable dir
One can change the type of all the mounts in a mount subtree
containing the directory dir:
mount --make-rshared dir
mount --make-rslave dir
mount --make-rprivate dir
mount --make-runbindable dir
A device can be given by name, say /dev/hda1 or /dev/cdrom,
or by label, using -L label or by uuid, using -U uuid .
Other options: [-nfFrsvw] [-o options] [-p passwdfd].
For many more details, say man 8 mount .
Usage: mount -V : print version
mount -h : print this help
mount : list mounted filesystems
mount -l : idem, including volume labels
So far the informational part. Next the mounting.

Have you checked your /etc/fstab ? Is there something abnormal there ?

Not sure. I was testing a new uImage. I got that message. So I put the official uImage back and got the same error. Strange things seem to happen while testing new kernel. I was able to boot the 4.12 uImage and uRamdisk
previously. Then the last time I tried to use it it said that the uRamdisk CRC was bad. Will have to check the sums to see if it did change. What I’ve done was put several uImages and uRamdisks on a USB with there version appended. When I need to use one I copy the two files as uImage and uRamdisk. Reboot to test the files. I think I’m going to go back and start testing using the official uImage and uRamdisk from USB and continue from there.

I tested minidlna with 4.11.8 and it has the same issue as 4.12, if that helps.

I compiled 4.12.2 mainline kernel. It is working well, but problem with minidlna is still present. I used dts file for marvell_armada_375 present in kernel source along with config file from john98’s github page. Link to the kernel image below

I don’t see any option which can break minidlna.

You should use my dts (in git), supports:

  • we have only 512MB RAM.
  • NAND (Flash) working, needed to read ethernet MAC.
  • LED’s
  • reset button
  • different ethernet phy

Johns