view · edit · print · history

Information for users upgrading from 2.x -> 3.10

The method used for upgrading to OpenSlug 3.10 differs from previous versions of OpenSlug and users are advised to read the appropriate section below.

General Information

Many OpenSlug upgrades may be accomplished solely by using the ipkg commands:

ipkg update
ipkg upgrade

However, any upgrades that alter the code in the NSLU2's flash memory require a different procedure. That's because the code in system flash memory must be compatible with the programs and config files in the root filesystem (on an external disk or flash card) or else the NSLU2 won't boot.

For example, it may not be possible to reboot to the root partition after an ipkg upgrade to a new feed. Conversely, after upgrading the

system flash, it also may not be possible to boot into a root partition which has not been upgraded to contain packages from the corresponding new feed (the set of packages in the root filesystem).

To be safe therefore, it is best to upgrade the root partition first and then (before rebooting) update the code image in the NSLU2 system flash memory.

Upgrading from OpenSlug 2.0 to any release upto 2.7-beta

Here's the recommended procedure for upgrading when the flash code is changing for typical users who only have a single root partition:

  1. Download the new flash code image from http://www.slug-firmware.net/
  2. This is usually a zip file, so unzip it to reveal the new flash image file. Store the actual image file somewhere that is accessible from the Slug, e.g. on the same drive where the root filesystem lives.
  3. While connected to the OpenSlug via ssh, change the ipkg configuration files to reflect the new version of the feed. These files are stored in the /etc/ipkg directory, so change directory with the command:
    cd /etc/ipkg
    Then edit the "cross-feed.conf" and "native-feed.conf" files in the /etc/ipkg directory to reflect the latest feed version. For example, the config line in each file might end in "2.5-beta" and the new version might be "2.7-beta", so in this case edit the 5 to become 7 with your favorite editor.
  4. Now update the packages in the root filesystem via these two commands:
    ipkg update
    ipkg upgrade
    Note: do not reboot the slug yet.
  5. Remember where you saved the downloaded flash image, then apply it to the slug with the command:
    reflash -i <path>
    where <path> is where you put the image file, e.g. /tmp/openslug-2.7-beta.bin
    This will update the system flash memory with the new binary.
  6. Reboot!


   If you have more than one root filesystem that needs upgrading,
   you can do that via the ipkg -o option (used to specify the
   location of the root filesystem you want to upgrade.)  Just make
   sure that by the time you try to boot into any particular root
   filesystem, its packages match whichever version of code is in the
   Slug's system flash memory.

Alternative Upgrade Procedure: Upgrading from OpenSlug 2.0 to any release upto 2.7-beta

Please note that this nine step process will destroy important parts of the configuration on the non-flash root file system, and you will have to restore these manually. (jbowler)

Instructions for restoring these files manually is currently beyond the scope of this document, and is left as an exercise to the reader.

(Dan Scott): I found the instructions above a little hard to follow. This is what I did to upgrade from 2.0 (I have 1 hard disk attached with two partitions one for data (/dev/sda1), and another for the root partition (/dev/sda2).

  1. Copy new binary firmware HD attached to NSLU2 (/dev/sda1 partition).
  2. Backup all data (including old root filesystem).
  3. Shutdown, detatch disks and boot NSLU2.
  4. Run turnup ram and reboot.
  5. Attach HD and mount the partition with the firmware.
  6. Run reflash -i path_to_firmware.
  7. Shutdown, detatch disks and boot NSLU2 (This would be where you would be having flashed using upslug and rebooted).
  8. Attach disk, run turnup init run turnup disk -i -f /dev/sda2 (or whatever, modify line correctly for your system) and reboot.
  9. I was then able to copy loads of config files from my old rootfs /etc/samba/* /etc/hosts /etc/fstab /etc/shells and others.

Upgrading from OpenSlug 2.x to 3.10-beta

As of August 2006, no 'official' method of upgrading to 3.10-beta has been established. According to wiki comments (available below this text), the following may work, although it has not been tested. *Please, please* ensure your root filesystem and files are backed up before attempting these instructions.

  1. Follow the instructions for upgrading from 2.0 -> 2.7 beta as listed above, but edit the "cross-feed.conf" and "native-feed.conf" files to reflect the new feed structure changes. Cross feed = http://ipkg.nslu2-linux.org/feeds/slugos-bag/cross/3.10-beta/ and native = http://ipkg.nslu2-linux.org/feeds/slugos-bag/native/3.10-beta/ etcetera.
  2. Continue with the instructions listed above, until your ipkg upgrade fails.
  3. Fix sh -> busybox symlink, and attempt ipkg update, ipkg upgrade again.
  4. Check whether mount and umount are available. If not, you need to copy your old busybox (to busybox-old) and set up the symlinks for sh, mount and umount to point to busybox old.
  5. Continue with instructions.
  6. Reboot!
  7. Restore old symlinks?

User Contributed Comments, regarding the upgrade to 3.10


starzi: Some of the kernel modules for the updated kernel version 2.6.16 were not installed automatically. I had to manually edit the file /etc/ipkg/arch.conf and add a line containing the architecture called "ixp4xxbe". Then the new modules were installed by ipkg upgrade.

Do this _before_ you reboot the slug or you will run into troubles because the network interface eth0 is also loaded as a module. So there will be no network in the updated version without the modules.


plasticmonkey: the instructions for upgrading from 2.0 to 2.7 did not work for me when upgrading to 3.10, partially due to the fact that I think the server structure has changed for the feeds (we now use /slugos-bag rather than /openslug) since 2.7.

If you want to try those instructions, I would recommend you use http://ipkg.nslu2-linux.org/feeds/slugos-bag/cross/3.10-beta/ http://ipkg.nslu2-linux.org/feeds/slugos-bag/native/3.10-beta/ etc.


Naib: I have just tried to follow these instruction plus the addmendments above to upgrade OpenSLug? from 2.7 to 3.10 It completely failed on the getting the package streams (wget unable to fetch). Changing the streams back to 2.7 resutled in the same errors!!

I decided to reboot and I was booting off the FLASH, luckly I could mount my data partition and the data is still there I have decided to just use upslug2 and reflash and re-install the root. Upgrading from 2.7 --> 3.10 seems to be a black-art and is not worth the risk of loosing data. BACKUP yr /etc and /home before you do though


nowrap: the symbolic link sh => busybox is missing after going to the first cycle of ipkg update & ipkg upgrade. after setting it manually the update could retrieve the Packages.gz and the upgrade loaded the ipkg packages.

stripwax: I found not just the sh link missing - but also mount and umount were provided by the old busybox but not by the new busybox (and don't seem to be provided by any alternative package). This meant that, after I had ipkg upgraded successfully, reflash would then fail immediately (because it needs to use the mount commands). What I had to do was copy my old busybox (to busybox-old), set up links for sh, mount, and umount, to point to busybox-old, and then I was ok.


If the flash fails

Reflash the NSLU2 using the upslug command from a remote machine.

If you forget to upgrade a root partition

Mount the root partition somewhere and use the -o option to ipkg to specify the root to update and upgrade. The delayed install scripts will be run the first time you boot into the partition.

You can also use this method to fix a problem root partition - i.e. one that you can no longer boot into. If necessary use the -force-reinstall option (with install) to reinstall packages.

If things go really badly wrong

ipkg can also be used to downgrade packages if necessary although if you have to completely reset a system it may be easier to use turnup disk -i -f (or nfs etc as appropriate) to overwrite the system files in the root partition. Use turnup flash first to get back to the flash file system.

If you have configured the root you will lose that configuration, however it will then be possible to boot into it and run the ipkg commands without losing the whole contents of the root partition.

If a partition fails to boot

Power cycle the NSLU2, it will boot back to flash. If it doesn't - if it tries to boot to the partition again - disconnect the drive (or the ethernet for NFS) and power cycle again. A partition which fails to boot will contain a file /.recovery which must be removed before the NSLU2 will attempt to use that partition again - mount the partition, make any necessary fixes, remove the file.

In some cases it may be impossible to reboot to an upgraded partition before upgrading the flash. (This happens in OpenSlug versions up to 2.6 if the shared libraries in /lib change too much in a new release, it should be fixed in future versions of OpenSlug.) If this happens the NSLU2 will boot to flash leaving /.recovery in the previous root file system.

In this case use turnup ram followed by reflash to upgrade the flash file system then use turnup to select the (previously failed) root partition.

Page last modified on October 24, 2006, at 01:38 PM