Sonntag, 6. September 2020

Debian on WD My Cloud Home single-bay (MCH) - part 1

 It's been almost ten years that I've been using a (few) WD MyBookLive (MBL) as my home server. In the end I used it for pure NAS tasks (Samba) only. The original 3TB became too small a couple of months ago, and I started looking for a larger harddisk.

 At that time the price for an 8TB NAS drive would be about 220€. Hence my surprise when I found an offer of a new WD NAS called My Cloud Home with an 8TB (WD RED CMR drive) for just 199€. Even if I would only use the disk it would still be cheaper - I guess that's the benefit of WD, being a harddrive manufacturer...

 Reading the specs also got me interested (4xCortex-A53@1.4GHz, 1GB RAM) - quite a bit more beefy than my old MBL. What I read about the software was rather irritating, so I didn't even bother with setting up the original software. Instead I put my hopes on a post I found in the Russian 4PDA forum (use Chrome and translate to English). Without opening the device, the procedure would install Debian Stretch and OpenMediaVault onto the device.
 The image works quite satisfactory, but coming from an unknown source it was clear for me that I need to replace it with my own. Also I would want the recent Debian Buster on it. As before on the MBL debootstrap is my weapon  of choice. Due to the nature of the boot process, repartitioning the disk is not recommended and we're limited to two 839MB plus one 2147MB partitions. The resulting RootFS therefore has to be split into root, /var, and /usr - exactly the files that are required for the original install method above. Only this time it is going to install our Debian Buster basic install instead of OMV.
apt-get install debootstrap
debootsrap buster /mnt
cp /etc/network/interfaces /mnt/etc/network/interfaces
cp /etc/fstab /mnt/etc/fstab

cd /mnt/
mount -t proc proc proc/
mount -t sysfs sys sys/
mount -o bind /dev dev/
chroot .

apt-get update
apt-get upgrade
apt-get install openssh-server -y --no-install-recommends
apt-get clean
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/cache/apt/archive/*.deb

adduser --home /home/alex --shell /bin/bash alex
passwd alex

umount /mnt/proc/
umount /mnt/sys/
umount /mnt/dev/

mkdir /new
mv /mnt/usr /new/
mv /mnt/var /new/
mkdir /mnt/usr /mnt/var
cd /mnt
tar cfz /srv/dev-sataa24/20-root.tar.gz *
cd /new
tar cfz /srv/dev-sataa24/21-var.tar.gz var/
tar cfz /srv/dev-sataa24/22-usr.tar.gz usr/
 Now the only challenge is to get a proper Kernel onto the system. That's what I am going to cover in the next post.


  1. Thank you for sharing!
    Is there a way to install Debian on an empty disk drive? I purchased only the case without hard drive.
    Then also the hard drive could be partitioned differently.
    I am looking forward to the next posts.

    And there is a typo in line 2 (bootsrap without t)

  2. Dieser Kommentar wurde vom Autor entfernt.