Martin Michlmayr
A NSLU2 from the front

Installing Debian on the Linksys NSLU2

Requirements and Preparation

In order to install Debian on a Linksys NSLU2, you need the following:

There is one complication: the Ethernet drivers require a proprietary microcode that cannot be included in the official images from Debian. There are basically two ways around this:

Regardless of which image you intend to use, you should configure your network settings (IP address, DNS, hostname) using the web interface before flashing the debian-installer image in case you do not want to use DHCP. Debian's installer will use those settings to bring up the network.

Please note that if you use a static IP configuration, you have to specify all information, including netmask, gateway (if you have one) and DNS. If you specify an incomplete IP configuration, Debian installer will request an IP address through DHCP instead.

Starting the Installer

First, you need to download a debian-installer firmware image which you can then flash to your NSLU2. As mentioned above, the Intel IXP4xx chip used in the Linksys NSLU2 needs some proprietary microcode for the Ethernet driver. As such, it cannot be distributed by the Debian project since we believe in free software and the advantages it offers to our users. While you can download an NSLU2 image directly from Debian this is probably not what you are looking for. It will only work if you use a USB Ethernet adapter. If you wish to use the Ethernet port of your NSLU2, you have to use the unofficial image which consists of copy of the Debian images plus the proprietary Ethernet microcode.

You can choose between one of the following methods to write the installer image di-nslu2.bin to flash:

  1. Using the web interface from the original NSLU2 firmware. Go to the administration section, choose Upgrade, browse your disk for the debian-installer image you have just downloaded. Then press the Start Upgrade button, confirm, wait for a few minutes and confirm again.

    Upgrading the firmware via the web interface

    Upgrading the firmware via the web interface

    Upgrading the firmware via the web interface

  2. Using upslug2 from any Linux or Unix machine to upgrade the machine via the network (the software is packaged for Debian).

    First, you have to put your NSLU2 in upgrade mode:

    1. Disconnect any disks and/or devices from the USB ports.
    2. Power off the NSLU2
    3. Press and hold the reset button (accessible through the small hole on the back just above the power input).
    4. Press and release the power button to power on the NSLU2.
    5. Wait for 10 seconds watching the ready/status LED. After 10 seconds it will change from amber to red (old older NSLU2) or dark orange (on newer machines). Immediately release the reset button.
    6. The NSLU2 ready/status LED will flash alternately dark orange and green (there is a 1 second delay before the first green). The NSLU2 is now in upgrade mode.

    See the NSLU2-Linux pages if you have problems with this.

    Once your NSLU2 is in upgrade mode, you can flash the new image:

    $ sudo upslug2 -i di-nslu2.bin
    Password:
    NSLU2     00:13:10:d6:1e:a7 Product ID: 1 [...]
    Upgrading LKGD61EA7 00:13:10:d6:1e:a7
        . original flash contents  * packet timed out
        ! being erased             - erased
        u being upgraded           U upgraded
        v being verified           V verified
    
      Display:
        <status> <address completed>+<bytes transmitted but not completed>
      Status:
        * timeout occurred         + sequence error detected
    
      2a013f+000000 ...UUUUUUUUUUUUUUUUUUu--------------------[...]
    

    By default, upslug2 will look for the NSLU2 on the network connected to the eth0 interface of your machine. If you have multiple network interfaces and the NSLU2 is not connected to eth0, you have to specify the network interface with the -d option (for example, -d eth1).

    Note that the tool also shows the MAC address of your NSLU2, which may come in handy to configure your DHCP server.

    After the whole image has been written and verified, the system will automatically reboot:

    [...]
      7fffff+000000 ...VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV[...]
    Rebooting... done
    

    Make sure you connect and turn on your USB disk again, otherwise debian-installer won't be able to find it.

  3. Using a tool for Windows to upgrade via the network.

After you have flashed the debian-installer image, your NSLU2 will boot and start the Debian installer. Since the NSLU2 does not have any IO device, SSH will be used for the installation. The installer will bring up the network, start the OpenSSH server and allow you to connect to the device using SSH. You have to wait approximately five minutes after the debian-installer firmware has been flashed before you can connect, but please be patient as it can sometimes take slightly longer, say 10-15 minutes. When the installer is ready, the status LED will become green and the NSLU2 will beep three times to indicate that you can now login via SSH.

Since the NSLU2 does not have an LCD, the installer cannot tell you which IP address to connect to or which password to use. With regards to the IP address, the following strategy is used:

If you're not able to connect to your NSLU2 after flashing the Debian installer, please use upslug2 to restore the original firmware from Linksys and check the network settings.

Please make sure that the NSLU2 is on a local network to which only you have access since the password from the NSLU2 firmware is not used for the installer but rather the the very generic password install. The user is installer. Connect to the installer:

ssh installer@192.168.1.77

The Installation

The installation itself should be pretty standard and you can follow the installation guide. It knows about the NSLU2 and at the end of the installation it will flash a kernel and ramdisk that will automatically boot into Debian.

Since the NSLU2 doesn't have much memory, the installer won't automatically load all installer modules that are available and will give you a list of additional modules to load. With previous versions of the installer, you had to specify some modules from the list for the installation to work. However, this is no longer necessary with the new installer for Debian 5.0 (lenny). The required modules are loaded automatically and not shown in the list. You can therefore continue without loading any additional installer modules.

The installation will take roughly 4 hours (or slightly more if you have a slow Internet connection). At the end of the installation, the installer will write the new kernel to flash. Afterwards you will get a confirmation that the installation is complete. Confirm, wait for the installer to finish and once your SSH session terminates, wait a few minutes before you can connect to your newly installed system vis SSH. You will be able to log in via SSH as root or your newly created user.

Flashing the kernel

Rebooting after d-i finishes

When you first login to your new system, it is recommended that you install the ntpdate (or ntp) package to make sure the clock is always up-to-date.

Success

You should now have a complete Debian system running on your NSLU2. You can use apt-get and other tools to install additional software. The NSLU2 is an ARM based device and the ARM architecture (called armel in Debian) is fully supported by Debian. Unlike the original firmware, the Debian port runs in little-endian mode. In case you faced any problems with the installer that couldn't be resolved, it's also possible to install Debian on your NSLU2 by manually unpacking a tar ball which I've prepared.

There are a number of resources where you can find more information about running Debian on your NSLU2. The README file from the nslu2-utils package (/usr/share/doc/nslu2-utils/README.Debian on your newly installed system) includes some important information you should definitely read. Also, there are some tips for running Linux on a flash device (in case you didn't install Debian on a hard drive but a USB flash stick) and for reducing memory usage.

Troubleshooting

If you run into any problems installing or running Debian on your Linksys NSLU2, please read the troubleshooting page.

If you find this site helpful, you're welcome to make a donation.