System Recovery Mode: Difference between revisions

From QNAPedia
Jump to navigation Jump to search
Update download link of TS-x09 flashimage
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Please also check [[Firmware Recovery]].


<br>
Please also check [[Firmware_Recovery|Firmware Recovery]].


This article explains the Standard Operating Procedure (SOP) for programming flash memory on QNAP NAS via TFTP (also known as&nbsp;NAS Recovery Mode).
&nbsp;


This is especially handy in case of:  
This article explains the Standard Operating Procedure (SOP) for programming flash memory on QNAP NAS via TFTP (also known as&nbsp;NAS Recovery Mode).
 
This is especially handy in case of:


*Unsuccessful firmware updates  
*Unsuccessful firmware updates  
*Accidentally overwriting the default QNAP&nbsp;firmware on the flash memory.  
*Accidentally overwriting the default QNAP&nbsp;firmware on the flash memory.  
*Restoring the QNAP default firmware
*Restoring the QNAP default firmware  


<span style="color: rgb(255, 0, 0);">'''Important!!! DO NOT attempt this procedure unless you are unable to boot your NAS correctly WITHOUT HARD DRIVE.&nbsp; If your NAS can not be booted correctly, the first thing you should try is to remove your hard drives and boot the NAS again.'''</span>  
<span style="color: rgb(255, 0, 0)">'''Important!!! DO NOT attempt this procedure unless you are unable to boot your NAS correctly WITHOUT HARD DRIVE.&nbsp; If your NAS can not be booted correctly, the first thing you should try is to remove your hard drives and boot the NAS again.'''</span>


<br>
&nbsp;


== QNAP NAS models applied ==
== QNAP NAS models applied ==


The System Recovery Mode is currently supported on QNAP TS-109, TS-209, TS-409 &amp; TS-409U (including Standard, PRO and PRO-II models).  
The System Recovery Mode is currently supported on QNAP TS-109, TS-209, TS-409 & TS-409U (including Standard, PRO and PRO-II models).


== <br>How does Recovery Mode work? <br>  ==
== <br/> How does Recovery Mode work? ==


The Recovery Mode enables the NAS to establish a TFTP session with a remote PC to retrieve the QNAP default flash image file and will programme this flash image file automatically to restore to the factory default state without the need to use a RS-232 console cable.  
The Recovery Mode enables the NAS to establish a TFTP session with a remote PC to retrieve the QNAP default flash image file and will programme this flash image file automatically to restore to the factory default state without the need to use a RS-232 console cable.


<br>
&nbsp;


Under the Recovery Mode, the NAS boot loader (U-boot) will be pre-configured with an IP address of '''192.168.0.10'''. Therefore in order to establish a TFTP session between the NAS and the PC, substitute '''192.168.0.11''' as a static IP and a subnet mask of '''255.255.255.0''' for the PC. The PC and the NAS can be connected directly by plugging a RJ-45 LAN cable to each other or through a network switch as long as both units are under the same network segment. <br>
Under the Recovery Mode, the NAS boot loader (U-boot) will be pre-configured with an IP address of '''192.168.0.10'''. Therefore in order to establish a TFTP session between the NAS and the PC, substitute '''192.168.0.11''' as a static IP and a subnet mask of '''255.255.255.0''' for the PC. The PC and the NAS can be connected directly by plugging a RJ-45 LAN cable to each other or through a network switch as long as both units are under the same network segment.


<br> '''Source(s):''' [http://www.downloadranking.com System Recovery Mode] <br>
&nbsp;


[[Image:550px-Recovery mode-1.png|thumb|none|550px|Recovery mode-1.png]] <br>
[[File:550px-Recovery mode-1.png|thumb|none|550px|Recovery mode-1.png]]


<br>
&nbsp;


<br>
&nbsp;


== Enable the Recovery Mode ==
== Enable the Recovery Mode ==


QNAP NAS manufactured prior to 2009 do not carry this function natively. The Recovery Mode needs to be manually enabled by installing the special QPKG file. Note that prior to enabling the Recovery Mode, please make sure that your current system firmware version is at least '''v2.1.2 build 081114'''. If not, you may go the offical firmware download site [http://www.qnap.com/download.asp here] and choose the correct firmware that matches your NAS model and update your system before continuing to the next step.  
QNAP NAS manufactured prior to 2009 do not carry this function natively. The Recovery Mode needs to be manually enabled by installing the special QPKG file. Note that prior to enabling the Recovery Mode, please make sure that your current system firmware version is at least '''v2.1.2 build 081114'''. If not, you may go the offical firmware download site [http://www.qnap.com/download.asp here] and choose the correct firmware that matches your NAS model and update your system before continuing to the next step.


<br>
&nbsp;


System Recovery Mode is enabled by installing the QPKG (.qpkg) files via the web administration page under ''''System Tools'''' -&gt; ''''QPKG''''. Once the installation ends you will have to reboot the NAS manually by either going to ''''System Tools'''' -&gt; ''''Restart / Shutdown'''' and select ''''Restart'''' or issue ''''reboot'''' from the console prompt and then when system starts up it will update the kernel and u-boot automatically and then reboot itself again to complete. Please note that before the update procedure finishes <span style="color: rgb(255, 0, 0);">'''DO NOT INTERVENE OR POWER OFF THE NAS'''</span>.  
System Recovery Mode is enabled by installing the QPKG (.qpkg) files via the web administration page under ''''System Tools'''' -> ''''QPKG''''. Once the installation ends you will have to reboot the NAS manually by either going to ''''System Tools'''' -> ''''Restart / Shutdown'''' and select ''''Restart'''' or issue ''''reboot'''' from the console prompt and then when system starts up it will update the kernel and u-boot automatically and then reboot itself again to complete. Please note that before the update procedure finishes <span style="color: rgb(255, 0, 0)">'''DO NOT INTERVENE OR POWER OFF THE NAS'''</span>.


&nbsp;  
&nbsp;


Once the update procedure ends your system now has the System Recovery Mode enabled. '''Please note that unless your flash memory is damaged and the NAS is unable to enter the normal operating state you do not need to continue on next chapter.'''  
Once the update procedure ends your system now has the System Recovery Mode enabled. '''Please note that unless your flash memory is damaged and the NAS is unable to enter the normal operating state you do not need to continue on next chapter.'''


&nbsp;  
&nbsp;


Now download the QPKG file from below that matches your QNAP NAS model:  
Now download the QPKG file from below that matches your QNAP NAS model:


*[http://eu1.qnap.com/Storage/QPKG/system_recovery/QNAP_SystemRecovery_1.0_TS-109.zip TS-109 | TS-109-Pro | TS-109-Pro-II]  
*[http://eu1.qnap.com/Storage/QPKG/system_recovery/QNAP_SystemRecovery_1.0_TS-109.zip TS-109 | TS-109-Pro | TS-109-Pro-II]  
*[http://eu1.qnap.com/Storage/QPKG/system_recovery/QNAP_SystemRecovery_1.0_TS-209.zip TS-209 | TS-209-Pro | TS-209-Pro-II]  
*[http://eu1.qnap.com/Storage/QPKG/system_recovery/QNAP_SystemRecovery_1.0_TS-209.zip TS-209 | TS-209-Pro | TS-209-Pro-II]  
*[http://eu1.qnap.com/Storage/QPKG/system_recovery/QNAP_SystemRecovery_1.0_TS-409.zip TS-409 | TS-409-Pro]  
*[http://eu1.qnap.com/Storage/QPKG/system_recovery/QNAP_SystemRecovery_1.0_TS-409.zip TS-409 | TS-409-Pro]  
*[http://eu1.qnap.com/Storage/QPKG/system_recovery/QNAP_SystemRecovery_1.0_TS-409U.zip TS-409U] <br>
*[http://eu1.qnap.com/Storage/QPKG/system_recovery/QNAP_SystemRecovery_1.0_TS-409U.zip TS-409U]  


&nbsp;  
&nbsp;


&nbsp;  
&nbsp;


&nbsp;  
&nbsp;


== Operating Guideline of System Recovery Mode  ==


Once you have updated your system with the QPKG file from the previous system, you can use the recovery mode in case you want to load a recovery image. We provide recovery images that contain the QNAP fimrware. Note the size of these images is 8MB which is the same size as your onboard flash memory. Now you can download the file that matches you QNAP NAS&nbsp;model&nbsp;from the URL below:
== Operating Guideline of System Recovery Mode ==


<br>
Once you have updated your system with the QPKG file from the previous system, you can use the recovery mode in case you want to load a recovery image. We provide recovery images that contain the QNAP fimrware. Note the size of these images is 8MB which is the same size as your onboard flash memory. Now you can download the file that matches you QNAP NAS&nbsp;model&nbsp;from the URL below:


*[ftp://csdread:csdread@ftp.qnap.com/NAS/firmware/beta/v2.1.2-1024-recovery_mode/flash_images/F_TS-109_20081024-2.1.2.zip TS-109 / TS-109-II]
&nbsp;
*[ftp://csdread:csdread@ftp.qnap.com/NAS/firmware/beta/v2.1.2-1024-recovery_mode/flash_images/F_TS-109P_20081024-2.1.2.zip TS-109-Pro / TS-109-Pro-II]
*[ftp://csdread:csdread@ftp.qnap.com/NAS/firmware/beta/v2.1.2-1024-recovery_mode/flash_images/F_TS-209_20081024-2.1.2.zip TS-209 / TS-209-II]
*[ftp://csdread:csdread@ftp.qnap.com/NAS/firmware/beta/v2.1.2-1024-recovery_mode/flash_images/F_TS-209P_20081024-2.1.2.zip TS-209-Pro / TS-209-Pro-II]
*[ftp://csdread:csdread@ftp.qnap.com/NAS/firmware/beta/v2.1.2-1024-recovery_mode/flash_images/F_TS-409_20081024-2.1.2.zip TS-409] / [ftp://csdread:csdread@ftp.qnap.com/NAS/firmware/beta/v2.1.2-1024-recovery_mode/flash_images/F_TS-409P_20081024-2.1.2.zip TS-409-Pro]&nbsp;/ [ftp://csdread:csdread@ftp.qnap.com/NAS/firmware/beta/v2.1.2-1024-recovery_mode/flash_images/F_TS-409U_20081024-2.1.2.zip TS-409U]


<br>
*[http://download.qnap.com/Storage/tsd/flashimage/F_TS-109_20081024-2.1.2.zip TS-109 / TS-109-II]
*[http://download.qnap.com/Storage/tsd/flashimage/F_TS-109P_20081024-2.1.2.zip TS-109-Pro / TS-109-Pro-II]
*[http://download.qnap.com/Storage/tsd/flashimage/F_TS-209_20081024-2.1.2.zip TS-209 / TS-209-II]
*[http://download.qnap.com/Storage/tsd/flashimage/F_TS-209P_20081024-2.1.2.zip TS-209-Pro / TS-209-Pro-II]
*[http://download.qnap.com/Storage/tsd/flashimage/F_TS-409_20081024-2.1.2.zip TS-409] / [http://download.qnap.com/Storage/tsd/flashimage/F_TS-409P_20081024-2.1.2.zip TS-409-Pro]&nbsp;/ [http://download.qnap.com/Storage/tsd/flashimage/F_TS-409U_20081024-2.1.2.zip TS-409U]


Remark:
&nbsp;


According to information from Martin Michlmayr the 6 mtdblocks are arranged in following order in the image:  
Remark:


mtdblock1 (Kernel, 2MiB)
According to information from Martin Michlmayr the 6 mtdblocks are arranged in following order in the image:


mtdblock2 (RootFS1, initrd, 4MiB)  
mtdblock1 (Kernel, 2MiB)


mtdblock3 (RootFS2, 1MiB)  
mtdblock2 (RootFS1, initrd, 4MiB)


mtdblock5 (NAS Config, 384kiB)  
mtdblock3 (RootFS2, 1MiB)


mtdblock4 (U-Boot Config, 128kiB)<br>
mtdblock5 (NAS Config, 384kiB)


mtdblock0 (U-Boot, 512kiB)  
mtdblock4 (U-Boot Config, 128kiB)


During the recovery only mtdblock1, mtdblock2, mtdblock3 (together 7MiB) are written to the flash. This way you also can backup your existing firmware/configuration into an image by executing:
mtdblock0 (U-Boot, 512kiB)


"cat /dev/mtdblock1 /dev/mtdblock2 /dev/mtdblock3 &gt; qnapimg.bin"
During the recovery only mtdblock1, mtdblock2, mtdblock3 (together 7MiB) are written to the flash. This way you also can backup your existing firmware/configuration into an image by executing:


and using this image (7MiB in size) for recovery.  
"cat /dev/mtdblock1 /dev/mtdblock2 /dev/mtdblock3 > qnapimg.bin"


== Setup TFTP server on Windows XP/Vista<br>  ==
and using this image (7MiB in size) for recovery.


If you have no TFTP server installed on your Windows machines you may find one free of charge from the Internet or simply follow the one recommended below in this guide.
== Setup TFTP server on Windows XP/Vista ==


<br>
If you have no TFTP server installed on your Windows machines you may find one free of charge from the Internet or simply follow the one recommended below in this guide.


=== Installation  ===
&nbsp;


*Download: http://sourceforge.net/projects/tftputil/  
=== Installation ===
 
*Download: [http://sourceforge.net/projects/tftputil/ http://sourceforge.net/projects/tftputil/]
*Latest Version: 1.3.0  
*Latest Version: 1.3.0  
*Filename: TFTPUtil_GUI_Version_1.3.0_Installer.exe  
*Filename: TFTPUtil_GUI_Version_1.3.0_Installer.exe  
*Requirement: .NET framework 2.0 (downloadable from Microsoft)
*Requirement: .NET framework 2.0 (downloadable from Microsoft)  


=== <br>Configuration ===
=== <br/> Configuration ===


*Start TFTPUtil GUI &amp; TFTP Server
*Start TFTPUtil GUI & TFTP Server  


<br>
&nbsp;


[[Image:550px-Recovery mode-2.png|thumb|none|550px|Recovery mode-2.png]] <br>
[[File:550px-Recovery mode-2.png|thumb|none|550px|Recovery mode-2.png]]


<br><br>
<br/> &nbsp;


*Set your root directory path of your TFTP server
*Set your root directory path of your TFTP server  


<br>
&nbsp;


[[Image:550px-Recovery mode-3.png|thumb|none|550px|Recovery mode-3.png]] <br>
[[File:550px-Recovery mode-3.png|thumb|none|550px|Recovery mode-3.png]]


<br><br>
<br/> &nbsp;


<br>
&nbsp;


*Either temporarily disable the Windows firewall or add TFTPUtil GUI program to the exception list.
*Either temporarily disable the Windows firewall or add TFTPUtil GUI program to the exception list.  


<br>
&nbsp;


*Unzip the firmware image you have just downloaded to the TFTP root directory you specify in the last step (C:\Users\ken\Desktop\img in this case) and do not forget to rename it to qnapimg.bin. ('''The recovery process will not start if the file name does not match the one above''')
*Unzip the firmware image you have just downloaded to the TFTP root directory you specify in the last step (C:\Users\ken\Desktop\img in this case) and do not forget to rename it to qnapimg.bin. ('''The recovery process will not start if the file name does not match the one above''')  


== <br>Enter the recovery mode ==
== <br/> Enter the recovery mode ==


Use any pointy object (eg, pen or small-size screw driver) to press and hold on the Reset Button (see below) for at least 5~8 seconds until you hear two short beeps and then you are in the system firmware recovery mode. The status LED should be lit from flashing red and green to constant red.  
Use any pointy object (eg, pen or small-size screw driver) to press and hold on the Reset Button (see below) for at least 5~8 seconds until you hear two short beeps and then you are in the system firmware recovery mode. The status LED should be lit from flashing red and green to constant red.


Alternatively press and hold the reset button whilst the unit is powered down and then power on the unit the two short beeps should be pretty much instant, this may prove the easier route if you're doing this to reinstate the firmware on a "live" unit.<br>
Alternatively press and hold the reset button whilst the unit is powered down and then power on the unit the two short beeps should be pretty much instant, this may prove the easier route if you're doing this to reinstate the firmware on a "live" unit.


<br>
&nbsp;


[[Image:Recovery mode-4.png|thumb|none|550px|Recovery mode-4.png]] <br>
[[File:550px-Recovery mode-4.png|thumb|none|550px|Recovery mode-4.png]]


<br><br>
<br/> &nbsp;


== During the recovery process<br>  ==
== During the recovery process ==


During the recovery operation (writing the firmware to the flash) the LED on the LAN port will flash rapidly for the first few seconds (receiving firmware image from the Windows machine over the network). Once the flash memory programming begins the status LED should lit constant red. '''LEAVE THE NAS ALONE AT THIS POINT! DO NOT TURN IT OFF OR UNPLUG THE POWER CORD'''. As soon as the flash programming ends you will hear a single long beep as well as the status LED flashing green. The NAS will now reboot itself with the new firmware loaded. No intervention required during this stage.  
During the recovery operation (writing the firmware to the flash) the LED on the LAN port will flash rapidly for the first few seconds (receiving firmware image from the Windows machine over the network). Once the flash memory programming begins the status LED should lit constant red. '''LEAVE THE NAS ALONE AT THIS POINT! DO NOT TURN IT OFF OR UNPLUG THE POWER CORD'''. As soon as the flash programming ends you will hear a single long beep as well as the status LED flashing green. The NAS will now reboot itself with the new firmware loaded. No intervention required during this stage.


<br>
&nbsp;


== Timeouts ==
== Timeouts ==


During the initial stage of the recovery operation the NAS will try to load the image file ('''qnapimg.bin''') from the Windows machine however one may experience timeouts due to poor connection quality or incorrect network address settings. If this should occur simply reset the NAS by pressing and holding down the power button for a few seconds and the system should reboot itself then you may try the procedure once again.<br>
During the initial stage of the recovery operation the NAS will try to load the image file ('''qnapimg.bin''') from the Windows machine however one may experience timeouts due to poor connection quality or incorrect network address settings. If this should occur simply reset the NAS by pressing and holding down the power button for a few seconds and the system should reboot itself then you may try the procedure once again.


= See also =
= See also =
[[Category:Troubleshooting]]

Latest revision as of 13:20, 24 January 2018

Please also check Firmware Recovery.

 

This article explains the Standard Operating Procedure (SOP) for programming flash memory on QNAP NAS via TFTP (also known as NAS Recovery Mode).

This is especially handy in case of:

  • Unsuccessful firmware updates
  • Accidentally overwriting the default QNAP firmware on the flash memory.
  • Restoring the QNAP default firmware

Important!!! DO NOT attempt this procedure unless you are unable to boot your NAS correctly WITHOUT HARD DRIVE.  If your NAS can not be booted correctly, the first thing you should try is to remove your hard drives and boot the NAS again.

 

QNAP NAS models applied

The System Recovery Mode is currently supported on QNAP TS-109, TS-209, TS-409 & TS-409U (including Standard, PRO and PRO-II models).


How does Recovery Mode work?

The Recovery Mode enables the NAS to establish a TFTP session with a remote PC to retrieve the QNAP default flash image file and will programme this flash image file automatically to restore to the factory default state without the need to use a RS-232 console cable.

 

Under the Recovery Mode, the NAS boot loader (U-boot) will be pre-configured with an IP address of 192.168.0.10. Therefore in order to establish a TFTP session between the NAS and the PC, substitute 192.168.0.11 as a static IP and a subnet mask of 255.255.255.0 for the PC. The PC and the NAS can be connected directly by plugging a RJ-45 LAN cable to each other or through a network switch as long as both units are under the same network segment.

 

Recovery mode-1.png

 

 

Enable the Recovery Mode

QNAP NAS manufactured prior to 2009 do not carry this function natively. The Recovery Mode needs to be manually enabled by installing the special QPKG file. Note that prior to enabling the Recovery Mode, please make sure that your current system firmware version is at least v2.1.2 build 081114. If not, you may go the offical firmware download site here and choose the correct firmware that matches your NAS model and update your system before continuing to the next step.

 

System Recovery Mode is enabled by installing the QPKG (.qpkg) files via the web administration page under 'System Tools' -> 'QPKG'. Once the installation ends you will have to reboot the NAS manually by either going to 'System Tools' -> 'Restart / Shutdown' and select 'Restart' or issue 'reboot' from the console prompt and then when system starts up it will update the kernel and u-boot automatically and then reboot itself again to complete. Please note that before the update procedure finishes DO NOT INTERVENE OR POWER OFF THE NAS.

 

Once the update procedure ends your system now has the System Recovery Mode enabled. Please note that unless your flash memory is damaged and the NAS is unable to enter the normal operating state you do not need to continue on next chapter.

 

Now download the QPKG file from below that matches your QNAP NAS model:

 

 

 


Operating Guideline of System Recovery Mode

Once you have updated your system with the QPKG file from the previous system, you can use the recovery mode in case you want to load a recovery image. We provide recovery images that contain the QNAP fimrware. Note the size of these images is 8MB which is the same size as your onboard flash memory. Now you can download the file that matches you QNAP NAS model from the URL below:

 

 

Remark:

According to information from Martin Michlmayr the 6 mtdblocks are arranged in following order in the image:

mtdblock1 (Kernel, 2MiB)

mtdblock2 (RootFS1, initrd, 4MiB)

mtdblock3 (RootFS2, 1MiB)

mtdblock5 (NAS Config, 384kiB)

mtdblock4 (U-Boot Config, 128kiB)

mtdblock0 (U-Boot, 512kiB)

During the recovery only mtdblock1, mtdblock2, mtdblock3 (together 7MiB) are written to the flash. This way you also can backup your existing firmware/configuration into an image by executing:

"cat /dev/mtdblock1 /dev/mtdblock2 /dev/mtdblock3 > qnapimg.bin"

and using this image (7MiB in size) for recovery.

Setup TFTP server on Windows XP/Vista

If you have no TFTP server installed on your Windows machines you may find one free of charge from the Internet or simply follow the one recommended below in this guide.

 

Installation


Configuration

  • Start TFTPUtil GUI & TFTP Server

 

Recovery mode-2.png


 

  • Set your root directory path of your TFTP server

 

Recovery mode-3.png


 

 

  • Either temporarily disable the Windows firewall or add TFTPUtil GUI program to the exception list.

 

  • Unzip the firmware image you have just downloaded to the TFTP root directory you specify in the last step (C:\Users\ken\Desktop\img in this case) and do not forget to rename it to qnapimg.bin. (The recovery process will not start if the file name does not match the one above)


Enter the recovery mode

Use any pointy object (eg, pen or small-size screw driver) to press and hold on the Reset Button (see below) for at least 5~8 seconds until you hear two short beeps and then you are in the system firmware recovery mode. The status LED should be lit from flashing red and green to constant red.

Alternatively press and hold the reset button whilst the unit is powered down and then power on the unit the two short beeps should be pretty much instant, this may prove the easier route if you're doing this to reinstate the firmware on a "live" unit.

 

Recovery mode-4.png


 

During the recovery process

During the recovery operation (writing the firmware to the flash) the LED on the LAN port will flash rapidly for the first few seconds (receiving firmware image from the Windows machine over the network). Once the flash memory programming begins the status LED should lit constant red. LEAVE THE NAS ALONE AT THIS POINT! DO NOT TURN IT OFF OR UNPLUG THE POWER CORD. As soon as the flash programming ends you will hear a single long beep as well as the status LED flashing green. The NAS will now reboot itself with the new firmware loaded. No intervention required during this stage.

 

Timeouts

During the initial stage of the recovery operation the NAS will try to load the image file (qnapimg.bin) from the Windows machine however one may experience timeouts due to poor connection quality or incorrect network address settings. If this should occur simply reset the NAS by pressing and holding down the power button for a few seconds and the system should reboot itself then you may try the procedure once again.

See also