INSTALL ENTWARE ON WD MY CLOUD HOME (SSH ACCESS, NFS SERVER, OPKG install packages)

Hello,
I will share my experience with you to install ENTWARE.
Entware, allows you to enable SSH on your WDMCH (WD my cloud home) and open the doors to other software.

Warning : your warranty is void when doing this

be careful i use google translation.
This adds spaces to the command line.
I correct them when I realize it.

complementary info
replace the following addresses:
10.10.11.156 by the ip address of your WD my cloud home
10.10.10.254 by the IP address of your DNS server (box or other)
admsysfile02 by the name you have assigned to your WD my cloude home

To begin, you need a linux distribution, I used ubuntu 16.04 DESKTOP.
Then take the disc out of its box.
There are 4 screws behind the 2 gray rubber that are glued to the back of the box.

Once the disk out of the box, connect it in sata on the pc ubuntu.


Turn on Ubuntu.
Volumes mounted automatically.
disk_admsysfile02
Enable ANDROID debug mode to use ADB :
On disk that contains the /system partition: /dev/block/sataa19/system
Edit the file: build.prop

ro.debuggable=1

(change before ro.debuggable = 0)

persist.sys.usb.config=adb

(add)

on disk /dev/block/sataa18/wd_config
delete the file: disable_adb
add an empty file named: enable_root
Turn off ubuntu
Unplug the ubuntu disk and put the disk back in its box.
Connect it to the network and find the internal ip of the wdmch, eg 192.168.0.5

On a windows pc, Download the zip adb.zip and unzip it at the root c:
adb.zip

Connect to your drive:

adb connect 192.168.0.5
adb root
adb shell
/system/bin/mount -o rw,remount /
mkdir /opt
/system/bin/mount -o ro,remount /
mkdir /data/entware.arm
mount -o bind /data/entware.arm /opt

install busybox

/system/bin/mount -o rw,remount /system
./sbin/busybox --install
/system/bin/mount -o ro,remount /system

Install entware

wget -O - http://bin.entware.net/armv7sf-k3.2/installer/alternative.sh | sh

Install the ssh server

unset LD_LIBRARY_PATH
unset LD_PRELOAD
/opt/bin/opkg install dropbear
/opt/sbin/dropbear -p 22 -a

Change the default password 12345:

/Opt/bin/passwd

Changing password for root
New password:
Retype password:
passwd: password for root changed by root

cd /opt/etc/
ln -s /system/etc/resolv.conf resolv.conf

test the ssh connection with putty

Install nano:

opkg install nano

Part 2 25/10/2018

Install an NFS server with ENTWARE
Hello everyone,

After several days trying to run the NFS server on the WDMCH, I finally got the results right.

My feedback on the subject.

create the file /opt/etc/services:
nano /opt/etc/services

include the following lines in the file opt/etc/services
Warning :
spaces must be replaced by pressing TAB x 2

sunrpc 111 /tcp portmapper # RPC 4.0 portmapper
sunrpc 111 /udp portmapper

create the symbolic link:

/system/bin/ mount -o rw, remount /system
ln -s /opt/etc/services /system/etc/services

install the NFS server (rpcbind dependency):
opkg install unfs3

modify the file /opt/etc/exports :

nano /opt/etc/exports

insert the following line and comment on the line:
comment:
# / mnt (ro,all_squash,insecure)
add :
/data/wd/diskVolume0/samba/share 10.10.10.0/255.255.254.0(rw,no_root_squash, insecure,sync)

INFO:
the line /data/wd/diskVolume0/samba/share 10.10.10.0/255.255.254.0(rw,no_root_squash,insecure,sync)

Is to modify with the ip addresses that you want to allow:
Example: my network is 192.168.0.1/24 so I write

/data/wd/diskVolume0/samba/share 192.168.0.0/255.255.255.0(rw,no_root_squash,insecure,sync)

Modify the S56unfsd file as follows so that all users can access the repository

nano /opt/etc/init.d/S56unfsd
add -s to ARGS = “”
result:
ARGS = “- s”

Return the file system read-only:

/system/bin/mount -o ro, remount /system

restart rpcbind then unfsd from /opt/etc/init.d

/opt/etc/init.d/S19rpcbind restart
/opt/etc/init.d/S56unfsd restart

you can now test the mount point from another station.

command example from a linux station (the ip address and the mount point on your client workstation are to be modified):

mkdir admsysfile02
sudo mount -t nfs 10.10.11.156:/data/wd/diskVolume0/samba/share /home/sysadmin/admsysfile02


Part 3 04/11/2018
Install an SFTP server with ENTWARE

opkg install openssh-sftp-server

That’s all

7 Likes

Great idea and great post! It will help a lot of us who want more than a brick in the process. I have several questions however which are :
_ Does this preserve the personal cloud side of things? Is it possible to disable WDMycloud remote access from Western Digital servers completely if the answer is yes?
_ Will the device keep updating automatically by itself ? Is it possible to turn off that feature too if yes?

Thanks a lot for sharing your experience with us, will certainly try to install it on MCHDuo and give feedback when I’ll be done with it.

Hi len3158,

_ Does this preserve the personal cloud side of things? YES
Is it possible to disable WDMycloud remote access from Western Digital servers completely if the answer is yes? : I do not think it’s possible to disable access from Westerne digital servers and keep the cloud side of things
there is a package that allows you to make the cloud:
seafile-server (I have not tested it)

_ Will the device keep updating automatically by itself ? Is it possible to turn off that feature too if yes?
I think that should be possible by modifying the internal services at WDMCH, it’s android.

Personally, I do not use the function in the clouds.
I installed iptables so that it no longer communicates with WD’s servers

 opkg install iptables
 iptables -A OUTPUT -p tcp --dport 8443 -j DROP
 iptables -A OUTPUT -p tcp --dport 443 -j DROP
4 Likes

Hi,

Some updates with MCHD.

It appears it is using a completely different model of storing both the data and OS portion and I cannot find the system partition. @Fox_exe mentioned it on the MyCloud Home forums and on his website. So unlocking ADB seems less straightforward.

Both of the drives have the same partition tables, even when configured as JBOD, (as I feared), it behaves like a software RAID instead of just acting as 2 separate drives. The 3.7TB partition shows up as RAID under ubuntu.

1 Like

I have completed all the steps but after device turn off I loss all entire pkgs and changes done to system
any idea how to solve this

Hello dr3mro,
On the web page of entware, it is mentioned that you have to start the Entware service after restarting with init.d/su.d

I did not find init.d, here is how I proceeded with the help of CRON:
mount the /system partition Read and Write :

/system/bin/mount -o rw,remount /system
nano /system/bin/entware.sh

copy paste the following text :

#!/system/bin/sh

PIDFILE="/opt/var/run/dropbear.pid"

dropbear_status ()
{
        [ -f $PIDFILE ] && [ -d /proc/`cat $PIDFILE` ]
}


start()
{
        unset LD_PRELOAD
        unset LD_LIBRARY_PATH
        sleep 3
        /system/bin/mount -o rw,remount /
        sleep 1
        /system/bin/mkdir /opt
        /system/bin/mount -o ro,remount /
        sleep 3
        /system/bin/mount -o bind /data/entware.arm /opt
        sleep 2
        /opt/etc/init.d/rc.unslung start
        sleep 2
}

stop()
{
        kill `cat $PIDFILE`
}
case "$1" in
        start)
                if dropbear_status
                then
                        echo dropbear already running
                else
                        start
                fi
                ;;
        stop)
                if dropbear_status
                then
                        stop
                else
                        echo dropbear is not running
                fi
                ;;
        status)
                if dropbear_status
                then
                        echo dropbear already running
                else
                        echo dropbear is not running
                fi
                ;;

        restart)
                stop
                sleep 3
                start
                ;;
        *)
                echo "Usage: $0 {start|stop|restart|status}"
                ;;
esac

Save the file.
make it executable:

chmod 755 /system/bin/entware.sh

edit the CRON :

nano /system/etc/cron/root

Insert the following line:

# lancement du logiciel entware au démarrage
*/1 * * * * /system/bin/entware.sh start

Save te file.

file system in read :
/system/bin/mount -o ro,remount /

enjoy :wink:

1 Like

Hi Len3158

have you tested the following commands:
fdisk -l
and
mdadm -E -s

ARRAY /dev/md0 level=raid1 num-devices=2 UUID=629bfb37:53a8883f:537f768e:e9290991
ARRAY /dev/md1 level=raid1 num-devices=2 UUID=adc78fa5:fac6da39:5ea2599b:29ca6912

mount -t ext3 /dev/md0 /mnt

Thanks this works perfectly

Amr Osman,MD

It’s a pleasure.

1 Like

dear,

are you have the img from the system. because i need the img to restore my cloud firmware please,

thanks

Hello baguzajja
Personally, I did not save my disk because in the original state it was useless.

Look here :
https://community.wd.com/t/disassembling-mycloud-home/217734
or here :
https://www.reddit.com/r/DataHoarder/comments/9amr8n/recovery_wd_mycloud_home/

I suggest you add a clear indication that your warranty is void when doing this.
But yeah, Entware is awesome :slight_smile:
Now only find a way to install it without chucking…

How can this void your warranty, You have to have the ability to replace the drives (It’s a NAS or with REAL software on running on it could be a NAS) and to do that you have to extricate the drives from the chassis. That is all that is being done here… Void the warranty give me a break…

You know the top pops off and the drives can be removed without having to undo screws…

Hello,

In response to TSl:
You’re right, it’s a good suggestion, in doubt.
I add it immediately.

in the guarantee we can read:
is attributable to misuse, improper installation, alteration (including removing or obliterating labels and opening or removing external covers (unless authorized to do so by Western Digital or an authorized Service Center)), accident or mishandling while in the possession of someone other than WD.

update
Install an NFS server with ENTWARE

@Helix1 this is more than just replacing a drive. You’re enabling adb and root access and are able to mess up the firmware badly. You can’t / shouldn’t RMA the device like this.
Don’t expect to get actual support from WD to recover the original firmware.
So in that sense, your warranty is void and this is why I suggested to add the warning.

I do agree 100% that RMAing the unit while still in this state would be stupid and you are of course taking a risk that you won’t be able to restore the default factory state, but that’s just the risk for doing something like this. If you don’t already know this, then don’t hack your hardware.


Followed your guide but my nfs server don’t work
can you help me
thanks!

can you give me back the console:

rpcinfo -p
cat /etc/hosts
cat /etc/resolv.conf (my local private dns)
ping localhost
cat /opt/etc/exports

here are my screenshots:

image

image

I have done so much testing that I may have something to change.

[EDIT]
I did refollow your guide again but same problem
Thank you for reply here is the output with additional error I got if I tried to launch it manualy if it helps

and I think something in this step need some work as the problem in port mapping

create the file /opt/etc/services:
nano /opt/etc/services

include the following lines in the file opt/etc/services
sunrpc 111 /tcp portmapper # RPC 4.0 portmapper
sunrpc 111 /udp portmapper

1 Like