Install Debian on WD My Cloud home

So in order to make this work I can use either of the above three tar.gz images, alter fwtable.bin using @sgissi 's fwtablectl, and just plug in the USB and reset the MCH, right? If not, Could you please write a full tutorial on how to properly do this? (i’ve read the whole thread, but I’m still not 100% sure on how to do this).
Thanks for taking the time and making this image!

Likely there is an encryption that cannot be read after you installed OMV. To my knowledge it is not possible to access the files.

The easiest way is to download OMV from Fox_exe file archive (fox-exe.ru). Extract it to a USB stick (FAT formatted, format with windows, not linux). Then you put that into the USB port and reset. After some Minutes you should be able to access http://wdnas
Then you can log in via SSH and follow the guide at Lötzimmer: Debian on WD My Cloud Home single-bay (MCH) - part 1 (loetzimmer.de)

Hi.
I did as the first post and have OMV running. But I can’t create shares, as there is no device on the list to be selected.
But I didn’t get the reason to do the SSH commands from that site.
Will it allow me to select a device and use OMV as it should be used? Or is that just to intall a clean Debian and go from it?
Also, the author says he now needs to get a proper kernel. Is it possible to use it normally without it, in the state it is after the commands?
Thanx.

1 Like

Here’s something that drove me crazy about the boot process. I added the serial cable and found this.
From a cold power on boot, with the reset button pushed, I couldn’t get the USB to be recognized and boot from. If I did a software boot, either from the WD interface or Debian, I could get the USB to boot.

Cold Power on Boot Serial output:

Net: Realtek PCIe GBE Family Controller mcfg = 0024
dev->name=r8168#0

  • Reboot-Action invalid *
    Hit Esc or Tab key to enter console mode or rescue linux: 0

Software reboot Serial output:

Net: Realtek PCIe GBE Family Controller mcfg = 0024
dev->name=r8168#0

  • Reboot-Action : 0xaabbcc00 *
    REBOOT_ACTION : No Action
    Hit Esc or Tab key to enter console mode or rescue linux: 0

Does anyone know how to get the device to reboot from the Realtek> prompt besides pulling to power plug?

Hi

I just installed Debian+OMV on my MCH but I can’t get docker running.
Is there any limitation? I read somehere that there is a kernel limitation?

@Alex-N does this work after installing buster?

Hello,

Is there file explorer for Debian/OMV 4.1 on MCH?
Sorry if its lame question but I am new to debian.
I just installed it and use it mostly as NAS/DLNA for personal data.
But when I need to transfer files from MCH to USB (3.0) drive connected directly to MCH I have to do it via FTP or samba and max speed is 6MB/s

Is there any way to do it directly from MCH to USB without any proxy?

Thanks very much! I’ve read the blog post, but apparently there is no part 2.
Also, is there a way to go back to the original firmware/factory software from WD?

You can log in via SSH and use cp command with the path to your internal files / the mounted USB drive. The internal drive is usually /srv/sataa24/. But I do not know where USB drives are mounted.

The way back is via the recovery USB image from fox-exe.ru. I have not tried it.

Dear Alex-N,
would you like to share with us what you did to ensure the drive is mostly sleeping? Like proper powermanagement, moving var to ramdisk etc.?

To be clear, I don’t use OMV as I value a stopped disk more than any of the features that I don’t need :wink:
I run a plain SAMBA server (recently I added Icecast and MPD to play locally stored music to my Amazon Echos - but that is another story :D).

After having used a custom RamLog script before, folder2ram is the preferred solution I now use. My folder2ram.conf looks like this:

#<type>         <mount point>                   <options>
tmpfs           /var/log
tmpfs           /var/tmp
tmpfs           /var/spool
tmpfs           /var/cache/samba
tmpfs           /var/lib/smartmontools
tmpfs           /var/lib/systemd
tmpfs           /var/lib/samba
tmpfs           /var/lib/dhcp

Although I don’t know if it’s still applicable in current Kernels, I am using the following sysctl options to limit disk activity:

vm.swappiness=30
vm.dirty_writeback_centisecs=360000
vm.laptop_mode=5

Needless to say, I don’t use any swap.

In order to shutdown the disk when it is not used anymore I use a modified monitorio.sh script that was provided with my old MyBookLive (https://loetzimmer.de/patches/monitorio.sh).
It uses hdparm to put the disk to sleep when no read/write access to the data partition happened during a configurable amount of time.
If you run the script in debug mode it also tells you which process prevents the disk from shutting down.

For monitorio.sh I set the config to:

# /usr/local/etc/standby.conf
standby_enable=enabled
standby_time=17

and created a systemd startup file

# /etc/systemd/system/monitorio.service
[Unit]
Description=Disk Sleep Daemon
After=local-fs.target

[Service]
ExecStart=/usr/local/sbin/monitorio.sh
ExecStop=/usr/bin/killall monitorio.sh

[Install]
WantedBy=multi-user.target

I’ll add this to my blog posts along with the promised Kernel compilation how-To as soon as I find time…

1 Like

Sorry for keeping everybody waiting - I just finished the Kernel write-up.

1 Like

Thank you Alex-N!
How can I check whether monitorio is running?
I installed hdparm, created the systemd startup file and copied monitorio.sh to /usr/local/sbin/monitorio.sh

systemctl status monitorio.service says it is inactive.

As you mentioned Icecast and MPD to feed Alexa, you know that we now expect a chapter on that too, right? :smiley:

@juniornerd did you configure

# /usr/local/etc/standby.conf
standby_enable=enabled
standby_time=17

Before running it via systemd you should have at least once tested running from command-line as root

/usr/local/sbin/monitorio.sh debug

It works if I start it in debug mode.
First error: The configuration of folder2ram requires TWO TABS in between the type and the mount point. I had spaces in between as I just copy pasted it without checking. :frowning:
The startup of monitorio.sh via systemd still does not work yet.

systemctl status monitorio.service
monitorio.service - Disk Sleep Daemon
Loaded: loaded (/etc/systemd/system/monitorio.service; disabled; vendor preset: enabled)
Active: inactive (dead)

By the way, if you want to know which program is writing to disk, iotop and fatrace both do not run on the MCH.
But the following command shows you which files were written in the last minute
find /var -mmin -1

Did you run

systemctl daemon-reload
systemctl enable monitorio.service

Well, no… I did not know that it is necessary. But after I did, it works well!
Thank you!!!
Now my disk is sleeping most of the time. :smiley:

Would you suggest using the other scripts from your blog as well like purgelogs.sh, zram etc.?

Is the kernel resulting from this procedure the same you offered for download in this thread?
I used the following commands to download and install it:

wget https://loetzimmer.de/patches/MCH_kernel_image_4.1.17
wget https://loetzimmer.de/patches/MCH_dtb_4.1.17
wget https://loetzimmer.de/patches/MCH_modules_4.1.17.tgz
wget https://github.com/sgissi/wdmch-tools/releases/download/v0.2/fwtablectl-arm64
chmod 777 fwtablectl-arm64

dd if=MCH_kernel_image_4.1.17 of=/dev/sataa8
dd if=MCH_dtb_4.1.17 of=/dev/sataa6
./fwtablectl-arm64 firmware update /dev/sataa1 RescueKernel MCH_kernel_image_4.1.17
./fwtablectl-arm64 firmware update /dev/sataa1 RescueDeviceTree MCH_dtb_4.1.17

mkdir /lib/modules
tar -xvf MCH_modules_4.1.17.tgz -C /lib/modules/