I Love Thecus
Manage to upgrade my N4520 to the latest firmward - Printable Version

+- I Love Thecus (http://forum.thecus.com)
+-- Forum: Thecus Linux NAS (http://forum.thecus.com/forumdisplay.php?fid=6)
+--- Forum: NAS from 2 to 4 bays - Home (http://forum.thecus.com/forumdisplay.php?fid=53)
+---- Forum: N4520/N4560 (http://forum.thecus.com/forumdisplay.php?fid=45)
+---- Thread: Manage to upgrade my N4520 to the latest firmward (/showthread.php?tid=13836)

Manage to upgrade my N4520 to the latest firmward - junajo85 - 12-08-2017

Hello Everyone, 

I have been trying to upgrade my NAS for really long time, but I couldn't because it was saying that "FAIL due to lack of tool". I was trying to find what it was giving me that error, and at the end I found what was it. 

First I plugged the USB in the back and start the NAS. Most probably is that after a while the beeping start because of that error. 

What I did next was to connect to the NAS using Telnet, as in my case the SSH service wasn't up. The first thing I did was to kill the noise, how to do that? Simple:

- ps -af (Look for the process called, "utility_start.sh" 
- kill -9 #of the process. 
- Done, now you can work without that noise. 

After doing that, I took me a while to find why the error "FAIL due to lack of tool" was appearing. until I found the issue. 

When reading the script in "img-upgrade.sh"

You can find the following 

    USBDISK="`awk '/Intf:USB/ {print $3}' /proc/scsi/scsi | cut -d":" -f2`"
    umount $USB_MNT
       if [ -n "`grep "${USBDISK}1$" /proc/partitions`" ];then
        mount "/dev/${USBDISK}1" $USB_MNT
        mount "/dev/${USBDISK}" $USB_MNT

    # install the newest img-tools
    IMGTOOLS="`readlink -f ${USB_MNT}/nas_img-tools-*.$(uname -m).rpm`"

In my case I found out that the $USB_MNT was /factory_usb. But when looking into that folder, the folder was empty.

I tried to fix that by first checking the things that were mounted in the system.


Then I ran the following command to check what is the unit of the USB

awk '/Intf:USB/ {print $3}' /proc/scsi/scsi | cut -d":" -f2

In my case, it was sdu. Funny thing is that the mtab already had mounted those folders. So in case you want to mounted again you wont be able to do it.

Go to /etc/mtab, and edit the file commenting those lines that have the USB unit there, in my case /dev/sdu*

Once that is done, mount the USB in the folder that is expected. In my case I tried to mount the /dev/sdu and /dev/sdu1 but both where empty, when I mounted /dev/sdu2 then all the files from the USB where displayed in the folder /factory_usb

mount /dev/sdu2 /factory_usb

When that is done, go to the /tmp folder and run the img-upgrade.sh script again

sh /tmp/img-upgrade.sh

It will display the progress and after waiting a bit, your NAS will shutdown. In case the script cannot find the nas_img-tools it will start beeping again.

Hope it helps those ones that still have this NAS.