Manually Updating Firmware

From QNAPedia
Jump to: navigation, search

We would recommend you to visit below link before starting to do the manual firmware update. 

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/ /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:

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)
model name = TS-X63
version = 4.2.0
4.2.0 20151118
MODEL NAME = TS-X63,new version = 4.2.0
limit version = 3.7.2
Allow upgrade
Allow upgrade
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