NSLU2-Linux
view · edit · print · history

Installation

Installation of the Unslung firmware simply involves following the steps in the README precisely without leaving out any steps or skipping ahead. Over 500 people have installed Unslung firmware using the instructions in the README, so make sure you've followed the steps exactly before asking for help.

The README can be found on the Unslung Download Page. If you spot a problem with the README documentation that comes with the Unslung firmware, please document it in the Readme suggestions.

Several assumptions are made if you are planning to use Unslung firmware:

  1. You already know your way around the Linksys web interface.
  2. You will read the README for installation and will follow the instructions precisely.
  3. You will search the Wiki first at http://www.nslu2-linux.org/wiki/Site/Search when you run into problems before asking questions in channel or on the mailing list.

New User's Guide

Unslung is a replacement firmware image for the Linksys NSLU2 which is designed to allow you to make changes to the root filesystem (including the installation of downloadable packages) while still providing all the standard product functionality.

If, at any time, you have any questions concerning the installation or operation of Unslung firmware, your first port of call should be the NSLU2-Linux wiki at:

Specifically, check the HowTo pages and the Frequently Asked Questions before posting to the nslu2-general mailing list or asking a question in the IRC channel [#nslu2-general @ irc.freenode.net].

OK! Now that that's out of the way...

This file is provided to give general information and usage notes for the UNSLUNG firmware. If you are looking for installation instructions, please stop now and go to the README file. Follow the README instructions WORD for WORD otherwise you'll have to start over from scratch. The information contained in this file will make more sense if you have already "unslung" your NSLU2.


These "Notes" are divided into three sections:

1 - GENERAL INFORMATION
2 - IPKG PACKAGES
3 - DIVERSION SCRIPTS

GENERAL INFORMATION

As stated above, Unslung firmware is a replacement firmware image for the Linksys NSLU2. The Unslung firmware is intended to be used for loading new packages (giving enhanced or additional functionality) with minimal changes to the standard user interface and firmware. The differences in the UNSLUNG firmware from the standard Linksys firmware can be found at:

For more information about the Unslung firmware, including details on how to build it from source code yourself, look at:

There are several assumptions made in this Notes. One, you've successfully unslung your NSLU2, and can verify the basic Linksys functionality (samba users, groups, and shares setup with the Linksys interface). Two, that you can get telnet or ssh shell access to your NSLU2 from any computer on the same network as the NSLU2. Three, that you have read and understand the NSLU2-linux community rules at:

If you understand the third assumption, then you also understand that there is an emphasis on using and developing the NSLU2-Linux wiki. Clarifications and further documentation is always welcomed on the wiki.

If you are experienced with the Linux operating system, then you can make changes directly to the root filesystem - changes which are persistent across reboot. If you are experienced with development on Linux, then get involved - check the NSLU2-linux wiki at:

IPKG PACKAGES

Packages require you to be running Unslung firmware (as you may have already guessed!) In general, ipkg packages are commonly available software packages that have been ported to the NSLU2 - giving enhanced or additional functionality. If you run into problems or have specific question with a certain package, you should look on the Internet for the general documentation about the package first. If your problem is specific to the NSLU2 port, then check for further documentation for the corresponding package on the NSLU2-Linux wiki at:

When you "unsling" an external disk (check the README for instructions), downloaded packages will be installed onto that external disk. The number of packages that you can install is only limited by the size of the "data" partition on the external disk.

Package Installation Details

1) Check for network connectivity to the package repository from the NSLU2 first: "ping ipkg.nslu2-linux.org"
- If this does not work, then please check the NSLU2 DNS settings in the web interface (under "Administration", "LAN").
2) Update the NSLU2 local list of available packages: "ipkg update"
3) Check the list of available packages for ones that you want on your NSLU2: "ipkg list"
4) Install the packages: "ipkg install <package-name>"

Most packages put their startup scripts into /opt/etc/init.d - which the Unslung firmware runs at boot. You can also check the ipkg command arguments simply by typing "ipkg" at the prompt.

DIVERSION SCRIPTS

Diversion scripts are used to start packages, set variables or function definitions at the time of the NSLU2 boot. The diversion mechanism allows you to add to, or even replace the Linksys script functionality. They "divert" the normal boot scripts to perform the needed action(s) and then can either "return 1" to continue normal factory script progress or "return 0" to abort the diverted factory script. The diversion of startup scripts is done at the lowest granularity, so you can just divert the rc.xinetd script and leave all others unchanged. You are advised to use diversion scripts rather than editing system files directly (as this will allow you to upgrade the Unslung firmware in the future without having to make all of your changes again).

- Note: If you do need to edit the system files directly, you can use the "resling" script to save and load your modified system files. See the NSLU2-Linux wiki at:

Diversion scripts go in /unslung (directory off the rootfs - you will have to create that directory first). WARNING: make sure that you are loading the root filesystem from an external disk before adding diversion scripts, as if you make a bad mistake with a diversion script in /unslung in the jffs2 filesystem instead of in an external root filesystem, you may have to reflash to fix the error.

You may divert as many or as few scripts as you like. Simply add the name of the standard rc script into the appropriate /unslung directory and it will be run.

For example, I have a script /unslung/rc.local:

  #! /bin/sh
  /opt/bin/do_foo
  return 1

That will run at the beginning of the normal /etc/rc.d/rc.local, and then the rest of the factory rc.local will be executed. If I do NOT want to run the factory rc.local, my script would be:

  #!/bin/sh
  /opt/bin/do_foo
  return 0

That is, if the diversion script returns with something other than 0, it will run the rest of the factory script.

Note that any variable definitions or function declarations are allowed to happen before the diversion script is called. This allows you to use the variables and functions defined by the factory script.

Also not that telnet is not enabled by default - there is an openssh package and a dropbear package that either can replace telnet access with secure shell access.

- OpenSSH? package details on the NSLU2-Linux wiki at:
- Dropbear package details on NSLU2-Linux wiki at:

The rationale behind not enabling telnet by default is ensure that an Unslung NSLU2 has the same network footprint as a stock NSLU2 with Linksys firmware. That said, if you want to enable telnet on boot, then just install the xinetd package and follow the instructions provided with it.

view · edit · print · history · Last edited by rwhitby.
Based on work by rwhitby, tman, ByronT, EikeLang, TotalNewbie, uSURPER, Graham, and jeremyeglen.
Originally by rwhitby.
Page last modified on October 20, 2006, at 12:23 PM