debian on a DNS-320

Back in 2009 I bought, on impulse, a D-Link DNS-313 thinking it was sufficiently similar to the 323 to enable me to install debian with some ease. As I noted at the time, however, I’d made a slight mistake and then had to settle for a compromise installation from a tarball rather than a full native install.

Recently I bought a slightly bigger brother to the 313 in the shape of a DNS-320 ShareCenter. Again, this box is not quite the same spec as the 323 (and hence is slightly less easy to flash with a debian installation) but at under £55.00 (albeit with no disks) it was too good a bargain to miss, particularly since I already had one spare terabyte SATA disk. What I hadn’t banked on, of course, was the terrible price I would have to pay for a second disk, but hey, I wanted to be able to set up RAID because I planned on making this new toy my main backup NAS.

Before parting with my money, I checked carefully that I would indeed be able to install my preferred OS. The 320 has an 800 MHz Marvell 88F6281 CPU on the Kirkwood family of SoC (so is closely related to the sheevaplug) and 128 MB RAM. Unfortunately, Martin Michlmayr’s site (which would normally be my first port of call) has nothing on the 320, but there are plenty of other sites offering advice on debian installation on this particular NAS. Martin does provide detailed instructions for the 323 of course, but that is based on the older Orion SoC.

D-link actually provides a complete build environment (available on its on its German ftp server) that lets you build your own firmware image. They also provide a rather useful build of debian squeeze on their Polish ftp site (strangely nothing so useful on the UK ftp site though).

The first and most comprehensive set of information I found was on the 320 wiki at Apart from proving a valuable technical resource itself, the site points to useful “howtos” on other sites such as Jamie Lentin’s excellent site which gives detailed instructions for building and installing debian images for both the DNS-320 and the 325, and the NAS Tweaks site which introduced me to the very useful “fonz fun_plug” concept.

The idea behind the fonz is to allow installation of non-standard software on a range of NAS devices. To quote from the NAS tweaks site tutorial page:

The Firmwares of various NAS-Devices includes a very interesting bonus: the user can execute a script (file) named “fun_plug” when the OS is booted. Unlike all the other Linux software which is loaded when the NAS boots, this file is located on Volume_1 of the hard disk rather than within the flash memory. This means the user can easily and safely modify the file because the contents of the flash memory is not changed. If you delete the fun_plug file (see here for instructions), or replace your hard disk, the modification is gone.

Fun_plug allows the user to start additional programs and tools on the NAS. A Berlin-based developer named “Fonz” created a package called “ffp” (Fonz fun_plug), which includes the script and some extra software which can be invoked by fun_plug.

Installation of fun_plug is easy and takes only a few steps. These steps should be performed carefully, as they depend on typed commands and running with “root” privileges.

What this means in practice, is that the user can effectively use fun_plug to install a complete OS image (such as debian) into a chrooted ennvironment on the NAS. This has the advantage of being easily reversible, you don’t have to dump the (sometimes useful) original firmware, and you don’t run much risk of bricking your device. So whilst the Jamie Lentin tutorial appealed to the techy in me, the pragamatist said that fun_plug looked a more interesting first approach, and the Fonz’s script in particular looked very useful. And, indeed, so it turned out.

I installed fun_plug 0.7 for ARM EABI and now have a cheap (if rather noisy to be honest) 1TB RAID1 NAS which both retains the D-Link firmware and gives me the additional functionality offered by a debian 6 installation. Muting that fan is now high on my ToDo list.

Permanent link to this article:

1 comment

    • shadowling on 2013/02/14 at 12:20 am

    I really had been researching for ideas for my own website and discovered your own blog post, “debian on a

Comments have been disabled.