/ Technical / Servers / NSLU2

NSLU2 and Debian

The NSLU2 is a small box, made by Linksys, designed to allow easy sharing of USB disks over the network. A NAS basically. What makes it even better is that it uses linux as the base OS and so Linksys we forced to release the source code. Various firmware options are available for the NSLU2, but of most interest to me was a full debian install.

Installation of Debian Etch

The Debian Install Process was relatively straightforward, but because I originally had the oldest Linksys firmware I couldn't upload the new firmware using the web interface. I had to use a windows based application to upload the latest Linksys firmware first - details can be found here.

The references section contains links to other sites with a good description of the installation process.

Configuration

For my reference, as much as anything, I've documented some of the configuration steps I performed after installing debian etch on a 1GB USB stick.

First off, keep the clock in sync.

apt-get install ntp
ntpd -gq

I don't like using vi, so I always install emacs.

apt-get install emacs21-nox
echo "(setq make-backup-files nil)" > ~/.emacs

Check the CPU speed with the following command and look at the BogoMIPS value. It is possible to get it to 26Mhz 6if it is closer to 133 - there are various guides on the internet about how to do this, but it involves removing a resistor from the board.

cat /proc/cpuinfo

ARM compatible java runtime environment.

apt-get install java-gcj-compat

Server polling to run my spider software (installed binary is called quakestat).

apt-get install qstat

Torrent downloading.

apt-get install screen rtorrent

Make the power button shutdown the system and not restart it. In /etc/inittab update the shutdown line to read as follows;

ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -h now

Change fstab to use the UUID of the root partition so that connecting new disks doesn't affect booting. The UUID is the bottom line in the output from the following command. Update /etc/fstab to contain UUID=<UUID> instead of /dev/sda1

tree /dev/disk

Play a little tune on reboot (make sure to run apt-get install beep) - add the following to /etc/rc.local

/usr/bin/beep -e /dev/input/event0 -f 329.628 -l 100 -D 20
/usr/bin/beep -e /dev/input/event0 -f 391.995 -l 100 -D 20
/usr/bin/beep -e /dev/input/event0 -f 523.251 -l 100 -D 20
/usr/bin/beep -e /dev/input/event0 -f 261.626 -l 300

References