Child pages
  • Debian on a QNAP
Skip to end of metadata
Go to start of metadata

Tested on a TS-412

Introduction

We decided to replace the default firmware of the QNAP by Debian for the following reasons:

  • The graphic interface was slow and painful to work with especially after the upgrade to the version 4.0
  • The Ethernet ports could not be used as we wished to (one for local LAN and one for internet)
  • The original firmware was not supporting multi-function printers
  • The tweak to make the scanner (sane) available was breaking every upgrade of the firmware
  • The printer was not accessible by some Apple computer apparently due to communication problem between the QNAP firmware to the printer (HP M1005)
  • The management via the interface was painful for us and not flexible enough
  • The QNAP didn't allow us to add it to our own VPN network
  • Not all the packages we needed were available
  • ...

From QNAP firmware to Debian Stable

Followed the tutorial from the following website: http://www.cyrius.com/debian/kirkwood/qnap/ts-41x/install/

  • Login via ssh to the NAS

Backup the firmware

Plug a USB disk formatted as FAT32 (NTFS won't work) and to the following

  • Detect the drives name:
fdisk -l /dev/sd? 
  • check if the drive is mounted and it not mount it
mount | grep external
mount <device path> /share/external/<device name>
  • backup the flash partition (note that seq was not available)
cd /share/external/<device name>
for i in 1 2 3 4 5; do cat /dev/mtdblock$i > mtd$i; done 
cd
umount /share/external/<device name>
  • disconnect the USB stick

Backup the data

The drives present in the NAS will be formatted so backup all the data present on it to an external drive by copying from the interface.

In our case a daily backup was scheduled on an internal disk which we removed prior the install.

 

Download the installer

You will need to get few files in order to install Debian

cd /tmp
busybox wget http://ftp.debian.org/debian/dists/stable/main/installer-armel/current/images/kirkwood/network-console/qnap/ts-41x/initrd.gz
busybox wget http://ftp.debian.org/debian/dists/stable/main/installer-armel/current/images/kirkwood/network-console/qnap/ts-41x/kernel
busybox wget http://ftp.debian.org/debian/dists/stable/main/installer-armel/current/images/kirkwood/network-console/qnap/ts-41x/flash-debian
busybox wget http://ftp.debian.org/debian/dists/stable/main/installer-armel/current/images/kirkwood/network-console/qnap/ts-41x/model

Then flash the installer

sh flash-debian

It will then ask you to reboot the device

reboot

Install Debian

One suggestion, unplug every drive before rebooting the device as the NAS will format/check them.

It is unnecessary as we are going to format them with the debian installer.

 

The NAS will reboot. Note that the lower LAN port will be used in order for you to ssh into the device.

It will use your default network configuration and IP. If any information is missing it will use DHCP.

If you are not sure of the IP start the NAS without the LAN cable and plug it once it has booted  (the green light stops blinking and it beeped briefly) it will use the fallback IP (192.168.1.100)

 

Now ssh into the NAS:

ssh installer@192.168.1.100
password: install 

 

From there everything is as for a normal Debian install... (smile)

 

Troubleshooting

The NAS takes too long to boot

If after flashing the reboot takes a long time (the green light keeps blinking) you have two solutions:

  • wait hours for the NAS to finish formatting the drives
  • reboot without the drives and plug them once booted
  • No labels