
Linksys Network Storage Link (NSLU2)
by
rastix
on Sun 20 Feb 2005 01:32 PM CET
I finally bought a Linksys Network Storage Link to make my 250GB external Maxtor available on my home network. The idea is to store all my music on that drive and to play it from there.
This is what it looks like:

It is very small and very quiet. You simply connect your external HDD to one of the two USB ports and turn on the device. The device connects to the network using a network cable. There is a short network cable in the package.
Installation is very simple. You run an application on your pc that finds the NSLU2. You can then set the IP address or you can use DHCP. At the end of this procedure, you are asked to format the disk. The NSLU2 runs Linux and it formats the disk using the ext3 file system. It actually creates two partitions. A small one with configuration data and the rest for your files. Of course, this means that if your disk contains a lot of data, you first have to copy it somewhere else. Then you let the NSLU2 format the disk and then you copy your data back. It would have been nice if the device supported FAT32 and NTFS out of the box.
Ok, the device is now on your network but you need to configure it further using the web interface because the initial configuration program only does the basic stuff (IP and formatting). You just connect to the admin web pages using http://ipaddressofNSLU2 and you get the following (click the thumbnail below):

From there it is simple. You can configure the name of the device (I called it NAS), additional users, groups, private area’s and so on.
In Windows, you just connect to the NSLU2 with \\nas. You then get this (click the thumbnail):

Of course, what do you do when you want to use the disk directly with your Windows system? Options are a bit limited:
- You can use Explore2FS. This tool gives you an explorer view on the ext3 partitions on the disk. I only managed to read from them. Writing did not work. Too bad…
- Use a file system driver. The author of Explore2FS also created a driver for windows that can read ext2 and ext3 file systems.
- Use Linux.
Of course, I am not going to use Linux as my main operating system. But to read and write to this NSLU2 formatted disk, I did use Knoppix in a VMWare session. Since VMWare supports USB, the partititions showed up on the Knoppix desktop after plugging in the disk. You can then right click on the icon to make the partition read/write (it is read-only by default). Nice solution when you need write access but maybe a bit complicated.
Now for the cool stuff!!! On the net, you can find a lot of information about hacking the NSLU2. Kudos to those guys because I could never find these things myself. The first thing I wanted to try was to telnet into the NSLU2 to get root access to its operating system. Here are the steps to do this:
- Enable telnet by surfing to http://nas/Management/telnet.cgi and clicking the Enable Telnet button. This is an undocumented feature.
- Telnet into the device and logon as root. But wait: what is the password? Well, there is a passwd file with all the passwords (remember, this is Linux). I used Knoppix to get write access to the configuration partition. I opened the passwd file and replaced the password hash with the known password hash of a user I created myself with the web interface.
- Now I can telnet to the device and logon with root. Cool !!!
Telnet:

What is the fun in having telnet access? Well, there are packages out there to enable NFS on the device (out of the box it is only SMB). But there is a much more interesting package out there: mt-daapd.
What is mt-daapd? Well, it allows you to setup an iTunes server that announces itself using RendezVous. This means that one this package is running, the server will show up in iTunes like this:

This means you just start iTunes and you see the mp3 files served by the NSLU2. No need to map a drive to the device and add your files to iTunes. Multiple machines on the network can use the server simultaneously. And if you have an Airport Express you can stream the music to that. You will still need a pc because you need iTunes to connect to the NSLU2 to get the files and to stream the music to the Airport Express. There are devices that can handle this more elegantly of course and doing it like this is not for everyone.
The installation of the mt-daapd package is a bit complicated. You can find more information here and here.
I did not build the package myself, I just downloaded the archive at the end of the tom’s networking article and installed all files on the NSLU2 according to the instructions (for that I needed telnet). It was a long time since I last used cp, mv, mkdir, and vi.
I had one problem. The mt-daapd server did not want to enumerate my mp3 files. You have to make sure the mt-daapd server has access to your collection of mp3’s. Run chmod o+r -R /share/hdd/data/public/mp3 to fix that. When the mt-daapd server goes over your collection you might see some errors in the log file. Something like Bad mp3 header in xxx.mp3. Not all my mp3’s had this problem, and this issue is solved in newer builds of the server.
All in all, it is a fun thing to play with. For a low price, you have an SMB server, an NFS server, an iTunes server, a web server (also possible), access to your files from the internet and more.