You think so?

Installing Unslung on a Linksys NSLU2

Between where I live and work, a new SIBA electronics shop just opened. It is situated next to the ICA grocery store, so it was just too tempting to enter SIBA before I went shopping for food. So I did, and after a little while I came across the computer department. They had two racks full of network gear, one with only d-link stuff, the other one with linksys stuff. As I was looking through the linksys rack I saw one of the small devices I have been thinking of buying, the Linksys NSLU2.

It is a "Network Storage Link for USB 2.0 Disk Drives ", an apparatus whose one end you plug into a LAN router and the other (two of those actually) into a usb storage medium. It is very clever and allows you to share your files across many computers and locations without having to run a PC all the time.

You guessed it, NOK895,- unzipped from my visa in no time. Well at home, I had to leave it be for two whole days - I had other stuff to do (listen to Opera and drinking beer at Underwater one day, the next day drinking wine and eating at Gautams place).

Today I finally got round to doing something to the NSLU2. I haven't connected it to a router yet, rather I just connected it directly to lan0 on my debian-on-hp laptop.

Like the topic says, I have replaced the firmware with Unslung. Unslung is one of many firmware replacements for NSLU2, and is based on the original firmware, which is linux based, so Linksys distributes the sources. What it adds is basically two things (maybe more):

  • Telnet support
  • Unslinging support.


Together, these two can be used to rebuild the whole thing. Unslinging means to copy the whole filesystem to an attached USB disk, and boot off that. This is all taken care of by a script that is included in the new firmware, and allows you to install packages like elinks and ssh on the thing. But first you need telnet access of course. smile

The process of installing teh new firmware went as such:

  • Download the Unslung firmware, unzip it.
  • Disconnect all disks.
  • Use the web interface to "upgrade" the firmware.
  • Automatically reboot.


All very easy. Now for the part where you unsling it and prepare for package installation. This was a little more work, and since the box doesn't have internet access I had to configure my ethernet card as well.

  • Shut down the box and unplug the disks.
  • Boot up and telnet into the box
    telnet 192.168.1.77
  • Connect a memory stick, wait for it to be mounted
  • Go into the web-administration and format the drive. This HAS to be done by the device, formatting it with anything else will not work (I don't know why yet, but so said the howto).
  • In the telnet session, run
     /sbin/unsling disk2 
    This will perform the needed operations including copying the filesystem to disk2 and configure the boot sequence.
  • Reboot leaving the disk plugged
  • Done


With all that covered, it was time to install some packages. This is done by the "ipkg" command, which resembles apt-get quite a lot. Normally you would run "ipkg update" and then "ipkg install pkg-name", but since it doesn't have internet access, I downloaded all the packages I needed from the repositoriy via wlan0, and set up an apache server so that the box could fetch packages on lan0.
ipkg install http://192.168.1.2/ipkg/package-name.ipk


The first thing I installed was OpenSSL, zlib and then OpenSSH. I proceeded with sudo, ncurses, bash, elinks, adduser, nano, strace, zip and tar, in that order.

All set! It was fun smile

OpenSlug
I rarely need the web interface as I want to use NFS for filesharing. After having installed the Unslung, I found that it was confusing to use for me as a linux user. For example, Unslung has its passwd file in several places other than the normal /etc/passwd, making it a strange experience to add users. So, I flashed it with OpenSlug instead, and it was more true to linux. More details coming as soon as I get to using it more - I installed it before going to sleep yesterday smile

x.org 7 and OperaDebian on a Fujitsu Siemens Amilo pro v3205

Comments

Stein VråleStein Saturday, June 24, 2006 3:04:09 PM

This looks very cool, thanks for tips and the instructions - I have to try this out some day! smile

Write a comment

You must be logged in to write a comment. If you're not a registered member, please sign up.