Manually Updating Firmware: Difference between revisions

From QNAPedia
Jump to navigation Jump to search
(Created page with "Regarding how to update the firmware manually via command line, you will have to upload the firmware image (e.g. <span style="color: rgb(255, 0, 0);">TS-209_2.1.2_build1031.im...")
 
No edit summary
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Regarding how to update the firmware manually via command line, you will have to upload the firmware image (e.g. <span style="color: rgb(255, 0, 0);">TS-209_2.1.2_build1031.img</span>) to a shared folder in the NAS (e.g. Public) first, and then execute&nbsp;several commands with SSH/Telnet.<br>
<span style="font-size:medium;">We would recommend you to visit below link before&nbsp;starting to do the manual firmware update.</span><br/>http://wiki.qnap.com/wiki/What_to_do_if_firmware_update_failed&nbsp;


If the firmware file is a zip file, then wherever you have copied it to on the server, firstly unzip it:
----


# unzip TS-410_3.5.2_Build1126.zip
Regarding how to update the firmware manually via command line, you will have to upload the firmware image (e.g. <span style="color: rgb(255, 0, 0);">TVS-X63_20151118-4.2.0.img</span>) to a shared folder in the NAS (e.g. Public) first, and then execute&nbsp;several commands with SSH/Telnet.


You will get some minimal output with the above command:
If the firmware file is a zip file, please unzip the file first&nbsp;on your PC/Mac and&nbsp;then copy it to the server.


Archive: TS-410_3.5.2_Build1126.zip
'''[Two important checks]'''
inflating: TS-410_3.5.2_Build1126.img


'''[Two important checks]'''<br>
(1) Please make sure the folder&nbsp;/mnt/HDA_ROOT/update exists.


(1) Please make sure there is /mnt/HDA_ROOT/update folder.
If it does not exist, create it using
<pre># mkdir /mnt/HDA_ROOT/update</pre>


If it does not exist, create it using<br>
(2) Confirm no /mnt/update file or folder and no /tmp/update_process file exist.
<pre># mkdir /mnt/HDA_ROOT/update</pre>
(2) Confirm no /mnt/update file or folder.  


If it exists, you need to delete it using:<br>
If it exists, you need to delete it using:
<pre># rm -rf /mnt/update</pre>  
<pre># rm -rf /mnt/update</pre>
if you get a message saying:  
<pre style="line-height: 20.8px;"># rm -f /tmp/update_process</pre>


"rm: unable to remove '/mnt/update': Device or resource busy", unmount the folder and try the rm line above again. To unmount use:
<br/>After the above two checks, execute the commands below to perform the update. If updating from 4.0.x to 4.0.5, 4.0.6, 4.0.7, 4.1 or newer, do not copy or move the image to HDA_ROOT/update, let's make a work copy on public. This is required avoid any "System update failed. No enough space on RAM/ disk available for firmware update." errors:
<pre># umount /mnt/update
</pre>
<br> After the above two checks, execute the commands below to perform the update. If updating from 4.0.x to 4.0.5, 4.0.6, 4.0.7, 4.1 or newer, do not copy or move the image to HDA_ROOT/update, let's make a work copy on public. This is required avoid any "System update failed. No enough space on RAM/ disk available for firmware update." errors:  


#Copy the image file to the normal update location:<pre># cp /share/Public/TS-119_20131219-4.1.0.img /share/Public/TS-119_20131219-4.1.0-work.img</pre>
1. Copy the image file to the normal update location:
#Create a link to the /mnt/update location: <pre># ln -sf /mnt/HDA_ROOT/update /mnt/update</pre>
<pre># cp /share/Public/TVS-X63_20151118-4.2.0.img /share/Public/TVS-X63_20151118-4.2.0-work.img</pre>
#Run the update script: <pre># /etc/init.d/update.sh /share/Public/TS-119_20131219-4.1.0-work.img</pre>


<br> Keeping the "original" procedure here - not to be repeated when doing the above 1-2-3. After the above two checks, execute the commands below to perform the update.
2. Create a link to the /mnt/update location:
<pre># ln -sf /mnt/HDA_ROOT/update /mnt/update</pre>


#Copy the image file to the normal update location:<pre># mv /share/Public/TS-209_2.1.2_build1031.img /mnt/HDA_ROOT/update/</pre>
3. Run the update script:
#Create a link to the /mnt/update location: <pre># ln -sf /mnt/HDA_ROOT/update /mnt/update</pre>
<pre># /etc/init.d/update.sh /share/Public/TVS-X63_20151118-4.2.0-work.img</pre>
#Run the update script: <pre># /etc/init.d/update.sh /mnt/HDA_ROOT/update/TS-209_2.1.2_build1031.img</pre>


'''Note''' while the update script runs, you will get some output feedback in the terminal, similar to the following. This particular update was conducted on a TS-410, with update package as shown, TS-410_3.5.2_Build1126.img, so here, as with any update, the various commands listed above which reference a particular update image would change with whichever update image you need to use:  
'''Note:'''&nbsp;While the update script runs, you will get some output feedback in the terminal, similar to the following. This particular update was conducted on a TVS-463, with update package as shown, TVS-463_20151118-4.2.0.img, so here, as with any update, the various commands listed above which reference a particular update image would change with whichever update image you need to use:
 
<div style="background:#eee;border:1px solid #ccc;padding:5px 10px;">cksum=548091281<br/>UBI device number 1, total 1728 LEBs (219414528 bytes, 209.2 MiB), available 1720 LEBs (218398720 bytes, 208.3 MiB), LEB size 126976 bytes (124.0 KiB)<br/>Set volume size to 218398720<br/>Volume ID 0, size 1720 LEBs (218398720 bytes, 208.3 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "tmp", alignment 1<br/>Using 120-bit encryption - (QNAPNASVERSION4)<br/>len=1048576<br/>model name = TS-X63<br/>version = 4.2.0<br/>IS_STORAGE_V2<br/>boot/<br/>config/<br/>fw_info<br/>libcrypto.so.1.0.0<br/>libssl.so.1.0.0<br/>rootfs2.ubi<br/>rootfs2.ubi.cksum<br/>uImage<br/>uImage.cksum<br/>update/<br/>update_img.sh<br/>4.2.0 20151118<br/>MODEL NAME = TS-X63,new version = 4.2.0<br/>limit version = 3.7.2<br/>Allow upgrade<br/>Allow upgrade<br/>/mnt/HDA_ROOT/update<br/>2015-11-25 17:55:18 Check CRC<br/>2015-11-25 17:55:18 cksum: uImage ...ok<br/>2015-11-25 17:55:20 cksum: rootfs2.ubi ...ok<br/>2015-11-25 17:55:20 Update uImage(Kernel + initrd.boot) to Recovery Partition<br/>2015-11-25 17:55:20 erase nand (mtd4)<br/>2015-11-25 17:55:20 write nand (mtd4)<br/>2015-11-25 17:55:25 Update rootfs2.ubi<br/>2015-11-25 17:55:25 write nand (mtd5)<br/>2015-11-25 17:56:18 Update uImage(Kernel + initrd.boot) to Main Partition<br/>2015-11-25 17:56:18 erase nand (mtd2)<br/>2015-11-25 17:56:18 write nand (mtd2)<br/>2015-11-25 17:56:23 Update Rootfs2.ubi<br/>2015-11-25 17:56:23 write nand (mtd3)<br/>2015-11-25 17:57:16 Update Finished<br/>set cksum [548091281]</div><div style="background:#eee;border:1px solid #ccc;padding:5px 10px;"></div>
'''If you get some error&nbsp;similar with: "undefined symbol: lock_system_update"<br>then run the command below and do the update procedure again<br>'''
Then reboot the system after manually updating the firmware:
<pre>rm /sbin/lock_system_update; echo '#!/bin/sh' &gt; /sbin/lock_system_update; chmod +x /sbin/lock_system_update</pre> <pre>[/] # /etc/init.d/update.sh /mnt/HDA_ROOT/update/TS-410_3.5.2_Build1126.img
 
&lt;p&gt;cksum=1727365263
Using 120-bit encryption - (QNAPNASVERSION4)
len=1048576
model name = TS-410
version = 3.5.2
16+0 records in
16+0 records out
3.5.2OLD MODEL NAME = TS-410
Allow upgrade
boot/
config/
fw_info
initrd.boot
initrd.boot.cksum
qpkg.tar
qpkg.tar.cksum
rootfs2.img
rootfs2.img.cksum
rootfs_ext.tgz
rootfs_ext.tgz.cksum
uImage
uImage.cksum
update/
update_check
update_img.sh
tune2fs 1.41.4 (27-Jan-2009)
Setting maximal mount count to -1
Setting interval between checks to 0 seconds
Update image using HDD ...
Update Kernel ...
4030+1 records in
4030+1 records out
Update Basic RootFS ...
17353+1 records in
17353+1 records out
Update Basic RootFS2 ...
6144+0 records in
6144+0 records out
1+0 records in
1+0 records out
Update Finished.
set cksum [1727365263]
[/] #
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
&lt;/p&gt;
 
 
</pre>  
Then reboot the system after manually updating the firmware:  


  # reboot
  # reboot
[[Category:Servicing]]

Latest revision as of 09:36, 26 November 2015

We would recommend you to visit below link before starting to do the manual firmware update.
http://wiki.qnap.com/wiki/What_to_do_if_firmware_update_failed 


Regarding how to update the firmware manually via command line, you will have to upload the firmware image (e.g. TVS-X63_20151118-4.2.0.img) to a shared folder in the NAS (e.g. Public) first, and then execute several commands with SSH/Telnet.

If the firmware file is a zip file, please unzip the file first on your PC/Mac and then copy it to the server.

[Two important checks]

(1) Please make sure the folder /mnt/HDA_ROOT/update exists.

If it does not exist, create it using

# mkdir /mnt/HDA_ROOT/update

(2) Confirm no /mnt/update file or folder and no /tmp/update_process file exist.

If it exists, you need to delete it using:

# rm -rf /mnt/update
# rm -f /tmp/update_process


After the above two checks, execute the commands below to perform the update. If updating from 4.0.x to 4.0.5, 4.0.6, 4.0.7, 4.1 or newer, do not copy or move the image to HDA_ROOT/update, let's make a work copy on public. This is required avoid any "System update failed. No enough space on RAM/ disk available for firmware update." errors:

1. Copy the image file to the normal update location:

# cp /share/Public/TVS-X63_20151118-4.2.0.img /share/Public/TVS-X63_20151118-4.2.0-work.img

2. Create a link to the /mnt/update location:

# ln -sf /mnt/HDA_ROOT/update /mnt/update

3. Run the update script:

# /etc/init.d/update.sh /share/Public/TVS-X63_20151118-4.2.0-work.img

Note: While the update script runs, you will get some output feedback in the terminal, similar to the following. This particular update was conducted on a TVS-463, with update package as shown, TVS-463_20151118-4.2.0.img, so here, as with any update, the various commands listed above which reference a particular update image would change with whichever update image you need to use:

cksum=548091281
UBI device number 1, total 1728 LEBs (219414528 bytes, 209.2 MiB), available 1720 LEBs (218398720 bytes, 208.3 MiB), LEB size 126976 bytes (124.0 KiB)
Set volume size to 218398720
Volume ID 0, size 1720 LEBs (218398720 bytes, 208.3 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "tmp", alignment 1
Using 120-bit encryption - (QNAPNASVERSION4)
len=1048576
model name = TS-X63
version = 4.2.0
IS_STORAGE_V2
boot/
config/
fw_info
libcrypto.so.1.0.0
libssl.so.1.0.0
rootfs2.ubi
rootfs2.ubi.cksum
uImage
uImage.cksum
update/
update_img.sh
4.2.0 20151118
MODEL NAME = TS-X63,new version = 4.2.0
limit version = 3.7.2
Allow upgrade
Allow upgrade
/mnt/HDA_ROOT/update
2015-11-25 17:55:18 Check CRC
2015-11-25 17:55:18 cksum: uImage ...ok
2015-11-25 17:55:20 cksum: rootfs2.ubi ...ok
2015-11-25 17:55:20 Update uImage(Kernel + initrd.boot) to Recovery Partition
2015-11-25 17:55:20 erase nand (mtd4)
2015-11-25 17:55:20 write nand (mtd4)
2015-11-25 17:55:25 Update rootfs2.ubi
2015-11-25 17:55:25 write nand (mtd5)
2015-11-25 17:56:18 Update uImage(Kernel + initrd.boot) to Main Partition
2015-11-25 17:56:18 erase nand (mtd2)
2015-11-25 17:56:18 write nand (mtd2)
2015-11-25 17:56:23 Update Rootfs2.ubi
2015-11-25 17:56:23 write nand (mtd3)
2015-11-25 17:57:16 Update Finished
set cksum [548091281]

Then reboot the system after manually updating the firmware:

# reboot