Clean OS (Debian), OpenMediaVault and other "firmwares"

Good work!
it worked well with me but i run up with 502 Bad Gateway error (nginx) when i restart my cloud, but i can visit my files through smb in windows and ssh.

I did clear cache but that didn’t work. so could you please help me figure out what’s the problem?
best

Hi Fox_exe,

many thanks for your work on giving the mycloud a useful system instead of the outdated and insecure firmware.
But how to install clean debian on EX4100? Is it possible? I found files on your google drive but no explanation.
I cant find “Autoinstall” folder and “Recovery” folder mentioned in the first post on google drive.
And is it possible to have the debian running from an usb pen drive without touching the firmware?

to bad this could not be combined into a simple .deb update file.

personally with all the failures with wd updates i am thinking about doing this. i just wish a better step by step english guide existed my linux skills are nowhere near up to snuff

All is possible, but hard for me alone (Need many time for teach/research/develop thins)…

all is understood. just to risky for myself to undertake.
my windows environment did not like the latest official firmware downgrade to the first v4 and got better speeds again…
could you perhaps clean up your english instal instructions for a total linux starter.

Hello Fox_exe and lordmage,

i found this thread Debian on WD MyCloud EX 4100 where there are people preparing the EX4100 for debian boot.
Maybe a good place to join forces and not have to do all on your own.

alas i’m sitting on a gen 1 x4 firmware mycloud. that i can ssh into and work with just would prefer a better guide to install and use alternatives with it., but since they are provided for free i am not rushing anyone in doing so… i sit behind a double nat using the my cloud as a back-up rather than as a cloud devices

Hi. Maybe you will skip the last step with openmediavault-iscsitarget.deb. I got also trouble with this package. so i removed it finally. furthermore the openmediavault iscsi webplugin isn’t able to map partitions. so i must use the config files.
good luck

WdMycloud.GEN1

Very good performance with samba debian Jessie-4K in reading, less good in writing, but not really important to me, just to dismount the disk to copy.

Read :

Write :

Just :
apt-get install samba
cd /etc/samba/
mv smb.conf smb.conf.back
nano smb.conf
follow : http://anionix.ddns.net/WDMyCloud/WDMyCloud-Gen1/Other/Samba%20v4/Info.txt
cd /data
mkdir Data Public
chmod 777 /data/Public
service smbd restart

And recover any place of the root file system (3.8GB) :

add raspberry repository :
nano /etc/apt/sources.list
deb Index of /raspbian jessie main contrib non-free rpi

Goodbye 64k, welcome 4k, Thanks @Fox_exe

@HRVSTR
If you could detail the procedure in one post, I would be really interested in your method. Thank you in advance.

Edit: To set the samba cache in tmpfs (/var/run) :

service nmbd stop
service smbd stop

mv /var/cache/samba /var/cache/samba.bak
mkdir /var/run/samba-cache
ln -s /var/run/samba-cache /var/cache/samba

The tip to add in /etc/init/smbd.conf install -o root -g root -m 755 -d /var/run/samba-cache does not work on reboot, so a @reboot to recreate the samba-cache folder.

crontab -e
and add
@reboot mkdir /var/run/samba-cache

service nmbd start
service smbd start

rm -rf /var/cache/samba.bak (If everything works)

I go to hdparm now see what it will give.

Thx @jpflouret

Edit1 : What I learnt from using WD Red disks to build a home NAS | With Blue Ink

On Linux, the traditional way to control disk standby (and power management) is to use hdparm; however, hdparm will not work with WD Red drives, because the firmware of the disks doesn’t support that. Instead, we can use the third-party hd-idle utility to accomplish this.

I tested hdparm with an old laptop drive, works perfectly. But if you want to do it with a WD RED, read the article.

1 Like

#WDMycloud GEN1 Debian Jessie-4K : Preserve your hard drive

#1.Edit :
/etc/fstab, add mount options to /dev/sda4 (Data partition) and
/dev/md0 (root):noatime,nodiratime,commit=60
#2.Install log2ram :
git clone GitHub - azlux/log2ram: ramlog like for systemd (Put log into a ram folder)
cd log2ram
chmod +x install.sh
./install.sh
#3.Disable unusual cron jobs:
crontab -e
Move fake-hwclock to “daily” folder:
mv /etc/cron.hourly/fake-hwclock /etc/cron.daily
#4.Set the samba cache in tmpfs (/var/run) :
service nmbd stop
service smbd stop
mv /var/cache/samba /var/cache/samba.bak
mkdir /var/run/samba-cache
ln -s /var/run/samba-cache /var/cache/samba
crontab -e
and add the line :
@reboot mkdir /var/run/samba-cache
service nmbd start
service smbd start
rm -rf /var/cache/samba.bak (If everything works)
#5. Install hd-idle (Spin Down and Manage Hard Drive Power)
apt-get install build-essential fakeroot debhelper -y
wget Download hd-idle-1.05.tgz (hd-idle)
tar -xvf hd-idle-1.05.tgz && cd hd-idle
dpkg-buildpackage -rfakeroot
dpkg -i …/hd-idle_*.deb
cd …
dpkg -i hd-idle_1.05_armhf.deb
Open the hd-idle configuration file to enable the service to automatically start and spin down drives :
nano /etc/default/hd-idle
Change this line to enable hd-idle :
START_HD_IDLE=true
Adjust this line to enable sleeping on the drive every 10 minutes (60 seconds * 10) :
HD_IDLE_OPTS=“-i 0 -a sda -i 600”

Reboot

#Bonus : Fix your WD Red drives (valid for all old WdRed hdd)
I did the manipulation yesterday under a Windows PC, no problem to report. Obligation to open the WDMycloud case to remove the disc.
Any command lines depending on your operating system are in the article :

2 Likes

@Fox_exe

I wanted to know if you had intentionally left this command “debug initcall_debug” and that it serves to keep it in the configuration of the bootconfig in /dev/sda7 ?

http://mybookworld.wikidot.com/forum/t-2222984

The default system cmdline includes some debug clauses in the cmdline: debug initcall_debug. This cause systemd and kernel to throw lots of unneeded messages. The only way to fix it is writing a new configuration partition. This is how I did it.

I followed the instructions and install the new bootconfig , temp on boot up is impressive.
To see if it does not pose a problem later.

For those who want to test, the file is already ready :
http://www62.zippyshare.com/v/WNMUTEZ3/file.html
dd if=/dev/zero of=/dev/sd7
dd if=new-config.img of=/dev/sd
7

Please can show me which file I need to down load for my mycloud version 2 and how do I install it to replace the useless WD software
thank you
Alistair

All is here for GEN2 :
https://drive.google.com/drive/folders/0B_6OlQ_H0PxVRXllYjY5RG1CZEU

Thank you, there is a load of folders there which one is the correct one?

Do you want exactly, dsm, debian, just some software?
You have the choice.

Tony to be honest I dont know, what I want if possible is to replace the supplied software.which I find to be very poor.
I am a photographer and bought the NAS drive to store images on and to be able to send clients a link to folder with their images. As these images are often 40+ mp each to use drop box is expensive and takes hours to upload to.
I find the supplied sharing software is very unfriendly to the receiver with no obvious instructions supplied and a tiny download arrow in the top right corner .
if I can get other software that is more user friendly I will be very happy.
thanks
Alistair

See my reply on your thread; using a MyCloud to share images will multiply your broadband use many times over, as each user will require the images to be uploaded from your MyCloud, via your broadband link.

Indeed. Professional hosting is the way to go. MyClouds are really best used as ordinary NAS boxes.

Hey @Fox_exe , Nobody has been able to answer me. Does the Gen2 do any kind of signature check on firmware or initial ramdisks?

I am very interested in running a custom kernel.