Restoring the original QNAP firmware or re-installing Debian
If you want to restore the original QNAP firmware or re-install Debian on your TS-41x or TS-42x device for some reason, you can follow the instructions below. Please note that this will only work if your Debian system is still working. If your Debian system is broken but the machine itself works, you can use the recovery mode to restore the QNAP firmware or re-install Debian.
Restoring the original QNAP firmware
There are two steps to restore the original QNAP firmware. First, you have to put the backup of the flash partitions from the QNAP firmware you made before the installation of Debian into flash.
cat mtd1 > /dev/mtdblock1 cat mtd2 > /dev/mtdblock2
Second, you have to restart your QNAP, and then go to the web interface to format your disk and install the full QNAP firmware.
After you put the QNAP firmware back in flash and installed the complete the QNAP software, your device will run the original software from QNAP again.
You can then write the installer files to flash:
cat kernel > /dev/mtdblock1 cat initrd > /dev/mtdblock2
Reboot your QNAP device and Debian installer will start and you can connect via SSH, as documented on the install page. Please be aware that the SSH key of the machine will have changed.