Welcome! Log In Create A New Profile

Advanced

WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)

Posted by JanN 
MM
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
December 17, 2016 11:37AM
Hi Carl,

the forum mangled the patch, get it from my server: patch

bye
Martin
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
December 17, 2016 11:42AM
Great work ! I'll test this soon and deleat the reboot / powerdown from the mcm-daemon

Just a remarks on naming: I'm wondering if ex2u is the right name for "this" device. As the mcm2 and ex2u is basicly the same device so i thought wd-385 might be better. But I'm open with naming, but think consist naming is a good idea.

-------------------------------------------------------------------------
GitHub https://github.com/cschil
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
December 17, 2016 12:38PM
Again, great work!

Reboot & Poweroff is working :-), but halt did not turn off the fan :-/

-------------------------------------------------------------------------
GitHub https://github.com/cschil
MM
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
December 17, 2016 01:07PM
Hi Carl,

yes, there is no handler for halt implemented. It doesn't turn of the power or anything. But I guess that's how it's supposed to be. The fan can't get turned of on halt as the cpu and the disks would be left running anyways.

So to get rid of halt, you can make it an alias for powerdown.

bye
Martin
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
December 17, 2016 04:00PM
I change the mcm-daemon in my github:
- removed shutdown
- tweaked the fan a bit

So the mcm-daemon works with the your patched kernel.


Quote

The fan can't get turned of on halt as the cpu and the disks would be left running anyways.
hm,.. but disk's and cpu should be powered down on "halt", and my old nas rn102 did so, but I can live with this :-)

-------------------------------------------------------------------------
GitHub https://github.com/cschil
MM
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
December 18, 2016 09:23AM
Hi Carl,

thank you, I recompiled the mcm-daemon from your repository and it works for me too.

Have you made any progress on the init-stuff (raid, crypto, ssh)?

bye
Martin
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
December 18, 2016 09:35AM
MM Wrote:
-------------------------------------------------------

> Have you made any progress on the init-stuff
> (raid, crypto, ssh)?

I updated my github, but git and empty folders are not the best friends :-|, but the uInitrd is also uploaded

+ raid works(mdadm + btrfs).
+ If it can't boot it drops to a ssh shell.

crypto I'm working on.

Futher problems: ssh/scp is some how not working; no ssl support form busybox

-------------------------------------------------------------------------
GitHub https://github.com/cschil
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
December 19, 2016 01:49PM
So small update on initrd:
+scp now working
+crypto / LUKS working and has to be unlocked by key via dropbear
+LVM ( but not tested)

TODO:
- dropbear has wrong PATH

-------------------------------------------------------------------------
GitHub https://github.com/cschil



Edited 2 time(s). Last edit at 12/19/2016 02:45PM by Peacemaker.
MM
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
December 20, 2016 10:15AM
Hi Carl,

thanks, I'm testing it at the moment.
cryptsetup is working and so is lvm.

What is missing is mke2fs in the "real" version, which can also make ext4-filesystems. Also is there a mechanism to search for crypto keyfiles? Maybe to put a keyfile onto the flash, where the mac-address file is would be an idea.

ssh login also worked for me. Putting an ssh authorized_keys file in the ubi partition and disable the password-free root login might also be nice.

What do you think?

bye
Martin
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
December 20, 2016 11:40AM
MM Wrote:
-------------------------------------------------------
> thanks, I'm testing it at the moment.
> cryptsetup is working and so is lvm.
god to hear :-)


> What is missing is mke2fs in the "real" version,
> which can also make ext4-filesystems.

OOps, I see its allready in (twice) as mkfs.ext3 / mkfs.ext4, but I'll change that.

> Also isthere a mechanism to search for crypto keyfiles?

No, but I can integrate one, but how is the "best"

> Maybe to put a keyfile onto the flash, where the
> mac-address file is would be an idea.

Sure this is possible, but in my opinion it provides only less security, as the key could be easy read out form the device.
Maybe a Self-Decrypting is then easy and provides the same kind of security.
A better way could be to store the key on a usbdrive as this can be physical removed.

> ssh login also worked for me.

Okay, I think i fixed the PATH problem as well :-)

> Putting an ssh
> authorized_keys file in the ubi partition and
> disable the password-free root login might also be
> nice.

Okay, what do you have in mind?

To enhance security,...hm, I don't see here a way in both.
You have at first bring the key on the nand, either its "public on the web" or if you generate it on first boot it could be read or copied by booting a initrd without password check :-/

So comments :-)

-------------------------------------------------------------------------
GitHub https://github.com/cschil



Edited 1 time(s). Last edit at 12/20/2016 01:40PM by Peacemaker.
MM
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
December 20, 2016 01:41PM
Hi Carl,

Peacemaker Wrote:
-------------------------------------------------------
> MM Wrote:
> --------------------------------------------------
> > What is missing is mke2fs in the "real" version,
> > which can also make ext4-filesystems.
>
> OOps, I see its allready in (twice) as mkfs.ext3 /
> mkfs.ext4, but I'll change that.

I didn't search for that name, but that's fine too.

> > Also isthere a mechanism to search for crypto keyfiles?
>
> No, but I can integrate one, but how is the "best"
>
> > Maybe to put a keyfile onto the flash, where the
> > mac-address file is would be an idea.
>
> Sure this is possible, but in my opinion it
> provides only less security, as the key could be
> easy read out form the device.

Well, that depends on why you encrypt your discs. I encrypt the discs on servers or at home mostly to be able to dump them without further thought when they are broken or too small.

> A better way could be to store the key on a
> usbdrive as this can be physical removed.

Yes, this is also a good idea. Maybe just search in some locations for a key and use it, when it is found.
That way the user could decide how he want's to use it.

I suggest the following steps:
  1. check nand for a file named "crypttab" and use it
  2. use findfs to look for a filesystem named "rootfsinfo" and use that

> > ssh login also worked for me.
>
> Okay, what about the PATH? Is this correct, so do
> you get cryptsetup or do you need to enter
> /sbin/cryptsetup?

The PATH in ssh is missing /sbin and maybe /usr/sbin.

Also waiting for /dev/mapper/cryptroot is not optimal when running with lvm. If I open the luks device with "cryptsetup -T 5 luksOpen /dev/md0 cryptroot", the kernel panics as the init script finds the device, but lvm is not yet up. To get it working with lvm I have to do the following steps via ssh:

~ # /sbin/cryptsetup luksOpen /dev/md0 lvm
Enter passphrase for /dev/md0:
~ # /sbin/lvm vgscan --mknodes
  Reading all physical volumes.  This may take a while...
  Found volume group "eboc" using metadata type lvm2
~ # /sbin/lvm vgchange -a y
  3 logical volume(s) in volume group "eboc" now active
~ # touch /dev/mapper/cryptroot

Nevertheless, stupid systemd fails to boot the system. I have 3 logical volumes in the volume group:
  • 30GB rootfs labeled "rootfs"
  • 2GB swap labeled "swap"
  • 200GB storage to be mounted on /srv labeled "storage"
[DEPEND] Dependency failed for /srv.
[DEPEND] Dependency failed for Local File Systems.
[DEPEND] Dependency failed for File System Check on /dev/disk/by-label/storage.
[ TIME ] Timed out waiting for device dev-disk-by\x2dlabel-swap.device.
[DEPEND] Dependency failed for /dev/disk/by-label/swap.
[DEPEND] Dependency failed for Swap.
... blahblah ...
Welcome to emergGive root password for maintenance
(or type Control-D to continue):

This is my fstab:
root@eboc:~# cat /etc/fstab 
LABEL="rootfs"  /       ext4    relatime,errors=remount-ro      0 1
LABEL="storage" /srv    ext4    relatime,errors=remount-ro      0 2
LABEL="swap"    none    swap    sw                              0 0

blkid finds everything:
root@eboc:~# blkid 
/dev/ubi0_0: UUID="68f22f98-594c-44a3-ae5c-8324295779fc" TYPE="ubifs"
/dev/sda1: UUID="c1a07711-80fd-0e28-3079-e32d031bbb9f" UUID_SUB="cddb0e69-1d84-cfe4-110d-6c4af3f83b25" LABEL="eboc:0" TYPE="linux_raid_member"
/dev/sdb1: UUID="c1a07711-80fd-0e28-3079-e32d031bbb9f" UUID_SUB="69789dfe-c480-0e9a-32a8-bf1e9acbaa70" LABEL="eboc:0" TYPE="linux_raid_member"
/dev/md0: UUID="b3e443de-165b-4040-bafe-4e539725ee2b" TYPE="crypto_LUKS"
/dev/mapper/lvm: UUID="nB8bum-vvI7-bbFq-p2Ch-OzEe-bnIP-hqyhjJ" TYPE="LVM2_member"
/dev/dm-1: LABEL="rootfs" UUID="31a21eb3-9817-4a7a-90d0-94987929047d" TYPE="ext4"
/dev/dm-2: LABEL="swap" UUID="303d1dc4-8311-4d2f-839a-c7ea52a7e49a" TYPE="swap"
/dev/dm-3: LABEL="storage" UUID="8bbe4ba1-16b4-48de-b301-397953e8559b" TYPE="ext4"

adding the missing parts manually:
root@eboc:~# mount -a
[  531.283131] EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: errors=remount-ro
root@eboc:~# swapon -a
[  538.511066] Adding 2097148k swap on /dev/dm-2.  Priority:-1 extents:1 across:2097148k

Now everything is mounted, but stupid systemd still doesn't want to continue to boot:
[    **] (3 of 3) A start job is running for dev-disk-by\x2dl...49s / 1min 30s)

It waits for another 90s and then it spills out:
[ TIME ] Timed out waiting for device dev-disk-by\x2dlabel-storage.device.
[DEPEND] Dependency failed for File System Check on /dev/disk/by-label/storage.
[ TIME ] Timed out waiting for device dev-disk-by\x2dlabel-swap.device.
[DEPEND] Dependency failed for /dev/disk/by-label/swap.
[DEPEND] Dependency failed for Swap.
[*     ] A start job is running for LSB: Raise network interf...11s / no limit)

Which will probably never finish, since the network interface is up since ages and I can ping the NAS fine from my desktop.

The last part with the network interface happens only sometimes, but the filesystems are never found.

> > Putting an ssh
> > authorized_keys file in the ubi partition and
> > disable the password-free root login might also be
> > nice.
>
> Okay, what do you have in mind?
>
> To enhance security,...hm, I don't see here a way in both.
> You have at first bring the key on the nand,
> either its "public on the web" or if you generate
> it on first boot it could be read or copied by
> booting a initrd without password check :-/

Well, I'd keep it simple. Maybe just check if there is a authorized_keys file in
/mnt/config and if it's there and readable, then start dropbear with it and disable
password authentication and password-less login. If it's not there, then just keep
the behaviour we have now.

Anyways, thanks a lot for the big progress with the Ramdisk.

bye
Martin
MM
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
December 20, 2016 02:22PM
Hi Carl,

me again.

Actually after thinking about it, the best idea might be to check for a directory named "dropbear" in the NAND under /mnt/config and use that as config directory. That way one could also copy the ssh-host keys there ti have the same fingerprint as the booted debian system.

Well, just a thought.

bye
Martin
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
December 20, 2016 03:20PM
hey Martin,
I add crypt-lvm support, so it should boot now your system, and as written above ssh PATH is now right.

For writing things in "config" and provide "key" options might be good idea. I'll think about it.
The most beautiful way, would be a small webserver for key insert and configuration, but this is to much effort for this project.
So your right, keep it simple :-)


For your Debian / systemd problem I don't know whats going on there.

-------------------------------------------------------------------------
GitHub https://github.com/cschil



Edited 1 time(s). Last edit at 12/20/2016 03:45PM by Peacemaker.
mm
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
December 20, 2016 03:42PM
Hi Carl,

thanks, but it doesn't work yet:

  Reading all physical volumes.  This may take a while...
  Found volume group "eboc" using metadata type lvm2
  Volume group "VG" not found
  Skipping volume group VG
  Reading all physical volumes.  This may take a while...
  Found volume group "eboc" using metadata type lvm2
findfs: unable to resolve 'LABEL=rootfs'
mount: can't read '/etc/fstab': No such file or directory

 Unmounting and Switch to OS
cat: can't open '/run/udhcpc.pid': No such file or directory
ash: you need to specify whom to kill
[  262.230425] UBIFS (ubi0:0): un-mount UBI device 0
[  262.235172] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" stops
umount: can't unmount /dev: Device or resource busy
BusyBox v1.25.1 (2016-11-06 19:18:40 UTC) multi-call binary.

Usage: switch_root [-c /dev/console] NEW_ROOT NEW_INIT [ARGS]

Free initramfs and switch to another root fs:
chroot to NEW_ROOT, delete all in /, move NEW_ROOT to /,
execute NEW_INIT. PID must be 1. NEW_ROOT must be a mountpoint.

        -c DEV  Reopen stdio to DEV after switch
[  262.428332] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
[  262.428332]

I guess the reason is:
lvm lvchange -a ly VG/root

Why don't you just use "lvm lvchange -a ly"?
That way one could use any vgname/lvname.

bye
Martin
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
December 20, 2016 03:52PM
As I'm not using (and never realy had used) LVM, I'm not realy into the problems there.
I'll look into it tomorrow or you can just make a commit :-)

Cheers Carl

-------------------------------------------------------------------------
GitHub https://github.com/cschil
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
January 01, 2017 01:25PM
So I changed over the holidays a few things in the initrd:
check my github

Dropbear:
+ changed port to 2222
+ readded fingerprint
+ pubkey unlock possible: stored on nand

Crypto:
add key unlock from nand / usb:
+nand /dev/mtd5: /initrd/key.luks
+usb LABEL=key: /key.luks

Initrd
+ changing and save/store root-password on nand
+ resuming boot-script (buggy /switch_root not working)

What I like to integrate is a bootinterrupt by pressing the resetkey, but I don't know the mmp for the reset gpiopin :-/

Fancontrol is not my friend for now to fast or to slow.
So i think more steps would be better.
fox-exe (the russian guy) has a "fan-gpio-script" but I don't get it to work. there is as well a python-scrpit, but I don't like python for the extra libs.

@MM As you are a better "coder" than I am, have you maybe looked at qcontrol for qnap-nas; thougt this cloud be a good base for a "control" script.

-------------------------------------------------------------------------
GitHub https://github.com/cschil
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
January 08, 2017 03:44PM
Updated the initrd in my github:
I add resetbutton support: with pressing resetbutton you can enter rescue-shell now without uart.

Somehow shutdown is not working any more; the device is rebooting every time :-/ and have no idea why.

To keep it simple I reworked the fancontrol script from Lorenzo Martignoni with more fan-states.
I will upload the sources and an patched rootfs when its tested.

-------------------------------------------------------------------------
GitHub https://github.com/cschil
MM
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
January 10, 2017 05:11AM
Hi Carl,

I'm back from holidays. Thanks for your improvements. They work for me with minor changes.
Here some remarks:

- you check for /sbin/init as a symlink which didn't work for me as /sbin/init is an executable
- when the passphrase in /mnt/config/initrd/luks.key is wrong (trailing newline) no shell is started to fix it
- the console is lost after the first init and no further boot messages are shown

For me shutdown still works, so I guess it's an kernel issue. I have seen the instant reboots in case of powerdown when I was playing with wakeonlan. It seems the micro controller sometimes wakes the device on ethernet activity. Try to powerdown the device with the ethernet unplugged and let me know if it still reboots.

I guess I will have a shot an implementing a PID-controller for the fan in the mcm-daemon, but this will take a bit of time.

I also found some basic info on how to read the fan speed from the MCU but don't have the speed table yet to convert the reading into the correct rpm value.

bye
Martin
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
January 10, 2017 01:48PM
MM Wrote:
-------------------------------------------------------
> - you check for /sbin/init as a symlink which
> didn't work for me as /sbin/init is an executable
> - when the passphrase in
> /mnt/config/initrd/luks.key is wrong (trailing
> newline) no shell is started to fix it

Thanks for your reply, I'll fix this

> - the console is lost after the first init and no
> further boot messages are shown

Sry, I do not get what you mean?

> For me shutdown still works, so I guess it's an
> kernel issue. I have seen the instant reboots in
> case of powerdown when I was playing with
> wakeonlan. It seems the micro controller sometimes
> wakes the device on ethernet activity. Try to
> powerdown the device with the ethernet unplugged
> and let me know if it still reboots.

yep, was my idea as well, as I played with Wol.

> I guess I will have a shot an implementing a
> PID-controller for the fan in the mcm-daemon, but
> this will take a bit of time.

Sry, but I really don't like the mcm-daemon as it is.
("iniparser" and config over telnet")

So I switched to python:
(I know C(++) might be better for all lib in the file but my C skills are limited :-/)
I uploaded (the unready, but) good working fancontrol to github.
No idea what a PID-controller is, but the "new" controlscript is working with much lower temp and lower noise / fan speeds.
> I also found some basic info on how to read the
> fan speed from the MCU but don't have the speed
> table yet to convert the reading into the correct
> rpm value.
Found that out as well and planed to integrate this.

Besides Wol and RCT-wake, I'd really like to see the powerled integrated in a kernel module to use led-triggers on this.

-------------------------------------------------------------------------
GitHub https://github.com/cschil
MM
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
January 10, 2017 02:16PM
Hi Carl,

Peacemaker Wrote:
-------------------------------------------------------
> MM Wrote:
> --------------------------------------------------
>
> > - the console is lost after the first init and no
> > further boot messages are shown
>
> Sry, I do not get what you mean?

After switching to the "real" init on the rootfs, no output from the boot scripts
is sent. I see only kernel messages and after a while the serial login prompt.

> Besides Wol and RCT-wake, I'd really like to see
> the powerled integrated in a kernel module to use
> led-triggers on this.

Well, I won't implement this since it's awful. Either everything the mcm-daemon/control script
does must be implemented in kernel, or one would have to somehow decide how to control
access to the MCU as two parties would be accessing it. I think the shutdown/reboot thing is
a good compromise as userspace should be dead by the time I access the MCU from the kernel.
Even if userspace would not be dead, it is dead after the kernel issues the shutdown/reboot commands.

That's why I don't consider the the mcm-daemon too bad. It has a socket interface (telnet) and can be
easily by shell scripts and from udev. So you can use the power LED that way. Maybe changing the
network socket to a UNIX domain socket would be a good idea.

bye
Martin
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
January 10, 2017 03:56PM
MM Wrote:

> After switching to the "real" init on the rootfs,
> no output from the boot scripts
> is sent. I see only kernel messages and after a
> while the serial login prompt.

I'm not missing anything, and will post a bootlog later.


> Well, I won't implement this since it's awful.
> Either everything the mcm-daemon/control script
> does must be implemented in kernel, or one would
> have to somehow decide how to control
> access to the MCU as two parties would be
> accessing it. I think the shutdown/reboot thing is
>
> a good compromise as userspace should be dead by
> the time I access the MCU from the kernel.
> Even if userspace would not be dead, it is dead
> after the kernel issues the shutdown/reboot
> commands.

I somehow forgot this. I just like how simple led's are controled through a virtual /sys/class/ device.

> That's why I don't consider the the mcm-daemon too
> bad. It has a socket interface (telnet) and can be
> easily by shell scripts and from udev. So you can
> use the power LED that way. Maybe changing the
> network socket to a UNIX domain socket would be a
> good idea.

I'm totally with you it is not too bad. But besides the "network socket" the iniparser is a downside of it me a problem as well, because the iniparser is not in the repo's of the big dists debian/ubuntu/arch. And this makes installation more difficult.
So I'm more into writing things total new, as for now only fan-control and powerled is really used and working.
Thats why I thought the qcontrol script should be a good base for rewriting

But I still like the idea of providing virtual devices by the kernel, so "standard" userspace programs could be used to control everything. ( I see this is the most work)
e.g.: fan by fan-control; led by kernel trigger, rtcwake would work

-------------------------------------------------------------------------
GitHub https://github.com/cschil



Edited 1 time(s). Last edit at 01/10/2017 04:02PM by Peacemaker.
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
January 11, 2017 12:09AM
This might be of interest to you guys with this box. This stock u-boot might be the same one as the NAS326 and will mess up the DTB when booting with separate DTB.

http://forum.doozan.com/read.php?2,27108,31935,page=5#msg-31935

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
January 11, 2017 01:23PM
@bodhi

Thanks, but the stock uboot of the WD-Devices are locked as no saveenv command is integrated, so we have to stay at stock env's :-/

@MM,
Updated the Initrd, and fixed this:
- you check for /sbin/init as a symlink which didn't work for me as /sbin/init is an executable
- when the passphrase in /mnt/config/initrd/luks.key is wrong (trailing newline) no shell is started to fix it

What are you missing else, my bootlog is looking good?
## Booting image at 00a00000 ...
## Booting kernel from Legacy Image at 00a00000 ...
   Image Name:   Linux-4.8.11
   Created:      2016-12-30  20:38:50 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3199148 Bytes = 3.1 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 00f00000 ...
   Image Name:   Initrd
   Created:      2017-01-11  19:01:19 UTC
   Image Type:   ARM Linux RAMDisk Image (lzma compressed)
   Data Size:    3344658 Bytes = 3.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.8.11 (peacemaker@debianvm) (gcc version 6.2.1 20161124 (Debian 6.2.1-5) ) #10 SMP Fri Dec 30 21:38:13 CET 2016
[    0.000000] CPU: ARMv7 Processor [414fc091] revision 1 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt:Machine model: Western Digital MyCloud EX2 Ultra
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 13 pages/cpu @ef7ce000 s22860 r8192 d22196 u53248
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260608
[    0.000000] Kernel command line: root=/dev/ram console=ttyS0,115200
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 1025388K/1048576K available (7168K kernel code, 247K rwdata, 1484K rodata, 1024K init, 225K bss, 23188K reserved, 0K cma-reserved, 262144K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0800000   (8160 kB)
[    0.000000]       .init : 0xc0a00000 - 0xc0b00000   (1024 kB)
[    0.000000]       .data : 0xc0b00000 - 0xc0b3df00   ( 248 kB)
[    0.000000]        .bss : 0xc0b3df00 - 0xc0b76658   ( 226 kB)
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] mvebu_mbus: [Firmware Warn]: deprecated mbus-mvebu Device Tree, suspend/resume will not work
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 D prefetch enabled, offset 1 lines
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 Coherent cache controller enabled, 16 ways, 1024 kB
[    0.000000] L2C-310 Coherent: CACHE_ID 0x410054c9, AUX_CTRL 0x56070001
[    0.000000] Switching to timer-based delay loop, resolution 40ns
[    0.000003] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns
[    0.000011] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.000262] Console: colour dummy device 80x30
[    0.000276] Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=250000)
[    0.000283] pid_max: default: 32768 minimum: 301
[    0.000349] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000355] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000681] CPU: Testing write buffer coherency: ok
[    0.000795] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.000810] Setting up static identity map for 0x100000 - 0x100058
[    0.000996] mvebu-soc-id: MVEBU SoC ID=0x6820, Rev=0x4
[    0.001082] mvebu-pmsu: Initializing Power Management Service Unit
[    0.001673] Booting CPU 1
[    0.001848] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.001890] Brought up 2 CPUs
[    0.001897] SMP: Total of 2 processors activated (100.00 BogoMIPS).
[    0.001901] CPU: All CPU(s) started in SVC mode.
[    0.002348] devtmpfs: initialized
[    0.004303] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.004407] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.004436] xor: measuring software checksum speed
[    0.099802]    arm4regs  :  2097.200 MB/sec
[    0.199703]    8regs     :  1585.200 MB/sec
[    0.299601]    32regs    :  1676.800 MB/sec
[    0.399501]    neon      :  1550.400 MB/sec
[    0.399505] xor: using function: arm4regs (2097.200 MB/sec)
[    0.399511] pinctrl core: initialized pinctrl subsystem
[    0.399930] NET: Registered protocol family 16
[    0.400511] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.421442] cpuidle: using governor ladder
[    0.421486] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.421491] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.629381] raid6: int32x1  gen()   205 MB/s
[    0.799196] raid6: int32x1  xor()   215 MB/s
[    0.969177] raid6: int32x2  gen()   233 MB/s
[    1.138848] raid6: int32x2  xor()   239 MB/s
[    1.308814] raid6: int32x4  gen()   236 MB/s
[    1.478480] raid6: int32x4  xor()   180 MB/s
[    1.648308] raid6: int32x8  gen()   222 MB/s
[    1.818230] raid6: int32x8  xor()   170 MB/s
[    1.987973] raid6: neonx1   gen()  1010 MB/s
[    2.157781] raid6: neonx1   xor()   758 MB/s
[    2.327632] raid6: neonx2   gen()  1085 MB/s
[    2.497416] raid6: neonx2   xor()   962 MB/s
[    2.667247] raid6: neonx4   gen()   964 MB/s
[    2.837090] raid6: neonx4   xor()   822 MB/s
[    3.006967] raid6: neonx8   gen()   440 MB/s
[    3.176772] raid6: neonx8   xor()   403 MB/s
[    3.176777] raid6: using algorithm neonx2 gen() 1085 MB/s
[    3.176780] raid6: .... xor() 962 MB/s, rmw enabled
[    3.176784] raid6: using intx1 recovery algorithm
[    3.177034] vgaarb: loaded
[    3.177195] SCSI subsystem initialized
[    3.177414] usbcore: registered new interface driver usbfs
[    3.177449] usbcore: registered new interface driver hub
[    3.177480] usbcore: registered new device driver usb
[    3.178124] clocksource: Switched to clocksource armada_370_xp_clocksource
[    3.178198] VFS: Disk quotas dquot_6.6.0
[    3.178234] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    3.182837] NET: Registered protocol family 2
[    3.183169] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    3.183232] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    3.183305] TCP: Hash tables configured (established 8192 bind 8192)
[    3.183345] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    3.183369] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    3.183454] NET: Registered protocol family 1
[    3.183628] RPC: Registered named UNIX socket transport module.
[    3.183634] RPC: Registered udp transport module.
[    3.183637] RPC: Registered tcp transport module.
[    3.183641] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    3.183754] Trying to unpack rootfs image as initramfs...
[    4.203218] Freeing initrd memory: 3268K (c0f00000 - c1231000)
[    4.203360] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    4.204005] futex hash table entries: 512 (order: 3, 32768 bytes)
[    4.204679] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[    4.204856] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    4.205727] NET: Registered protocol family 38
[    4.205738] async_tx: api initialized (async)
[    4.205766] bounce: pool size: 64 pages
[    4.205803] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    4.205809] io scheduler noop registered
[    4.205813] io scheduler deadline registered
[    4.205822] io scheduler cfq registered (default)
[    4.206484] armada-38x-pinctrl f1018000.pinctrl: registered pinctrl driver
[    4.207387] mvebu-pcie soc:pcie-controller: PCI host bridge to bus 0000:00
[    4.207396] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    4.207402] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[    4.207408] pci_bus 0000:00: root bus resource [bus 00-ff]
[    4.207673] PCI: bus0: Fast back to back transfers disabled
[    4.207681] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    4.207689] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    4.207753] PCI: bus1: Fast back to back transfers enabled
[    4.207830] PCI: bus2: Fast back to back transfers enabled
[    4.207853] pci 0000:00:01.0: PCI bridge to [bus 01]
[    4.207863] pci 0000:00:02.0: PCI bridge to [bus 02]
[    4.207976] mv_xor f1060800.xor: Marvell shared XOR driver
[    4.278520] mv_xor f1060800.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    4.279381] mv_xor f1060900.xor: Marvell shared XOR driver
[    4.348501] mv_xor f1060900.xor: Marvell XOR (Descriptor Mode): ( xor cpy intr )
[    4.378103] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    4.379151] console [ttyS0] disabled
[    4.399225] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 23, base_baud = 12500000) is a 16550A
[    5.200831] console [ttyS0] enabled
[    5.224869] f1012100.serial: ttyS1 at MMIO 0xf1012100 (irq = 24, base_baud = 12500000) is a 16550A
[    5.239027] brd: module loaded
[    5.244849] loop: module loaded
[    5.248384] ahci-mvebu f10a8000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl platform mode
[    5.257473] ahci-mvebu f10a8000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs
[    5.266916] scsi host0: ahci-mvebu
[    5.270572] scsi host1: ahci-mvebu
[    5.274128] ata1: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x100 irq 42
[    5.282092] ata2: SATA max UDMA/133 mmio [mem 0xf10a8000-0xf10a9fff] port 0x180 irq 42
[    5.290513] pxa3xx-nand f10d0000.flash: This platform can't do DMA on this device
[    5.298364] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xda
[    5.304744] nand: Hynix H27U2G8F2CTR-BC
[    5.308606] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    5.316211] pxa3xx-nand f10d0000.flash: ECC strength 16, ECC step size 2048
[    5.323396] Bad block table found at page 131008, version 0x01
[    5.329590] Bad block table found at page 130944, version 0x01
[    5.335654] 8 ofpart partitions found on MTD device pxa3xx_nand-0
[    5.341782] Creating 8 MTD partitions on "pxa3xx_nand-0":
[    5.347205] 0x000000000000-0x000000500000 : "U-Boot"
[    5.352740] 0x000000500000-0x000000a00000 : "uImage"
[    5.358213] 0x000000a00000-0x000000f00000 : "uRamdisk"
[    5.363852] 0x000000f00000-0x00000c800000 : "image.cfs"
[    5.370086] 0x00000c800000-0x00000d700000 : "rescue fw"
[    5.375852] 0x00000d700000-0x00000eb00000 : "config"
[    5.381386] 0x00000eb00000-0x00000f500000 : "reserve1"
[    5.387056] 0x00000f500000-0x00000ff00000 : "reserve2"
[    5.393082] libphy: Fixed MDIO Bus: probed
[    5.397373] libphy: orion_mdio_bus: probed
[    5.403471] mvneta f1034000.ethernet eth0: Using hardware mac address 00:50:43:00:00:1f
[    5.411622] usbcore: registered new interface driver rtl8150
[    5.417339] usbcore: registered new interface driver r8152
[    5.422890] usbcore: registered new interface driver ipheth
[    5.428499] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    5.435052] ehci-pci: EHCI PCI platform driver
[    5.439555] ehci-orion: EHCI orion driver
[    5.443874] xhci-hcd f10f0000.usb3: xHCI Host Controller
[    5.449237] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 1
[    5.456823] xhci-hcd f10f0000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010
[    5.465422] xhci-hcd f10f0000.usb3: irq 45, io mem 0xf10f0000
[    5.471629] hub 1-0:1.0: USB hub found
[    5.475413] hub 1-0:1.0: 1 port detected
[    5.479545] xhci-hcd f10f0000.usb3: xHCI Host Controller
[    5.484887] xhci-hcd f10f0000.usb3: new USB bus registered, assigned bus number 2
[    5.492505] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    5.501017] hub 2-0:1.0: USB hub found
[    5.504798] hub 2-0:1.0: 1 port detected
[    5.509005] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    5.514350] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 3
[    5.521940] xhci-hcd f10f8000.usb3: hcc params 0x0a000990 hci version 0x100 quirks 0x00010010
[    5.530534] xhci-hcd f10f8000.usb3: irq 46, io mem 0xf10f8000
[    5.536673] hub 3-0:1.0: USB hub found
[    5.540469] hub 3-0:1.0: 1 port detected
[    5.544580] xhci-hcd f10f8000.usb3: xHCI Host Controller
[    5.549933] xhci-hcd f10f8000.usb3: new USB bus registered, assigned bus number 4
[    5.557495] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    5.565988] hub 4-0:1.0: USB hub found
[    5.569778] hub 4-0:1.0: 1 port detected
[    5.574013] usbcore: registered new interface driver usb-storage
[    5.580214] mousedev: PS/2 mouse device common for all mice
[    5.586177] armada38x-rtc f10a3800.rtc: rtc core: registered f10a3800.rtc as rtc0
[    5.593870] i2c /dev entries driver
[    5.598111] wt_power_off f1012100.poweroff: installing pm_power_off handler
[    5.605144] wt_power_off f1012100.poweroff: replacing arm_pm_restart (mvebu_restart)
[    5.620314] ata1: SATA link down (SStatus 0 SControl 300)
[    5.623624] orion_wdt: Initial timeout 171 sec
[    5.623706] md: linear personality registered for level -1
[    5.623708] md: raid0 personality registered for level 0
[    5.623710] md: raid1 personality registered for level 1
[    5.623711] md: raid10 personality registered for level 10
[    5.623891] md: raid6 personality registered for level 6
[    5.623893] md: raid5 personality registered for level 5
[    5.623895] md: raid4 personality registered for level 4
[    5.625831] device-mapper: ioctl: 4.35.0-ioctl (2016-06-23) initialised: dm-devel@redhat.com
[    5.630218] device-mapper: raid: Loading target version 1.9.1
[    5.682198] ledtrig-cpu: registered to indicate activity on CPUs
[    5.688975] marvell-cesa f1090000.crypto: CESA device successfully registered
[    5.696326] usbcore: registered new interface driver usbhid
[    5.701963] usbhid: USB HID core driver
[    5.705992] Netfilter messages via NETLINK v0.30.
[    5.710730] nfnl_acct: registering with nfnetlink.
[    5.715621] nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
[    5.721969] NET: Registered protocol family 10
[    5.726902] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    5.733235] NET: Registered protocol family 17
[    5.737711] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    5.750393] Bridge firewalling registered
[    5.754460] ThumbEE CPU extension supported.
[    5.758758] Registering SWP/SWPB emulation handler
[    5.764425] Btrfs loaded, crc32c=crc32c-generic, assert=on
[    5.770237] armada38x-rtc f10a3800.rtc: setting system clock to 2017-01-11 19:20:44 UTC (1484162444)
[    5.858138] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    5.886682] ata2.00: ATA-8: WDC WD5001ABYS-18YNA0, 59.01D01, max UDMA/133
[    5.893506] ata2.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    5.902100] ata2.00: configured for UDMA/133
[    5.906622] scsi 1:0:0:0: Direct-Access     ATA      WDC WD5001ABYS-1 1D01 PQ: 0 ANSI: 5
[    5.928221] usb 4-1: new SuperSpeed USB device number 2 using xhci-hcd
[    5.960578] usb-storage 4-1:1.0: USB Mass Storage device detected
[    5.966797] scsi host2: usb-storage 4-1:1.0
[    5.988459] sd 1:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/466 GiB)
[    5.988544] sd 1:0:0:0: Attached scsi generic sg0 type 0
[    6.001426] sd 1:0:0:0: [sda] Write Protect is off
[    6.006282] sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    6.024063]  sda: sda1 sda2 sda3
[    6.027942] sd 1:0:0:0: [sda] Attached SCSI removable disk
[    6.034837] Freeing unused kernel memory: 1024K (c0a00000 - c0b00000)
[    6.258571] md: md0 stopped.
[    6.262613] md: bind<sda2>
[    6.267337] md/raid1:md0: active with 1 out of 2 mirrors
[    6.272748] md0: detected capacity change from 0 to 107307073536
mdadm: /dev/md/0 has been started with 1 drive ([    6.293173] md: md1 stopped.
out of 2).
[    6.298372] md: bind<sda1>
[    6.303034] md/raid1:md1: active with 1 out of 2 mirrors
[    6.308465] md1: detected capacity change from 0 to 49976115200
mdadm: /dev/md/1 has been started with 1 drive (out of 2).
[    6.337477] ubi0: attaching mtd5
[    6.346436] random: fast init done
[    6.396709] ubi0: scanning is finished
[    6.404620] ubi0 warning: ubi_eba_init: cannot reserve enough PEBs for bad PEB handling, reserved 32, need 40
[    6.416779] ubi0: attached mtd5 (name "config", size 20 MiB)
[    6.422494] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    6.429406] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    6.436221] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    6.443217] ubi0: good PEBs: 160, bad PEBs: 0, corrupted PEBs: 0
[    6.449251] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
[    6.456503] ubi0: max/mean erase counter: 74/49, WL threshold: 4096, image sequence number: 421211732
[    6.465765] ubi0: available PEBs: 0, total reserved PEBs: 160, PEBs reserved for bad PEB handling: 32
[    6.475034] ubi0: background thread "ubi_bgt0d" started, PID 1314
[    6.481562] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 1317
[    6.509921] UBIFS (ubi0:0): recovery needed
[    6.570047] UBIFS (ubi0:0): recovery completed
[    6.574554] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "config"
[    6.581996] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    6.591967] UBIFS (ubi0:0): FS size: 14475264 bytes (13 MiB, 114 LEBs), journal size 1015809 bytes (0 MiB, 6 LEBs)
[    6.602370] UBIFS (ubi0:0): reserved for root: 683702 bytes (667 KiB)
[    6.608843] UBIFS (ubi0:0): media format: w4/r0 (latest is w4/r0), UUID BAB225FD-C67E-4FA8-88D9-56F4B2843C4D, small LPT model
[    6.620718] UBIFS (ubi0:0): full atime support is enabled.
  Reading all physical volumes.  This may take a while...
  No volume groups found
  No volume groups found
  No volume groups found
  Reading all physical volumes.  This may take a while...
[    7.129076] scsi 2:0:0:0: Direct-Access     Lexar    USB Flash Drive  1100 PQ: 0 ANSI: 6
[    7.137869] sd 2:0:0:0: Attached scsi generic sg1 type 0
[    7.144172] sd 2:0:0:0: [sdb] 62537728 512-byte logical blocks: (32.0 GB/29.8 GiB)
[    7.152347] sd 2:0:0:0: [sdb] Write Protect is off
[    7.157690] sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    7.171841]  sdb: sdb1
[    7.177109] sd 2:0:0:0: [sdb] Attached SCSI removable disk
  No volume groups found
  No volume groups found
 Press any key or reset key to stop and run shell...5..4..3..2..1..

[   12.814974] random: crng init done
findfs: unable to resolve 'LABEL=rootfs'
mount: can't read '/etc/fstab': No such file or directory
[   13.209713] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

 Waiting for device decryption
  Reading all physical volumes.  This may take a while...
  Found volume group "vgroup" using metadata type lvm2
  3 logical volume(s) in volume group "vgroup" now active
  Reading all physical volumes.  This may take a while...
  Found volume group "vgroup" using metadata type lvm2
[   21.115860] EXT4-fs (dm-1): couldn't mount as ext3 due to feature incompatibilities
[   21.124018] EXT4-fs (dm-1): couldn't mount as ext2 due to feature incompatibilities
[   21.366785] EXT4-fs (dm-1): recovery complete
[   21.385980] EXT4-fs (dm-1): mounted filesystem with ordered data mode. Opts: (null)

 Unmounting and Switch to OS
cat: can't open '/run/dropbear.pid': No such file or directory
ash: you need to specify whom to kill
cat: can't open '/run/udhcpc.pid': No such file or directory
ash: you need to specify whom to kill
[   21.478269] UBIFS (ubi0:0): un-mount UBI device 0
[   21.483005] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" stops
[   22.078551] systemd[1]: systemd 215 running in system mode. (+PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR)
[   22.092047] systemd[1]: Detected architecture 'arm'.

Welcome to Debian GNU/Linux 8 (jessie)!

[   22.159294] systemd[1]: Set hostname to <WDebian>.
[   22.546939] systemd[1]: Cannot add dependency job for unit dbus.socket, ignoring: Unit dbus.socket failed to load: No such file or directory.
[   22.559772] systemd[1]: Cannot add dependency job for unit display-manager.service, ignoring: Unit display-manager.service failed to load: No such file or directory.
[   22.575893] systemd[1]: Starting Forward Password Requests to Wall Directory Watch.
[   22.583747] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[   22.591388] systemd[1]: Expecting device dev-ttyS0.device...
         [   22.597181] systemd[1]: Starting Remote File Systems (Pre).
Expecting device[   22.603580] systemd[1]: Reached target Remote File Systems (Pre).
 dev-ttyS0.device...
[  OK  ] Reached target Remote File Systems (Pre).
[  OK  ] Reached target Paths.
[  OK  ] Reached target Swap.
[  OK  ] Created slice Root Slice.
[  OK  ] Created slice User and Session Slice.
[  OK  ] Listening on Delayed Shutdown Socket.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Listening on LVM2 metadata daemon socket.
[  OK  ] Listening on Device-mapper event daemon FIFOs.
[  OK  ] Listening on udev Kernel Socket.
[  OK  ] Listening on Journal Socket.
[  OK  ] Created slice System Slice.
[  OK  ] Created slice system-getty.slice.
[  OK  ] Created slice system-serial\x2dgetty.slice.
         Starting Increase datagram queue length...
         Starting Load Kernel Modules...
         Starting Create list of required static device nodes...rrent kernel...
         Mounting Debug File System...
[  OK  ] Reached target Slices.
[  OK  ] Listening on udev Control Socket.
         Starting udev Coldplug all Devices...
[  OK  ] Started Create list of required static device nodes ...current kernel.
[  OK  ] Started Load Kernel Modules.
[  OK  ] Started Increase datagram queue length.
[  OK  ] Mounted Debug File System.
[  OK  ] Listening on Syslog Socket.
[  OK  ] Reached target Sockets.
         Starting Journal Service...
[  OK  ] Started Journal Service.
         Starting Apply Kernel Variables...
         Starting Create Static Device Nodes in /dev...
[  OK  ] Started udev Coldplug all Devices.
         Starting udev Wait for Complete Device Initialization...
[  OK  ] Started Apply Kernel Variables.
[  OK  ] Started Create Static Device Nodes in /dev.
         Starting udev Kernel Device Manager...
[   23.293948] systemd-udevd[2432]: starting version 215
[  OK  ] Started udev Kernel Device Manager.
         Starting LSB: Tune IDE hard disks...
         Starting LSB: MD array assembly...
         Starting LSB: Set preliminary keymap...
[  OK  ] Found device /dev/ttyS0.
[  OK  ] Started LSB: Tune IDE hard disks.
         Starting MD array monitor...
[  OK  ] Started MD array monitor.
[  OK  ] Started LSB: Set preliminary keymap.
         Starting Remount Root and Kernel File Systems...
[  OK  ] Started udev Wait for Complete Device Initialization.
         Starting Activation of LVM2 logical volumes...
         Starting Copy rules generated while the root was ro...
[  OK  ] Started Remount Root and Kernel File Systems.
         Starting Load/Save Random Seed...
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Started Copy rules generated while the root was ro.
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Started LSB: MD array assembly.
[  OK  ] Started Activation of LVM2 logical volumes.
[  OK  ] Reached target Encrypted Volumes.
         Starting Activation of LVM2 logical volumes...
[  OK  ] Started Activation of LVM2 logical volumes.
         Starting Monitoring of LVM2 mirrors, snapshots etc. ...ress polling...
[  OK  ] Started Monitoring of LVM2 mirrors, snapshots etc. u...ogress polling.
[  OK  ] Reached target Local File Systems.
         Starting Create Volatile Files and Directories...
[  OK  ] Reached target Remote File Systems.
         Starting Trigger Flushing of Journal to Persistent Storage...
         Starting LSB: Prepare console...
         Starting LSB: Raise network interfaces....
[  OK  ] Started Create Volatile Files and Directories.
         Starting Update UTMP about System Boot/Shutdown...
[   27.197059] systemd-journald[1706]: Received request to flush runtime journal from PID 1
[  OK  ] Started Trigger Flushing of Journal to Persistent Storage.
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Started LSB: Prepare console.
         Starting LSB: Set console font and keymap...
[  OK  ] Started LSB: Set console font and keymap.
[   27.748824] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[***   ] A start job is running for LSB: Raise network interf...32s / no limit)[   54.788551] mvneta f1034000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[   54.796603] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[  OK  ] Started LSB: Raise network interfaces..
[  OK  ] Reached target Network.
[  OK  ] Reached target Network is Online.
[  OK  ] Reached target System Initialization.
[  OK  ] Reached target Timers.
[  OK  ] Reached target Basic System.
         Starting Initialize hardware monitoring sensors...
         Starting Self Monitoring and Reporting Technology (SMART) Daemon...
[  OK  ] Started Self Monitoring and Reporting Technology (SMART) Daemon.
         Starting Regular background program processing daemon...
[  OK  ] Started Regular background program processing daemon.
         Starting OpenBSD Secure Shell server...
[  OK  ] Started OpenBSD Secure Shell server.
         Starting /etc/rc.local Compatibility...
         Starting getty on tty2-tty6 if dbus and logind are not available...
         Starting (null)...
         Starting LSB: exim Mail Transport Agent...
         Starting LSB: disk temperature monitoring daemon...
         Starting System Logging Service...
         Starting Permit User Sessions...
[  OK  ] Started (null).
[  OK  ] Started /etc/rc.local Compatibility.
[  OK  ] Started Initialize hardware monitoring sensors.
[  OK  ] Started LSB: disk temperature monitoring daemon.
[  OK  ] Started getty on tty2-tty6 if dbus and logind are not available.
[  OK  ] Started Permit User Sessions.
         Starting Getty on tty6...
[  OK  ] Started Getty on tty6.
         Starting Getty on tty5...
[  OK  ] Started Getty on tty5.
         Starting Getty on tty4...
[  OK  ] Started Getty on tty4.
         Starting Getty on tty3...
[  OK  ] Started Getty on tty3.
         Starting Getty on tty2...
[  OK  ] Started Getty on tty2.
         Starting Getty on tty1...
[  OK  ] Started Getty on tty1.
         Starting Serial Getty on ttyS0...
[  OK  ] Started Serial Getty on ttyS0.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started System Logging Service.
[  OK  ] Started LSB: exim Mail Transport Agent.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.
         Starting Update UTMP about System Runlevel Changes...
[  OK
Debian GNU/Linux 8 WDebian ttyS0

WDebian login:

-------------------------------------------------------------------------
GitHub https://github.com/cschil
MM
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
January 15, 2017 03:58PM
Hi Carl,

i made the first changes to the mcm-daemon and added the ability to show the fanrpms.
echo "GetFanRpm" | nc -q1 localhost 57367

github

After reinstalling debian from scratch with my kernel and the debian install ramdisk I also get the boot messages. I guess something broke, when I replaced systemd with sysv-init. Now it works.

What doesn't work for me with your initrd is getting a shell by pressing a key on the serial console, but pressing the reset button works for me.

bye
Martin
MM
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
January 16, 2017 08:24AM
I have added debian packaging to the repo. It will also build the iniparser library and link the mcm-daemon statically to it.

You can build a debian package for easy installation with:

dpkg-buildpackage -uc -us -b -t arm-linux-gnueabihf
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
January 16, 2017 12:38PM
MM Wrote:
-------------------------------------------------------
> i made the first changes to the mcm-daemon and
> added the ability to show the fanrpms.
Great work!

> What doesn't work for me with your initrd is
> getting a shell by pressing a key on the serial
> console, but pressing the reset button works for
> me.

Hm,.. strange, did you pressed only "enter" or some "abcd..." key; as "enter" did not work for me either.
maybe I should rework this code.

Okay, I try to implement "10-step" fan-control into the mcm-daemon from the python fan-control

Update:
I modified the fan-control lines and will test this tomorrow. If its working, its change the speed in small steps and I'll commit this to your git :-)


cheers Carl

-------------------------------------------------------------------------
GitHub https://github.com/cschil



Edited 1 time(s). Last edit at 01/16/2017 03:45PM by Peacemaker.
MM
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
January 16, 2017 08:21PM
Hi Carl,

great, let's see what you find with the key press problem. I tried different keys and none that I tried in the 5 seconds worked. But that is not really important.

I'm looking into implementing a PID-controller in the mcm-daemon but will have to rework the logic of the mcm-daemon before this makes sense. I will do this mainly out of curiosity as I haven't tried something like that before, but I guess I'll learn a lot by trying it. Especially if you look at the tuning section on the wikipedia page, this sounds like an interesting playground. I will make the Kp, Ki and Kd constants available in the config file, so no recompilation will be needed for tuning. I also want to include the temperature of the harddisks into it, which can be acquired with "smartctl -A /dev/sd[ab]" and which does the original daemon in the WD firmware.

I acquired two Toshiba 2.5" 3TB harddisks (MQ03ABB300) and adapters for 3.5" to keep the system quiet and cool. Currently it works at 38C system temperature and 31C disk temperature when idle without the running fan and a power consumtion of 5.4W including one usb2-hub and one DVB-T usb receiver, which is really great. When I give it some work the power consumption increases to a maximum of 14W and the fan starts running. I have set TempLow to 42C in the mcm-daemon.ini file.

I guess I will also convert the interface to an unix domain socket and provide a client application for it if netcat won't do the job.

The EX2 ultra also has a red LED behind the power LED, which I also would like to control, but I haven't figured out the serial commands for that yet.

bye
Martin
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
January 17, 2017 03:14AM
Hey Martin,

The PID-controller sounds really interresting and would be a "nice to have" feature.
( besides I think it is not needed as rapid tempreture increase and decrease does not happen)
I merge your mcm-daemon on github and reworked the fan-control, in my opinion it is working better, with lower noise. Maybe you can have a look at these lines and maybe it helps with the pid.

To include the harddisk might be a good idea, but then cpu-temp has to be integrated as well. With ~45 °C at the MCU the CPU is at ~60-75 °C.
With 2.5" disk you won't have a problem with noise and temperture. To have a "worst" case, I'm using for test's some old 3.5" WD 7.2k enterpise disks.

For a client application, do you think of a sepreate program or somkinde like

# mcm-daemon start
# mcm-daemon get-fan
..


For the power led, I even saw a short yellow light, right after start up. :-).

Besides there is an "mcu-firmware upload" in the original firmware, perhaps there is a way to dump it some how?! (to be honest I have no idea how and if these data are some kind of readable)

-------------------------------------------------------------------------
GitHub https://github.com/cschil
MM
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
January 23, 2017 10:34AM
Hi Carl,

I updated the mcm-daemon to full control of the Power-LED and to include the harddisk temperatures into the fancontrol.

The Power-LED can blink and fade in blue, and it can blink or shine in organge, red and blue. I tested it with the original Firmware. Combinations of the above are not possible as only one register is used for control via the mcu.

I didn't go for a PID-controller, as it wasn't really suitable for the task when looking closely at it, as there is no "destination temperature" to aim for. Instead I implemented something similar as you did in your repo.

If you test it, let me know how it performs. I will start testing with some old 3.5" drives tomorrow I think. Upto now I only used my 2.5" disks, which are quite cool anyways.

bye
Martin
Re: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton)
January 24, 2017 03:17PM
Hey martin,

really nice work ! & Big Thanks !

Few things:
- 80 for min speed is quite high and why hardcode this value:
What about check on first start the "fanstart" value and add for safety 5 or so

for smaller thinks I'll just do commits

-------------------------------------------------------------------------
GitHub https://github.com/cschil
Author:

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: