Compelling Linux server slithers into the open

The Linksys NSLU2 is a cheap and compact Network Attached Storage (NAS) device with an Ethernet connection and two USB ports for connecting hard drives and/or USB flash disks to a LAN. It sports a simple web-based interface that is used to configure the device, format any attached disks, set up disk shares and so on.

It's a fairly basic interface but there's a lot of functionality locked away in the device (though the documentation leaves a lot to be desired). However, under the covers the NSLU2 runs Linux and can be made into a useful development Linux server, which is why you're reading this in Reg Developer rather than Reg Hardware.

While the official NSLU2 firmware keeps the user well away from any hint of a command line (and keeps all interactions to the web interface), there is a community of like-minded souls who've developed a range of unofficial firmware images which, to varying degrees, lift the covers and turn the NSLU2 into the Slug.

And, as a Slug, the NSLU2 is a functional, flexible, and extendible Linux server. From providing basic file services, which is what it does as a NAS, the Slug can be extended to run as a print server, media box, development machine, and more.

The starting point for all this activity is to "reflash" the firmware. As with most other areas of Linux development, there's a range of different alternatives to chose from. The best place to start, particularly for those without extensive Linux experience, is the Unslung firmware, which keeps the official Linksys web-based interface for day to day usage, but also provides a telnet server for connecting directly to the Slug.

Other alternatives include Debian Linux and a number of different versions of SlugOS. In all cases the place to look for further information and comparison of features is the NSLU2-Linux home page.

Before proceeding to reflash the official firmware, it's important to point out that Linksys does not support any of the alternatives, though the company is on record as stating that it's delighted that the product has gained such widespread acceptance. It's recommended that before going ahead you fully understand what it is you're undertaking, and that you've mastered the art of getting the NSLU2 into reset mode if things go horribly wrong (which is always a possibility). The worst-case scenario could leave you with a dead, unresponsive box of electronics that does nothing but look pretty.

For upgrading to the Unslung firmware, the process is fairly straightforward and described in meticulous detail on the NSLU2-Linux site. Once installed, the firmware copies part of its file system to an attached hard drive, which has to be present from then on. A fully Unslung Slug now sports an additional item on the admin web page, which enables telnet access to the Slug command line from any machine on your network. Once connected, it's possible to use the IPKG package manager to install and upgrade new packages on your Slug.

There's an impressively long list of packages available to run on the Slug, including many that can be used to turn it into a development server that packs a good punch. Aside from the usual set of essential Linux development tools – the GNU compiler collection, a number of emacs and vi clones, the Bash shell, Perl etc – there are also packages for CVS or Subversion for version control, Python, a couple of Java virtual machines and compilers (though not the official Sun versions), web servers (including Apache), and more.

Of course, there is also a pretty wide range of non-development packages, including some of the Unix/Linux standards – CUPS for printing, MySQL for databasing, Bit Torrent tools, Mail serving, and so on.

Thanks to the active community around it, it's possible even for somebody not especially proficient in Linux to turn the NSLU2 into a file and print server that also acts as a Subversion box, hosts web applications that can be coded in Python, PHP, Java, or just plain old fashioned CGI, as well as downloading media files in the background.

What the Slug won't do is become a production server for anything but small values of production. Although it has fairly good performance for what it's designed to do, it is seriously under-powered compared to a standard PC. However, many development activities, such as running Subversion or acting as a group print server, don't require much CPU power.

Given the compact size of the Slug (it's smaller than most of the hard disk enclosures that plug into it), the low power consumption and the range of software available, it makes for a pretty compelling little Linux server, particularly for developers. ®