Personal tools
You are here: Home Hardware SoundSlug Debian on a Linksys NSLU2 ('Slug')

Debian on a Linksys NSLU2 ('Slug')

Installing Debian on a Linksys NSLU2.

This tutorial describes how to install Debian on a Linksys NSLU2. It mainly follows the standard tutorial for this scenario, but might be of complementary interest. A different tutorial describes the installation of PDa ('PD anywhere') on this system, which together with a Speedlink USB audio interface turns the Linksys NSLU2 into an affordable sound server.

Debian installation

First, I attached the USB stick that I wanted to install Debian on to my Linksys NSLU2, and the NSLU2 to my router. Using my laptop (which was connected to the same router through WiFi) as a host for the installation process, I first downloaded the unofficial Debian image (stable version 4.0r3), which includes the proprietary ethernet drivers, from here. Unzip the archive.

Firmware Replacement

Following the first strategy for firmware replacement suggested at [1], I accessed the slug's web interface by pointing my laptop's browser to its
default IP 192.168.1.77 and logged in using the default login (username: admin, password: admin). Then, I followed the menu:

Administration -> Advanced -> Upgrade

I chose the Debian image file downloaded earlier and upgraded the firmware.

Installer

As suggested at [1], I had to wait for some minutes after

the firmware had successfully been upgraded, before the slug beeped three times, indicating that it was ready for an SSH connection to its Debian installer. Note that after the reboot, my router's DHCP had assigned a different IP (.88 instead of .77) to the Slug:

ssh installer@192.168.1.88
I used the default password install for login. This brought up the installer's GUI. Note that from here, you should not resize the installer's terminal window, since this can break your connection to the Slug [2]. In the installer, choose Start Menu, then choose a Debian mirror archive and add your HTTP proxy configuration. In the next step, we followed the recommendation from [1] and only selected the following three required modules, in order not to run out of memory during installation:
[*] partman-auto: Automatically partition storage devices (partman)
[*] partman-ext3: Add to partman support for ext3
[*] usb-storage-modules-2.6.18-6-ixp4xx-di: USB storage support

Then the installation process continued by loading additional components and detecting disks and other hardware, before it brought up the disk partitioning tool. I went for manual partitioning. On the sda drive, which I identified as my 2GB USB stick, I deleted the already existing fat16 partition and set up the following two partitions instead:

  • A 1.8 GB ext3 partition mounted at /
  • A 256 MB swap partition

Note that ext2 is not available as a file system option, which seems weird, considering that this might be advantageous in terms of limiting write cycles to the USB stick's Flash memory. Also note that while partitioning, I lost the connection to the installer - most likely due to myself resizing the terminal window. I unpowered and restarted the Slug and got the 3 beeps after a couple of minutes again, after which we could ssh to the installer and re-ran
the procedure in the same way as above (before that I actually had to delete the RSA key from ~/.ssh/known_hosts, in order to be able to ssh to the Slug). This time, the partitioner finished its job, and after choosing my preferred language, I set up root and user accounts, and off I was installing a base system. This is of course the part which takes really long (1.5 hours in my case with a not-amazingly fast internet connection). Then the installer configured apt and went on to software selection and installation. I decided not to participate in the popularity contest, and then in tasksel only selected the Standard system. The actual software installation then took about another hour, so the 2.5 hours suggested at [1] for installation are quite close to reality.

System configuration

I will not give descriptions of those edits which I do on every Debian system (installing sudo, adding standard user to sudoers file, setting bash aliases, changing the hostname). However, for people installing to (rather space-limited) USB sticks like myself, it might be worth mentioning that I configured aptitude (my favorite package managing tool) in a way that it does not install recommended packages (it does do that by default). The edits described here all follow recommendations from on the Slug.

System clock

First I set the clock manually:

sudo date --set="20080919 00:06"

 Then I installed ntp (network time protocol) as recommended at [1]:

sudo aptitude install ntp

Change power button behavior from reboot to shutdown

As suggested in /usr/share/doc/nslu2-utils/README.Debian, we decided to change the power button's behavior from reboot to shutdown. In /etc/inittab, we changed the line

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

to

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

Trying the power button immediately after this change resulted in... a reboot, but after powering off the Slug again through the terminal running on the host, and then powering up again, the power button showed the expected shutdown behavior.

Enable boot logging

This was also suggested in the Slug's /usr/share/doc/nslu2-utils/README.Debian. In order to activate boot logging to /var/log/boot, we changed a line in /etc/default/bootlogd to

BOOTLOGD_ENABLE=Yes

 Confirming processor speed

Some early versions of the Slug cam with its 266 MHz processor being underclocked to 133 MHz. To confirm that this isn't the case for mine, I followed recommendations at [3].

cat /proc/cpuinfo | grep BogoMIPS

returned a value of 266 MHz. If you get 133 MHz here, you might consider de-underclocking by some hardware-tweaking, described at [4]. Basically, you need to remove a resistor.

References:

  1. http://www.cyrius.com/debian/nslu2/install.html
  2. http://www.nslu2-linux.org/wiki/Debian/DebianInstallerDisconnectsSSH
  3. http://www.nslu2-linux.org/wiki/HowTo/BogoMIPS
  4. http://www.nslu2-linux.org/wiki/HowTo/OverClockTheSlug
Document Actions
Florian Hollerweger. Cite/attribute Resource. admin. (2008, September 19). Debian on a Linksys NSLU2 (\'Slug\'). Retrieved May 26, 2017, from Florian Hollerweger Web site: http://flo.mur.at/hardware/soundslug/debian-on-a-linksys-nslu2-slug. All Rights Reserved.