NSLU2-Linux
view · edit · print · history

OpenSlug.UpgradingOpenSlugToANewRelease History

Hide minor edits - Show changes to markup

October 24, 2006, at 08:38 PM by starzi -- problem with kernel modules
Added lines 93-98:

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.

--------------------------------------------------------------------------------------------------------------------------------------

August 22, 2006, at 03:41 PM by Philip Johnson plasticmonkey -- This page needed some wiki love!
Changed lines 1-22 from:

plasticmonkey: these instructions did not work for me upgrading from OpenSlug 2.7 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 these 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. --------------------------------------------------------------------------------------------------------------------------------------

to:

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

Added line 19:
Added line 28:

Upgrading from OpenSlug 2.0 to any release upto 2.7-beta

Changed lines 30-31 from:

changing, for typical users who only have a single root partition:

to:

changing for typical users who only have a single root partition:

Changed lines 60-89 from:

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.

Upgrade from OpenSlug 2.0 - instructions that worked for me

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

to:

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

Changed lines 76-78 from:
  1. I was then able to copy loads of config files from my old rootfs /etc/samba/* /etc/hosts /etc/fstab /etc/shells and others

[jbowler: note that the above 9 step process will destroy important parts of the configuration on the non-flash root file system, you will have to restore these by hand.]

to:
  1. 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

--------------------------------------------------------------------------------------------------------------------------------------

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.


Troubleshooting

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.

August 16, 2006, at 12:07 AM by Dave Hooper stripwax --
Added line 18:
August 16, 2006, at 12:07 AM by Dave Hooper stripwax -- Add my experiences here..
Changed line 18 from:
to:

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.

August 09, 2006, at 08:39 PM by nowrap -- added an update note
Added lines 17-21:

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.

--------------------------------------------------------------------------------------------------------------------------------------

July 02, 2006, at 05:09 PM by anonymous -- Fix turnup command line
Changed line 107 from:
  1. Attach disk, run turnup init run turnup -i -f disk /dev/sda2 (or whatever, modify line correctly for your system) and reboot.
to:
  1. Attach disk, run turnup init run turnup disk -i -f /dev/sda2 (or whatever, modify line correctly for your system) and reboot.
June 17, 2006, at 11:53 AM by Naib --
Changed lines 6-7 from:
to:

--------------------------------------------------------------------------------------------------------------------------------------

Changed lines 14-16 from:
to:

--------------------------------------------------------------------------------------------------------------------------------------

June 17, 2006, at 11:52 AM by Naib -- my experience of a 2.7 --> 3.10
Added lines 7-15:

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

June 14, 2006, at 09:10 PM by Philip Johnson -- Put small notice regarding feed changes.
Added lines 1-6:

plasticmonkey: these instructions did not work for me upgrading from OpenSlug 2.7 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 these 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.

April 12, 2006, at 10:36 PM by ByronT -- Slug-Firmware.net related changes
Changed lines 26-27 from:
  1. Download the new flash code image from http://www.openslug.org/
to:
  1. Download the new flash code image from http://www.slug-firmware.net/
October 21, 2005, at 10:44 AM by kraeml --
Changed lines 94-100 from:

[jbowler: note that the above 9 step process will destroy important parts of the configuration on the non-flash root file system, you will have to restore these by hand.] [kraeml: you can save your root-system on /dev/sda2 with: mkdir source mkdir dest mount /dev/sda2 source mount /dev/sda1 dest tar czf dest/root.tgz source]

to:

[jbowler: note that the above 9 step process will destroy important parts of the configuration on the non-flash root file system, you will have to restore these by hand.]

October 21, 2005, at 10:08 AM by kraeml --
Added lines 95-100:

[kraeml: you can save your root-system on /dev/sda2 with: mkdir source mkdir dest mount /dev/sda2 source mount /dev/sda1 dest tar czf dest/root.tgz source]

September 29, 2005, at 10:21 AM by Terry Gray -- Attempted to clarify upgrade procedure
Changed lines 1-15 from:

In normal use OpenSlug can be easily upgraded from the ipkg feeds. Simply type:

ipkg update
ipkg upgrade

However significant changes in the distribution or any changes to the kernel require upgrading to the new binary release containing these changes. To make this upgrade follow these steps:

  1. Download the binary release.
  2. For each root partition add the new release feed to the list of feeds in /etc/ipkg.
  3. After doing this run the update and upgrade steps on the root partition and then use turnup to select the next root partition to upgrade.
  4. At the last (or only) root partition do not reboot. Download the new binary image so that it is accessible and use reflash -i to write the new binary into the NSLU2 flash.
  5. Reboot

It may not be possible to reboot to the root partition after an ipkg upgrade to the new feed. It also may not be possible to boot into a root partition which has not been upgraded after upgrading the flash. Therefore it is easiest to upgrade all the root partitions first and to finish by writing the new binary image to flash.

to:

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.

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.openslug.org/
  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!

Note:

   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.

September 20, 2005, at 08:50 AM by jbowler -- clarification of what is not possible
Changed lines 14-15 from:

It is not possible to reboot to the root partition after an ipkg upgrade to the new feed. It is not possible to boot into a root partition which has not been upgraded from the new binary. Therefore it is easiest to upgrade all the root partitions first and to finish by writing the new binary image to flash.

to:

It may not be possible to reboot to the root partition after an ipkg upgrade to the new feed. It also may not be possible to boot into a root partition which has not been upgraded after upgrading the flash. Therefore it is easiest to upgrade all the root partitions first and to finish by writing the new binary image to flash.

September 20, 2005, at 08:48 AM by jbowler -- More stuff about problems
Changed lines 14-15 from:

It is not possible to reboot to the root partition after an ipkg upgrade to the new feed. It is not possible to boot into a root partition which has not been upgraded from the new binary. Therefore it is essential to upgrade all the root partitions first and to finish by writing the new binary image to flash.

to:

It is not possible to reboot to the root partition after an ipkg upgrade to the new feed. It is not possible to boot into a root partition which has not been upgraded from the new binary. Therefore it is easiest to upgrade all the root partitions first and to finish by writing the new binary image to flash.

Added lines 32-39:

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.

September 20, 2005, at 08:40 AM by jbowler -- Proper instructions for failed upgrades using ipkg -o
Changed lines 22-23 from:

Use turnup disk -i -f (or nfs etc as appropriate) to overwrite the system files in the root partition. 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.

to:

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.

September 20, 2005, at 08:30 AM by jbowler -- Note about the addend
Added lines 37-38:

[jbowler: note that the above 9 step process will destroy important parts of the configuration on the non-flash root file system, you will have to restore these by hand.]

August 10, 2005, at 10:24 AM by Dan Scott -- Added upgrade from 2.0
Changed lines 22-37 from:

Use turnup disk -i -f (or nfs etc as appropriate) to overwrite the system files in the root partition. 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.

to:

Use turnup disk -i -f (or nfs etc as appropriate) to overwrite the system files in the root partition. 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.

Upgrade from OpenSlug 2.0 - instructions that worked for me

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 -i -f disk /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
July 22, 2005, at 09:51 PM by jbowler --
Changed lines 8-13 from:
Download the binary release.
For each root partition add the new release feed to the list of feeds in /etc/ipkg.
After doing this run the update and upgrade steps on the root partition and then use turnup to select the next root partition to upgrade.
At the last (or only) root partition do not reboot. Download the new binary image so that it is accessible and use reflash -i to write the new binary into the NSLU2 flash.
Reboot
to:
  1. Download the binary release.
  2. For each root partition add the new release feed to the list of feeds in /etc/ipkg.
  3. After doing this run the update and upgrade steps on the root partition and then use turnup to select the next root partition to upgrade.
  4. At the last (or only) root partition do not reboot. Download the new binary image so that it is accessible and use reflash -i to write the new binary into the NSLU2 flash.
  5. Reboot
July 22, 2005, at 09:51 PM by jbowler --
Added lines 1-22:

In normal use OpenSlug can be easily upgraded from the ipkg feeds. Simply type:

ipkg update
ipkg upgrade

However significant changes in the distribution or any changes to the kernel require upgrading to the new binary release containing these changes. To make this upgrade follow these steps:

Download the binary release.
For each root partition add the new release feed to the list of feeds in /etc/ipkg.
After doing this run the update and upgrade steps on the root partition and then use turnup to select the next root partition to upgrade.
At the last (or only) root partition do not reboot. Download the new binary image so that it is accessible and use reflash -i to write the new binary into the NSLU2 flash.
Reboot

It is not possible to reboot to the root partition after an ipkg upgrade to the new feed. It is not possible to boot into a root partition which has not been upgraded from the new binary. Therefore it is essential to upgrade all the root partitions first and to finish by writing the new binary image to flash.

If the flash fails

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

If you forget to upgrade a root partition

Use turnup disk -i -f (or nfs etc as appropriate) to overwrite the system files in the root partition. 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.

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