Installing Debian on the Thecus N2100
Requirements
In order to install Debian on an N2100, you need the following:
- A Thecus N2100 machine or compatible device, such as the Allnet ALL6500.
- Another machine on which you have an SSH client. Every Linux distribution includes an OpenSSH client and there is PuTTY for Windows.
Preparation
There are a number of issues you should be aware of before beginning with the installation:
- You have to be aware that by installing Debian you probably lose the warranty on your N2100.
- The installation of Debian will replace the Thecus firmware that is shipped with your N2100. It is not possible to keep both installed at the same time.
- When you install Debian, it will by default format your whole disk. I therefore recommend to make backup of any data you might have on your machine.
- Make sure that the J3/J4 jumper on your board is set to the J3 position. This is the default position so you should not have to change anything.
Upgrading the Firmware
Before installing Debian, make sure that you have at least version 2.1.05 of the Thecus firmware. In version 2.1.05 Thecus added the ability to the boot loader used on this machine, RedBoot, to allow users to connect to the machine via telnet while the machine is booting. This gives you a rescue mode in case something goes wrong with the installation. I therefore strongly advise you to upgrade to version 2.1.05 before installing Debian. If you don't have a Thecus N2100, but an Allnet or another box, you first need to make a simple change so that you can upgrade to the Thecus firmware. This change is documented on the Thecus wiki in the page about turning your Allnet into a Thecus.
Starting the Installer
In order to start the installation of Debian, you have to login to the firmware of your Thecus N2100 to configure the network and to upgrade the firmware to an installer image of Debian. The N2100 is configured to have the IP address 192.168.1.100. You can open this address in your web browser and then login in as admin. The default password is admin.


The way the installation of Debian works is that you flash an upgrade firmware that will start the installer. The installer will then allow you to connect via SSH to perform the installation. This works because the installer will read your network settings from your device and then bring up SSH so you can connect. That's why it's important to configure the network settings in the Thecus firmware. If you have used a static configuration different from the default address 192.168.1.100, these values will be used. Otherwise, the installer will ask a DHCP server in your network for an IP configuration. If the installer cannot find a DHCP server on your network, it will fall back to the static configuration that is the default on the N2100, namely the IP address 192.168.1.100 and a gateway and name server at 192.168.1.1. In any case, make sure that your network is configured fully, including values for DNS.

Once you have configured the network, you can go to System, followed by Firmware Upgrade. First, you have to download the firmware image provided by Debian for the installation. Afterwards you can upload this image to the Thecus firmware. It will ask you to confirm that you want to upgrade to this new version.




Note that the progress bar is not updated during the upgrade process and will remain at 1% until the end.

After a few minutes the upgrade process has completed and you have to reboot the machine:

The system will now restart and after about 5 minutes you can connect to the installer via SSH. Please ignore your web browser which tells you that the system is soon restarting because no update will be shown there. When the web page has finished counting down and says Reboot Complete, the installer will not be ready yet! You need to wait about another minute. You also have to ignore the LEDs (in particular the orange one that is constantly flashing) because no indication is given there. After several minutes, connect to your machine via SSH. The username is installer and the password is install. Note that you need a terminal which understands UTF-8 because that's the character set the installer will use.
ssh installer@192.168.1.100
Installing Debian
The installation itself should be pretty standard and you can follow the installation guide. It knows about the N2100 and at the end of the installation it will flash a kernel and initramfs that will automatically boot into Debian.
The whole installation will take about one hour. After the installation is complete, you will be able to log in as root or your newly created user via SSH.
After the installation, you need to change the time, for example by installing the ntpdate package and running ntpdate pool.ntp.org. You will notice that the year of your machine is set to something like 2036. This is because the kernel of the Thecus firmware starts to count with the year 2000 while it's common to start from 1970. You also need to make sure that there's a symlink from /dev/rtc to /dev/rtc0. Afterwards, you have to run hwclock --systohc in order to set the hardware clock from the new (and now correct) system time. When you restart your N2100 next time, it will take quite a while because the time change will force Linux to check all the partitions on your disk. You can also create some files so this symlink will be created automatically when the machine boots. First, create /etc/udev/n2100-rtc.rules with the following contents:
# The rtc-dev module registers a rtcN device; link the first to /dev/rtc. KERNEL=="rtc0", SYMLINK+="rtc" GROUP="audio"
Afterwards, run the following commands:
cd /etc/udev/rules.d ln -s ../n2100-rtc.rules z60_n2100-rtc.rules
From now on, the RTC symlink will be created automatically when your machine starts. Apart from this manual step to create the RTC symlink, the installer has fully configured your new Debian system.
Usage
Fan
By default, the fan should run at full speed. If you need to regulate the speed, you need to locate the pwm files in /sys:
find /sys/ | grep pwm
/sys/devices/platform/IOP3xx-I2C.0/i2c-0/0-002e/pwm2
/sys/devices/platform/IOP3xx-I2C.0/i2c-0/0-002e/pwm1
If you want to stop the fan, you have to write the value zero to these files:
echo 0 > /sys/devices/platform/IOP3xx-I2C.0/i2c-0/0-002e/pwm2 echo 0 > /sys/devices/platform/IOP3xx-I2C.0/i2c-0/0-002e/pwm1
You can activate full speed using the following commands:
echo 255 > /sys/devices/platform/IOP3xx-I2C.0/i2c-0/0-002e/pwm1 echo 255 > /sys/devices/platform/IOP3xx-I2C.0/i2c-0/0-002e/pwm2
There's currently no script to regulate the fan automatically, so I suggest you run the fan at full speed.
Known Problems
The following problems are known:
- The command halt doesn't actually shut down the machine with the 2.6.18 kernel but leads to a restart. This is fixed in newer releases of the kernel. As a workaround, you can call shutdown now. This will put the machine into run level 1 and ask for the root password on the serial console. While this doesn't automatically power the machine down it makes sure that you can safely turn it off because it sits idle waiting for the password.
- There is no support for the beeper and the LEDs. The orange LED will flash constantly and there's currently no way to turn this off.