Martin Michlmayr
A NSLU2 from the front

Manually unpacking a tar ball of Debian on NSLU2

If you want to run Debian on your NSLU2, you can manually unpack a tar ball which I have prepared for these systems. You simply have to attach the USB drive to a PC running Linux first to prepare it according to the following instructions. If you're not running Linux on your PC, you can use a Linux live CD, such as Knoppix or Debian Live.

Preparing the hard drive

First, you have to partition the disk (we'll use /dev/sdb in the following examples but you have to replace this with the device name of your disk). I have used the partition scheme where a separate partition is used for /home. Therefore, you need to create /dev/sdb1 for the boot partition, /dev/sdb2 for the root partition, /dev/sdb3 as an extended partition from which swap (sdb5) and home (sdb6) are created. You can use a different layout but in this case you need to adapt /etc/fstab after unpacking the tar ball. The root partition has to be the 2nd primary partition (i.e. /dev/sdb2 in this example) since the root device is hard-coded in the ramdisk.

I used the following layout:

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          31      248976   83  Linux
/dev/sdb2              32         882     6835657+  83  Linux
/dev/sdb3             883        9729    71063527+   5  Extended
/dev/sdb5             883         913      248976   82  Linux swap
/dev/sdb6             914        9729    70814488+  83  Linux

Use fdisk to partition your disk (let's call the disk sdb for now). Mark sdb1 as a bootable partition (press the key a in fdisk) and make sure that the partition is labelled as a Linux partition (type 83). Make sure that the root partition is large enough to install all the applications you're interested in (at least 2-3 GB on a hard drive, and whatever you can spare if you're using a USB stick). Now format the drive:

mkfs.ext2 /dev/sdb1
mkfs.ext3 /dev/sdb2
mkfs.ext3 /dev/sdb6
mkswap /dev/sdb5

Mount the disk somewhere:

mount /dev/sdb2 /mnt
mkdir /mnt/boot
mount /dev/sdb1 /mnt/boot

Downloading and installing the Debian base system

You have to download the compressed base system. The tar ball contains a basic system with a standard set of Debian packages. You can choose between a tar ball containing Debian 6 (squeeze) and Debian 7 (wheezy):

Please be aware that these tar balls are not up-to-date and therefore lack important security updates. Please upgrade to the latest Debian release (jessie, version 8) immediately after the installation.

Verify that the GPG signature matches:

gpg --keyserver --recv-key 68FD549F
gpg --verify base.tar.bz2.asc base.tar.bz2

Now untar this system onto the drive as the root user and unmount the disk:

cd /mnt
tar -xjvf ~/base.tar.bz2
cd /
umount /mnt/boot
umount /mnt

Boot the system

Now you have to write the Debian firmware image to your NSLU2. You can do this with upslug2, a tool for Linux and Unix which can be used to write a firmware image to the NSLU2 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.

Download the firmware image:

Write the firmware file to your NSLU2 using upslug2:

upslug2 -i sda2-version

Connect your hard drive immediately when upslug2 is done and then your device will reboot. The first time you boot, the system will probably check your drives. Please wait patiently until this is over. When the drive check is done, your NSLU2 will reboot again and directly boot into your new Debian system.

The system includes support for the Intel IXP4xx network chip (including the proprietary microcode that is required for operation) and will try to obtain an IP address via DHCP on eth0. SSH is installed and remote root logins are allowed. The password is root. There are no users yet. The RSA key of the host is:


What to do now

You now have a working system. There are a few things you should do, though:


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.

Go back to my Debian on NSLU2 page.