NSLU2-Linux
view · edit · print · history

Contents

What is Debian/NSLU2?

Debian/NSLU2 is the name given to the official Debian distribution for ARM that runs on the NSLU2, thanks to the efforts of the nslu2-linux developers to get the necessary kernel patches and utilities accepted upstream by the kernel maintainers and by the Debian Project.

Goals

The goal is to add full support for the NSLU2 and similar devices into the official Linux kernel and the Debian GNU/Linux distribution, so users can benefit from the full Debian package repository and also have slug-specific packages and patches for hardware devices such as the built-in Ethernet port, LEDs, etc.

News

  • [2009-02-14] Debian lenny (5.0) is released.
   ( And it really run fine on my Slug after a long, long installation ! ) 
Standard caveats about backup apply. Per Martin Michlmayr, you can safely ignore this message:
    Hmm. The package shipped with a symbolic link /lib/modules/2.6.18-6-ixp4xx/source
      However, I can not read the target: No such file or directory
      Therefore, I am deleting /lib/modules/2.6.18-6-ixp4xx/source

State of the project

Debian fully supports the NSLU2 using the Debian Installer (this is the setup known as Debian/NSLU2). Please visit http://www.cyrius.com/debian/nslu2/ for the recommended way to install Debian on a NSLU2.

Please note that a lot of information on this wiki is out of date. Refer to http://www.cyrius.com/debian/nslu2/ for up-to-date information about Debian on the NSLU2.

Known Problems

Installation instructions

You may still use debian installer. After connecting to the installer via SSH do the following:

  1. start the menu
  2. choose "<Go Back>"
  3. choose "Change debconf priority" and set the priority to "low"
  4. resume installation with "Choose a mirror of the Debian archive"
  5. when you'll be asked which kernel you want to use, choose "linux-image-2.6.18-5-ixp4xx"

Solution from Rainer Hlawaty.

Instructions to set up Debian/NSLU2 are available at Debian on NSLU2, using the latest Debian Lenny release (5.0.4). There is also a manual method described at http://www.cyrius.com/debian/nslu2/unpack.html, but everything should work using the automatic install.

If your device (i.e. an IXP4xx device other than the NSLU2) is not supported by the Debian Installer, then you can use the Bootstrap procedure instead.

French Version (DebianSlug): Debian GNU/Linux sur le NSLU2.

German Version (DebianSlug & DebianInstaller): Debian auf NSLU2 installieren.

Installation errata

  1. The previous installer for Debian/NSLU2 available via http://www.slug-firmware.net/d-dls.php (debian-4.0r0.zip) was hardwired to look for kernel version 2.6.18-4, but the kernels have been upgraded to 2.6.18-5 with the release if Debian 4.0r1 and the installer could not continue, causing the installation to abort. This is a known problem with Debian 4.0r1 and no longer applies to 4.0r2. The automatic install using debian-installer works correctly in 4.0r2.
  2. The previous installer for Debian/NSLU2 available via http://www.slug-firmware.net (debian-etch-rc1-20061102.zip) seems to repeatedly close SSH during installation, causing the install to restart. This is a symptom of the NSLU2 running out of available memory. [ Current Lenny installer debian-armel-5.0.4.zip from http://www.slug-firmware.net/ does not seem to have this problem anymore ]
  3. RC2 has the same problem as above when tested on an 2GB flash drive. Best bet is to format the flash drive on another box and then mount it as per the link below: You can choose to manually partition the flash drive in the installer making the second partition a 128Mb swap and the first partition the rest.

Check DebianInstallerDisconnectsSSH.

Another option is to create and format the ext3 partition on a normal PC as described in the FAQ.

Upgrade from previous versions

Upgrade from debian-installer beta2

If you are already running Debian/NSLU2 as installed by debian-installer beta2, you can upgrade to the latest version following the guide for Upgrading Debian on the NSLU2. Please note that this manual procedure is necessary due to changes in the way the kernel is loaded at boot time.

Upgrade from manual bootstrap to testing ("etch")

If you have previously installed SlugOS/LE (formerly know as DebianSlug) using the manual bootstrap procedure with Debian testing ("etch") and your root partition is /dev/sda1, you can upgrade to Debian/NSLU2 according to this message from the mailing list. To do this, first create the file /etc/kernel-img.conf with the following contents:

 do_symlinks = yes
 relative_links = yes
 do_bootloader = no
 do_bootfloppy = no
 do_initrd = yes
 link_in_boot = yes

Ethernet driver issue: If your /etc/network/interfaces looks like this, it may happen, that eth0 isn't brought up.

 auto eth0
 iface eth0 inet static
         pre-up modprobe -f ixp400
         pre-up modprobe -f ixp400_eth
         address 10.0.0.201
         netmask 255.255.255.0
         gateway 10.0.0.138

If this is the case try this:

 allow-hotplug eth0
 iface eth0 inet static
         address 10.0.0.201
         netmask 255.255.255.0
         gateway 10.0.0.138

After that, follow the guide to Upgrading Debian on the Linksys NSLU2. When you get to the step, "You need to obtain Intel's proprietary NPE-B microcode so built-in Ethernet will work.", follow the procedure documented below in the next few paragraphs.

Obtaining the NPE-B microcode

The following details a method for obtaining the NPE-B microcode, which is needed for the ethernet driver in 2.6.18. The procedure is not tested yet, so please provide feedback or update the Wiki if you find errors. Note that, apart from building the microcode from the source, this procedure is currently the only documented legal way to obtain the microcode.

Download the debian-installer image from slug-firmware.net and unpack the image using slugimage (you need a recent version of slugimage that includes second-stage bootloader support (the -L switch.).

(For Ubuntu users, fiesty is not up to date as of 09/09/07 and slugimage should be downloaded from the debian unstable repository and installed using dpkg. Frank: Ubuntu users can extend the software source for the installation to gutsy and will have the recent version

  sudo gedit /etc/apt/sources.list

add an additional line with

  deb http://at.archive.ubuntu.com/ubuntu/ gutsy universe

update your package list and install the newest version. remove the line afterwards again.).

 apt-get install slugimage
 slugimage -u -i di-nslu2.bin       # di-nslu2.bin is the debian-installer

Endian swap the initramfs (ramdisk.gz).

 apt-get install devio
 devio '<< ramdisk.gz; xp $ 4' > ramdisk-swap.gz

Unpack the initramfs into a directory e.g. initrd.

 mkdir initrd; cd initrd
 zcat ../ramdisk-swap.gz | cpio -i

The NPE microcode firmware will be in the lib/firmware directory. It is called NPE-B.01000201. Copy this file as root to /lib/firmware on the slug or to /mnt/lib/firmware if you are creating a usb drive image, and then create a symbolic link in /lib/firmware called NPE-B which points to NPE-B.01000201.

 [s]cp NPE-B.01000201 [user@hostname:][/mnt]/lib/firmware/
 [ssh user@hostname]
 cd [/mnt]/lib/firmware; sudo ln -s NPE-B.01000201 NPE-B

Upgrade from manual bootstrap to unstable ("sid")

If you have previously bootstrapped your NSLU2 to Debian unstable ("sid"), you will have to adjust your /etc/apt/sources.list file in order to install the correct packages for kernel 2.6.18. Before you start the upgrade procedure, add a line to /etc/apt/sources.list for testing (remember to use your favorite Debian mirror):

 deb http://ftp.XX.debian.org/debian testing main non-free contrib

Now follow the same steps mentioned above for etch: create the /etc/kernel-img.conf and follow the upgrade guide. However, during the upgrade procedure, at the point you have to install the kernel packages, use this command to get the correct packages for kernel 2.6.18:

 apt-get -t testing install linux-image-2.6-ixp4xx

Links to more Debian/NSLU2 documentation

The Debian/NSLU2 FAQ.

To learn how to build a Debian/NSLU2 image, see BuildImage.

See ChangeKernelCommandLine for how to change the command line passed to the kernel by the second-stage bootloader, APEX, in a Debian/NSLU2 system.

If you want to free up some space in your internal flash, see NoInitramfs.

To use the Debian Installer with a FatSlug, follow the instructions here.

To use a Hauppauge WinTV PVR USB2, see InstallWinTVPVRUSB2

For information on installing rtorrent, go here InstallRtorrentOnDebian

Troubleshooting

Section moved to the Debian/NSLU2 Troubleshooting page.

Native Development

The Debian build-essential package should install without problems, however if you try to compile more than a few dozen lines you might see problems that don't appear to make sense. The first thing to check is that you have enough memory: on a system with 32Mb physical RAM Debian might only install another 90Mb swapspace.

I believe that in order to fix this you will have to reinstall, deleting/recreating partitions to get sensible sizes. Based on the fact that I've seen building the Lazarus GUI taking 200Mb I suggest 256Mb swap as a minimum, 512Mb is probably adequate.

Other Solutions

The old solution to run Debian packages in the NSLU2 is SlugOS/LE, previously known as DebianSlug. This solution uses the SlugOS kernel in little-endian mode, in a way that is compatible with the Debian arm distribution. This setup requires a manual bootstrap procedure and is no longer the recommended solution to run Debian in the slug.

Also available is Big Endian DebianSlug (known as OpenDebianSlug, because it uses the big-endian OpenSlug binary image). Since Debian does not provide big endian ARM as a supported Debian architecture, OpenDebianSlug makes use of the unofficial armeb port of Debian. Currently, only parts of debian sarge and sid are available.

French support

I have added some guidelines in french to install Debian on the Slug, with an associated support forum. Everything is located here and in the forum section of the site.