Yesterday I installed debian on my thecus n2100. Thanks to Martin Michlmayr for putting up with my neurotic questions during this process. Normally, this would take about 2 hours. Unfortunately I hit a bug in the r8169 network driver (or the hardware) which made the process excruciatingly slow: over 8 hours.

I did delay the process somewhat by going for a stable installation first time through. You need to go for etch, for anyone following along at home.

I have two hard discs in this box and I wanted to use RAID-1 for the root filesystem. Actually, the two discs were already in a linux RAID-1 set, with superblocks, an ext3 filesystem and some files, from when I was using the default thecus firmware. The following approach lets you setup RAID in the installer and preserve any existing data. You will need to have at least one connection to the installer running a shell, in addition to the one running the installer.

When you enter the disc partitioner stage, you will need to fetch the udeb which gives you the md module. For the current thecus installer image, that's md-modules-2.6.18-3-iop32x-di_1.5_arm.udeb. wget it from a mirror (path pool/main/l/linux-kernel-di-arm-2.6) and udpkg -i it. Then restart the partitioner.

To preserve the contents of the RAID-1, you might be able to select "don't wipe this partition", and just make sure nothing on it would clash with the directories that Debian will create. I didn't take this approach.

Instead, you can drop one of the discs from the mirror, continue with the installation as normal, copy the data back across after, and re-add the disc to the mirror set. Before you select your filesystems in the partitioner:

  • # mdadm --fail /dev/md0 /dev/sdb2
  • # mdadm --remove /dev/md0 /dev/sdb2

Now feel free to let the installer stick a new filesystem on the RAID set, and install the base system etc.

Once the thing has booted:

  • # mount /dev/sdb2 /mnt
  • # cp -a /mnt /data
  • # umount /mnt
  • # mdadm --add /dev/md0 /dev/sdb2

Periodically check on the rebuild status with mdadm -D /dev/md0.

One other thing I would strongly advise is getting the installer's debconf priority to medium or lower before you get the base system installed, so you can skip the bootloader / flashing stage.

Update: I've clarified the following paragraphs.

At present, the default etch kernel is 2.6.17. The network device in the Thecus is not supported by this kernel, so you have to manually install a particular 2.6.18 kernel prior to rebooting, or you will not be able to communicate with the machine once it boots.

Martin makes this very clear in his instructions. However, if you have no experience using a d-i which flashes the kernel (as appose to say, the bootloader prompts you get when doing an x86 install, for example) you may not be aware that by default, the flash stage proceeds without prompts.

That means that if you do not prevent it from doing so, there will be a window between the installer flashing 2.6.17, and you manually installing 2.6.18, where the thecus will be in an unbootable state, should you suffer a power cut or similar problem.

In my case, I left the base system being unpacked overnight (due to the fact the network was so slow). So, that window was several hours wide.

This is only a temporary situation, as the release team plan to have 2.6.18 available for Etch, and the patches for the Thecus hardware are steadily working their way into the mainline kernel.