NSLU2-Linux
view · edit · print · history

Unslung.NewUsersGuide History

Hide minor edits - Show changes to markup

October 20, 2006, at 12:23 PM by rwhitby --
Changed lines 11-12 from:
  1. You will search the Wiki first at http://www.nslu2-linux.org/wiki/Main/SearchWiki when you run into problems before asking questions in channel or on the mailing list.
to:
  1. 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.
April 12, 2006, at 09:30 PM by rwhitby --
Changed lines 5-6 from:

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.

to:

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.

Changed lines 21-22 from:

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].

to:

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].

Changed lines 25-26 from:

This file is provided to give general information and usage notes for the UNSLUNG-4.x 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.

to:

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.

Changed lines 37-38 from:

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 4.x firmware from the standard Linksys 2.3R25 firmware can be found at:

to:

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:

Added lines 108-111:
- OpenSSH? package details on the NSLU2-Linux wiki at:
http://www.nslu2-linux.org/wiki/HowTo/UseOpenSSHForRemoteAccess
June 01, 2005, at 11:11 PM by tman -- Removing the term"brick" since it ISN'T accurate.
Changed lines 25-26 from:

This file is provided to give general information and usage notes for the UNSLUNG-4.x firmware. If you are looking for installation instructions, please stop now and go to the README file. Follow the README instructions WORD for WORD to keep from turning your NSLU2 into a brick. The information contained in this file will make more sense if you have already "unslung" your NSLU2.

to:

This file is provided to give general information and usage notes for the UNSLUNG-4.x 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.

May 29, 2005, at 10:45 AM by rwhitby --
Changed lines 21-22 from:

Specifically, check the HowTos? 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].

to:

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].

May 29, 2005, at 10:43 AM by rwhitby -- Updated for Unslung 4.x
Changed lines 3-6 from:

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 uNSLUng, please document it in the Readme suggestions.

to:

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.

Changed lines 21-22 from:

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

to:

Specifically, check the HowTos? 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].

Changed lines 25-26 from:

This file is provided to give general information and usage notes for the UNSLUNG-3.x firmware. If you are looking for installation instructions, please stop now and go to the README file. Follow the README instructions WORD for WORD to keep from turning your NSLU2 into a brick. The information contained in this file will make more sense if you have already "unslung" your NSLU2.

to:

This file is provided to give general information and usage notes for the UNSLUNG-4.x firmware. If you are looking for installation instructions, please stop now and go to the README file. Follow the README instructions WORD for WORD to keep from turning your NSLU2 into a brick. The information contained in this file will make more sense if you have already "unslung" your NSLU2.

Changed lines 37-40 from:

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 3.x firmware from the standard Linksys 2.3R25 firmware can be found at:

http://www.nslu2-linux.org/wiki/Unslung/UnslungStandard
to:

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 4.x firmware from the standard Linksys 2.3R25 firmware can be found at:

http://www.nslu2-linux.org/wiki/Unslung/UnslungFeatures
Changed lines 51-52 from:

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

to:

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:

Changed lines 61-68 from:

If 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 "conf" partition on the external disk.

- If you run out of room on the "conf" partition, you can always put symlinks across to the "data" partition. From a prompt:
  mkdir /share/hdd/data/opt
  mv /share/hdd/conf/opt/* /share/hdd/data/opt
  rm /opt; ln -s /share/hdd/data/opt /opt
to:

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.

Changed lines 71-78 from:
3) Update the NSLU2 list of available feeds: "ipkg install unslung-feeds"
4) Update the list of available packages from new feeds: "ipkg update"
5) Check the list of available packages for ones that you want on your NSLU2: "ipkg list"
6) Install the packages: "ipkg install <package-name>"
to:
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>"
Changed lines 85-88 from:

Diversion scripts can go into three places. The three locations are: /unslung (directory off the rootfs), /share/hdd/conf/unslung (directory off a drive plugged into the Disk1 port), or /share/flash/conf/unslung (directory off a drive plugged into the Disk2 port). These last two locations are used for "Pluggable Personalities" - meaning that the diversion scripts placed in those two locations are ONLY run when the drive is plugged in and recognized at boot time. If you always want a diversion script to run - independent of what disks/flash drives are plugged in, then put the diversion script into /unslung (you will have to create that directory first). WARNING: if you make a bad mistake with a diversion script in /unslung, you may have to reflash to fix the error.

Note: In the old README and older versions of Unslung (anything prior to 3.16), /unslung was a symlinked directory to the /share/hdd/conf/unslung. With unslung 3.16 and later, that symlink DOES NOT need to exist (and should not exist) as any diversion script located in the pluggable locations will be run IF the hard drive or flash unit is plugged in and recognized at boot time.
to:

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.

Changed lines 112-118 from:

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, store the following script as /unslung/rc.xinetd:

  #!/bin/sh
  if ( [ ! -f /etc/inetd.conf ] || !(grep telnetd /etc/inetd.conf -q) ) then
echo "telnet stream tcp nowait root /usr/sbin/telnetd" >> /etc/inetd.conf fi return 1
to:

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.

February 18, 2005, at 03:09 AM by ByronT --
Changed line 21 from:

Specifically, check the HowTos? and the Frequently Asked Questions before posting to the mailing list or asking a question in the IRC channel.

to:

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

February 07, 2005, at 12:21 AM by ByronT --
Changed line 11 from:
  1. You will search the Wiki first http://www.nslu2-linux.org/wiki/Main/SearchWiki when you run into problems before asking questions in channel or on the mailing list.
to:
  1. You will search the Wiki first at http://www.nslu2-linux.org/wiki/Main/SearchWiki when you run into problems before asking questions in channel or on the mailing list.
February 07, 2005, at 12:12 AM by ByronT --
Changed line 1 from:

(Not complete yet - in the meantime, follow the README in the binary distribution).

to:

Installation

Changed lines 3-59 from:

If you spot a problem with the README documentation that comes with uNSLUng, please document it in the http://www.nslu2-linux.org/wiki/Unslung/SuggestedChangesToTheReadme Readme suggestions.

to:

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 https://sourceforge.net/project/showfiles.php?group_id=116564 Unslung Download Page. If you spot a problem with the README documentation that comes with uNSLUng, please document it in the http://www.nslu2-linux.org/wiki/Unslung/SuggestedChangesToTheReadme 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 http://www.nslu2-linux.org/wiki/Main/SearchWiki 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:

http://www.nslu2-linux.org

Specifically, check the HowTos? and the Frequently Asked Questions before posting to the mailing list or asking a question in the IRC channel.

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

This file is provided to give general information and usage notes for the UNSLUNG-3.x firmware. If you are looking for installation instructions, please stop now and go to the README file. Follow the README instructions WORD for WORD to keep from turning your NSLU2 into a brick. 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 3.x firmware from the standard Linksys 2.3R25 firmware can be found at:

http://www.nslu2-linux.org/wiki/Unslung/UnslungStandard

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

http://www.nslu2-linux.org/wiki/Unslung

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:

http://www.nslu2-linux.org/wiki/Main/HomePage

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 jffs filesystem - changes which are persistent across reboot. If you are experienced with development on Linux, then get involved - check the NSLU2-linux wiki at:

http://www.nslu2-linux.org/wiki/Main/HowToGetInvolved

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:

http://www.nslu2-linux.org/wiki/Unslung/Packages
Changed line 61 from:

Introduction

to:

If 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 "conf" partition on the external disk.

Changed line 63 from:

Unslung is replacement firmware for the Linksys NSLU2 Network Storage Link device. It is designed to be backwards compatible with the stock Linksys firmware (version 2.3r25), whilst at the same time adding the ability to download and install additional software packages, and (if you are experienced with the Linux command line) the ability to make persistent changes to the Linux operating system on the device.

to:
- If you run out of room on the "conf" partition, you can always put symlinks across to the "data" partition. From a prompt:
Changed lines 65-67 from:

Installation

to:
  mkdir /share/hdd/data/opt
  mv /share/hdd/conf/opt/* /share/hdd/data/opt
  rm /opt; ln -s /share/hdd/data/opt /opt
Changed lines 69-124 from:

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).

to:

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) Update the NSLU2 list of available feeds: "ipkg install unslung-feeds"
4) Update the list of available packages from new feeds: "ipkg update"
5) Check the list of available packages for ones that you want on your NSLU2: "ipkg list"
6) 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:
http://www.nslu2-linux.org/wiki/Unslung/ReSling

Diversion scripts can go into three places. The three locations are: /unslung (directory off the rootfs), /share/hdd/conf/unslung (directory off a drive plugged into the Disk1 port), or /share/flash/conf/unslung (directory off a drive plugged into the Disk2 port). These last two locations are used for "Pluggable Personalities" - meaning that the diversion scripts placed in those two locations are ONLY run when the drive is plugged in and recognized at boot time. If you always want a diversion script to run - independent of what disks/flash drives are plugged in, then put the diversion script into /unslung (you will have to create that directory first). WARNING: if you make a bad mistake with a diversion script in /unslung, you may have to reflash to fix the error.

Note: In the old README and older versions of Unslung (anything prior to 3.16), /unslung was a symlinked directory to the /share/hdd/conf/unslung. With unslung 3.16 and later, that symlink DOES NOT need to exist (and should not exist) as any diversion script located in the pluggable locations will be run IF the hard drive or flash unit is plugged in and recognized at boot time.

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.

- Dropbear package details on NSLU2-Linux wiki at:
http://www.nslu2-linux.org/wiki/HowTo/UseDropBearForRemoteAccess

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, store the following script as /unslung/rc.xinetd:

Changed lines 126-130 from:

The README can be found on the https://sourceforge.net/project/showfiles.php?group_id=116564 Unslung Download Page.

to:
  #!/bin/sh
  if ( [ ! -f /etc/inetd.conf ] || !(grep telnetd /etc/inetd.conf -q) ) then
echo "telnet stream tcp nowait root /usr/sbin/telnetd" >> /etc/inetd.conf fi return 1
January 19, 2005, at 03:57 PM by EikeLang --
Changed line 13 from:

The readme can be found on the https://sourceforge.net/project/showfiles.php?group_id=116564 Unslung Download Page.

to:

The README can be found on the https://sourceforge.net/project/showfiles.php?group_id=116564 Unslung Download Page.

January 19, 2005, at 03:55 PM by EikeLang --
Changed lines 13-25 from:

Unslinging

Managing Packages

Diversion Scripts

To be completed ...

(Please don't paste the README in here, as that just creates a maintenance problem - one more place to make sure is up to date)

Ok, this is the NewUsersGuide. The totally clueless, but direction following person is going to end up here because its where the home page tells them to go. So, this page should probably say "Read the readme ,and you can get it *HERE*" .... as a newbie, I have no idea where the readme is!

to:

The readme can be found on the https://sourceforge.net/project/showfiles.php?group_id=116564 Unslung Download Page.

January 15, 2005, at 08:28 AM by TotalNewbie --
Changed lines 21-25 from:

(Please don't paste the README in here, as that just creates a maintenance problem - one more place to make sure is up to date)

to:

(Please don't paste the README in here, as that just creates a maintenance problem - one more place to make sure is up to date)

Ok, this is the NewUsersGuide. The totally clueless, but direction following person is going to end up here because its where the home page tells them to go. So, this page should probably say "Read the readme ,and you can get it *HERE*" .... as a newbie, I have no idea where the readme is!

January 13, 2005, at 03:37 PM by uSURPER --
Added lines 3-4:

If you spot a problem with the README documentation that comes with uNSLUng, please document it in the http://www.nslu2-linux.org/wiki/Unslung/SuggestedChangesToTheReadme Readme suggestions.

January 11, 2005, at 12:24 PM by Graham --
Changed line 1 from:

(Not complete yet - in the meantime, follow the README in the binary disribution).

to:

(Not complete yet - in the meantime, follow the README in the binary distribution).

December 29, 2004, at 12:14 AM by rwhitby --
Added lines 11-16:

Unslinging

Managing Packages

Diversion Scripts

December 29, 2004, at 12:12 AM by rwhitby --
Changed lines 13-180 from:

UNSLUNG-2.x family release README

Unslung is a replacement firmware image for the NSLU2 whic is designed to allow you to mount the root filesystem from an external disk, without changing the standard product functionality.

This is intended to be a way of distributing and loading new packages for the NSLU2, with minimal changes to the standard user interface and firmware.

The changes in the UNSLUNG 2.x firmware from the standard Linksys 2.3R25 can be found at:

        http://www.nslu2-linux.org/wiki/Unslung/UnslungStandard

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

        http://www.nslu2-linux.org/wiki/Unslung

PRE-INSTALLATION CONSIDERATIONS

  1. It is strongly recommended that you test telnet Redboot access first. See TelnetIntoRedBoot
  2. It is strongly recommended you select a 'virgin' disk for unslinging that is a disk that empty; or that can be reformatted. It is absolutely required that the disk is (or has previously been) formatted by the NSLU2. It is possible to upgrade from Unslung 1.x to Unslung 2.x without reformatting your disk. The unsling script will not touch anything in /unslung so /opt, so make sure all your file modifications are in those directories, as you were warned in the README for Unslung 1.x :-)

INSTALLATION DETAILS

  1. Make sure your NSLU2 is working properly.
  2. Flash unslung-standard-2.x.img as you normally would flash new firmware.
  3. Verify your NSLU2 is working normally at this point.
  4. Make sure that you do *not* have a disk plugged in when you reboot to perform the next part of the installation.

'UNSLINGING' DETAILS

  1. Note that this only has to be done when you update the firmware. Also note that you should not have a disk plugged in at this stage.
  2. Enable telnet by going to http://192.168.1.77/Management/telnet.cgi, and press the enable button.
  3. Telnet into the NSLU2 using the username root and password uNSLUng.
  4. Identify which drive you wish you "unsling", and plug it in. Wait a minute or two while the disk is mounted. If the disk has not been previously formatted on the NSLU2, then now is the time to do that. Make sure that the drive is recognised in the web interface.
  5. In the telnet session, run "/sbin/unsling" and watch the ramdisk files be copied to your disk. The files from the ramdisk will be copied to the "conf" partition, not the "data" partition.
  6. Note that unsling will not change the password on your disk, so if you had previously changed the password on a disk, then your password will not be changed.
  7. Reboot.

Congratulations, you're now Unslung! You should have an extra 10M of free memory to use for other things.

Make sure you add an entry to the "The Unslung 2.x" table in the Yahoo group. Just use the next free integer for your Unslung number.

If you make no further changes, your NSLU2 will continue to operate normally. But to customize things, you'll be downloading packages and adding stuff to the /unslung directory on the new hard drive root using diversion scripts.

POST-INSTALLATION DETAILS

Diversion scripts go into /unslung. You can divert as many or as few scripts as you like. Simply add the name of the standard rc script into /unslung 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.

PACKAGE INSTALLATION

  1. Run "ipkg update" on the NSLU2.
  2. Run "ipkg list" to see the available packages.
  3. Run "ipkg install <package-name>" to install them.

ADDITIONAL INFORMATION:

  1. If you wish to see the contents of the ramdisk, temporarily make a directory called /initrd in your new hard drive /, then the ramdisk will not be dismounted. You will not see a RAM benefit if you do this, so use with caution. After you're done looking at the contents of the ramdisk, unmount it and remove the initrd directory for RAM savings on the next reboot.
  2. The linuxrc is written in such a way that if a known good unslung disk is NOT attached, it will revert to failsafe booting from ramdisk.
  3. There is a version check mechanism which tags your unslung hard disk at a certain firmware version (including the unslung version) and will not boot from it if the versions do not match. When you flash a new version of unslung, then you must re-run unsling to update the root disk (and that's when you check your diversion scripts to make sure they are still compatible with the new firmware version).
  4. The unsling script will never touch any files under /unslung or /opt, so please store all your additional files there. However, any existing files that you modify in any other of the standard directories will be overwritten when you next update the firmware and unsling the disk. If you need to modify a file in /etc for example, then write a diversion script which does it on each boot (perhaps by symlinking it to a file in /opt/etc which will not be touched by unsling).
  5. The diversion of startup scripts is done at the lowest granularity, so you can, for instance, just divert the rc.xinetd script if you want, and leave all the others unchanged.
  6. The diversion mechanism allows you to add to, or replace, the Linksys script functionality.
  7. The /sbin/unsling script can take a new version of the Linksys ramdisk, and update your unslung hard disk root filesystem from that. This makes sure that unslung can take advantage of any new Linksys features. As noted in item #4, if you have modified any of the files from the Linksys ramdisk, then they will be overwritten. Keep your modifications in /unslung and /opt and they will be safe.
  8. Note that telnet is not enabled by default - there is an openssh package available to replace telnet access with secure shell access. The rationale behind not enabling it by default is to ensure that an unslung NSLU2 without a hard disk attached has the same network footprint as the standard firmware.
  9. This simple diversion script will enable telnet on boot
 # /unslung/rc.xinetd 
 #! /bin/sh
 echo "telnet  stream  tcp     nowait  root    /usr/sbin/telnetd" > /etc/inetd.conf
 # Additional lines must append (using >>), ie:
 # echo "ftp   stream  tcp     nowait  root    /usr/sbin/ftpd -a=passwd" >> /etc/inetd.conf
 return 1
  1. Note that the PATH is set so that downloadable packages do not override the factory executables. This is so that a package can't break the standard functionality. You can use a diversion script or a .profile in the /root directory to change the PATH if you would prefer to take the chance and get a different behaviour.
  2. The Unslung firmware will automatically execute any scripts which are in /opt/etc/init.d - and this is where any packages put their startup scripts so that they execute on each boot.

CHANGELOG:

1.11:

First public release

1.12:

Added a symlink to slingbox for gzip. Added flashfs (as simple utility for preserving user files across hard disk formats during beta testing).

1.13:

Added LD_LIBRARY_PATH to /etc/profile (only works for telnet and ssh access, not for serial or diversion scripts).

1.14:

Added Unslung Doc link to the User Guide page.

2.3:

Moved development to OpenEmbedded.

2.4:

Updated to the latest ipk binary instead of the simple script.

2.5:

Added the real wget (instead of using the busybox version). This is so we can support .netrc files for commercial packages.

2.6:

Fixed the unsling script so it removes conflicting files on an upgrade.

2.7:

Began development of the -able variant.

2.8:

Added the patch for genesys enclosures.

2.9:

Reorganised the various variants into a more consistent scheme.

2.10:

Added the ext3flash-on-disk1 functionality.

2.11:

Added the README to /opt/doc.

2.12:

First public release of 2.x firmware.

to:

(Please don't paste the README in here, as that just creates a maintenance problem - one more place to make sure is up to date)

December 28, 2004, at 08:36 PM by jeremyeglen --
Added lines 12-180:

UNSLUNG-2.x family release README

Unslung is a replacement firmware image for the NSLU2 whic is designed to allow you to mount the root filesystem from an external disk, without changing the standard product functionality.

This is intended to be a way of distributing and loading new packages for the NSLU2, with minimal changes to the standard user interface and firmware.

The changes in the UNSLUNG 2.x firmware from the standard Linksys 2.3R25 can be found at:

        http://www.nslu2-linux.org/wiki/Unslung/UnslungStandard

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

        http://www.nslu2-linux.org/wiki/Unslung

PRE-INSTALLATION CONSIDERATIONS

  1. It is strongly recommended that you test telnet Redboot access first. See TelnetIntoRedBoot
  2. It is strongly recommended you select a 'virgin' disk for unslinging that is a disk that empty; or that can be reformatted. It is absolutely required that the disk is (or has previously been) formatted by the NSLU2. It is possible to upgrade from Unslung 1.x to Unslung 2.x without reformatting your disk. The unsling script will not touch anything in /unslung so /opt, so make sure all your file modifications are in those directories, as you were warned in the README for Unslung 1.x :-)

INSTALLATION DETAILS

  1. Make sure your NSLU2 is working properly.
  2. Flash unslung-standard-2.x.img as you normally would flash new firmware.
  3. Verify your NSLU2 is working normally at this point.
  4. Make sure that you do *not* have a disk plugged in when you reboot to perform the next part of the installation.

'UNSLINGING' DETAILS

  1. Note that this only has to be done when you update the firmware. Also note that you should not have a disk plugged in at this stage.
  2. Enable telnet by going to http://192.168.1.77/Management/telnet.cgi, and press the enable button.
  3. Telnet into the NSLU2 using the username root and password uNSLUng.
  4. Identify which drive you wish you "unsling", and plug it in. Wait a minute or two while the disk is mounted. If the disk has not been previously formatted on the NSLU2, then now is the time to do that. Make sure that the drive is recognised in the web interface.
  5. In the telnet session, run "/sbin/unsling" and watch the ramdisk files be copied to your disk. The files from the ramdisk will be copied to the "conf" partition, not the "data" partition.
  6. Note that unsling will not change the password on your disk, so if you had previously changed the password on a disk, then your password will not be changed.
  7. Reboot.

Congratulations, you're now Unslung! You should have an extra 10M of free memory to use for other things.

Make sure you add an entry to the "The Unslung 2.x" table in the Yahoo group. Just use the next free integer for your Unslung number.

If you make no further changes, your NSLU2 will continue to operate normally. But to customize things, you'll be downloading packages and adding stuff to the /unslung directory on the new hard drive root using diversion scripts.

POST-INSTALLATION DETAILS

Diversion scripts go into /unslung. You can divert as many or as few scripts as you like. Simply add the name of the standard rc script into /unslung 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.

PACKAGE INSTALLATION

  1. Run "ipkg update" on the NSLU2.
  2. Run "ipkg list" to see the available packages.
  3. Run "ipkg install <package-name>" to install them.

ADDITIONAL INFORMATION:

  1. If you wish to see the contents of the ramdisk, temporarily make a directory called /initrd in your new hard drive /, then the ramdisk will not be dismounted. You will not see a RAM benefit if you do this, so use with caution. After you're done looking at the contents of the ramdisk, unmount it and remove the initrd directory for RAM savings on the next reboot.
  2. The linuxrc is written in such a way that if a known good unslung disk is NOT attached, it will revert to failsafe booting from ramdisk.
  3. There is a version check mechanism which tags your unslung hard disk at a certain firmware version (including the unslung version) and will not boot from it if the versions do not match. When you flash a new version of unslung, then you must re-run unsling to update the root disk (and that's when you check your diversion scripts to make sure they are still compatible with the new firmware version).
  4. The unsling script will never touch any files under /unslung or /opt, so please store all your additional files there. However, any existing files that you modify in any other of the standard directories will be overwritten when you next update the firmware and unsling the disk. If you need to modify a file in /etc for example, then write a diversion script which does it on each boot (perhaps by symlinking it to a file in /opt/etc which will not be touched by unsling).
  5. The diversion of startup scripts is done at the lowest granularity, so you can, for instance, just divert the rc.xinetd script if you want, and leave all the others unchanged.
  6. The diversion mechanism allows you to add to, or replace, the Linksys script functionality.
  7. The /sbin/unsling script can take a new version of the Linksys ramdisk, and update your unslung hard disk root filesystem from that. This makes sure that unslung can take advantage of any new Linksys features. As noted in item #4, if you have modified any of the files from the Linksys ramdisk, then they will be overwritten. Keep your modifications in /unslung and /opt and they will be safe.
  8. Note that telnet is not enabled by default - there is an openssh package available to replace telnet access with secure shell access. The rationale behind not enabling it by default is to ensure that an unslung NSLU2 without a hard disk attached has the same network footprint as the standard firmware.
  9. This simple diversion script will enable telnet on boot
 # /unslung/rc.xinetd 
 #! /bin/sh
 echo "telnet  stream  tcp     nowait  root    /usr/sbin/telnetd" > /etc/inetd.conf
 # Additional lines must append (using >>), ie:
 # echo "ftp   stream  tcp     nowait  root    /usr/sbin/ftpd -a=passwd" >> /etc/inetd.conf
 return 1
  1. Note that the PATH is set so that downloadable packages do not override the factory executables. This is so that a package can't break the standard functionality. You can use a diversion script or a .profile in the /root directory to change the PATH if you would prefer to take the chance and get a different behaviour.
  2. The Unslung firmware will automatically execute any scripts which are in /opt/etc/init.d - and this is where any packages put their startup scripts so that they execute on each boot.

CHANGELOG:

1.11:

First public release

1.12:

Added a symlink to slingbox for gzip. Added flashfs (as simple utility for preserving user files across hard disk formats during beta testing).

1.13:

Added LD_LIBRARY_PATH to /etc/profile (only works for telnet and ssh access, not for serial or diversion scripts).

1.14:

Added Unslung Doc link to the User Guide page.

2.3:

Moved development to OpenEmbedded.

2.4:

Updated to the latest ipk binary instead of the simple script.

2.5:

Added the real wget (instead of using the busybox version). This is so we can support .netrc files for commercial packages.

2.6:

Fixed the unsling script so it removes conflicting files on an upgrade.

2.7:

Began development of the -able variant.

2.8:

Added the patch for genesys enclosures.

2.9:

Reorganised the various variants into a more consistent scheme.

2.10:

Added the ext3flash-on-disk1 functionality.

2.11:

Added the README to /opt/doc.

2.12:

First public release of 2.x firmware.

December 28, 2004, at 02:41 AM by rwhitby --
Changed line 9 from:

Installation of the Unslung firmware simply involved 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).

to:

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).

December 28, 2004, at 02:40 AM by rwhitby --
Changed line 9 from:

Installation of the Unslung firmware simply involved 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 the chances of a problem not being yours is slim (however, not zero - so if you really have followed the steps exactly and it doesn't work then please do ask for help).

to:

Installation of the Unslung firmware simply involved 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).

December 28, 2004, at 02:39 AM by rwhitby --
Changed line 9 from:
to:

Installation of the Unslung firmware simply involved 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 the chances of a problem not being yours is slim (however, not zero - so if you really have followed the steps exactly and it doesn't work then please do ask for help).

December 28, 2004, at 01:33 AM by rwhitby --
Changed lines 1-11 from:

Describe NewUsersGuide here.

to:

(Not complete yet - in the meantime, follow the README in the binary disribution).

Introduction

Unslung is replacement firmware for the Linksys NSLU2 Network Storage Link device. It is designed to be backwards compatible with the stock Linksys firmware (version 2.3r25), whilst at the same time adding the ability to download and install additional software packages, and (if you are experienced with the Linux command line) the ability to make persistent changes to the Linux operating system on the device.

Installation

To be completed ...

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