Fan control on the D-Link DNS-323
The kernel in Debian doesn't have support for the fan control chip on the D-Link DNS-323. Since some people said that their device runs quite hot after installing Debian, I've prepared a 2.6.29 based kernel that includes the fan driver.
If you want to install this kernel, edit the file /etc/apt/sources.list and add the following line:
deb http://people.debian.org/~tbm/orion lenny main
Now you can install the new kernel:
apt-get update apt-get install linux-image-orion5x
After a reboot, you can control the fan this way:
echo 0 > /sys/class/hwmon/hwmon?/device/pwm1 # turn it off echo 255 > /sys/class/hwmon/hwmon?/device/pwm1 # turn it to full speed
Any values between 0 and 255 will work.
According to Anselmo Luginbuhl, you should also be able to use the lm-sensors package to automatically control the fan:
"Execute pwmconfig, it will make some tests and generate the fancontrol config file. At the end of the procedure it will ask you to "Select fan output to configure, or other action:", just be sure to pass through choice "1" or it would not fill in the configuration file, save the configuration and start the daemon /etc/init.d/fancontrol.
Probably the only thing that needs some attention to get an optimal result is to choose the right parameters for max and min temperature at which the fan should start or stop to minimize the °C and the noise."
Finally, this kernel also includes some performance patches from Marvell, so you might see some performance increases too.
Automatic power on QNAP Turbo Station devices
All ARM based QNAP machines can turn on automatically when power is applied if the device was not powered down correctly. This is helpful when your power goes down. Follow the instructions below if you want to turn automatic power on using Debian on a QNAP TS-109, TS-119, TS-209, TS-219, TS-409 or TS-409U.
Edit the file /etc/apt/sources.list and add the following line:
deb http://people.debian.org/~tbm/orion lenny main
Now install a new version of qcontrol:
apt-get update apt-get install qcontrol
Finally, turn the automatic power feature on:
qcontrol -d & qcontrol autopower on kill %1 rm /var/run/qcontrol.sock
Test kernel for Orion with performance patches available
Marvell posted some performance patches for ARM that speed up the copy_to_user and clear_user functions which are used to copy data around. I see quite a bit of performance increase with these patches on Orion, and I've prepared a test kernel so you can try them out too. This kernel should be treated as experimental, but I'm looking for testers with Orion-based hardware (e.g. QNAP TS-109, TS-209, and TS-409) who are interested in giving it a go.
If your system has a rescue mode (the QNAP devices and the HP mv2120 do), I suggest you first make a backup of your flash. On the QNAP devices, you can do this with:
cat /dev/mtdblock1 /dev/mtdblock2 /dev/mtdblock3 > qnapimg.bin
Then edit the file /etc/apt/sources.list and add the following line:
deb http://people.debian.org/~tbm/orion lenny main
Load the key used to sign this repository so that apt can verify it:
gpg --keyserver pgp.earth.li --recv-keys 68FD549F gpg --export -a 68FD549F | apt-key add -
Now you can install the new kernel:
apt-get update apt-get install linux-image-2.6-orion5x flash-kernel
After the installation of the kernel, reboot and do some tests: Do you see any speedup? Do you see any problems?
Debian lenny images and docs for Debian on D-Link DNS-323
After integrating Matt Palmer's installer patches for D-Link DNS-323, I have now created installer images based on Debian lenny. They will work both on the D-Link DNS-323 as well as the Conceptronic CH3SNAS. I've also written an installation guide and other information, including how to use the recovery mechanism through the serial console.
D-Link DNS-323 and Conceptronic CH3SNAS support integrated in installer
I finally had a chance today to test the patches Matt Palmer created to add D-Link DNS-323 support to the Debian installer. I tested the patches on a Conceptronic CH3SNAS which, from a hardware perspective, is a D-Link DNS-323 (rev B1). I noticed that the firmware image specifies a number for the vendor, so we have to generate different installer images for the D-Link DNS-323 and Conceptronic CH3SNAS. That was easy enough to do and I was able to install Debian without any problems.
The next steps are to write an installation guide and other documentation, and to improve the kernel (the power LED is blinking and cannot be changed, and fan control is missing).
SmallNetBuilder article about Debian on QNAP TS-209
Jim Buzbee published an article in SmallNetBuilder a few days before Christmas about installing Debian on the QNAP TS-209. I find the article very well written and balanced, and it makes a good introduction for folks who are interested in installing Debian on NAS devices.
Pictures of QNAP TS-409U and Conceptronic CH3SNAS
I took some pictures the other day of NAS devices I'm currently working on. They are now available in the QNAP TS-409U and Conceptronic CH3SNAS (aka D-Link DNS-323) image galleries.
HP mv2120 is sold in Europe as the HP mv5020
We added Debian support for the HP Media Vault mv2120 this summer and it works very well. While this NAS device is easily available in the US, I have unfortunately not been able to find it in Europe so far, which obviously limits the number of people who will run Debian on it. Yesterday I learnt that the mv2120 is sold in Europe under the name HP Media Vault Pro mv5020 (GX666AA). I found some shops in the UK that sell the mv5020 but I assume it's also available in other parts of Europe.
Recovery mode for QNAP devices available now
QNAP recently released an upgrade for u-boot, the boot loader used on most QNAP devices, that adds a recovery mode. With this recovery mode, a backup image is requested via TFTP and then written to flash. This is useful in case there are problems during the installation or an upgrade of Debian.
While Debian itself works well on QNAP and another NAS devices, we get reports from users every once in a while that their machine stopped booting (either after an upgrade or for no good reason) and it's usually impossible to say why since these devices are headless. The recovery mode allows them to put an image into flash that is known to work or an image of the installer that can be used as a rescue option. Essentially, the recovery mode removes the need for a serial console in many cases.
I've added information about the recovery mode for the QNAP TS-109, TS-209 and TS-409/TS-409U, including installation instructions of users already running Debian.
Installer working fine on the Kurobox Pro
Per Andersson ported the Debian installer to the Kurobox Pro this summer as part of a Google Summer of Code project. Along with Riku Voipio, I acted as Per's mentor and gave him advice while he was trying to figure out all the details that were needed to get Debian running on the device. Since I spent the summer in Israel and didn't have my Kurobox Pro with me, I never performed an installation on my own though.
Yesterday I finally found time to play with my Kurobox Pro. Per did a great job and the installation worked without any problems. I also investigated how the recovery mode works and added various new information to my Debian on the Kurobox Pro pages. The Kurobox Pro seems like a nice machine, but I hope we'll add full support for the Linkstation Pro and Live soon since these devices are much more easily available. It shouldn't take too much work since these devices are quite similar to the Kurobox Pro.
Debian installer coming to the D-Link DNS-323
My posting about receiving a Conceptronic CH3SNAS a month ago prompted Matt Palmer to work on the installer. Matt did a fantastic job and had patches for everything within a few days: he added support for the revision B of the DNS-323 to the kernel, added code to the kernel so the MAC address is parsed from flash, and added DNS-323 support to various components of the installer. Finally, he wrote a really good porting guide that will hopefully inspire other people to port the installer to more NAS devices. Porting to another Orion based device usually doesn't take much now that we have the infrastructure in place.
While Matt's patches came too late for inclusion into the initial release of lenny, the release team seems agreeable to the idea of adding support for the D-Link DNS-323 and Conceptronic CH3SNAS to a stable update of lenny. To this end, the dns323-firmware-tools package which is needed to create proper firmware images for the DNS-323 was accepted for lenny a few days ago. Alan Fletcher also kindly agreed to make a serial cable for me, so hopefully I'll get a chance to test Matt's patches soon and integrate them into the installer. In the meantime, I created a few simple pages about Debian on the D-Link DNS-323 which I will extend once support has been integrated into the installer.
Debian on the QNAP TS-409U
Christmas came early for me this year: after receiving a Conceptronic CH3SNAS yesterday, a QNAP TS-409U showed up today. QNAP sent it to me a week ago to ensure that Debian works on it but it was stuck in customs for a few days. The QNAP TS-409U is similar to the TS-409 but comes in a rack case (and with more RAM). It seems that QNAP have also changed the layout of the mainboard but essentially it's still a TS-409. This means that the installer works just fine. Another difference to the TS-409 is that the TS-409U has two fans but qcontrol works without any problems on both machines.
Conceptronic CH3SNAS and the D-Link DNS-323 revision B1
Conceptronic kindly sent me a CH3SNAS for my Debian porting efforts. The Conceptronic CH3SNAS is reported to be basically the same hardware as the D-Link DNS-323 but it costs slightly less. There were some reports that the CH3SNAS uses a 88F5182 chip whereas the D-Link DNS-323 uses a 88F5181 but nobody was able to confirm this for sure. As it turns out, there are two revisions of the DNS-323. Revision A1 uses a 88F5181 chip along with a separate SATA chip. Revision B1 on the other hand uses a 88F5182 which integrates SATA into the SoC itself. The CH3SNAS is equivalent to a D-Link DNS-323 revision B1. In fact, the mainboard of the CH3SNAS even says DNS-323 rev B1.
The Linux kernel from mainline only works on the DNS-323 revision A1 at the moment. Adding support for revision B1 should be trivial since you basically just need to initialize the SATA chip on the SoC and possibly adapt some other values. Unfortunately, the DNS-323 uses a very small serial connector so none of my serial cables work. If I can find someone who will make a serial cable for me, I'll fix up the kernel.
Visiting Marvell in Yoqne'am
Since I'm spending the summer in Israel, I used the opportunity
yesterday to visit the Marvell site in Yoqne'am where the majority of
the NAS software engineering team is located. They first gave me a
tour through the hardware labs which I found incredibly interesting.
It's amazing what equipment those folks use to perform QA tests of new
chips, how they can reverse engineer chips and even make some
modifications to test their theories about hardware bugs. I found it
really amazing and at the same time felt glad that changing things in
software is so easy.
Later they showed me the software lab where they had an exhibition of various devices based on the Orion chip, including NAS devices, but also printers, wifi APs and game machines. They also told me some details of their product roadmap but unfortunately I cannot share that information. The only thing I can say is that we'll see a lot of new devices to which it would be cool to port Debian.
TODO list for Debian on D-Link DNS-323
Someone asked me the other day what it would take to add Debian support for the D-Link DNS-323. Since we support a number of Orion based devices in debian-installer already, adding support for another device is typically fairly easy. I don't have a D-Link DNS-323 myself, but I looked around the useful DNS-323 wiki and this is what I came up. I'm sharing this list in the hope that other people are interested in working on DNS-323 support.
- The Orion kernel in Debian has support for the D-Link DNS-323 but it needs testing. Also, some patches, such as support for the fan speed chip, are not included in the mainline kernel yet.
- flash-kernel (which writes the kernel and ramdisk to flash) needs support for the DNS-323. I actually implemented this in the meantime but it's completely untested.
- oldsys-preseed reads the network configuration from your existing firmware and uses it to configure the network for debian-installer. This also needs support for the DNS-323.
- Some tools to generate proper firmware images need to be packaged for Debian.
- The debian-installer needs to generate a boot image for the DNS-323 (easy once the tools are packaged).
- Apparently the MAC address is not set automatically in u-boot and you have to run a tool called mac_read to set it. This is problematic because at the moment there's no code to set the MAC address in d-i and to make sure the newly installed system will automatically set the MAC address. This needs some work.
Debian on HP mv2120 web site
I've created a web site with information for running Debian on the HP mv2120. The HP mv2120 is a NAS device based on Marvell's Orion platform and has a 500 MHz ARM CPU, 128 MB RAM and two SATA slots.
All components needed to support Debian on the HP mv2120 have been integrated into Debian and Debian installer. However, a new release of the Debian installer is required so installations of Debian testing are actually possible.
Daily installer image available for QNAP TS-109, TS-209 and TS-409
Daily installer images are now available for the QNAP TS-109, TS-209 and TS-409. This means that complete installations of Debian testing are possible now.
You can consider the daily image as a beta release of RC1 of the debian-installer for Debian lenny. It should only be used by experienced users and only if you can make a serial console in case something goes wrong. As the name suggests, the daily images change on a daily basis and they install Debian testing which also changes on a daily basis (although testing should be fairly stable since we're close to the freeze of testing in preparation for the release of Debian lenny).
If you install Debian with these installer images, please send an installation report to debian-boot send an email to me so I can let you know in case there are any important news you should be aware of.
There is a web site now with complete installation instructions and other information about Debian on QNAP Turbo Station. If you have any questions or suggestions, please let me know.
Debian support for HP mv2120: putting everything together
I managed to get my hands on a HP Media Vault mv2120, a nice ARM based NAS device, a few months ago with the intentions of porting Debian to it. Unfortunately, I have been really busy lately and most of my time was spent on adding support for the QNAP TS-109/TS-209 and TS-409 (which required a lot of generic work to get Marvell Orion support into Debian, a new SoC used in many NAS devices, including the QNAP TS-x09 and HP mv2120).
There were a number of things that had to be worked out before Debian would run on the mv2120. The good news is that Marc Singer and Eugene San have done all of the heavy lifting in the last few weeks in figuring out how the mv2120 works and that now it's just a matter of putting everything together for Debian to work.
Here are the issues that had to be worked out:
- Figure out how the rescue mode works and how to construct a rescue image that the device can boot: I knew that the mv2120 had a rescue mode that can be activated by keeping the the power and reset buttons pressed when starting that would request a rescue image via the network. This rescue mode can be used to start the Debian installer. Eugene San figured out how to construct a rescue image that the mv2120 would accept. Marc Singer has also written a tool, uphpmvault, to serve such rescue images from Linux.
- Figure out the best way to make one image that contains the kernel and ramdisk: the mv2120 only loads a kernel and no ramdisk, but a ramdisk is needed to start Debian. I discussed some really ugly hacks with Marc Singer to get the mv2120 to accept an image consisting of kernel and ramdisk but Marc wanted to try something else first. u-boot, the boot loader used on the mv2120, can accept something called a multipart image which can consist of a kernel and a ramdisk. When Eugene San heard that we were trying to load a multipart image, he went ahead and figured out how to construct an image that the mv2120 would boot.
Now that these two issues are resolved, I simply need to put everything together and add support for the mv2120 to a number of debian-installer components. We already have Orion kernel images in unstable that support the HP mv2120 (along with a number of other Orion based NAS devices) and the rest shouldn't take too long.
QNAP TS-109/TS-209 and TS-409 experimental developer release
Yesterday I completed the first successful installation of Debian on a QNAP TS-209 using a custom debian-installer image with 2.6.25 from unstable. I made the installer image for QNAP TS-109 and TS-209 available as an experimental developer release and today I also uploaded images for the TS-409. More on my plans to support the QNAP TS-109/TS-209 and TS-409 in the upcoming release of Debian (starting with beta3 of debian-installer) soon.