Tuesday, September 2, 2008

Installing Debian on QNAP TS-209

What to do with a QNAP TS-209? Install a REAL Linux... Install Debian...

I have a QNAP TS-209 at home, but I am not really happy with it. One of my concerns is security. With the firmware I've used (2.0.1 Build 0324T) there was a massive security hole.

The file .ssh/authorized_keys will be overwritten on ach reboot, with an unknown user (admin@Richard-TS209). See authorized_keys oerwritten at reboot.

I am not sure if QNAP has fixed this issue with the new Firmware, but this showed me, that my QNAP is not the device where I've want to store my private data.

Some time ago I've read a Post that Martin Michlmayr is working on a QNAP-Port of debian. See more details abount Martin on his website and on wikipedia.

Now it is possible on an easy way to install debian on your QNAP. See here is Martins description. Read carefully!

I want to show you here my experiences with Debian on my QNAP TS-209

The first step is to create a backup of the original Firmware

cd /share/HDA_DATA/public

cat /dev/mtdblock1 > mtd1

cat /dev/mtdblock2 > mtd2

Save these both files to a USB-Stick or download them to your workstation!

Now download the required installer images

wget http://people.debian.org/~joeyh/d-i/armel/images/daily/orion5x/netboot/qnap/ts-209/flash-debian

wget http://people.debian.org/~joeyh/d-i/armel/images/daily/orion5x/netboot/qnap/ts-209/initrd.gz

wget http://people.debian.org/~joeyh/d-i/armel/images/daily/orion5x/netboot/qnap/ts-209/kernel

Run the following script to write the kernel and the initrd.gz to flash

sh flash-debian

This will take some time...

Writing debian-installer to flash... done.

Please reboot your QNAP device.

When you've rebooted the TS-209, you can login via ssh. The Firmware will configure the IP-Address via DHCP or if no DHCP-Server is available, it will fallback to

ssh installer@ (Password in install)

Here are the screenshots of the installer
Choose a mirror

Choose your language

I want to use the Manual Parttioning method

After setting up the partitions, creating the Filesystem, the installer start the installation of the base system.
Setting up users and passwords

I just want to install the standard software and configure the system later

It will take some time to install the software

Flash memory will be configured

The installation is complete!

After the reboot you are able to login via ssh...