NSLU2-Linux
view · edit · print · history

HowTo.RecoverFromABadFlash History

Hide minor edits - Show changes to markup

November 08, 2008, at 12:34 PM by geoscouter -- remove spam
Changed lines 1-53 from:

http://www.exalead.fr/search/results?q=site%3Axboxoffer.com

to:

What do we mean by a "Bad Flash" ?

This page describes how you can get your Slug working again after its internal flash memory has somehow become corrupt. It doesn't really matter how it became corrupt since the recovery procedure is the same; the most obvious cause, however, is disconnecting the power mid way through an attempt to program the flash, or something like that.

But there are plenty of ways in which you can make your Slug unbootable without having corrupted the internal flash. For example, you may have changed the IP configuration so that it is no longer accessible on your network. Apparently a "disk full" condition can also cause boot failure. In these cases you should probably try to find another solution before resorting to re-flashing.

The role of the bootloader

The very first portion of the Slug's internal flash contains a program called Redboot. This is a bootloader and is run before Linux starts. None of the software distributed by this project changes this portion of the flash in normal use.

Redboot provides an "upgrade mode" which is entered if you hold down the reset button for 10 seconds when powering on. The normal procedure for re-flashing involves communicating with the bootloader in this mode. So if you have somehow corrupted your bootloader, this procedure can't work. In this case you need to use special JTAG hardware to re-program the flash. This is described further here. But, as noted above, the software distributed by this project doesn't change the portion of the flash containing Redboot in normal use, so you are unlikely to find yourself in this position. Possible ways of corrupting Redboot that you ought to avoid include:

  • Using the Linksys EraseAll tool.
  • Using the -C option to upslug2 (this is disabled by default).
  • Writing to /dev/mtd0 or /dev/mtdblock0.
  • Typing the wrong thing at the RedBoot or APEX command line.
  • Forgetting to copy the APEX bootloader to RAM, and then trying to upgrade the flash while running from flash.

Re-Flashing using Upslug2

This is the normal procedure for recovering from a bad flash. It is a reasonably safe method. Basically you put the Slug into "upgrade mode" by holding down the reset button for ten seconds when powering it on, and then run the upslug2 program on a PC on the same network to send the new flash data. This is all described in great detail on this page: Main.UpSlug2. You should read that page now.

Mac Users

Apparently Upslug2 works on MacOS X. This is described on the Main.Upslug2 page.

Windows Users

I believe that the Upslug2 program is not available for Windows. So if you don't have a Linux PC you should get yourself a "Live" Linux CD (e.g. Knoppix or similar) and boot from that, and then use Upslug2.

You can also use a VMWare appliance which creates a virtual Linux box on your PC. You'll need the free player and free appliance image with Debian Etch, also available at this direct link. This worked great for me. You can then install the Upslug2 program and you're away!

If for some reason you don't want to run any form of Linux on your PC, there is another way of sending the new flash data to a Slug in upgrade mode - you can use the Sercomm program. This is described in detail on this page: Main.SercommFirmwareUpdater.

An alternative procedure

There is an alternative to using Upslug2 or Sercomm in combination with RedBoot's upgrade mode. However, you almost certainly don't want to use this alternative because:

  1. This mode still requires that you have a non-corrupt Redboot program in your flash, so it can only work in cases when Upslug2 or Sercomm would also have worked.
  2. It is possible for you to corrupt your Redboot program if you don't get the commands exactly right.
  3. It is more complicated than using Upslug2 or Sercomm.

If I have failed to discourage you, the details can be found on this page: HowTo.ReflashUsingRedbootAndTFTP.

Yet another procedure, which also has no benefits that I can see and is even more obscure, is described on HowTo.ReflashUsingApexAndXmodem.

November 08, 2008, at 05:07 AM by httpwwwexaleadfrsearchresultsqsite3Axboxoffercom -- <a href=\" http://www.answers.com/xboxoffer.com \">xbox spiele</a> <a href=\" http://www.mahalo.com/Special:Search?search=site%3Axboxoffer.com&go=Searchs=web&t=0 \">xbox games</a> <a href=\" http://www.xomreviews.com/xboxoffer.com \">xbox 360 core</a>
Changed lines 1-53 from:

What do we mean by a "Bad Flash" ?

This page describes how you can get your Slug working again after its internal flash memory has somehow become corrupt. It doesn't really matter how it became corrupt since the recovery procedure is the same; the most obvious cause, however, is disconnecting the power mid way through an attempt to program the flash, or something like that.

But there are plenty of ways in which you can make your Slug unbootable without having corrupted the internal flash. For example, you may have changed the IP configuration so that it is no longer accessible on your network. Apparently a "disk full" condition can also cause boot failure. In these cases you should probably try to find another solution before resorting to re-flashing.

The role of the bootloader

The very first portion of the Slug's internal flash contains a program called Redboot. This is a bootloader and is run before Linux starts. None of the software distributed by this project changes this portion of the flash in normal use.

Redboot provides an "upgrade mode" which is entered if you hold down the reset button for 10 seconds when powering on. The normal procedure for re-flashing involves communicating with the bootloader in this mode. So if you have somehow corrupted your bootloader, this procedure can't work. In this case you need to use special JTAG hardware to re-program the flash. This is described further here. But, as noted above, the software distributed by this project doesn't change the portion of the flash containing Redboot in normal use, so you are unlikely to find yourself in this position. Possible ways of corrupting Redboot that you ought to avoid include:

  • Using the Linksys EraseAll tool.
  • Using the -C option to upslug2 (this is disabled by default).
  • Writing to /dev/mtd0 or /dev/mtdblock0.
  • Typing the wrong thing at the RedBoot or APEX command line.
  • Forgetting to copy the APEX bootloader to RAM, and then trying to upgrade the flash while running from flash.

Re-Flashing using Upslug2

This is the normal procedure for recovering from a bad flash. It is a reasonably safe method. Basically you put the Slug into "upgrade mode" by holding down the reset button for ten seconds when powering it on, and then run the upslug2 program on a PC on the same network to send the new flash data. This is all described in great detail on this page: Main.UpSlug2. You should read that page now.

Mac Users

Apparently Upslug2 works on MacOS X. This is described on the Main.Upslug2 page.

Windows Users

I believe that the Upslug2 program is not available for Windows. So if you don't have a Linux PC you should get yourself a "Live" Linux CD (e.g. Knoppix or similar) and boot from that, and then use Upslug2.

You can also use a VMWare appliance which creates a virtual Linux box on your PC. You'll need the free player and free appliance image with Debian Etch, also available at this direct link. This worked great for me. You can then install the Upslug2 program and you're away!

If for some reason you don't want to run any form of Linux on your PC, there is another way of sending the new flash data to a Slug in upgrade mode - you can use the Sercomm program. This is described in detail on this page: Main.SercommFirmwareUpdater.

An alternative procedure

There is an alternative to using Upslug2 or Sercomm in combination with RedBoot's upgrade mode. However, you almost certainly don't want to use this alternative because:

  1. This mode still requires that you have a non-corrupt Redboot program in your flash, so it can only work in cases when Upslug2 or Sercomm would also have worked.
  2. It is possible for you to corrupt your Redboot program if you don't get the commands exactly right.
  3. It is more complicated than using Upslug2 or Sercomm.

If I have failed to discourage you, the details can be found on this page: HowTo.ReflashUsingRedbootAndTFTP.

Yet another procedure, which also has no benefits that I can see and is even more obscure, is described on HowTo.ReflashUsingApexAndXmodem.

to:

http://www.exalead.fr/search/results?q=site%3Axboxoffer.com

September 07, 2007, at 09:53 PM by fcarolo -- formatting
Changed lines 35-37 from:

You can also use a VMWare appliance which creates a virtual Linux box on your PC. You'll need the free player and free appliance. This worked great for me. You can then install the Upslug2 program and you're away! (Direct link to appliance : http://www.visoracle.com/download/debian/ )

to:

You can also use a VMWare appliance which creates a virtual Linux box on your PC. You'll need the free player and free appliance image with Debian Etch, also available at this direct link. This worked great for me. You can then install the Upslug2 program and you're away!

September 07, 2007, at 09:39 AM by sjef -- direct lin kto appliance
Changed lines 36-37 from:
to:

(Direct link to appliance : http://www.visoracle.com/download/debian/ )

September 07, 2007, at 09:37 AM by sjef --
Changed lines 35-36 from:

You can also use a VMWare appliance which creates a virtual Linux box on your PC. You'll need the free player and free appliance. This worked great for me. You can then install the Upslug2 program and you're away!

to:

You can also use a VMWare appliance which creates a virtual Linux box on your PC. You'll need the free player and free appliance. This worked great for me. You can then install the Upslug2 program and you're away!

September 07, 2007, at 09:34 AM by sjef -- direct link to appliance
Changed lines 35-36 from:

You can also use a VMWare appliance which creates a virtual Linux box on your PC. You'll need the free player and free appliance. This worked great for me. You can then install the Upslug2 program and you're away!

to:

You can also use a VMWare appliance which creates a virtual Linux box on your PC. You'll need the free player and free appliance. This worked great for me. You can then install the Upslug2 program and you're away!

June 20, 2007, at 06:42 PM by fcarolo -- removed false wikilinks
Changed lines 28-30 from:

Apparently Upslug2 works on MacOS? X. This is described on the Main.Upslug2 page.

to:

Apparently Upslug2 works on MacOS X. This is described on the Main.Upslug2 page.

Changed lines 35-36 from:

You can also use a VMWare? appliance which creates a virtual Linux box on your PC. You'll need the free player and free appliance. This worked great for me. You can then install the Upslug2 program and you're away!

to:

You can also use a VMWare appliance which creates a virtual Linux box on your PC. You'll need the free player and free appliance. This worked great for me. You can then install the Upslug2 program and you're away!

June 20, 2007, at 12:17 PM by mekondelta --
Changed lines 35-36 from:

You can also use a VMWare? appliance which creates a virtual Linux box on your PC. You'll need the [[http://vmware.com/products/player/|free player] and [http://www.vmware.com/vmtn/appliances/directory/838|free appliance]. This worked great for me. You can then install the Upslug2 program and you're away!

to:

You can also use a VMWare? appliance which creates a virtual Linux box on your PC. You'll need the free player and free appliance. This worked great for me. You can then install the Upslug2 program and you're away!

June 20, 2007, at 12:17 PM by mekondelta --
Changed lines 35-36 from:

You can also use a VMWare? appliance which creates a virtual Linux box on your PC. You'll need the [free player|http://vmware.com/products/player/] and [free appliance|http://www.vmware.com/vmtn/appliances/directory/838]. This worked great for me. You can then install the Upslug2 program and you're away!

to:

You can also use a VMWare? appliance which creates a virtual Linux box on your PC. You'll need the [[http://vmware.com/products/player/|free player] and [http://www.vmware.com/vmtn/appliances/directory/838|free appliance]. This worked great for me. You can then install the Upslug2 program and you're away!

June 20, 2007, at 12:15 PM by mekondelta -- added note about using vmware for windows users
Added lines 35-36:

You can also use a VMWare? appliance which creates a virtual Linux box on your PC. You'll need the [free player|http://vmware.com/products/player/] and [free appliance|http://www.vmware.com/vmtn/appliances/directory/838]. This worked great for me. You can then install the Upslug2 program and you're away!

May 28, 2007, at 06:13 PM by llaurén --
Changed lines 12-13 from:

Redboot provides an "upgrade mode" which is entered if you hold down the reset button for 10 seconds when powering on. The normal procedure for re-flashing involves communicating with the bootloader in this mode. So if you have somehow corrupted your bootloader, this procedure can't work. In this case you need to use special JTAG hardware to re-program the flash. This is described further here. But, as noted above, the software distributed by this project doesn't change the portion of the flash containing Redboot in normal use, so you are unlikely to find yourself in this position. Possible ways of corrupting Redboot that you ought to avoid include:

to:

Redboot provides an "upgrade mode" which is entered if you hold down the reset button for 10 seconds when powering on. The normal procedure for re-flashing involves communicating with the bootloader in this mode. So if you have somehow corrupted your bootloader, this procedure can't work. In this case you need to use special JTAG hardware to re-program the flash. This is described further here. But, as noted above, the software distributed by this project doesn't change the portion of the flash containing Redboot in normal use, so you are unlikely to find yourself in this position. Possible ways of corrupting Redboot that you ought to avoid include:

March 27, 2007, at 10:12 PM by Rob Lockhart -- clarification of mistakes causing flash corruption
Changed lines 18-20 from:
  • Forgetting to copy the APEX bootloader to RAM, and then run it from RAM before upgrading the flash image.
to:
  • Forgetting to copy the APEX bootloader to RAM, and then trying to upgrade the flash while running from flash.
March 27, 2007, at 08:20 PM by Rob Lockhart -- added note of how else the flash could get corrupted
Changed lines 18-19 from:
to:
  • Forgetting to copy the APEX bootloader to RAM, and then run it from RAM before upgrading the flash image.
March 27, 2007, at 08:16 PM by Rob Lockhart -- added link to JTAG recovery page
Changed lines 12-13 from:

Redboot provides an "upgrade mode" which is entered if you hold down the reset button for 10 seconds when powering on. The normal procedure for re-flashing involves communicating with the bootloader in this mode. So if you have somehow corrupted your bootloader, this procedure can't work. In this case you need to use special JTAG hardware to re-program the flash. This is not described further here. But, as noted above, the software distributed by this project doesn't change the portion of the flash containing Redboot in normal use, so you are unlikely to find yourself in this position. Possible ways of corrupting Redboot that you ought to avoid include:

to:

Redboot provides an "upgrade mode" which is entered if you hold down the reset button for 10 seconds when powering on. The normal procedure for re-flashing involves communicating with the bootloader in this mode. So if you have somehow corrupted your bootloader, this procedure can't work. In this case you need to use special JTAG hardware to re-program the flash. This is described further here. But, as noted above, the software distributed by this project doesn't change the portion of the flash containing Redboot in normal use, so you are unlikely to find yourself in this position. Possible ways of corrupting Redboot that you ought to avoid include:

March 03, 2007, at 03:26 PM by Phil Endecott -- Link to ReflashUsingApexAndXmodem
Changed lines 49-50 from:
to:

Yet another procedure, which also has no benefits that I can see and is even more obscure, is described on HowTo.ReflashUsingApexAndXmodem.

March 03, 2007, at 02:59 PM by Phil Endecott --
Changed lines 22-24 from:

This is the normal procedure for recovering from a bad flash. It is a reasonably safe method. Basically you put the Slug into "upgrade mode" by holding down the reset button for ten seconds when powering it on, and then run the upslug2 program on a PC on the same network to send the new flash data. This is all described in great detail on this page: Main.Upslug2. You should read that page now.

to:

This is the normal procedure for recovering from a bad flash. It is a reasonably safe method. Basically you put the Slug into "upgrade mode" by holding down the reset button for ten seconds when powering it on, and then run the upslug2 program on a PC on the same network to send the new flash data. This is all described in great detail on this page: Main.UpSlug2. You should read that page now.

March 03, 2007, at 02:58 PM by Phil Endecott --
Changed lines 47-49 from:

If I have failed to discourage you, the details can be found on this page: HowTo.ReFlashUsingRedbootAndTFTP?.

to:

If I have failed to discourage you, the details can be found on this page: HowTo.ReflashUsingRedbootAndTFTP.

March 03, 2007, at 02:56 PM by Phil Endecott -- Overhaul this page, removing cruft and pointing to other pages for details of Upslug2, Sercomm and the Redboot/TFTP upgrade method.
Changed lines 1-316 from:


The factory default IP address for the slug is 192.168.1.77. This can be checked by booting the Linksys configuration CD-ROM that came with your slug. Maybe it's different that what you think it is, especially if you've Reset The Sys Conf Area.

  1. DHCP

    Some people have found reliability problems with the DHCP code in the Linksys firmware.

    If your router doesn't allow you to manually set a MAC address for a particular IP address, perhaps you should use your Linksys CD-ROM to make the slug use a fixed IP.
  2. Configuration Server Port

    Many people re-configure the Linksys web interface to another port (e.g. 8080) so that it doesn't conflict with other services they may wish to install.

    Consult your Linksys manual on information about how to do that.

Assuming none of that helps, follow the instructions below and also consider following the Reset The Sys Conf Area process.


Easiest method? Use SerComm or Upslug (Win/Linux)

In some cases, when erasing the flash worked fine, but programming did not, for instance because the upgrade was terminated prematurely, the slug falls back in failsafe upgrade mode. When it does, you can tell by the flashing Ready/Status LED in red shortly after power on. In this case telnetting into RedBoot may appear impossible, but luckily there is an easy way out. I have had success with the SerComm Upgrade Utility named "Upgrade_207_XP.exe". You have to Google for it as sercomm.com no longer has it available. This route requires that you have access to a Windows PC.

The best way to get started is to hook up the slug to the Windows PC through an isolated hub or through a standard ethernet cable (or crossover cable on older PC's). Make sure that NO DISKS ARE ATTACHED TO THE SLUG after this point.

Procedure

  1. Download the SerComm utility and a binary of the firmware you want to use to the PC;
  2. Put your slug into Firmware Upgrade mode.

    Easy Way:
    1. Turn off your slug
    2. Hold down the reset button on the slug's back panel down
    3. Turn on your slug while still pressing the Reset button
    4. Keep holding down the Reset button for 10 seconds
    5. Wait for the Ready/Status light to go solid red. (from a lighter shade of red / orange) Note: on a newer slug, there is no red anymore, it will turn from yellow to orange, hardly noticeable.
    6. Stop pressing the Reset button
    7. Wait for the Ready/Status light to alternate between red and green. Here too: not with newer slugs, they will just altenate between orange and green.

      If you don't see the alternating red/green (or orange/green) Ready/Status light, repeat this process.

I found that it's best if you release the Reset button as soon as the Ready/Status light goes red. -- Mani

  1. Fire up the SerComm utility. It will go looking for a slug on the local subnet;
  2. Select your slug in the SerComm utility
  3. Select the firmware to be loaded and press the upgrade button.

The SerComm utility will then upload the firmware image to the slug and verify it once written. Once done, you can reboot your slug. - Romix12000

Additional SerComm notes: When starting Upgrade.exe I kept getting an error message telling me to run RmDrv.exe, and then rerun Upgrade.exe - unfotunately doing so had no effect, I still kept getting the error. Then by sheer luck I discovered that the "Adapter Cards Lists:" was actually listing each of my network cards 3 or 4 times. By using the up & down keys and trial & error I eventually managed to select the correct network card, at which point it all worked flawlessly. - Lurch. I had a card disabled (a 1394 card) and got the same behavior until I enabled it. - Gunnar

More additional SerComm notes: The behaviour mentioned above happened to me too. For me the solution was to run the Sercomm utility with Administrators' rights - ABE

More additional SerComm notes: Under Windows Vista i got repeatingly blue screens (page fault in non paged area), The solution: Set the properties to compatibilitymode "XP sp2" and run the Sercomm utility with Administrators' rights - Wouter

The SerComm-Utility sees the slug with firmware 4.x and higher after putting him into upgrade mode. The SerComm-Utility left the ethernet devices on two of my machines disfunctional after browsing for slugs and another time after starting with "erasing flash" and stopped updating. seems unstable. suggestion: switch to upslug on linux/knoppix. worked reliable.

If you have access to a Linux machine, you can use the UpSlug tool instead. You will find the procedure using UpSlug at HowTo.RecoverFromABadFlashWithUpSlug.

You can also put your slug manually into Upgrade mode by giving it the upgrade command in Redboot.


MacOS User?

MacOS users currently must use The Manual Reflash Recovery Procedure listed below, because neither SerComm nor UpSlug work with it directly.

If you have Microsoft Virtual PC for Mac installed and networking setup, you might be able to accomplish the SerComm or Upslug steps. - Yemi

Using UpSlug2 to Reflash with Mac OS X

UpSlug2 works well with Mac OS X. You must use/install three pieces of software, the primary one being UpSlug2, and also libpcap, a library needed for UpSlug2 to run, and finally, you need DarwinPorts, the installation conduit by which you install libpcap. This has been tested on a PPC G5 under Mac OS 10.4.7. This has not been tested on an Intel based Mac, although it will quite possibly work fine under Rosetta emulation.

1.1 Download and install the DarwinPorts software.

1.2 Update the available ports for installation by opening up a new terminal window and typing: ports sync

1.3 Install libcap in the Terminal by typing: sudo /opt/local/bin/port install libpcap

2.1 Download and install the UpSlug2 package for OS X. [The current version at the time of this writing is 2-11, the file for OS X is named "upslug2-11-osx.tgz"]

2.2 After the upslug download archive has been expanded, locate the file named "upslug2" This file needs to be moved to the operating directory of the Terminal.

2.3 Use the Terminal to move the upslug2 file to the /usr/bin/ directory

2.3.1 or move upslug2 manually by quitting Terminal and in the Finder goto: Go > Goto Folder... and type /usr/bin/ then click "Go" in the resulatnt dialog box. The /bin/ folder should open.
2.3.2 Drag and drop the "upslug2" file into the /bin/ directory and choose "Authenticate" and type your administrative password to move upslug to the Terminal's working directory.

3.1 Connect your NSLU2 directly to your computer's ethernet port [be sure you have downloaded the flash file for reflashing]

3.1.1 If you have not already done so, Duplicate Network Port Configuration:
goto System Preferences > Network Port Configurations.
Select built in ethernet and hit "duplicate" and rename the configuration
Select the new configuration and click the "TCP/IP" tab
Select "Using DHCP with manual address,"
Enter the manual IP of the form 192.168.0.2
3.1.2 Disover NSLU2 Device code:
Open Terminal and type arp -a
Find the address for the NSLU2 under 192.168.1.77
Write the NSLU2 address replacing spaces with 0. so, 0:f:66:89:19:69 = 00:0f:66:89:19:69
3.1.3 Rewrite new temp path for NSLU2:
Open Terminal and type sudo arp -s 192.168.0.1 [the NSLU2 adress]

4.1 Reflash your NSLU2 with the UpSlug2? command line

4.2 Put your NSLU2 into upgrade mode by restarting it with only the ethernet cable connected while holding a paperclip in the reset hole in the back of the NSLU2. When the light on the fron turns red, remove the paperclip. The NSLU2 should now be blinking red. Note: on newer slugs, the red might be a darker shade of yellow: orange, not red.

4.3 Open a new Terminal window and type the following command:

sudo upslug2 -d en0 -t [the NSLU2 adress] -i [the path to the flash file]
where -d en0 specifies that you wish to use the "en0" ethernet port, the default on Macintosh computers
-t [the NSLU2 adress] specifies the address of the NSLU2 you wish to upgrade
-i [the path to the flash file] specifies the flash image you wish to use.

So, for example, the command would be typed as:

sudo upslug2 -d en0 -t 00:0f:66:89:19:69 -i ~/Desktop/NSLU2_V23R63.bin

4.4 let the command run and let the NSLU2 reboot before accessing it via the web interface or attempting to unsling it again.

- Ockham


The Manual Reflash Recovery Procedure

  1. Install a TFTP Server (or HTTP server)

    The first thing you will need to do is set up a TFTP server, if you do not already have one installed. I work mostly on OS X, so I can't give detailed instructions for Linux (I did try, briefly, to install a TFTP RPM on my Linux machine, but though it claimed to be client and server only the client seemed to be installed). If you're using OS X, feel free to contact me for details. You should set up the server with a directory to serve from; this will need to be world-readable, *as will any files you place in it* if you want them to be served.

    If you're looking for a Windows TFTP server, you can download a free one from http://solarwinds.net/downloads/index.aspx .

    For details how to setup and test TFTP Server for Windows see SetupSolarWindsTFTPServer .

    I had issues with getting the solarwinds TFTP server to work under windows. It would serve files to the local machine, but fail to send anything to the slug. What worked for me was http://tftpd32.jounin.net/

If you're looking for a small and simple alternative that's also Open Source, this is the one that worked for me after I couldn't get SolarWinds? to listen to the right interface: http://sourceforge.net/projects/tftp-server

  1. Obtain the firmware and place it in the TFTP serving directory.

    If you've made your slug unbootable I suggest you start by getting it back to default configuration by installing the official Linksys firmware - you can always upload a fancier one via the Web interface once you've got it working. Download the firmware from their site if you haven't already (NSLU2 Firmware 2.3R63) and place the 8MB firmware file found in the zip file into the TFTP directory.
  2. Connect to RedBoot via telnet or serial.
  3. Tell the NSLU2 where the TFTP server is.

    At the RedBoot prompt, type the following command:

    ip_address -h 192.168.0.99

    where 192.168.0.99 is the IP of the TFTP server. This tells RedBoot where to download the data from. You should get your prompt back after each command; I've occasionally had it hang, in which case restart and do the Ctrl-C dance again.

  4. Load the firmware.

    Now type:

    load -r -v -b 0x01000000 -h 192.168.0.99 NSLU2_V23R25.bin

    again, in this article 192.168.0.99 is the assumed IP of the TFTP server.
    (assuming, of course, that you're using the R25 firmware).
    This will load the firmware into the slug's RAM over the network.

    RedBoot also supports HTTP in addition to TFTP. All you have to do is add -m http to the load command and specify a full path (from the doc root) to the file you want ('/firm/myfirmware.bin', for example).
  5. Verify the firmware.

    For safety's sake, you can now do a checksum on the file to ensure it didn't get corrupted in transit. Simply type:

    cksum

    and you should get a set of numbers calculated from the file. For the R25 firmware, these should be: 3007264634 8388608. If not (and you're not using a different firmware version), you should probably try loading the file again.

    The checksum for NSLU2_V23R63.bin is:
RedBoot> cksum
Computing cksum for area 0x01000000-0x01800000
POSIX cksum = 4056400472 8388608 (0xf1c7c258 0x00800000)
  1. Write the firmware to the flash.

    Cross your fingers and type:

    fis write -f 0x50060000 -b 0x01060000 -l 0x7a0000

    This will write the kernel, ramdisk and trailer portions of the firmware to the right position in the flash. This may take up to 5 minutes. When it's finished and you get your Redboot prompt back, your slug should be fixed.

    Because you didn't overwrite the SysConf part of the flash, your slug will still be using the same IP address as before. Remember to set your subnets appropriately, and ensure you're looking for it in the right place. If you wish to erase the SysConf as well then follow the instructions to reset the SysConf
  2. Restart the slug.

    With fingers still crossed, type:

    reset

    Be ready to celebrate when you hear that strangled little beep it makes as it finishes booting and is ready to be used.



Manual Reflash of NSLU2_V23R63.bin

Start with entering fixed IP in your PC network settings 192.168.0.1 and add a second IP 192.168.0.2 in advanced settings.

1. Activate TFTP server. http://www.tftp-server.com/tftp-download.html

(enter root directory (where the fimware is located), enter PC ipaddress & use port 69)

2. Telnet 192.168.0.1 9000 (quick & repeadely with F3 & enter to enter boot, then ^c to enter redboot)

3. ip_address -h 192.168.0.2 (computerIP/TFTPd server)

4. load -r -v -b 0x01000000 -h 192.168.0.2 NSLU2_V23R63.bin (Firmware in TFTPd directory)

   Disable software firewall if you are unable to transfer the file!

5. fis write -f 0x50060000 -b 0x01060000 -l 0x7a0000 (Write kernel into flash)

6. Pull the power immediately at return of redboot prompt

7. Telnet 192.168.0.1 9000 (quick & repeadely with F3 & enter to enter boot, then ^c to enter redboot)

8. fis erase -f 0x50040000 -l 0x20000 (reset SysConf?)

9. reset

10. The NSLU2 should come up with Linksys firmware on 192.168.1.77 as normal.

la7dfa@gmail.com


The Manual Reflash Procedure While Using APEX

  1. Serial Console

    If you have APEX installed, then you probably already have a serial console.
  2. Boot up to the APEX command line by hitting ctrl-c
  3. Transfer over the image using the serial console

    xreceive 0x1000000

    Send over the flash image from your terminal. APEX doesn't support tftp or http for the slug yet as I know of (please correct me if not). This will take around 10 minutes to transfer over the 8M image.
  4. Erase and write the image into flash

    erase nor:0x60000+0x7a0000
    copy 0x1060000+0x7a0000 nor:0x60000

    Now, type "reset" in APEX, and it should be good. -Ming

Acknowledgements

This HowTo was originally written by Pete Verdon who based it on posts on the mailing list. Thanks to those who originally discovered and posted it, in particular Irfan29200, Smakofsky, and Rod. Apologies if anybody has been missed out.

Notes

  1. Linux allows you to add an IP address to an existing ethernet card. In my case, I've got 'eth0' so I typed the following on my desktop/server:

    ifconfig eth0:1 192.168.0.2

    As long as you're not already using the 192.168.0 network, this won't confuse anything and will only exist until you reboot (or type "ifconfig eth0:1 down" on your server) - jkpeters_37
  2. The RedBoot command reset will reboot without having to power-cycle. - jkpeters_37
  3. I found it easier to add a route to 192.168.0.1 than to add interfaces or change my current setup. - CodeWhacker
  4. The loading of the .bin should be done in about 5 seconds. My stock nslu timed out (5+ min wait) when loading from http (on a OS X Apache, my setup could be broke =)
  5. If the host IP is set, the following command will load from http server:
    load -r -m http -b 0x01000000 /NSLU2_V23R29.bin
    For the fis command, -l 0x7a0000 worked well enough with NSLU2_V23R29.bin for the purpose of then upgrading to unslung-standard-3.18-beta.bin via the web interface - willpost

Flash ROM Filled

Another way you can make your NSLU2 unbootable is by accidentally filling up your Flash directories with too much stuff. This can easily be caused by trying to install a package or refreshing the available package list without Unsling-ing to a hard drive.

In this situation, the NSLU2 Ready / Status light will continue to flash green for > 3 minutes and not make it's usual "strangled beep" noise. This also induces instant terror in the heart of the brand-new Unslung user and causes them to wonder if they've just wasted all their money and if they can take it back to the store and say "It doesn't work! Can I get a new one?" :-)

In these cases, follow the telnet instructions to get into RedBoot. Once inside, follow the standard reflashing instructions above to reapply Unslung or fallback to the standard Linksys firmware. If you have further problems, you might have to Reset The Sys Conf Area.


Historical:

The normal sequence I see when powering up my NSLU2 using Unslung 3.18 with lots of installed packages is:

  1. Solid orange Ready/Status light (1 sec)
  2. Solid orange Ready/Status and green Ethernet light (2 sec)
  3. Solid orange Ready/Status light (2 sec)
  4. Repeat previous 2 steps once with slightly shorter solid green Ethernet
  5. Solid orange Ready/Status and green Ethernet light (10 sec)
  6. All lights turn off (<0.5 sec)
  7. Flashing green Ready/Status light and flickering solid green Ethernet light (16 sec)
  8. Flashing green Ready/Status light, flickering solid green Ethernet light, and flickering solid green Disk 1 / Disk 2 light (approx. 120 sec)
  9. Solid green Ready/Status, flickering green Ethernet, flickering green Disk 1/Disk 2, and the "strangled beep" (1 sec)

Total time from power on to beep: around 150 seconds (2.5 minutes)

to:

What do we mean by a "Bad Flash" ?

This page describes how you can get your Slug working again after its internal flash memory has somehow become corrupt. It doesn't really matter how it became corrupt since the recovery procedure is the same; the most obvious cause, however, is disconnecting the power mid way through an attempt to program the flash, or something like that.

But there are plenty of ways in which you can make your Slug unbootable without having corrupted the internal flash. For example, you may have changed the IP configuration so that it is no longer accessible on your network. Apparently a "disk full" condition can also cause boot failure. In these cases you should probably try to find another solution before resorting to re-flashing.

The role of the bootloader

The very first portion of the Slug's internal flash contains a program called Redboot. This is a bootloader and is run before Linux starts. None of the software distributed by this project changes this portion of the flash in normal use.

Redboot provides an "upgrade mode" which is entered if you hold down the reset button for 10 seconds when powering on. The normal procedure for re-flashing involves communicating with the bootloader in this mode. So if you have somehow corrupted your bootloader, this procedure can't work. In this case you need to use special JTAG hardware to re-program the flash. This is not described further here. But, as noted above, the software distributed by this project doesn't change the portion of the flash containing Redboot in normal use, so you are unlikely to find yourself in this position. Possible ways of corrupting Redboot that you ought to avoid include:

  • Using the Linksys EraseAll tool.
  • Using the -C option to upslug2 (this is disabled by default).
  • Writing to /dev/mtd0 or /dev/mtdblock0.
  • Typing the wrong thing at the RedBoot or APEX command line.

Re-Flashing using Upslug2

This is the normal procedure for recovering from a bad flash. It is a reasonably safe method. Basically you put the Slug into "upgrade mode" by holding down the reset button for ten seconds when powering it on, and then run the upslug2 program on a PC on the same network to send the new flash data. This is all described in great detail on this page: Main.Upslug2. You should read that page now.

Mac Users

Apparently Upslug2 works on MacOS? X. This is described on the Main.Upslug2 page.

Windows Users

I believe that the Upslug2 program is not available for Windows. So if you don't have a Linux PC you should get yourself a "Live" Linux CD (e.g. Knoppix or similar) and boot from that, and then use Upslug2.

If for some reason you don't want to run any form of Linux on your PC, there is another way of sending the new flash data to a Slug in upgrade mode - you can use the Sercomm program. This is described in detail on this page: Main.SercommFirmwareUpdater.

An alternative procedure

There is an alternative to using Upslug2 or Sercomm in combination with RedBoot's upgrade mode. However, you almost certainly don't want to use this alternative because:

  1. This mode still requires that you have a non-corrupt Redboot program in your flash, so it can only work in cases when Upslug2 or Sercomm would also have worked.
  2. It is possible for you to corrupt your Redboot program if you don't get the commands exactly right.
  3. It is more complicated than using Upslug2 or Sercomm.

If I have failed to discourage you, the details can be found on this page: HowTo.ReFlashUsingRedbootAndTFTP?.

March 01, 2007, at 03:36 AM by mrkzander -- Steps to take if you need to recover from a bad flash upgrade
Changed lines 20-33 from:

How Is The Firmware Setup?

The firmware is divided into four sections:

  • RedBoot - The bootloader that runs when the device is first started, loads things into memory and starts Linux. RedBoot is quite sophisticated, and has a user interface that you can access by telnet or serial. You can use it to load things into memory by TFTP, write to flash, and similar tasks.
  • SysConf - This portion of the flash contains the sort of data you can modify through the Web interface, such as the hostname.
  • Linux kernel - This is a more-or-less opaque (to me, anyway) vmlinuz file containing a compressed kernel.
  • Ramdisk - This is the conventional Linux file tree - /bin, /etc, and all the rest of them - in compressed form. It's stored in flash, but gets loaded into RAM by RedBoot when Linux is run. You can modify its contents, but any changes will be lost when you reboot, as a fresh copy is loaded into RAM from flash.
  • There is also a small "trailer" at the end of the ramdisk area (in the last erase block in fact) that the slug can check.

Of these sections, hopefully RedBoot at least is still intact. If it is not, these instructions will not help you, and you'll need to talk to the hardcore JTAG people.


to:
February 18, 2007, at 12:31 PM by Wouter --
Changed lines 67-68 from:

More additional SerComm notes: Under Windows Vista i got repeatingly blue screens (page fault in non paged area), The solution: Set the properties to compatibilitymode WindowsXPSP2? and run the Sercomm utility with Administrators' rights - Wouter

to:

More additional SerComm notes: Under Windows Vista i got repeatingly blue screens (page fault in non paged area), The solution: Set the properties to compatibilitymode "XP sp2" and run the Sercomm utility with Administrators' rights - Wouter

February 18, 2007, at 12:29 PM by Wouter --
Changed lines 67-68 from:

More additional SerComm notes: Under Windows Vista i got repeatingly blue screens (page fault in non paged area), The solution: Set the properties to compatibilitymode WindowsXP? SP2? and run the Sercomm utility with Administrators' rights - Wouter

to:

More additional SerComm notes: Under Windows Vista i got repeatingly blue screens (page fault in non paged area), The solution: Set the properties to compatibilitymode WindowsXPSP2? and run the Sercomm utility with Administrators' rights - Wouter

February 18, 2007, at 12:29 PM by Wouter --
Changed lines 67-68 from:

More additional SerComm notes: Under Windows Vista i got repeatingly blue screens (page fault in non paged area), The solution: Set the properties to compatibilitymode \"WindowsXP? SP2?\" and run the Sercomm utility with Administrators' rights - Wouter

to:

More additional SerComm notes: Under Windows Vista i got repeatingly blue screens (page fault in non paged area), The solution: Set the properties to compatibilitymode WindowsXP? SP2? and run the Sercomm utility with Administrators' rights - Wouter

February 18, 2007, at 12:28 PM by Wouter --
Changed lines 67-68 from:

More additional SerComm notes: Under Windows Vista i got repeatingly blue screens (page fault in non paged area), The solution: Set the properties to compatibilitymode "WindowsXP? SP2?" and run the Sercomm utility with Administrators' rights - Wouter

to:

More additional SerComm notes: Under Windows Vista i got repeatingly blue screens (page fault in non paged area), The solution: Set the properties to compatibilitymode \"WindowsXP? SP2?\" and run the Sercomm utility with Administrators' rights - Wouter

February 18, 2007, at 12:28 PM by Wouter --
Added lines 67-68:

More additional SerComm notes: Under Windows Vista i got repeatingly blue screens (page fault in non paged area), The solution: Set the properties to compatibilitymode "WindowsXP? SP2?" and run the Sercomm utility with Administrators' rights - Wouter

February 15, 2007, at 02:59 PM by Martiniman --
Changed lines 36-37 from:

In some cases, when erasing the flash worked fine, but programming did not, for instance because the upgrade was terminated prematurely, the slug falls back in failsafe upgrade mode. When it does, you can tell by the flashing Ready/Status LED in red shortly after power on. In this case telnetting into RedBoot may appear impossible, but luckily there is an easy way out. I have had success with the SerComm Upgrade Utility found at sercomm.com. This route requires that you have access to a Windows PC.

to:

In some cases, when erasing the flash worked fine, but programming did not, for instance because the upgrade was terminated prematurely, the slug falls back in failsafe upgrade mode. When it does, you can tell by the flashing Ready/Status LED in red shortly after power on. In this case telnetting into RedBoot may appear impossible, but luckily there is an easy way out. I have had success with the SerComm Upgrade Utility named "Upgrade_207_XP.exe". You have to Google for it as sercomm.com no longer has it available. This route requires that you have access to a Windows PC.

February 15, 2007, at 02:55 PM by Martiniman --
Changed lines 88-89 from:

1.3 Install libcap in the Terminal by typing: sudo port install libpcap

to:

1.3 Install libcap in the Terminal by typing: sudo /opt/local/bin/port install libpcap

February 15, 2007, at 11:43 AM by fcarolo -- fixed some links
Changed lines 63-64 from:

Additional SerComm notes: When starting Upgrade.exe I kept getting an error message telling me to run RmDrv?.exe, and then rerun Upgrade.exe - unfotunately doing so had no effect, I still kept getting the error. Then by sheer luck I discovered that the "Adapter Cards Lists:" was actually listing each of my network cards 3 or 4 times. By using the up & down keys and trial & error I eventually managed to select the correct network card, at which point it all worked flawlessly. - Lurch. I had a card disabled (a 1394 card) and got the same behavior until I enabled it. - Gunnar

to:

Additional SerComm notes: When starting Upgrade.exe I kept getting an error message telling me to run RmDrv.exe, and then rerun Upgrade.exe - unfotunately doing so had no effect, I still kept getting the error. Then by sheer luck I discovered that the "Adapter Cards Lists:" was actually listing each of my network cards 3 or 4 times. By using the up & down keys and trial & error I eventually managed to select the correct network card, at which point it all worked flawlessly. - Lurch. I had a card disabled (a 1394 card) and got the same behavior until I enabled it. - Gunnar

Changed lines 80-83 from:

Using UpSlug2? to Reflash with Mac OS X

UpSlug2 works well with Mac OS X. You must use/install three pieces of software, the primary one being UpSlug2?, and also libpcap, a library needed for UpSlug2? to run, and finally, you need DarwinPorts, the installation conduit by which you install libpcap. This has been tested on a PPC G5 under Mac OS 10.4.7. This has not been tested on an Intel based Mac, although it will quite possibly work fine under Rosetta emulation.

to:

Using UpSlug2 to Reflash with Mac OS X

UpSlug2 works well with Mac OS X. You must use/install three pieces of software, the primary one being UpSlug2, and also libpcap, a library needed for UpSlug2 to run, and finally, you need DarwinPorts, the installation conduit by which you install libpcap. This has been tested on a PPC G5 under Mac OS 10.4.7. This has not been tested on an Intel based Mac, although it will quite possibly work fine under Rosetta emulation.

Changed lines 157-158 from:

If you've made your slug unbootable I suggest you start by getting it back to default configuration by installing the official Linksys firmware - you can always upload a fancier one via the Web interface once you've got it working. Download the firmware from their site if you haven't already (http://www.linksys.com/download/firmware.asp?fwid=217[This link didn't work so I found this one linksys.com 18 Jan 2007) and place the 8MB firmware file found in the zip file into the TFTP directory.

to:

If you've made your slug unbootable I suggest you start by getting it back to default configuration by installing the official Linksys firmware - you can always upload a fancier one via the Web interface once you've got it working. Download the firmware from their site if you haven't already (NSLU2 Firmware 2.3R63) and place the 8MB firmware file found in the zip file into the TFTP directory.

February 15, 2007, at 07:39 AM by rdb -- No preview so see if link hiding works
Changed lines 157-158 from:

If you've made your slug unbootable I suggest you start by getting it back to default configuration by installing the official Linksys firmware - you can always upload a fancier one via the Web interface once you've got it working. Download the firmware from their site if you haven't already (http://www.linksys.com/download/firmware.asp?fwid=217[This link didn't work so I found this one http://www.linksys.com/servlet/Satellite?c=L_Download_C2&childpagename=US%2FLayout&cid=1115417109974&packedargs=sku%3D1115416906769&pagename=Linksys%2FCommon%2FVisitorWrapper 18 Jan 2007) and place the 8MB firmware file found in the zip file into the TFTP directory.

to:

If you've made your slug unbootable I suggest you start by getting it back to default configuration by installing the official Linksys firmware - you can always upload a fancier one via the Web interface once you've got it working. Download the firmware from their site if you haven't already (http://www.linksys.com/download/firmware.asp?fwid=217[This link didn't work so I found this one linksys.com 18 Jan 2007) and place the 8MB firmware file found in the zip file into the TFTP directory.

January 28, 2007, at 09:53 PM by RichF -- Update link for free Windows TFTP server
Changed line 147 from:

If you're looking for a Windows TFTP server, you can download a free one from http://solarwinds.net/Download-Tools.htm .\\

to:

If you're looking for a Windows TFTP server, you can download a free one from http://solarwinds.net/downloads/index.aspx .\\

January 19, 2007, at 04:11 AM by Accelero --
Changed lines 157-158 from:

If you've made your slug unbootable I suggest you start by getting it back to default configuration by installing the official Linksys firmware - you can always upload a fancier one via the Web interface once you've got it working. Download the firmware from their site if you haven't already (http://www.linksys.com/download/firmware.asp?fwid=217) and place the 8MB firmware file found in the zip file into the TFTP directory.

to:

If you've made your slug unbootable I suggest you start by getting it back to default configuration by installing the official Linksys firmware - you can always upload a fancier one via the Web interface once you've got it working. Download the firmware from their site if you haven't already (http://www.linksys.com/download/firmware.asp?fwid=217[This link didn't work so I found this one http://www.linksys.com/servlet/Satellite?c=L_Download_C2&childpagename=US%2FLayout&cid=1115417109974&packedargs=sku%3D1115416906769&pagename=Linksys%2FCommon%2FVisitorWrapper 18 Jan 2007) and place the 8MB firmware file found in the zip file into the TFTP directory.

January 19, 2007, at 04:10 AM by Accelero --
Changed lines 157-158 from:

If you've made your slug unbootable I suggest you start by getting it back to default configuration by installing the official Linksys firmware - you can always upload a fancier one via the Web interface once you've got it working. Download the firmware from their site if you haven't already (http://www.linksys.com/servlet/Satellite?c=L_Download_C2&childpagename=US%2FLayout&cid=1115417109974&packedargs=sku%3D1115416906769&pagename=Linksys%2FCommon%2FVisitorWrapper.) and place the 8MB firmware file found in the zip file into the TFTP directory.

to:

If you've made your slug unbootable I suggest you start by getting it back to default configuration by installing the official Linksys firmware - you can always upload a fancier one via the Web interface once you've got it working. Download the firmware from their site if you haven't already (http://www.linksys.com/download/firmware.asp?fwid=217) and place the 8MB firmware file found in the zip file into the TFTP directory.

January 19, 2007, at 04:06 AM by Accelero --
Changed lines 157-158 from:

If you've made your slug unbootable I suggest you start by getting it back to default configuration by installing the official Linksys firmware - you can always upload a fancier one via the Web interface once you've got it working. Download the firmware from their site if you haven't already (http://www.linksys.com/servlet/Satellite?c=L_Download_C2&childpagename=US%2FLayout&cid=1115417109974&packedargs=sku%3D1115416906769&pagename=Linksys%2FCommon%2FVisitorWrapper) and place the 8MB firmware file found in the zip file into the TFTP directory.

to:

If you've made your slug unbootable I suggest you start by getting it back to default configuration by installing the official Linksys firmware - you can always upload a fancier one via the Web interface once you've got it working. Download the firmware from their site if you haven't already (http://www.linksys.com/servlet/Satellite?c=L_Download_C2&childpagename=US%2FLayout&cid=1115417109974&packedargs=sku%3D1115416906769&pagename=Linksys%2FCommon%2FVisitorWrapper.) and place the 8MB firmware file found in the zip file into the TFTP directory.

January 19, 2007, at 03:18 AM by Jon Fleming --
Changed lines 157-158 from:

If you've made your slug unbootable I suggest you start by getting it back to default configuration by installing the official Linksys firmware - you can always upload a fancier one via the Web interface once you've got it working. Download the firmware from their site if you haven't already (http://www.linksys.com/download/firmware.asp?fwid=217[This link didn't work so I found this one http://www.linksys.com/servlet/Satellite?c=L_Download_C2&childpagename=US%2FLayout&cid=1115417109974&packedargs=sku%3D1115416906769&pagename=Linksys%2FCommon%2FVisitorWrapper 18 Jan 2007) and place the 8MB firmware file found in the zip file into the TFTP directory.

to:

If you've made your slug unbootable I suggest you start by getting it back to default configuration by installing the official Linksys firmware - you can always upload a fancier one via the Web interface once you've got it working. Download the firmware from their site if you haven't already (http://www.linksys.com/servlet/Satellite?c=L_Download_C2&childpagename=US%2FLayout&cid=1115417109974&packedargs=sku%3D1115416906769&pagename=Linksys%2FCommon%2FVisitorWrapper) and place the 8MB firmware file found in the zip file into the TFTP directory.

January 19, 2007, at 03:13 AM by Jon Fleming -- update to Linksys firmware
Changed lines 157-158 from:

If you've made your slug unbootable I suggest you start by getting it back to default configuration by installing the official Linksys firmware - you can always upload a fancier one via the Web interface once you've got it working. Download the firmware from their site if you haven't already (http://www.linksys.com/download/firmware.asp?fwid=217) and place the 8MB firmware file found in the zip file into the TFTP directory.

to:

If you've made your slug unbootable I suggest you start by getting it back to default configuration by installing the official Linksys firmware - you can always upload a fancier one via the Web interface once you've got it working. Download the firmware from their site if you haven't already (http://www.linksys.com/download/firmware.asp?fwid=217[This link didn't work so I found this one http://www.linksys.com/servlet/Satellite?c=L_Download_C2&childpagename=US%2FLayout&cid=1115417109974&packedargs=sku%3D1115416906769&pagename=Linksys%2FCommon%2FVisitorWrapper 18 Jan 2007) and place the 8MB firmware file found in the zip file into the TFTP directory.

January 17, 2007, at 06:35 PM by Jelle Alten --
Changed line 50 from:
  1. Wait for the Ready/Status light to go solid red. (from a lighter shade of red / orange) Note: on a newer slug, there is no red anymore, it will turn from yellow to orange, hardly noticable.
to:
  1. Wait for the Ready/Status light to go solid red. (from a lighter shade of red / orange) Note: on a newer slug, there is no red anymore, it will turn from yellow to orange, hardly noticeable.
January 17, 2007, at 06:33 PM by Jelle Alten -- added some notes about new led colors... orange instead of red.
Changed line 50 from:
  1. Wait for the Ready/Status light to go solid red. (from a lighter shade of red / orange)
to:
  1. Wait for the Ready/Status light to go solid red. (from a lighter shade of red / orange) Note: on a newer slug, there is no red anymore, it will turn from yellow to orange, hardly noticable.
Changed line 52 from:
  1. Wait for the Ready/Status light to alternate between red and green.\\
to:
  1. Wait for the Ready/Status light to alternate between red and green. Here too: not with newer slugs, they will just altenate between orange and green.\\
Changed line 54 from:

If you don't see the alternating red/green Ready/Status light, repeat this process.

to:

If you don't see the alternating red/green (or orange/green) Ready/Status light, repeat this process.

Changed lines 120-121 from:

4.2 Put your NSLU2 into upgrade mode by restarting it with only the ethernet cable connected while holding a paperclip in the reset hole in the back of the NSLU2. When the light on the fron turns red, remove the paperclip. The NSLU2 should now be blinking red.

to:

4.2 Put your NSLU2 into upgrade mode by restarting it with only the ethernet cable connected while holding a paperclip in the reset hole in the back of the NSLU2. When the light on the fron turns red, remove the paperclip. The NSLU2 should now be blinking red. Note: on newer slugs, the red might be a darker shade of yellow: orange, not red.

October 17, 2006, at 06:17 PM by abe --
Added lines 65-66:

More additional SerComm notes: The behaviour mentioned above happened to me too. For me the solution was to run the Sercomm utility with Administrators' rights - ABE

October 03, 2006, at 04:01 PM by deathbunny -- Open Source TFTP Server added
Added lines 151-152:

If you're looking for a small and simple alternative that's also Open Source, this is the one that worked for me after I couldn't get SolarWinds? to listen to the right interface: http://sourceforge.net/projects/tftp-server

September 25, 2006, at 01:19 AM by Per-Einar Dahlen --
Changed lines 218-221 from:

1. Activate a TFTPd server. http://www.tftp-server.com/tftp-download.html

(enter root directory where the fimware is located, enter PC ipaddress & use port 69)

to:

1. Activate TFTP server. http://www.tftp-server.com/tftp-download.html

(enter root directory (where the fimware is located), enter PC ipaddress & use port 69)

Changed lines 227-228 from:
to:
   Disable software firewall if you are unable to transfer the file!
September 21, 2006, at 02:04 PM by Per-Einar Dahlen --
Changed lines 216-217 from:

1. Use TFTPd server. http://www.tftp-server.com/tftp-download.html

to:

Start with entering fixed IP in your PC network settings 192.168.0.1 and add a second IP 192.168.0.2 in advanced settings.

1. Activate a TFTPd server. http://www.tftp-server.com/tftp-download.html

September 20, 2006, at 11:27 PM by Per-Einar Dahlen --
Changed lines 230-236 from:

7. fis erase -f 0x50040000 -l 0x20000 (reset SysConf?)

8. reset

9. The NSLU2 should come up with Linksys firmware on 192.168.1.77 as normal.

to:

7. Telnet 192.168.0.1 9000 (quick & repeadely with F3 & enter to enter boot, then ^c to enter redboot)

8. fis erase -f 0x50040000 -l 0x20000 (reset SysConf?)

9. reset

10. The NSLU2 should come up with Linksys firmware on 192.168.1.77 as normal.

September 20, 2006, at 11:23 PM by Per-Einar Dahlen --
Added line 217:
Added line 219:
Added line 221:
Added line 223:
Added line 225:
Added line 227:
Added line 229:
Added line 231:
Added line 233:
Added line 236:
September 20, 2006, at 11:22 PM by Per-Einar Dahlen -- NSLU2 reflash of bricked unit
Added lines 214-231:

Manual Reflash of NSLU2_V23R63.bin

1. Use TFTPd server. http://www.tftp-server.com/tftp-download.html (enter root directory where the fimware is located, enter PC ipaddress & use port 69) 2. Telnet 192.168.0.1 9000 (quick & repeadely with F3 & enter to enter boot, then ^c to enter redboot) 3. ip_address -h 192.168.0.2 (computerIP/TFTPd server) 4. load -r -v -b 0x01000000 -h 192.168.0.2 NSLU2_V23R63.bin (Firmware in TFTPd directory) 5. fis write -f 0x50060000 -b 0x01060000 -l 0x7a0000 (Write kernel into flash) 6. Pull the power immediately at return of redboot prompt 7. fis erase -f 0x50040000 -l 0x20000 (reset SysConf?) 8. reset 9. The NSLU2 should come up with Linksys firmware on 192.168.1.77 as normal.

la7dfa@gmail.com


July 25, 2006, at 03:00 AM by Ockham -- formatting existing text
Changed lines 84-91 from:

1.2 Update the available ports for installation by opening up a new terminal window and typing:

ports sync

1.3 Install libcap in the Terminal by typing:

sudo port install libpcap

to:

1.2 Update the available ports for installation by opening up a new terminal window and typing: ports sync

1.3 Install libcap in the Terminal by typing: sudo port install libpcap

Changed lines 116-121 from:

4.1 Put your NSLU2 into upgrade mode by restarting it with only the ethernet cable connected while holding a paperclip in the reset hole in the back of the NSLU2. When the light on the fron turns red, remove the paperclip. The NSLU2 should now be blinking red.

4.2 Open a new Terminal window and type the following command:

sudo upslug2 -d en0 -t [the NSLU2 adress] -i [the path to the flash file]

to:

4.1 Reflash your NSLU2 with the UpSlug2? command line

4.2 Put your NSLU2 into upgrade mode by restarting it with only the ethernet cable connected while holding a paperclip in the reset hole in the back of the NSLU2. When the light on the fron turns red, remove the paperclip. The NSLU2 should now be blinking red.

4.3 Open a new Terminal window and type the following command:

sudo upslug2 -d en0 -t [the NSLU2 adress] -i [the path to the flash file]
Changed lines 130-133 from:

sudo upslug2 -d en0 -t 00:0f:66:89:19:69 -i ~/Desktop/NSLU2_V23R63.bin

4.3 let the command run and let the NSLU2 reboot before accessing it via the web interface or attempting to unsling it again.

to:
sudo upslug2 -d en0 -t 00:0f:66:89:19:69 -i ~/Desktop/NSLU2_V23R63.bin

4.4 let the command run and let the NSLU2 reboot before accessing it via the web interface or attempting to unsling it again.

July 25, 2006, at 02:52 AM by Ockham -- Added detailed instructions for flash recovery from Mac OS X
Changed lines 78-82 from:

UpSlug2 works well with Mac OS X. You must use/install three pieces of software, the primary one being UpSlug2?, and also libpcap, a library needed for UpSlug2? to run, and finally, you need DarwinPorts, the installation conduit by which you install libpcap. This has been tested on a PPC G5 under Mac OS 10.4.7.

This has not been tested on an Intel based Mac, although it will quite possibly work fine under Rosetta emulation. - "Ockham"

to:

Using UpSlug2? to Reflash with Mac OS X

UpSlug2 works well with Mac OS X. You must use/install three pieces of software, the primary one being UpSlug2?, and also libpcap, a library needed for UpSlug2? to run, and finally, you need DarwinPorts, the installation conduit by which you install libpcap. This has been tested on a PPC G5 under Mac OS 10.4.7. This has not been tested on an Intel based Mac, although it will quite possibly work fine under Rosetta emulation.

1.1 Download and install the DarwinPorts software.

1.2 Update the available ports for installation by opening up a new terminal window and typing:

ports sync

1.3 Install libcap in the Terminal by typing:

sudo port install libpcap

2.1 Download and install the UpSlug2 package for OS X. [The current version at the time of this writing is 2-11, the file for OS X is named "upslug2-11-osx.tgz"]

2.2 After the upslug download archive has been expanded, locate the file named "upslug2" This file needs to be moved to the operating directory of the Terminal.

2.3 Use the Terminal to move the upslug2 file to the /usr/bin/ directory

2.3.1 or move upslug2 manually by quitting Terminal and in the Finder goto: Go > Goto Folder... and type /usr/bin/ then click "Go" in the resulatnt dialog box. The /bin/ folder should open.
2.3.2 Drag and drop the "upslug2" file into the /bin/ directory and choose "Authenticate" and type your administrative password to move upslug to the Terminal's working directory.

3.1 Connect your NSLU2 directly to your computer's ethernet port [be sure you have downloaded the flash file for reflashing]

3.1.1 If you have not already done so, Duplicate Network Port Configuration:
goto System Preferences > Network Port Configurations.
Select built in ethernet and hit "duplicate" and rename the configuration
Select the new configuration and click the "TCP/IP" tab
Select "Using DHCP with manual address,"
Enter the manual IP of the form 192.168.0.2
3.1.2 Disover NSLU2 Device code:
Open Terminal and type arp -a
Find the address for the NSLU2 under 192.168.1.77
Write the NSLU2 address replacing spaces with 0. so, 0:f:66:89:19:69 = 00:0f:66:89:19:69
3.1.3 Rewrite new temp path for NSLU2:
Open Terminal and type sudo arp -s 192.168.0.1 [the NSLU2 adress]

4.1 Put your NSLU2 into upgrade mode by restarting it with only the ethernet cable connected while holding a paperclip in the reset hole in the back of the NSLU2. When the light on the fron turns red, remove the paperclip. The NSLU2 should now be blinking red.

4.2 Open a new Terminal window and type the following command:

sudo upslug2 -d en0 -t [the NSLU2 adress] -i [the path to the flash file]

where -d en0 specifies that you wish to use the "en0" ethernet port, the default on Macintosh computers
-t [the NSLU2 adress] specifies the address of the NSLU2 you wish to upgrade
-i [the path to the flash file] specifies the flash image you wish to use.

So, for example, the command would be typed as:

sudo upslug2 -d en0 -t 00:0f:66:89:19:69 -i ~/Desktop/NSLU2_V23R63.bin

4.3 let the command run and let the NSLU2 reboot before accessing it via the web interface or attempting to unsling it again.

- Ockham

July 25, 2006, at 02:18 AM by Ockham -- Correcting yemi\'s assertion that only the manual method of reflash will work on OS X
Added lines 78-82:

UpSlug2 works well with Mac OS X. You must use/install three pieces of software, the primary one being UpSlug2?, and also libpcap, a library needed for UpSlug2? to run, and finally, you need DarwinPorts, the installation conduit by which you install libpcap. This has been tested on a PPC G5 under Mac OS 10.4.7.

This has not been tested on an Intel based Mac, although it will quite possibly work fine under Rosetta emulation. - "Ockham"

June 28, 2006, at 03:58 PM by metamind --
Changed line 50 from:
  1. Wait for the Ready/Status light to go solid red.
to:
  1. Wait for the Ready/Status light to go solid red. (from a lighter shade of red / orange)
June 05, 2006, at 09:45 PM by Sinclair73 -- fixed copy command for flash from apex
Changed line 172 from:

copy 0x1060000+7a0000 nor:0x60000\\

to:

copy 0x1060000+0x7a0000 nor:0x60000\\

June 05, 2006, at 05:16 AM by Gunnar -- Fixed minor typo
Changed lines 63-64 from:

Additional SerComm notes: When starting Upgrade.exe I kept getting an error message telling me to run RmDrv?.exe, and then rerun Upgrade.exe - unfotunately doing so had no effect, I still kept getting the error. Then by sheer luck I discovered that the "Adapter Cards Lists:" was actually listing each of my network cards 3 or 4 times. By using the up & down keys and trial & error I eventually managed to select the correct network card, at which point it all worked flawlessly. - Lurch. I a card disabled (a 1394 card) and got the same behavior until I enabled it. - Gunnar

to:

Additional SerComm notes: When starting Upgrade.exe I kept getting an error message telling me to run RmDrv?.exe, and then rerun Upgrade.exe - unfotunately doing so had no effect, I still kept getting the error. Then by sheer luck I discovered that the "Adapter Cards Lists:" was actually listing each of my network cards 3 or 4 times. By using the up & down keys and trial & error I eventually managed to select the correct network card, at which point it all worked flawlessly. - Lurch. I had a card disabled (a 1394 card) and got the same behavior until I enabled it. - Gunnar

June 05, 2006, at 05:13 AM by Gunnar -- Additional SerComm RmDrv.exe error notes
Changed lines 63-64 from:

Additional SerComm notes: When starting Upgrade.exe I kept getting an error message telling me to run RmDrv?.exe, and then rerun Upgrade.exe - unfotunately doing so had no effect, I still kept getting the error. Then by sheer luck I discovered that the "Adapter Cards Lists:" was actually listing each of my network cards 3 or 4 times. By using the up & down keys and trial & error I eventually managed to select the correct network card, at which point it all worked flawlessly. - Lurch

to:

Additional SerComm notes: When starting Upgrade.exe I kept getting an error message telling me to run RmDrv?.exe, and then rerun Upgrade.exe - unfotunately doing so had no effect, I still kept getting the error. Then by sheer luck I discovered that the "Adapter Cards Lists:" was actually listing each of my network cards 3 or 4 times. By using the up & down keys and trial & error I eventually managed to select the correct network card, at which point it all worked flawlessly. - Lurch. I a card disabled (a 1394 card) and got the same behavior until I enabled it. - Gunnar

April 30, 2006, at 08:08 AM by Ming -- Manual reflash procedure for APEX
Changed lines 153-161 from:

Acknowledgements

This HowTo was originally written by Pete Verdon who based it on posts on the mailing list. Thanks to those who originally discovered and posted it, in particular Irfan29200, Smakofsky, and Rod. Apologies if anybody has been missed out.

Notes

  1. Linux allows you to add an IP address to an existing ethernet card. In my case, I've got 'eth0' so I typed the following on my desktop/server:\\
to:

The Manual Reflash Procedure While Using APEX

  1. Serial Console\\
Changed lines 159-163 from:

ifconfig eth0:1 192.168.0.2\\

to:

If you have APEX installed, then you probably already have a serial console.

  1. Boot up to the APEX command line by hitting ctrl-c
  2. Transfer over the image using the serial console\\
Changed lines 165-176 from:

As long as you're not already using the 192.168.0 network, this won't confuse anything and will only exist until you reboot (or type "ifconfig eth0:1 down" on your server) - jkpeters_37

  1. The RedBoot command reset will reboot without having to power-cycle. - jkpeters_37
  2. I found it easier to add a route to 192.168.0.1 than to add interfaces or change my current setup. - CodeWhacker
  3. The loading of the .bin should be done in about 5 seconds. My stock nslu timed out (5+ min wait) when loading from http (on a OS X Apache, my setup could be broke =)
  4. If the host IP is set, the following command will load from http server:
    load -r -m http -b 0x01000000 /NSLU2_V23R29.bin
    For the fis command, -l 0x7a0000 worked well enough with NSLU2_V23R29.bin for the purpose of then upgrading to unslung-standard-3.18-beta.bin via the web interface - willpost
to:

xreceive 0x1000000

Send over the flash image from your terminal. APEX doesn't support tftp or http for the slug yet as I know of (please correct me if not). This will take around 10 minutes to transfer over the 8M image.

  1. Erase and write the image into flash

    erase nor:0x60000+0x7a0000
    copy 0x1060000+7a0000 nor:0x60000

    Now, type "reset" in APEX, and it should be good. -Ming
Added lines 178-204:

Acknowledgements

This HowTo was originally written by Pete Verdon who based it on posts on the mailing list. Thanks to those who originally discovered and posted it, in particular Irfan29200, Smakofsky, and Rod. Apologies if anybody has been missed out.

Notes

  1. Linux allows you to add an IP address to an existing ethernet card. In my case, I've got 'eth0' so I typed the following on my desktop/server:

    ifconfig eth0:1 192.168.0.2

    As long as you're not already using the 192.168.0 network, this won't confuse anything and will only exist until you reboot (or type "ifconfig eth0:1 down" on your server) - jkpeters_37
  2. The RedBoot command reset will reboot without having to power-cycle. - jkpeters_37
  3. I found it easier to add a route to 192.168.0.1 than to add interfaces or change my current setup. - CodeWhacker
  4. The loading of the .bin should be done in about 5 seconds. My stock nslu timed out (5+ min wait) when loading from http (on a OS X Apache, my setup could be broke =)
  5. If the host IP is set, the following command will load from http server:
    load -r -m http -b 0x01000000 /NSLU2_V23R29.bin
    For the fis command, -l 0x7a0000 worked well enough with NSLU2_V23R29.bin for the purpose of then upgrading to unslung-standard-3.18-beta.bin via the web interface - willpost

April 14, 2006, at 02:23 PM by Yemi Bedu -- Virtual PC for Mac option
Changed lines 74-75 from:

MacOS users currently must use The Manual Reflash Recovery Procedure listed below, because neither SerComm or UpSlug work with it.

to:

MacOS users currently must use The Manual Reflash Recovery Procedure listed below, because neither SerComm nor UpSlug work with it directly.

If you have Microsoft Virtual PC for Mac installed and networking setup, you might be able to accomplish the SerComm or Upslug steps. - Yemi

March 22, 2006, at 06:08 PM by seders -- restore load command which dissappears in some browsers (due to long line?)
Changed line 109 from:
 -h 192.168.0.99 NSLU2_V23R25.bin@@\\
to:

load -r -v -b 0x01000000 -h 192.168.0.99 NSLU2_V23R25.bin\\

March 15, 2006, at 07:34 PM by MJFox --
Changed lines 14-18 from:

Consult your Linksys manual on i

to:

Consult your Linksys manual on information about how to do that.

Assuming none of that helps, follow the instructions below and also consider following the Reset The Sys Conf Area process.

Changed lines 20-23 from:

The Manual Reflash Recovery Procedure

  1. Install a TFTP Server (or HTTP server)\\
to:

How Is The Firmware Setup?

The firmware is divided into four sections:

  • RedBoot - The bootloader that runs when the device is first started, loads things into memory and starts Linux. RedBoot is quite sophisticated, and has a user interface that you can access by telnet or serial. You can use it to load things into memory by TFTP, write to flash, and similar tasks.
  • SysConf - This portion of the flash contains the sort of data you can modify through the Web interface, such as the hostname.
  • Linux kernel - This is a more-or-less opaque (to me, anyway) vmlinuz file containing a compressed kernel.
  • Ramdisk - This is the conventional Linux file tree - /bin, /etc, and all the rest of them - in compressed form. It's stored in flash, but gets loaded into RAM by RedBoot when Linux is run. You can modify its contents, but any changes will be lost when you reboot, as a fresh copy is loaded into RAM from flash.
  • There is also a small "trailer" at the end of the ramdisk area (in the last erase block in fact) that the slug can check.

Of these sections, hopefully RedBoot at least is still intact. If it is not, these instructions will not help you, and you'll need to talk to the hardcore JTAG people.


Easiest method? Use SerComm or Upslug (Win/Linux)

In some cases, when erasing the flash worked fine, but programming did not, for instance because the upgrade was terminated prematurely, the slug falls back in failsafe upgrade mode. When it does, you can tell by the flashing Ready/Status LED in red shortly after power on. In this case telnetting into RedBoot may appear impossible, but luckily there is an easy way out. I have had success with the SerComm Upgrade Utility found at sercomm.com. This route requires that you have access to a Windows PC.

The best way to get started is to hook up the slug to the Windows PC through an isolated hub or through a standard ethernet cable (or crossover cable on older PC's). Make sure that NO DISKS ARE ATTACHED TO THE SLUG after this point.

Procedure

  1. Download the SerComm utility and a binary of the firmware you want to use to the PC;
  2. Put your slug into Firmware Upgrade mode.\\
Changed lines 45-52 from:

The first thing you will need to do is set up a TFTP server, if you do not already have one installed. I work mostly on OS X, so I can't give detailed instructions for Linux (I did try, briefly, to install a TFTP RPM on my Linux machine, but though it claimed to be client and server only the client seemed to be installed). If you're using OS X, feel free to contact me for details. You should set up the server with a directory to serve from; this will need to be world-readable, *as will any files you place in it* if you want them to be served.\\

to:

Easy Way:

  1. Turn off your slug
  2. Hold down the reset button on the slug's back panel down
  3. Turn on your slug while still pressing the Reset button
  4. Keep holding down the Reset button for 10 seconds
  5. Wait for the Ready/Status light to go solid red.
  6. Stop pressing the Reset button
  7. Wait for the Ready/Status light to alternate between red and green.\\
Changed lines 54-80 from:

If you're looking for a Windows TFTP server, you can download a free one from http://solarwinds.net/Download-Tools.htm .\\

to:

If you don't see the alternating red/green Ready/Status light, repeat this process. I found that it's best if you release the Reset button as soon as the Ready/Status light goes red. -- Mani

  1. Fire up the SerComm utility. It will go looking for a slug on the local subnet;
  2. Select your slug in the SerComm utility
  3. Select the firmware to be loaded and press the upgrade button.

The SerComm utility will then upload the firmware image to the slug and verify it once written. Once done, you can reboot your slug. - Romix12000

Additional SerComm notes: When starting Upgrade.exe I kept getting an error message telling me to run RmDrv?.exe, and then rerun Upgrade.exe - unfotunately doing so had no effect, I still kept getting the error. Then by sheer luck I discovered that the "Adapter Cards Lists:" was actually listing each of my network cards 3 or 4 times. By using the up & down keys and trial & error I eventually managed to select the correct network card, at which point it all worked flawlessly. - Lurch

The SerComm-Utility sees the slug with firmware 4.x and higher after putting him into upgrade mode. The SerComm-Utility left the ethernet devices on two of my machines disfunctional after browsing for slugs and another time after starting with "erasing flash" and stopped updating. seems unstable. suggestion: switch to upslug on linux/knoppix. worked reliable.

If you have access to a Linux machine, you can use the UpSlug tool instead. You will find the procedure using UpSlug at HowTo.RecoverFromABadFlashWithUpSlug.

You can also put your slug manually into Upgrade mode by giving it the upgrade command in Redboot.


MacOS User?

MacOS users currently must use The Manual Reflash Recovery Procedure listed below, because neither SerComm or UpSlug work with it.


The Manual Reflash Recovery Procedure

  1. Install a TFTP Server (or HTTP server)\\
Changed line 82 from:

For details how to setup and test TFTP Server for Windows see SetupSolarWindsTFTPServer . \\

to:

The first thing you will need to do is set up a TFTP server, if you do not already have one installed. I work mostly on OS X, so I can't give detailed instructions for Linux (I did try, briefly, to install a TFTP RPM on my Linux machine, but though it claimed to be client and server only the client seemed to be installed). If you're using OS X, feel free to contact me for details. You should set up the server with a directory to serve from; this will need to be world-readable, *as will any files you place in it* if you want them to be served.\\

Added lines 84-87:

If you're looking for a Windows TFTP server, you can download a free one from http://solarwinds.net/Download-Tools.htm .

For details how to setup and test TFTP Server for Windows see SetupSolarWindsTFTPServer .
\\

March 15, 2006, at 06:57 PM by huou --
Changed lines 14-18 from:

Consult your Linksys manual on information about how to do that.

Assuming none of that helps, follow the instructions below and also consider following the Reset The Sys Conf Area process.

to:

Consult your Linksys manual on i

Changed lines 16-39 from:

How Is The Firmware Setup?

The firmware is divided into four sections:

  • RedBoot - The bootloader that runs when the device is first started, loads things into memory and starts Linux. RedBoot is quite sophisticated, and has a user interface that you can access by telnet or serial. You can use it to load things into memory by TFTP, write to flash, and similar tasks.
  • SysConf - This portion of the flash contains the sort of data you can modify through the Web interface, such as the hostname.
  • Linux kernel - This is a more-or-less opaque (to me, anyway) vmlinuz file containing a compressed kernel.
  • Ramdisk - This is the conventional Linux file tree - /bin, /etc, and all the rest of them - in compressed form. It's stored in flash, but gets loaded into RAM by RedBoot when Linux is run. You can modify its contents, but any changes will be lost when you reboot, as a fresh copy is loaded into RAM from flash.
  • There is also a small "trailer" at the end of the ramdisk area (in the last erase block in fact) that the slug can check.

Of these sections, hopefully RedBoot at least is still intact. If it is not, these instructions will not help you, and you'll need to talk to the hardcore JTAG people.


Easiest method? Use SerComm or Upslug (Win/Linux)

In some cases, when erasing the flash worked fine, but programming did not, for instance because the upgrade was terminated prematurely, the slug falls back in failsafe upgrade mode. When it does, you can tell by the flashing Ready/Status LED in red shortly after power on. In this case telnetting into RedBoot may appear impossible, but luckily there is an easy way out. I have had success with the SerComm Upgrade Utility found at sercomm.com. This route requires that you have access to a Windows PC.

The best way to get started is to hook up the slug to the Windows PC through an isolated hub or through a standard ethernet cable (or crossover cable on older PC's). Make sure that NO DISKS ARE ATTACHED TO THE SLUG after this point.

Procedure

  1. Download the SerComm utility and a binary of the firmware you want to use to the PC;
  2. Put your slug into Firmware Upgrade mode.\\
to:

The Manual Reflash Recovery Procedure

  1. Install a TFTP Server (or HTTP server)\\
Changed lines 21-28 from:

Easy Way:

  1. Turn off your slug
  2. Hold down the reset button on the slug's back panel down
  3. Turn on your slug while still pressing the Reset button
  4. Keep holding down the Reset button for 10 seconds
  5. Wait for the Ready/Status light to go solid red.
  6. Stop pressing the Reset button
  7. Wait for the Ready/Status light to alternate between red and green.\\
to:

The first thing you will need to do is set up a TFTP server, if you do not already have one installed. I work mostly on OS X, so I can't give detailed instructions for Linux (I did try, briefly, to install a TFTP RPM on my Linux machine, but though it claimed to be client and server only the client seemed to be installed). If you're using OS X, feel free to contact me for details. You should set up the server with a directory to serve from; this will need to be world-readable, *as will any files you place in it* if you want them to be served.\\

Changed lines 23-49 from:

If you don't see the alternating red/green Ready/Status light, repeat this process. I found that it's best if you release the Reset button as soon as the Ready/Status light goes red. -- Mani

  1. Fire up the SerComm utility. It will go looking for a slug on the local subnet;
  2. Select your slug in the SerComm utility
  3. Select the firmware to be loaded and press the upgrade button.

The SerComm utility will then upload the firmware image to the slug and verify it once written. Once done, you can reboot your slug. - Romix12000

Additional SerComm notes: When starting Upgrade.exe I kept getting an error message telling me to run RmDrv?.exe, and then rerun Upgrade.exe - unfotunately doing so had no effect, I still kept getting the error. Then by sheer luck I discovered that the "Adapter Cards Lists:" was actually listing each of my network cards 3 or 4 times. By using the up & down keys and trial & error I eventually managed to select the correct network card, at which point it all worked flawlessly. - Lurch

The SerComm-Utility sees the slug with firmware 4.x and higher after putting him into upgrade mode. The SerComm-Utility left the ethernet devices on two of my machines disfunctional after browsing for slugs and another time after starting with "erasing flash" and stopped updating. seems unstable. suggestion: switch to upslug on linux/knoppix. worked reliable.

If you have access to a Linux machine, you can use the UpSlug tool instead. You will find the procedure using UpSlug at HowTo.RecoverFromABadFlashWithUpSlug.

You can also put your slug manually into Upgrade mode by giving it the upgrade command in Redboot.


MacOS User?

MacOS users currently must use The Manual Reflash Recovery Procedure listed below, because neither SerComm or UpSlug work with it.


The Manual Reflash Recovery Procedure

  1. Install a TFTP Server (or HTTP server)\\
to:

If you're looking for a Windows TFTP server, you can download a free one from http://solarwinds.net/Download-Tools.htm .\\

Changed line 25 from:

The first thing you will need to do is set up a TFTP server, if you do not already have one installed. I work mostly on OS X, so I can't give detailed instructions for Linux (I did try, briefly, to install a TFTP RPM on my Linux machine, but though it claimed to be client and server only the client seemed to be installed). If you're using OS X, feel free to contact me for details. You should set up the server with a directory to serve from; this will need to be world-readable, *as will any files you place in it* if you want them to be served.\\

to:

For details how to setup and test TFTP Server for Windows see SetupSolarWindsTFTPServer . \\

Deleted lines 26-29:

If you're looking for a Windows TFTP server, you can download a free one from http://solarwinds.net/Download-Tools.htm .

For details how to setup and test TFTP Server for Windows see SetupSolarWindsTFTPServer .
\\

March 15, 2006, at 06:56 PM by huou --
Deleted line 0:
Changed line 109 from:

load -r -v -b 0x01000000 -h 192.168.0.99 NSLU2_V23R25.bin\\

to:
 -h 192.168.0.99 NSLU2_V23R25.bin@@\\
March 15, 2006, at 06:55 PM by huou --
Changed lines 1-4 from:

(:table border=0 width=100% bgcolor=red cellspacing=0:) (:cell:)

WARNING

[++Do not under *any* circumstances use the Linksys "EraseAll" utility to reflash your NSLU2.\\

to:
Changed lines 3-5 from:

In the worst case scenario, it may erase the bootloader and cause an unbootable slug. The only method of repair for the mentioned case would be JTAG, which requires extra hardware and knowledge that most users do not have.\\

to:

The factory default IP address for the slug is 192.168.1.77. This can be checked by booting the Linksys configuration CD-ROM that came with your slug. Maybe it's different that what you think it is, especially if you've Reset The Sys Conf Area.

  1. DHCP\\
Changed lines 7-16 from:

You should use the old Sercomm Upgrade utility, Upslug2 or RedBoot to flash new images. Methods are discussed on this page.++] (:tableend:)

Situation

Your slug isn't bootable, meaning that some part of the firmware is corrupt.

You want to install a new firmware, but aren't sure how to do it or you can't use the Linksys web interface.

to:

Some people have found reliability problems with the DHCP code in the Linksys firmware.

If your router doesn't allow you to manually set a MAC address for a particular IP address, perhaps you should use your Linksys CD-ROM to make the slug use a fixed IP.

  1. Configuration Server Port

    Many people re-configure the Linksys web interface to another port (e.g. 8080) so that it doesn't conflict with other services they may wish to install.

    Consult your Linksys manual on information about how to do that.

Assuming none of that helps, follow the instructions below and also consider following the Reset The Sys Conf Area process.

Changed lines 21-41 from:

How Do I Know I've Broken It?

The normal sequence I see when powering up my NSLU2 using Unslung 4.x with lots of installed packages is:

  1. Solid orange Ready/Status light (1 sec)
  2. Solid orange Ready/Status and green Ethernet light (2 sec)
  3. Solid orange Ready/Status light (2 sec)
  4. Repeat previous 2 steps once with slightly shorter solid green Ethernet
  5. Solid orange Ready/Status and green Ethernet light (10 sec)
  6. All lights turn off (<0.5 sec)
  7. Flashing green Ready/Status light and flickering solid green Ethernet light (8 sec)
  8. Flickering solid green Ethernet light and flickering solid green Disk 1 light (14 sec)
  9. Flashing green Ready/Status light, flickering solid green Ethernet light, and flickering solid green Disk 1 / Disk 2 light (approx. 120 sec)
  10. Solid green Ready/Status, flickering green Ethernet, flickering green Disk 1/Disk 2, and the "strangled beep" (1 sec)

Total time from power on to beep: around 150 seconds (2.5 minutes)

After the beep, the NSLU2 may continue to load stuff from the hard drive, but it is now useable.

If you're not seeing this sort of sequence, you are probably corrupted the flash and made it unbootable. This can usually be fixed as the bootloader itself should be okay. It is only a true "brick" if you've managed to damage the bootloader (RedBoot) and even then you can recover it by reprogramming the flash via the JTAG interface. There have only been 2 proper "bricks" so far in the history of the project (one was a soldering problem, and the other was a casualty of an early prototype of the slugimage tool with a programming error) and both were recoverable. We know of no NSLU2 that has been truly "bricked" by installation of released custom firmware.

to:

How Is The Firmware Setup?

The firmware is divided into four sections:

  • RedBoot - The bootloader that runs when the device is first started, loads things into memory and starts Linux. RedBoot is quite sophisticated, and has a user interface that you can access by telnet or serial. You can use it to load things into memory by TFTP, write to flash, and similar tasks.
  • SysConf - This portion of the flash contains the sort of data you can modify through the Web interface, such as the hostname.
  • Linux kernel - This is a more-or-less opaque (to me, anyway) vmlinuz file containing a compressed kernel.
  • Ramdisk - This is the conventional Linux file tree - /bin, /etc, and all the rest of them - in compressed form. It's stored in flash, but gets loaded into RAM by RedBoot when Linux is run. You can modify its contents, but any changes will be lost when you reboot, as a fresh copy is loaded into RAM from flash.
  • There is also a small "trailer" at the end of the ramdisk area (in the last erase block in fact) that the slug can check.

Of these sections, hopefully RedBoot at least is still intact. If it is not, these instructions will not help you, and you'll need to talk to the hardcore JTAG people.

Changed lines 34-40 from:

Before Attempting A Flash...

For Unslung users, in some cases the boot process of the NSLU2 seems to be ok, but it is still not possible to access the device.

Save yourself some stress and check these things before attempting a re-flash:

  1. Slug IP Address\\
to:

Easiest method? Use SerComm or Upslug (Win/Linux)

In some cases, when erasing the flash worked fine, but programming did not, for instance because the upgrade was terminated prematurely, the slug falls back in failsafe upgrade mode. When it does, you can tell by the flashing Ready/Status LED in red shortly after power on. In this case telnetting into RedBoot may appear impossible, but luckily there is an easy way out. I have had success with the SerComm Upgrade Utility found at sercomm.com. This route requires that you have access to a Windows PC.

The best way to get started is to hook up the slug to the Windows PC through an isolated hub or through a standard ethernet cable (or crossover cable on older PC's). Make sure that NO DISKS ARE ATTACHED TO THE SLUG after this point.

Procedure

  1. Download the SerComm utility and a binary of the firmware you want to use to the PC;
  2. Put your slug into Firmware Upgrade mode.\\
Changed lines 46-48 from:

Are you sure you're using the right address?
Are you on the right subnet?
Are you using the right router address?\\

to:

Easy Way:

  1. Turn off your slug
  2. Hold down the reset button on the slug's back panel down
  3. Turn on your slug while still pressing the Reset button
  4. Keep holding down the Reset button for 10 seconds
  5. Wait for the Ready/Status light to go solid red.
  6. Stop pressing the Reset button
  7. Wait for the Ready/Status light to alternate between red and green.\\
Changed lines 55-57 from:

The factory default IP address for the slug is 192.168.1.77. This can be checked by booting the Linksys configuration CD-ROM that came with your slug. Maybe it's different that what you think it is, especially if you've Reset The Sys Conf Area.

  1. DHCP\\
to:

If you don't see the alternating red/green Ready/Status light, repeat this process. I found that it's best if you release the Reset button as soon as the Ready/Status light goes red. -- Mani

  1. Fire up the SerComm utility. It will go looking for a slug on the local subnet;
  2. Select your slug in the SerComm utility
  3. Select the firmware to be loaded and press the upgrade button.

The SerComm utility will then upload the firmware image to the slug and verify it once written. Once done, you can reboot your slug. - Romix12000

Additional SerComm notes: When starting Upgrade.exe I kept getting an error message telling me to run RmDrv?.exe, and then rerun Upgrade.exe - unfotunately doing so had no effect, I still kept getting the error. Then by sheer luck I discovered that the "Adapter Cards Lists:" was actually listing each of my network cards 3 or 4 times. By using the up & down keys and trial & error I eventually managed to select the correct network card, at which point it all worked flawlessly. - Lurch

The SerComm-Utility sees the slug with firmware 4.x and higher after putting him into upgrade mode. The SerComm-Utility left the ethernet devices on two of my machines disfunctional after browsing for slugs and another time after starting with "erasing flash" and stopped updating. seems unstable. suggestion: switch to upslug on linux/knoppix. worked reliable.

If you have access to a Linux machine, you can use the UpSlug tool instead. You will find the procedure using UpSlug at HowTo.RecoverFromABadFlashWithUpSlug.

You can also put your slug manually into Upgrade mode by giving it the upgrade command in Redboot.


MacOS User?

MacOS users currently must use The Manual Reflash Recovery Procedure listed below, because neither SerComm or UpSlug work with it.


The Manual Reflash Recovery Procedure

  1. Install a TFTP Server (or HTTP server)\\
Changed line 83 from:

Some people have found reliability problems with the DHCP code in the Linksys firmware.\\

to:

The first thing you will need to do is set up a TFTP server, if you do not already have one installed. I work mostly on OS X, so I can't give detailed instructions for Linux (I did try, briefly, to install a TFTP RPM on my Linux machine, but though it claimed to be client and server only the client seemed to be installed). If you're using OS X, feel free to contact me for details. You should set up the server with a directory to serve from; this will need to be world-readable, *as will any files you place in it* if you want them to be served.\\

Changed lines 85-87 from:

If your router doesn't allow you to manually set a MAC address for a particular IP address, perhaps you should use your Linksys CD-ROM to make the slug use a fixed IP.

  1. Configuration Server Port\\
to:

If you're looking for a Windows TFTP server, you can download a free one from http://solarwinds.net/Download-Tools.htm .\\

Changed line 87 from:

Many people re-configure the Linksys web interface to another port (e.g. 8080) so that it doesn't conflict with other services they may wish to install.\\

to:

For details how to setup and test TFTP Server for Windows see SetupSolarWindsTFTPServer . \\

Changed lines 89-118 from:

Consult your Linksys manual on information about how to do that.

Assuming none of that helps, follow the instructions below and also consider following the Reset The Sys Conf Area process.


How Is The Firmware Setup?

The firmware is divided into four sections:

  • RedBoot - The bootloader that runs when the device is first started, loads things into memory and starts Linux. RedBoot is quite sophisticated, and has a user interface that you can access by telnet or serial. You can use it to load things into memory by TFTP, write to flash, and similar tasks.
  • SysConf - This portion of the flash contains the sort of data you can modify through the Web interface, such as the hostname.
  • Linux kernel - This is a more-or-less opaque (to me, anyway) vmlinuz file containing a compressed kernel.
  • Ramdisk - This is the conventional Linux file tree - /bin, /etc, and all the rest of them - in compressed form. It's stored in flash, but gets loaded into RAM by RedBoot when Linux is run. You can modify its contents, but any changes will be lost when you reboot, as a fresh copy is loaded into RAM from flash.
  • There is also a small "trailer" at the end of the ramdisk area (in the last erase block in fact) that the slug can check.

Of these sections, hopefully RedBoot at least is still intact. If it is not, these instructions will not help you, and you'll need to talk to the hardcore JTAG people.


Easiest method? Use SerComm or Upslug (Win/Linux)

In some cases, when erasing the flash worked fine, but programming did not, for instance because the upgrade was terminated prematurely, the slug falls back in failsafe upgrade mode. When it does, you can tell by the flashing Ready/Status LED in red shortly after power on. In this case telnetting into RedBoot may appear impossible, but luckily there is an easy way out. I have had success with the SerComm Upgrade Utility found at sercomm.com. This route requires that you have access to a Windows PC.

The best way to get started is to hook up the slug to the Windows PC through an isolated hub or through a standard ethernet cable (or crossover cable on older PC's). Make sure that NO DISKS ARE ATTACHED TO THE SLUG after this point.

Procedure

  1. Download the SerComm utility and a binary of the firmware you want to use to the PC;
  2. Put your slug into Firmware Upgrade mode.\\
to:

I had issues with getting the solarwinds TFTP server to work under windows. It would serve files to the local machine, but fail to send anything to the slug. What worked for me was http://tftpd32.jounin.net/

  1. Obtain the firmware and place it in the TFTP serving directory. \\
Changed lines 93-100 from:

Easy Way:

  1. Turn off your slug
  2. Hold down the reset button on the slug's back panel down
  3. Turn on your slug while still pressing the Reset button
  4. Keep holding down the Reset button for 10 seconds
  5. Wait for the Ready/Status light to go solid red.
  6. Stop pressing the Reset button
  7. Wait for the Ready/Status light to alternate between red and green.\\
to:

If you've made your slug unbootable I suggest you start by getting it back to default configuration by installing the official Linksys firmware - you can always upload a fancier one via the Web interface once you've got it working. Download the firmware from their site if you haven't already (http://www.linksys.com/download/firmware.asp?fwid=217) and place the 8MB firmware file found in the zip file into the TFTP directory.

  1. Connect to RedBoot via telnet or serial.
  2. Tell the NSLU2 where the TFTP server is.\\
Changed lines 99-125 from:

If you don't see the alternating red/green Ready/Status light, repeat this process. I found that it's best if you release the Reset button as soon as the Ready/Status light goes red. -- Mani

  1. Fire up the SerComm utility. It will go looking for a slug on the local subnet;
  2. Select your slug in the SerComm utility
  3. Select the firmware to be loaded and press the upgrade button.

The SerComm utility will then upload the firmware image to the slug and verify it once written. Once done, you can reboot your slug. - Romix12000

Additional SerComm notes: When starting Upgrade.exe I kept getting an error message telling me to run RmDrv?.exe, and then rerun Upgrade.exe - unfotunately doing so had no effect, I still kept getting the error. Then by sheer luck I discovered that the "Adapter Cards Lists:" was actually listing each of my network cards 3 or 4 times. By using the up & down keys and trial & error I eventually managed to select the correct network card, at which point it all worked flawlessly. - Lurch

The SerComm-Utility sees the slug with firmware 4.x and higher after putting him into upgrade mode. The SerComm-Utility left the ethernet devices on two of my machines disfunctional after browsing for slugs and another time after starting with "erasing flash" and stopped updating. seems unstable. suggestion: switch to upslug on linux/knoppix. worked reliable.

If you have access to a Linux machine, you can use the UpSlug tool instead. You will find the procedure using UpSlug at HowTo.RecoverFromABadFlashWithUpSlug.

You can also put your slug manually into Upgrade mode by giving it the upgrade command in Redboot.


MacOS User?

MacOS users currently must use The Manual Reflash Recovery Procedure listed below, because neither SerComm or UpSlug work with it.


The Manual Reflash Recovery Procedure

  1. Install a TFTP Server (or HTTP server)\\
to:

At the RedBoot prompt, type the following command:\\

Changed line 101 from:

The first thing you will need to do is set up a TFTP server, if you do not already have one installed. I work mostly on OS X, so I can't give detailed instructions for Linux (I did try, briefly, to install a TFTP RPM on my Linux machine, but though it claimed to be client and server only the client seemed to be installed). If you're using OS X, feel free to contact me for details. You should set up the server with a directory to serve from; this will need to be world-readable, *as will any files you place in it* if you want them to be served.\\

to:

ip_address -h 192.168.0.99\\

Changed line 103 from:

If you're looking for a Windows TFTP server, you can download a free one from http://solarwinds.net/Download-Tools.htm .\\

to:

where 192.168.0.99 is the IP of the TFTP server. This tells RedBoot where to download the data from. You should get your prompt back after each command; I've occasionally had it hang, in which case restart and do the Ctrl-C dance again. \\

Changed lines 105-106 from:

For details how to setup and test TFTP Server for Windows see SetupSolarWindsTFTPServer . \\

to:
  1. Load the firmware.\\
Changed lines 108-110 from:

I had issues with getting the solarwinds TFTP server to work under windows. It would serve files to the local machine, but fail to send anything to the slug. What worked for me was http://tftpd32.jounin.net/

  1. Obtain the firmware and place it in the TFTP serving directory. \\
to:

Now type:\\

Changed lines 110-114 from:

If you've made your slug unbootable I suggest you start by getting it back to default configuration by installing the official Linksys firmware - you can always upload a fancier one via the Web interface once you've got it working. Download the firmware from their site if you haven't already (http://www.linksys.com/download/firmware.asp?fwid=217) and place the 8MB firmware file found in the zip file into the TFTP directory.

  1. Connect to RedBoot via telnet or serial.
  2. Tell the NSLU2 where the TFTP server is.\\
to:

load -r -v -b 0x01000000 -h 192.168.0.99 NSLU2_V23R25.bin\\

Changed lines 112-114 from:

At the RedBoot prompt, type the following command:\\

to:

again, in this article 192.168.0.99 is the assumed IP of the TFTP server.
(assuming, of course, that you're using the R25 firmware).
This will load the firmware into the slug's RAM over the network. \\

Changed lines 116-118 from:

ip_address -h 192.168.0.99\\

to:

RedBoot also supports HTTP in addition to TFTP. All you have to do is add -m http to the load command and specify a full path (from the doc root) to the file you want ('/firm/myfirmware.bin', for example).

  1. Verify the firmware.\\
Changed lines 120-121 from:

where 192.168.0.99 is the IP of the TFTP server. This tells RedBoot where to download the data from. You should get your prompt back after each command; I've occasionally had it hang, in which case restart and do the Ctrl-C dance again. \\

to:

For safety's sake, you can now do a checksum on the file to ensure it didn't get corrupted in transit. Simply type: \\

Changed lines 123-124 from:
  1. Load the firmware.\\
to:

cksum \\

Changed line 125 from:

Now type:\\

to:

and you should get a set of numbers calculated from the file. For the R25 firmware, these should be: 3007264634 8388608. If not (and you're not using a different firmware version), you should probably try loading the file again. \\

Changed lines 127-133 from:

load -r -v -b 0x01000000 -h 192.168.0.99 NSLU2_V23R25.bin\\

to:

The checksum for NSLU2_V23R63.bin is:

RedBoot> cksum
Computing cksum for area 0x01000000-0x01800000
POSIX cksum = 4056400472 8388608 (0xf1c7c258 0x00800000)
  1. Write the firmware to the flash.\\
Changed lines 135-137 from:

again, in this article 192.168.0.99 is the assumed IP of the TFTP server.
(assuming, of course, that you're using the R25 firmware).
This will load the firmware into the slug's RAM over the network. \\

to:

Cross your fingers and type:\\

Changed lines 137-139 from:

RedBoot also supports HTTP in addition to TFTP. All you have to do is add -m http to the load command and specify a full path (from the doc root) to the file you want ('/firm/myfirmware.bin', for example).

  1. Verify the firmware.\\
to:

fis write -f 0x50060000 -b 0x01060000 -l 0x7a0000\\

Changed lines 139-140 from:

For safety's sake, you can now do a checksum on the file to ensure it didn't get corrupted in transit. Simply type: \\

to:

This will write the kernel, ramdisk and trailer portions of the firmware to the right position in the flash. This may take up to 5 minutes. When it's finished and you get your Redboot prompt back, your slug should be fixed.\\

Changed lines 141-143 from:

cksum \\

to:

Because you didn't overwrite the SysConf part of the flash, your slug will still be using the same IP address as before. Remember to set your subnets appropriately, and ensure you're looking for it in the right place. If you wish to erase the SysConf as well then follow the instructions to reset the SysConf

  1. Restart the slug.\\
Changed line 145 from:

and you should get a set of numbers calculated from the file. For the R25 firmware, these should be: 3007264634 8388608. If not (and you're not using a different firmware version), you should probably try loading the file again. \\

to:

With fingers still crossed, type:\\

Changed lines 147-153 from:

The checksum for NSLU2_V23R63.bin is:

RedBoot> cksum
Computing cksum for area 0x01000000-0x01800000
POSIX cksum = 4056400472 8388608 (0xf1c7c258 0x00800000)
  1. Write the firmware to the flash.\\
to:

reset\\

Changed line 149 from:

Cross your fingers and type:\\

to:

Be ready to celebrate when you hear that strangled little beep it makes as it finishes booting and is ready to be used.

Changed lines 151-160 from:

fis write -f 0x50060000 -b 0x01060000 -l 0x7a0000\\

to:

Acknowledgements

This HowTo was originally written by Pete Verdon who based it on posts on the mailing list. Thanks to those who originally discovered and posted it, in particular Irfan29200, Smakofsky, and Rod. Apologies if anybody has been missed out.

Notes

  1. Linux allows you to add an IP address to an existing ethernet card. In my case, I've got 'eth0' so I typed the following on my desktop/server:\\
Changed line 162 from:

This will write the kernel, ramdisk and trailer portions of the firmware to the right position in the flash. This may take up to 5 minutes. When it's finished and you get your Redboot prompt back, your slug should be fixed.\\

to:

ifconfig eth0:1 192.168.0.2\\

Deleted lines 163-185:

Because you didn't overwrite the SysConf part of the flash, your slug will still be using the same IP address as before. Remember to set your subnets appropriately, and ensure you're looking for it in the right place. If you wish to erase the SysConf as well then follow the instructions to reset the SysConf

  1. Restart the slug.

    With fingers still crossed, type:

    reset

    Be ready to celebrate when you hear that strangled little beep it makes as it finishes booting and is ready to be used.


Acknowledgements

This HowTo was originally written by Pete Verdon who based it on posts on the mailing list. Thanks to those who originally discovered and posted it, in particular Irfan29200, Smakofsky, and Rod. Apologies if anybody has been missed out.

Notes

  1. Linux allows you to add an IP address to an existing ethernet card. In my case, I've got 'eth0' so I typed the following on my desktop/server:

    ifconfig eth0:1 192.168.0.2
    \\
March 05, 2006, at 07:45 AM by Reiner Nothdurft -- Reformatted my last change
Changed line 162 from:

again in this article 192.168.0.99 is the assumed IP of the TFTP server.

to:

again, in this article 192.168.0.99 is the assumed IP of the TFTP server.\\

March 05, 2006, at 07:42 AM by Reiner Nothdurft -- added host IP to load command
Changed line 160 from:

load -r -v -b 0x01000000 NSLU2_V23R25.bin\\

to:

load -r -v -b 0x01000000 -h 192.168.0.99 NSLU2_V23R25.bin\\

Added line 162:

again in this article 192.168.0.99 is the assumed IP of the TFTP server.

February 11, 2006, at 01:47 PM by olaf --
Added lines 116-117:

The SerComm-Utility sees the slug with firmware 4.x and higher after putting him into upgrade mode. The SerComm-Utility left the ethernet devices on two of my machines disfunctional after browsing for slugs and another time after starting with "erasing flash" and stopped updating. seems unstable. suggestion: switch to upslug on linux/knoppix. worked reliable.

February 05, 2006, at 11:55 AM by Lurch -- Notes on the SerComm RmDrv.exe error
Added lines 114-115:

Additional SerComm notes: When starting Upgrade.exe I kept getting an error message telling me to run RmDrv?.exe, and then rerun Upgrade.exe - unfotunately doing so had no effect, I still kept getting the error. Then by sheer luck I discovered that the "Adapter Cards Lists:" was actually listing each of my network cards 3 or 4 times. By using the up & down keys and trial & error I eventually managed to select the correct network card, at which point it all worked flawlessly. - Lurch

December 31, 2005, at 01:24 AM by Mani Varadarajan --
Changed lines 106-107 from:
to:

I found that it's best if you release the Reset button as soon as the Ready/Status light goes red. -- Mani

December 08, 2005, at 01:08 PM by thx1011 --
Changed lines 120-121 from:

MacOS users currently must use The Manaual Reflash Recovery Procedure listed below, because neither SerComm or UpSlug work with it.

to:

MacOS users currently must use The Manual Reflash Recovery Procedure listed below, because neither SerComm or UpSlug work with it.

October 30, 2005, at 06:18 AM by tman --
Changed lines 1-8 from:

(:table border=0 width=100% align=center bgcolor=red cellspacing=0:) (:cellnr:)

WARNING

Do not under *any* circumstances use the Linksys "EraseAll" utility to reflash your NSLU2.

In the worst case scenario, it may erase the bootloader and cause an unbootable slug. The only method of repair for the mentioned case would be JTAG, which requires extra hardware and knowledge that most users do not have.

You should use the old Sercomm Upgrade utility, or Upslug2, or RedBoot, to flash new images. Methods are discussed on this page.

to:

(:table border=0 width=100% bgcolor=red cellspacing=0:) (:cell:)

WARNING

Do not under *any* circumstances use the Linksys "EraseAll" utility to reflash your NSLU2.

In the worst case scenario, it may erase the bootloader and cause an unbootable slug. The only method of repair for the mentioned case would be JTAG, which requires extra hardware and knowledge that most users do not have.

You should use the old Sercomm Upgrade utility, Upslug2 or RedBoot to flash new images. Methods are discussed on this page.

October 30, 2005, at 05:44 AM by philipjohnson -- Added Colour.
Changed lines 1-3 from:

NOTICE:

Do not under *any* circumstances use the Linksys "EraseAll" utility to reflash your NSLU2. In the worst case scenario, it can cause your NSLU2 to be unbootable. The only method of repair in this case would be JTAG which requires extra hardware.

to:

(:table border=0 width=100% align=center bgcolor=red cellspacing=0:) (:cellnr:)

WARNING

Do not under *any* circumstances use the Linksys "EraseAll" utility to reflash your NSLU2.

In the worst case scenario, it may erase the bootloader and cause an unbootable slug. The only method of repair for the mentioned case would be JTAG, which requires extra hardware and knowledge that most users do not have.

You should use the old Sercomm Upgrade utility, or Upslug2, or RedBoot, to flash new images. Methods are discussed on this page.

(:tableend:)

October 28, 2005, at 06:01 PM by tman --
Changed lines 2-3 from:

Do not under *any* circumstances use the Linksys "EraseAll" utility to reflash your NSLU2. In a worst case scenario, it can brick your slug to the extent that it is not recoverable without hardware modifications.

to:

Do not under *any* circumstances use the Linksys "EraseAll" utility to reflash your NSLU2. In the worst case scenario, it can cause your NSLU2 to be unbootable. The only method of repair in this case would be JTAG which requires extra hardware.

October 27, 2005, at 05:14 PM by demon -- add warning for linksys\'s dodgy software
Added lines 1-3:

NOTICE:

Do not under *any* circumstances use the Linksys "EraseAll" utility to reflash your NSLU2. In a worst case scenario, it can brick your slug to the extent that it is not recoverable without hardware modifications.

Changed lines 78-81 from:

Easiest method? Use the Linksys "EraseAll" utility, or Upslug (Win/Linux)

In some cases, when erasing the flash worked fine, but programming did not, for instance because the upgrade was terminated prematurely, the slug falls back in failsafe upgrade mode. When it does, you can tell by the flashing Ready/Status LED in red shortly after power on. In this case telnetting into RedBoot may appear impossible, but luckily there is an easy way out. I have had success with Linksys's so-called "EraseAll" utility found at Linksys Support. This route requires that you have access to a Windows PC.

to:

Easiest method? Use SerComm or Upslug (Win/Linux)

In some cases, when erasing the flash worked fine, but programming did not, for instance because the upgrade was terminated prematurely, the slug falls back in failsafe upgrade mode. When it does, you can tell by the flashing Ready/Status LED in red shortly after power on. In this case telnetting into RedBoot may appear impossible, but luckily there is an easy way out. I have had success with the SerComm Upgrade Utility found at sercomm.com. This route requires that you have access to a Windows PC.

Changed line 86 from:
  1. Download the EraseAll utility and a binary of the firmware you want to use to the PC;
to:
  1. Download the SerComm utility and a binary of the firmware you want to use to the PC;
Changed lines 100-101 from:
  1. Fire up the EraseAll utility. It will go looking for a slug on the local subnet;
  2. Select your slug in the EraseAll utility
to:
  1. Fire up the SerComm utility. It will go looking for a slug on the local subnet;
  2. Select your slug in the SerComm utility
Changed lines 104-105 from:

The EraseAll utility will then upload the firmware image to the slug and verify it once written. Once done, you can reboot your slug. - Romix12000

to:

The SerComm utility will then upload the firmware image to the slug and verify it once written. Once done, you can reboot your slug. - Romix12000

October 23, 2005, at 03:17 AM by demon -- Change references from Sercomm to Linksys \\\"EraseAll\\\"
Changed lines 75-78 from:

Easiest method? Use SerComm or Upslug (Win/Linux)

In some cases, when erasing the flash worked fine, but programming did not, for instance because the upgrade was terminated prematurely, the slug falls back in failsafe upgrade mode. When it does, you can tell by the flashing Ready/Status LED in red shortly after power on. In this case telnetting into RedBoot may appear impossible, but luckily there is an easy way out. I have had success with the SerComm Upgrade Utility found at sercomm.com. This route requires that you have access to a Windows PC.

to:

Easiest method? Use the Linksys "EraseAll" utility, or Upslug (Win/Linux)

In some cases, when erasing the flash worked fine, but programming did not, for instance because the upgrade was terminated prematurely, the slug falls back in failsafe upgrade mode. When it does, you can tell by the flashing Ready/Status LED in red shortly after power on. In this case telnetting into RedBoot may appear impossible, but luckily there is an easy way out. I have had success with Linksys's so-called "EraseAll" utility found at Linksys Support. This route requires that you have access to a Windows PC.

Changed line 83 from:
  1. Download the SerComm utility and a binary of the firmware you want to use to the PC;
to:
  1. Download the EraseAll utility and a binary of the firmware you want to use to the PC;
Changed lines 97-98 from:
  1. Fire up the SerComm utility. It will go looking for a slug on the local subnet;
  2. Select your slug in the SerComm utility
to:
  1. Fire up the EraseAll utility. It will go looking for a slug on the local subnet;
  2. Select your slug in the EraseAll utility
Changed lines 101-102 from:

The SerComm utility will then upload the firmware image to the slug and verify it once written. Once done, you can reboot your slug. - Romix12000

to:

The EraseAll utility will then upload the firmware image to the slug and verify it once written. Once done, you can reboot your slug. - Romix12000

September 14, 2005, at 05:06 PM by tcampbell --
Changed lines 122-124 from:

For details how to setup and test TFTP Server for Windows see SetupSolarWindsTFTPServer .

  1. Obtain the firmware and place it in the TFTP serving directory. \\
to:

For details how to setup and test TFTP Server for Windows see SetupSolarWindsTFTPServer . \\

Added lines 124-127:

I had issues with getting the solarwinds TFTP server to work under windows. It would serve files to the local machine, but fail to send anything to the slug. What worked for me was http://tftpd32.jounin.net/

  1. Obtain the firmware and place it in the TFTP serving directory.
    \\
Changed lines 159-161 from:

and you should get a set of numbers calculated from the file. For the R25 firmware, these should be: 3007264634 8388608. If not (and you're not using a different firmware version), you should probably try loading the file again.

  1. Write the firmware to the flash.\\
to:

and you should get a set of numbers calculated from the file. For the R25 firmware, these should be: 3007264634 8388608. If not (and you're not using a different firmware version), you should probably try loading the file again. \\

Added lines 161-168:

The checksum for NSLU2_V23R63.bin is:

RedBoot> cksum
Computing cksum for area 0x01000000-0x01800000
POSIX cksum = 4056400472 8388608 (0xf1c7c258 0x00800000)
  1. Write the firmware to the flash.
    \\
August 30, 2005, at 11:25 AM by tman -- Removed RedBoot editing due to high risk
Deleted lines 203-229:

MAC Address Hosed

I had the situation where RedBoot was running but the kernel was not booting - not even the Linksys firmware. The problem was that I had hosed the MAC address stored at 0x5003ffb0 accidentally.

To fix it, I edited the firmware image in vim and added the MAC address. In redboot, I knew the MAC address was 00 c0 02 01 01 02 from using the command 'set_npe_mac'.

 vim -b NSLU2_V23R29.bin
 :%!xxd

edit the 6 bytes at 0x3ffb0 to be 00 c0 02 01 01 02 or whatever your MAC address is.

 :%!xxd -r
 ZZ

then in redboot load the image into RAM

 load -r -v -b 0x1000000 NSLU2_V23R29.bin

then load the whole thing

 fis write -f 0x50000000 -b 0x01000000 -l 0x00800000
 reset

WARNING: this overwrites redboot and the config and everything. If it goes right, you'll have a NSLU2 as it comes out of the box. I couldn't find a way to only write to 0x3ffb0 because it wants 128KB blocks. The first part of that block is part of redboot so i've overwritten the whole lot in case you have a slightly different version of redboot from what's in the image.


July 25, 2005, at 10:32 PM by Cryptnotic -- Flash RAM -> Flash ROM
Changed lines 231-232 from:

Flash RAM Filled

to:

Flash ROM Filled

July 22, 2005, at 01:21 AM by tman -- Removed vandalism
Added lines 1-257:

Situation

Your slug isn't bootable, meaning that some part of the firmware is corrupt.

You want to install a new firmware, but aren't sure how to do it or you can't use the Linksys web interface.


How Do I Know I've Broken It?

The normal sequence I see when powering up my NSLU2 using Unslung 4.x with lots of installed packages is:

  1. Solid orange Ready/Status light (1 sec)
  2. Solid orange Ready/Status and green Ethernet light (2 sec)
  3. Solid orange Ready/Status light (2 sec)
  4. Repeat previous 2 steps once with slightly shorter solid green Ethernet
  5. Solid orange Ready/Status and green Ethernet light (10 sec)
  6. All lights turn off (<0.5 sec)
  7. Flashing green Ready/Status light and flickering solid green Ethernet light (8 sec)
  8. Flickering solid green Ethernet light and flickering solid green Disk 1 light (14 sec)
  9. Flashing green Ready/Status light, flickering solid green Ethernet light, and flickering solid green Disk 1 / Disk 2 light (approx. 120 sec)
  10. Solid green Ready/Status, flickering green Ethernet, flickering green Disk 1/Disk 2, and the "strangled beep" (1 sec)

Total time from power on to beep: around 150 seconds (2.5 minutes)

After the beep, the NSLU2 may continue to load stuff from the hard drive, but it is now useable.

If you're not seeing this sort of sequence, you are probably corrupted the flash and made it unbootable. This can usually be fixed as the bootloader itself should be okay. It is only a true "brick" if you've managed to damage the bootloader (RedBoot) and even then you can recover it by reprogramming the flash via the JTAG interface. There have only been 2 proper "bricks" so far in the history of the project (one was a soldering problem, and the other was a casualty of an early prototype of the slugimage tool with a programming error) and both were recoverable. We know of no NSLU2 that has been truly "bricked" by installation of released custom firmware.


Before Attempting A Flash...

For Unslung users, in some cases the boot process of the NSLU2 seems to be ok, but it is still not possible to access the device.

Save yourself some stress and check these things before attempting a re-flash:

  1. Slug IP Address

    Are you sure you're using the right address?
    Are you on the right subnet?
    Are you using the right router address?

    The factory default IP address for the slug is 192.168.1.77. This can be checked by booting the Linksys configuration CD-ROM that came with your slug. Maybe it's different that what you think it is, especially if you've Reset The Sys Conf Area.
  2. DHCP

    Some people have found reliability problems with the DHCP code in the Linksys firmware.

    If your router doesn't allow you to manually set a MAC address for a particular IP address, perhaps you should use your Linksys CD-ROM to make the slug use a fixed IP.
  3. Configuration Server Port

    Many people re-configure the Linksys web interface to another port (e.g. 8080) so that it doesn't conflict with other services they may wish to install.

    Consult your Linksys manual on information about how to do that.

Assuming none of that helps, follow the instructions below and also consider following the Reset The Sys Conf Area process.


How Is The Firmware Setup?

The firmware is divided into four sections:

  • RedBoot - The bootloader that runs when the device is first started, loads things into memory and starts Linux. RedBoot is quite sophisticated, and has a user interface that you can access by telnet or serial. You can use it to load things into memory by TFTP, write to flash, and similar tasks.
  • SysConf - This portion of the flash contains the sort of data you can modify through the Web interface, such as the hostname.
  • Linux kernel - This is a more-or-less opaque (to me, anyway) vmlinuz file containing a compressed kernel.
  • Ramdisk - This is the conventional Linux file tree - /bin, /etc, and all the rest of them - in compressed form. It's stored in flash, but gets loaded into RAM by RedBoot when Linux is run. You can modify its contents, but any changes will be lost when you reboot, as a fresh copy is loaded into RAM from flash.
  • There is also a small "trailer" at the end of the ramdisk area (in the last erase block in fact) that the slug can check.

Of these sections, hopefully RedBoot at least is still intact. If it is not, these instructions will not help you, and you'll need to talk to the hardcore JTAG people.


Easiest method? Use SerComm or Upslug (Win/Linux)

In some cases, when erasing the flash worked fine, but programming did not, for instance because the upgrade was terminated prematurely, the slug falls back in failsafe upgrade mode. When it does, you can tell by the flashing Ready/Status LED in red shortly after power on. In this case telnetting into RedBoot may appear impossible, but luckily there is an easy way out. I have had success with the SerComm Upgrade Utility found at sercomm.com. This route requires that you have access to a Windows PC.

The best way to get started is to hook up the slug to the Windows PC through an isolated hub or through a standard ethernet cable (or crossover cable on older PC's). Make sure that NO DISKS ARE ATTACHED TO THE SLUG after this point.

Procedure

  1. Download the SerComm utility and a binary of the firmware you want to use to the PC;
  2. Put your slug into Firmware Upgrade mode.

    Easy Way:
    1. Turn off your slug
    2. Hold down the reset button on the slug's back panel down
    3. Turn on your slug while still pressing the Reset button
    4. Keep holding down the Reset button for 10 seconds
    5. Wait for the Ready/Status light to go solid red.
    6. Stop pressing the Reset button
    7. Wait for the Ready/Status light to alternate between red and green.

      If you don't see the alternating red/green Ready/Status light, repeat this process.
  3. Fire up the SerComm utility. It will go looking for a slug on the local subnet;
  4. Select your slug in the SerComm utility
  5. Select the firmware to be loaded and press the upgrade button.

The SerComm utility will then upload the firmware image to the slug and verify it once written. Once done, you can reboot your slug. - Romix12000

If you have access to a Linux machine, you can use the UpSlug tool instead. You will find the procedure using UpSlug at HowTo.RecoverFromABadFlashWithUpSlug.

You can also put your slug manually into Upgrade mode by giving it the upgrade command in Redboot.


MacOS User?

MacOS users currently must use The Manaual Reflash Recovery Procedure listed below, because neither SerComm or UpSlug work with it.


The Manual Reflash Recovery Procedure

  1. Install a TFTP Server (or HTTP server)

    The first thing you will need to do is set up a TFTP server, if you do not already have one installed. I work mostly on OS X, so I can't give detailed instructions for Linux (I did try, briefly, to install a TFTP RPM on my Linux machine, but though it claimed to be client and server only the client seemed to be installed). If you're using OS X, feel free to contact me for details. You should set up the server with a directory to serve from; this will need to be world-readable, *as will any files you place in it* if you want them to be served.

    If you're looking for a Windows TFTP server, you can download a free one from http://solarwinds.net/Download-Tools.htm .

    For details how to setup and test TFTP Server for Windows see SetupSolarWindsTFTPServer .
  2. Obtain the firmware and place it in the TFTP serving directory.

    If you've made your slug unbootable I suggest you start by getting it back to default configuration by installing the official Linksys firmware - you can always upload a fancier one via the Web interface once you've got it working. Download the firmware from their site if you haven't already (http://www.linksys.com/download/firmware.asp?fwid=217) and place the 8MB firmware file found in the zip file into the TFTP directory.
  3. Connect to RedBoot via telnet or serial.
  4. Tell the NSLU2 where the TFTP server is.

    At the RedBoot prompt, type the following command:

    ip_address -h 192.168.0.99

    where 192.168.0.99 is the IP of the TFTP server. This tells RedBoot where to download the data from. You should get your prompt back after each command; I've occasionally had it hang, in which case restart and do the Ctrl-C dance again.

  5. Load the firmware.

    Now type:

    load -r -v -b 0x01000000 NSLU2_V23R25.bin

    (assuming, of course, that you're using the R25 firmware).
    This will load the firmware into the slug's RAM over the network.

    RedBoot also supports HTTP in addition to TFTP. All you have to do is add -m http to the load command and specify a full path (from the doc root) to the file you want ('/firm/myfirmware.bin', for example).
  6. Verify the firmware.

    For safety's sake, you can now do a checksum on the file to ensure it didn't get corrupted in transit. Simply type:

    cksum

    and you should get a set of numbers calculated from the file. For the R25 firmware, these should be: 3007264634 8388608. If not (and you're not using a different firmware version), you should probably try loading the file again.
  7. Write the firmware to the flash.

    Cross your fingers and type:

    fis write -f 0x50060000 -b 0x01060000 -l 0x7a0000

    This will write the kernel, ramdisk and trailer portions of the firmware to the right position in the flash. This may take up to 5 minutes. When it's finished and you get your Redboot prompt back, your slug should be fixed.

    Because you didn't overwrite the SysConf part of the flash, your slug will still be using the same IP address as before. Remember to set your subnets appropriately, and ensure you're looking for it in the right place. If you wish to erase the SysConf as well then follow the instructions to reset the SysConf
  8. Restart the slug.

    With fingers still crossed, type:

    reset

    Be ready to celebrate when you hear that strangled little beep it makes as it finishes booting and is ready to be used.


Acknowledgements

This HowTo was originally written by Pete Verdon who based it on posts on the mailing list. Thanks to those who originally discovered and posted it, in particular Irfan29200, Smakofsky, and Rod. Apologies if anybody has been missed out.

Notes

  1. Linux allows you to add an IP address to an existing ethernet card. In my case, I've got 'eth0' so I typed the following on my desktop/server:

    ifconfig eth0:1 192.168.0.2

    As long as you're not already using the 192.168.0 network, this won't confuse anything and will only exist until you reboot (or type "ifconfig eth0:1 down" on your server) - jkpeters_37
  2. The RedBoot command reset will reboot without having to power-cycle. - jkpeters_37
  3. I found it easier to add a route to 192.168.0.1 than to add interfaces or change my current setup. - CodeWhacker
  4. The loading of the .bin should be done in about 5 seconds. My stock nslu timed out (5+ min wait) when loading from http (on a OS X Apache, my setup could be broke =)
  5. If the host IP is set, the following command will load from http server:
    load -r -m http -b 0x01000000 /NSLU2_V23R29.bin
    For the fis command, -l 0x7a0000 worked well enough with NSLU2_V23R29.bin for the purpose of then upgrading to unslung-standard-3.18-beta.bin via the web interface - willpost

MAC Address Hosed

I had the situation where RedBoot was running but the kernel was not booting - not even the Linksys firmware. The problem was that I had hosed the MAC address stored at 0x5003ffb0 accidentally.

To fix it, I edited the firmware image in vim and added the MAC address. In redboot, I knew the MAC address was 00 c0 02 01 01 02 from using the command 'set_npe_mac'.

 vim -b NSLU2_V23R29.bin
 :%!xxd

edit the 6 bytes at 0x3ffb0 to be 00 c0 02 01 01 02 or whatever your MAC address is.

 :%!xxd -r
 ZZ

then in redboot load the image into RAM

 load -r -v -b 0x1000000 NSLU2_V23R29.bin

then load the whole thing

 fis write -f 0x50000000 -b 0x01000000 -l 0x00800000
 reset

WARNING: this overwrites redboot and the config and everything. If it goes right, you'll have a NSLU2 as it comes out of the box. I couldn't find a way to only write to 0x3ffb0 because it wants 128KB blocks. The first part of that block is part of redboot so i've overwritten the whole lot in case you have a slightly different version of redboot from what's in the image.


Flash RAM Filled

Another way you can make your NSLU2 unbootable is by accidentally filling up your Flash directories with too much stuff. This can easily be caused by trying to install a package or refreshing the available package list without Unsling-ing to a hard drive.

In this situation, the NSLU2 Ready / Status light will continue to flash green for > 3 minutes and not make it's usual "strangled beep" noise. This also induces instant terror in the heart of the brand-new Unslung user and causes them to wonder if they've just wasted all their money and if they can take it back to the store and say "It doesn't work! Can I get a new one?" :-)

In these cases, follow the telnet instructions to get into RedBoot. Once inside, follow the standard reflashing instructions above to reapply Unslung or fallback to the standard Linksys firmware. If you have further problems, you might have to Reset The Sys Conf Area.


Historical:

The normal sequence I see when powering up my NSLU2 using Unslung 3.18 with lots of installed packages is:

  1. Solid orange Ready/Status light (1 sec)
  2. Solid orange Ready/Status and green Ethernet light (2 sec)
  3. Solid orange Ready/Status light (2 sec)
  4. Repeat previous 2 steps once with slightly shorter solid green Ethernet
  5. Solid orange Ready/Status and green Ethernet light (10 sec)
  6. All lights turn off (<0.5 sec)
  7. Flashing green Ready/Status light and flickering solid green Ethernet light (16 sec)
  8. Flashing green Ready/Status light, flickering solid green Ethernet light, and flickering solid green Disk 1 / Disk 2 light (approx. 120 sec)
  9. Solid green Ready/Status, flickering green Ethernet, flickering green Disk 1/Disk 2, and the "strangled beep" (1 sec)

Total time from power on to beep: around 150 seconds (2.5 minutes)