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

Thank you so much!
I wrote a little simple script - everything works great!
Fan speed is AUTOMATICALLY controlled according to temperature.
Also I put the launch of this script at startup.

#!/bin/bash

#Make the script file executable
# chmod +x ./nameOfScript

#Run hddtemp in demon mode with /dev/sda
hddtemp -d /dev/sda

while true; do
	#Read temp value of /dev/sda like simple digit without other information
	#WARNING - commands bellow always gives static result on my system
	# nc localhost 7634 |sed 's/|//m' | sed 's/||/ \n/g' | awk -F'|' '{print $3}'
	# smartctl -A /dev/sda | awk '/Temperature_Celsius/{print $10}'

	#This command gives actual HDD temp value, but I don't know how to filtering it (f.e. it gives value "+54.0°C")
	# sensors | grep crit | awk '{print($2)}' 

	#This command gives actual HDD temp value on my system in good format
	actualTemp=$(`cat /sys/class/hwmon/hwmon0/temp1_input` / 1000)
	

	# True if actual HDD temp less or equal than 47 Celsius
	if [ $actualTemp -le 47 ]
		# Set fan speed 0 rpm	
		then /home/mcu_control/mcu_ctl 2 0 0 0 0 
	# True if actual HDD temp more than 47 and less or equal than 49 Celsius
	elif [ $actualTemp -gt 47 -a $actualTemp -le 49 ];
		# Set fan speed 17%
		then /home/mcu_control/mcu_ctl 2 0 30 0 0
	elif [ $actualTemp -gt 49 -a $actualTemp -le 52 ];
		# Set fan speed 32%
		then /home/mcu_control/mcu_ctl 2 0 50 0 0
	elif [ $actualTemp -gt 52 -a $actualTemp -le 54 ];
		# Set fan speed 40%
		then /home/mcu_control/mcu_ctl 2 0 64 0 0
	elif [ $actualTemp -gt 54 -a $actualTemp -le 56 ];
		# Set fan speed 51%
		then /home/mcu_control/mcu_ctl 2 0 80 0 0 
	elif [ $actualTemp -gt 56 -a $actualTemp -le 58 ];
		# Set fan speed 75%
		then /home/mcu_control/mcu_ctl 2 0 BD 0 0 
	elif [ $actualTemp -gt 58 -a $actualTemp -le 60 ];
		# Set fan speed 85%
		then /home/mcu_control/mcu_ctl 2 0 D7 0 0 
	elif [ $actualTemp -gt 60 ]
		# Set fan speed 100%
		then /home/mcu_control/mcu_ctl 2 0 FF 0 0 
	fi

	#Make time out for a cycle of 30 seconds
    sleep 30
done

Do I understand correctly that there is no way to calculate the number of fan revolutions yet?

Hm…

	#WARNING - commands bellow always gives static result on my system
	# nc localhost 7634 |sed 's/|//m' | sed 's/||/ \n/g' | awk -F'|' '{print $3}'
	# smartctl -A /dev/sda | awk '/Temperature_Celsius/{print $10}'

I looked at the temperature change over a long period and now I doubt it.
I started copying a very large file (over 15GB) and observed the gauges value. After a while, the sensor readings have changed!

smartctl -A /dev/sda | awk '/Temperature_Celsius/{print $10}'
50

And sometime before that, it showed a stable value of 49!

And now I have a question:

sensors

f1072004mdiomii00-mdio-0
Adapter: MDIO adapter
temp1:        +54.0°C  (crit = +100.0°C)

armada_thermal-virtual-0
Adapter: Virtual device
temp1:        +84.2°C  

armada_thermal-virtual-0 - it’s a CPU.
What is f1072004mdiomii00-mdio-0?

P.S. Ohh… Now I see temp value from smartctl is 48!

Seems like its network card (WTF!?)

For cleanup thermal numbers (Take only a integer):

sensors | grep "Core 0" | sed -r 's/.*\+([0-9]+)\.([0-9]+)°C.*/\1/'

network card??? :thinking: :flushed:
As I know, the temperature of the network cards has never been measured! I agree - WTF!?

When the NAS is loaded, this temperature value changes quite quickly. About 20-30 seconds per degree. And the discs change the temperature by one degree for several minutes.

Thanks!

Another question.
The temperature of the disks does not drop below 48 degrees. I am using WD RED.

xxxxx@xxxxx:~ » sudo hddtemp /dev/sd?                                              
/dev/sda: WDC WD30EFRX-68EUZN0: 48°C
/dev/sdb: WDC WD30EFRX-68EUZN0: 49°C

Does everyone have it?

For 3.5" HDD - 40-45С is normal.
60-70
С under load in closed space with heating eath other, plus heat from board and CPU.

hey dude i use this daemon.

please disable fox script in rc.local

Yes, I know max temp in specification. But I thought 48C is too big. I waited 46-47C…

https://www.west-l.ru/uploads/tdpdf/wd%20red_eng_tds.pdf

Is someone able to help me with unbricking my MyCloud Home 3TB? I tried several times, but it won’t boot after restore partitions :frowning:
I am able connect with adb, but i can’t get access with my wd apps.

The My Cloud Home is a completely different device that uses a different operating system than the single bay/single drive My Cloud. This subforum (My Cloud) generally discusses the single bay/single drive My Cloud. There is a dedicated subforum for the My Cloud Home where users more familiar with that device may be able to assist in restoring the operating system of that device (if its even possible).

https://community.wd.com/c/home-cloud-storage/my-cloud-home/229

User Fox_Exe has some information (in Russian) related to the My Cloud Home at the following link that may be relevant to trying to restore that device’s operating system. One may need to use a translation website to translate the Russian directions/information to one’s own language.

Hi Fox_exe
First of all, I just have to express my admiration for your skills, and your generosity with your knowledge and information and time, your commitment and passion and your desire to share and help everyone grow in this field. You are a shining star and a leader for sure.

Thanks to google translate I can now say: YA prosto dolzhen vyrazit’ svoye voskhishcheniye vashimi navykami, vashey shchedrost’yu, vashimi znaniyami, informatsiyey i vremenem, vashey priverzhennost’yu i entuziazmom, a takzhe vashim zhelaniyem podelit’sya i pomoch’ vsem rasti v etoy oblasti. Vy yarkaya zvezda i navernyaka lider.

I will be making a contribution to express my thanks and I encourage others to do so as well, to the best of their abilities. I dont have your email but I will try to send a donation with the information I have.

I do need your help and have some comments to make. This may be a long post…

My goals are (were) simple -

  1. Install Debian on my WD EX2 (gen1 not ultra) and then OMV to try.
  2. After that I wanted to put any stable DSM version on it.
  3. The End. That’s it.

So I checked out your site and the instructions but even now I dont know what " Look for WDMC-Mirror (Gen1, Its same devices)" is supposed to mean. Are you saying that the files for the WD EX2 and the WDMC-Mirror are the same and interchangeable?

Some of the instructions are not clear and a lot of readers would benefit if you wrote in a simple “Step1, step2” …in a logically ordered fashion. Keeping the cookies on the lowest shelf helps a lot more people reach it and you can help a lot more people.

So in any case, I went to your website’s EX2 folder and in my case the .bin files for Debian in the “EX2” folder dont install on my EX2 through the WD Webgui…in the “Mirror” folder on your website, the only thing that did install was “Debian-jessie-firmware-test” (why is it still called test? is this not working ? Shouldn’t it be a .bin file) and I was able to Telnet into it but SSH didn’t work…and I couldn’t figure out what to do next (partition disks?, fix the sleep issue or the ramdisk ? i dont know the Sequence of what comes next) or even if that was the right file for the EX2…
I couldn’t do anything so I successfully reverted to the stock WD firmware (using your instructions - thanks) . So now I am twiddling my thumbs having used up about 48 hours trying to find a solution…

I understand you are fairly busy with other projects and it seems you have moved on but can you help me with this ?

I sold all my WD’s, so, i can’t develop and test anything for this NAS.

If you have Telnet access - seems all good. Next step: Prepare (partition) disks and install rootfs:

  1. Run parted /dev/sda and type this (Its erase all data on disks! Make backup if you need!)
mklabel gpt
mkpart primary 0% 512MB
mkpart primary 512MB 4096MB
mkpart primary 4096MB 100%
set 1 raid on
set 2 raid on
set 3 raid on
  1. Create RAID data (Replace all “/dev/sdbX” to “missing” if you have only one disk):
mdadm --create --force /dev/md0 --raid-devices=2 --level=raid1 --run /dev/sda1 /dev/sdb1
mdadm --create --force /dev/md1 --raid-devices=2 --level=raid1 --run /dev/sda2 /dev/sdb2
mdadm --create --force /dev/md2 --raid-devices=2 --level=raid1 --run /dev/sda3 /dev/sdb3
  1. Format partitions:
mkswap /dev/md0
mkfs.ext4 -F /dev/md1
mkfs.ext4 -F /dev/md2
  1. Upload rootfs (Archive already installed into Nand if you use “Update firmware” method):
mkdir /mnt/root
mount /dev/md1 /mnt/root
tar xf /dev/mtdblock3 -C /mnt/root
umount /mnt/root
sync
  1. Reboot:
reboot -f

If someone have UART - i can try to build latest linux kernel and prepare rootfs with Debian Buster.

Thanks for your reply.
So:

  1. The .bin files for clean Debian 8.0 in the “EX2” folder dont install on my EX2 through the WD Webgui
    (I wanted to install clean debian first)

  2. I did manage to install “Debian-jessie-firmware-test” from Gen 1 “Mirror” folder

  3. So what is the difference with the clean debian and the debian-jesse-firmware-test ?

  4. If I do as you instructed in your recent reply to my post, then after reboot -f how to install omv?

By the way I tried the DSM 6 as trial installation and it works great. Only problem is that my windows PC’s cant see the drive and I cant map a folder or see shared folders…

I do :slight_smile:

hi
I have my cloud home 4TB
and I can’t understand how to use this firmware
can you please give me instraction video to learn us how to install it step by step

This firmware (for single bay My Cloud units) won’t work with a My Cloud Home because the My Cloud Home is a completely different device than the My Cloud units.

User Fox_Exe has some directions (in Russian) that may explain how to install Debain (of some type) to a My Cloud Home device. One may have to use a translation program/website to translate the information into their native language. See the file _Info.txt at the following link.

https://fox-exe.ru/WDMyCloud/WDMyCloud-Home/Debian/

http://4pda.ru/forum/index.php?showtopic=467828&st=12140#entry87961189

If one uses the forum search feature (magnifying glass icon upper right) they’ll also come across the following large discussion about Debian on the My Cloud Home in a different subforum (a subforum specifically for the My Cloud Home).

Hello all,

I’ve just purchased a WD Cloud EX2 Ultra, and I’m going to install Debian an OMV, but, I’m stuck in the first step, when I’m trying to upload the firmware over the Web UI. It always says “The firmware version you are trying to update is not compatible with your My Cloud system. Please download the correct firmware and try again.”
Any tips?
The stock firmware version is 5.09.115.

Many thanks for your help.

That may be your problem. One may have to find a way to roll back to the OS3 (v2.x firmware) for their device before attempting to run the steps to try and install Debian. Because you are both using OS5 and using a different device than the single bay My Cloud (the general subject of this My Cloud subforum/discussion thread) you may (if you haven’t done so already) want to see the dedicated OS5 EX Series subforum where there is discussion on the OS5 EX2 Ultra.

OS5 My Cloud EX Series

From there you can use the forum search feature (magnifying glass icon upper right) to find discussion on attempts to roll back to the OS3 firmware. For example see the following discussion in that subforum.

Hey Bennor,

Many thanks for your answer, make sense… I’ll start to read.

Cheers.

Edit: It worked, I’ve downgraded the firmware and installed Debian.
Edit2: It’s bricked now :slight_smile: after following the steps, on the first reboot, the box never get an ip, so I guess it’s bricked.

Hey Fox
hope you are fine my friend
i am running DSM on MyCloud EX2 and I would like to switch back to Original Firmware
can you please let me know how to install the original firmware back
thanks