NSLU2-Linux
view · edit · print · history

HowTo.ReflashUsingRedbootAndTFTP History

Hide minor edits - Show changes to markup

April 22, 2010, at 02:09 PM by Toby Speight -- s/server/served/ type
Changed lines 18-19 from:

With Linux and MacOS you generally need to pay attention to file permissions in the TFTP server directory: the files being server must be world-readable.

to:

With Linux and MacOS you generally need to pay attention to file permissions in the TFTP server directory: the files being served must be world-readable.

August 10, 2008, at 06:00 PM by Alfonso Reyes --
Changed lines 69-71 from:

@@R25: 3007264634 8388608 NSLU2_V23R63.bin: 4056400472 8388608@@

to:

R25: 3007264634 8388608 NSLU2_V23R63.bin: 4056400472 8388608

August 10, 2008, at 06:00 PM by Alfonso Reyes --
Changed lines 69-71 from:

R25: 3007264634 8388608 NSLU2_V23R63.bin: 4056400472 8388608

to:

@@R25: 3007264634 8388608 NSLU2_V23R63.bin: 4056400472 8388608@@

August 10, 2008, at 05:58 PM by Alfonso Reyes --
Added line 44:
Added line 90:
August 10, 2008, at 05:57 PM by Alfonso Reyes --
Changed lines 89-91 from:

reset

to:
reset
August 10, 2008, at 05:55 PM by Alfonso Reyes --
Changed lines 62-64 from:

cksum

to:
cksum
Added line 81:
August 10, 2008, at 05:54 PM by Alfonso Reyes --
Changed line 35 from:

ip_address -h 192.168.0.99

to:

ip_address -h 192.168.0.99

Changed lines 44-46 from:

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

to:
load -r -v -b 0x01000000 -h 192.168.0.99 NSLU2_V23R25.bin
Changed lines 77-78 from:

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

to:
fis write -f 0x50060000 -b 0x01060000 -l 0x7a0000
August 10, 2008, at 05:53 PM by Alfonso Reyes --
Changed lines 36-37 from:

[@

to:

@]

August 10, 2008, at 05:52 PM by Alfonso Reyes --
Added line 34:

[@

Changed lines 36-37 from:
to:

[@

May 03, 2008, at 05:10 PM by Rob Lockhart -- bad link for WebServer - trying to correct
Changed lines 22-24 from:
 /Library/WebServer?/Documents
to:

/Library/WebServer/Documents

May 03, 2008, at 05:08 PM by Rob Lockhart -- brief instructions/advise for Linux, cosmetic changes
Changed lines 10-11 from:

The first thing you will need to do is set up a TFTP or HTTP server on your PC, if you do not already have one installed. Linux users have a variety of TFTP servers available. Apparently one is available on MacOS X (someone wrote "If you're using OS X, feel free to contact me for details", but exactly who wrote that is now lost). On MS-Windows, see SetupTFTPServer.

to:

The first thing you will need to do is set up a TFTP or HTTP server on your PC, if you do not already have one installed. Linux users have a variety of TFTP servers available. Apparently one is available on MacOS X (someone wrote "If you're using OS X, feel free to contact me for details", but exactly who wrote that is now lost). On MS-Windows, see SetupTFTPServer. For Linux, there's a plethora of instructions available, with some distributions having a TFTP server installed by default, and files being served from its /tftpboot directory (but read-only access). The best advise would be to seek the wikis and manuals for your distribution as such things as inetd may need to be modified and/or created.

Deleted line 13:
Changed lines 22-24 from:

to:
 /Library/WebServer?/Documents
May 03, 2008, at 04:56 PM by Rob Lockhart -- cosmetic only
Changed lines 17-25 from:

One option is to re-flash with the Linksys firmware: NSLU2 Firmware 2.3R63 - unzip this file and put the 8 MByte? firmware file in the TFTP directory. Alternatively you can use a firmware file distributed by this project, or one you have saved yourself using "cat /dev/mtdblock* > firmware". In any case you should have an 8 MByte? file.

With Linux and MacOS? X you generally need to pay attention to file permissions in the TFTP server directory: the files being server must be world-readable.

MacOS? "personal web services" users should place the file in

/Library/WebServer?/Documents

to:

One option is to re-flash with the Linksys firmware: NSLU2 Firmware 2.3R63 - unzip this file and put the 8 MiB? firmware file in the TFTP directory. Alternatively you can use a firmware file distributed by this project, or one you have saved yourself using "cat /dev/mtdblock* > firmware". In any case you should have an 8 MiB? file.

With Linux and MacOS you generally need to pay attention to file permissions in the TFTP server directory: the files being server must be world-readable.

MacOS "personal web services" users should place the file in

June 11, 2007, at 03:25 PM by Phil Endecott -- Merge JoLu\'s comments into the flow of the page
Changed lines 10-14 from:

The first thing you will need to do is set up a TFTP or HTTP server on your PC, if you do not already have one installed. Linux users have a variety of TFTP servers available. Apparently one is available on MacOS X (someone wrote "If you're using OS X, feel free to contact me for details", but exactly who wrote that is now lost). On MS-Windows, see SetupTFTPServer . Although TFTP is the "traditional" choice, apparently HTTP can also be used.

Obtain the firmware and place it in the TFTP serving directory

to:

The first thing you will need to do is set up a TFTP or HTTP server on your PC, if you do not already have one installed. Linux users have a variety of TFTP servers available. Apparently one is available on MacOS X (someone wrote "If you're using OS X, feel free to contact me for details", but exactly who wrote that is now lost). On MS-Windows, see SetupTFTPServer.

Although TFTP is the "traditional" choice, apparently HTTP can also be used. Mac users could use something called "personal web services".

Obtain the firmware and place it in the TFTP or HTTP serving directory

Changed lines 21-25 from:
to:

MacOS? "personal web services" users should place the file in

/Library/WebServer?/Documents

Changed lines 42-43 from:

Now type:

to:

To get the firmware from a TFTP server, type:

Changed lines 50-61 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).

Remark JoLu? : The following command have to be used to download a new firmwire from a web server:

load -r -b 0x01000000 -h 192.168.0.99 -m http /unslung68.bin (example)

The parameter -v sould be removed otherwise the upload failed.

I took the personal web services from Apple MacOSX?. The file (here unslung68.bin) should be in

/Library/WebServer?/Documents

to:

RedBoot also supports HTTP. Here's an example of using that:

load -r -b 0x01000000 -h 192.168.0.99 -m http /unslung68.bin

Don't use the -v flag in HTTP mode, it will cause the transfer to fail.

June 09, 2007, at 07:02 PM by JoLu --
Changed lines 46-47 from:

Remark JoLu?: The following command have to be used to download a new firmwire from a web server:

to:

Remark JoLu? : The following command have to be used to download a new firmwire from a web server:

Changed lines 50-51 from:

I took the personal web services from Apple MacOSX?. The file should be in

to:

The parameter -v sould be removed otherwise the upload failed.

I took the personal web services from Apple MacOSX?. The file (here unslung68.bin) should be in

June 09, 2007, at 07:00 PM by JoLu -- Download with HTTP
Changed lines 46-53 from:
to:

Remark JoLu?: The following command have to be used to download a new firmwire from a web server:

load -r -b 0x01000000 -h 192.168.0.99 -m http /unslung68.bin (example)

I took the personal web services from Apple MacOSX?. The file should be in

/Library/WebServer?/Documents

April 07, 2007, at 06:14 PM by Rob Lockhart -- changed link from SolarWinds to new generic TFTP page
Changed lines 10-12 from:

The first thing you will need to do is set up a TFTP or HTTP server on your PC, if you do not already have one installed. Linux users have a variety of TFTP servers available. Apparently one is available on MacOS X (someone wrote "If you're using OS X, feel free to contact me for details", but exactly who wrote that is now lost). On MS-Windows, see SetupSolarWindsTFTPServer. Although TFTP is the "traditional" choice, apparently HTTP can also be used.

to:

The first thing you will need to do is set up a TFTP or HTTP server on your PC, if you do not already have one installed. Linux users have a variety of TFTP servers available. Apparently one is available on MacOS X (someone wrote "If you're using OS X, feel free to contact me for details", but exactly who wrote that is now lost). On MS-Windows, see SetupTFTPServer . Although TFTP is the "traditional" choice, apparently HTTP can also be used.

April 07, 2007, at 05:56 PM by Rob Lockhart -- corrected bad links
Changed lines 3-4 from:

You probably don't want to do this: there are better ways to reflash your Slug. In particular, see Main.UpSlug2 and Main.SercommFirmwareUpgrade?. If you have read those pages and still think that you want to use the method described here, I encourage you to ask for advice on the mailing lists before continuing.

to:

You probably don't want to do this: there are better ways to reflash your Slug. In particular, see UpSlug2 and SercommFirmwareUpgrade. If you have read those pages and still think that you want to use the method described here, I encourage you to ask for advice on the mailing lists before continuing.

April 07, 2007, at 05:52 PM by Rob Lockhart -- link added for MacOS and changed windows to MS-Windows
Changed lines 10-12 from:

The first thing you will need to do is set up a TFTP or HTTP server on your PC, if you do not already have one installed. Linux users have a variety of TFTP servers available. Apparently one is available on MacOS? X (someone wrote "If you're using OS X, feel free to contact me for details", but exactly who wrote that is now lost). On windows, see SetupSolarWindsTFTPServer. Although TFTP is the "traditional" choice, apparently HTTP can also be used.

to:

The first thing you will need to do is set up a TFTP or HTTP server on your PC, if you do not already have one installed. Linux users have a variety of TFTP servers available. Apparently one is available on MacOS X (someone wrote "If you're using OS X, feel free to contact me for details", but exactly who wrote that is now lost). On MS-Windows, see SetupSolarWindsTFTPServer. Although TFTP is the "traditional" choice, apparently HTTP can also be used.

March 03, 2007, at 03:00 PM by Phil Endecott --
Changed lines 3-4 from:

You probably don't want to do this: there are better ways to reflash your Slug. In particular, see Main.Upslug2 and Main.SercommFirmwareUpgrade?. If you have read those pages and still think that you want to use the method described here, I encourage you to ask for advice on the mailing lists before continuing.

to:

You probably don't want to do this: there are better ways to reflash your Slug. In particular, see Main.UpSlug2 and Main.SercommFirmwareUpgrade?. If you have read those pages and still think that you want to use the method described here, I encourage you to ask for advice on the mailing lists before continuing.

March 03, 2007, at 02:29 PM by Phil Endecott -- Create this page based on material from RecoverFromABadFlash
Added lines 1-78:

How to Reflash using Redboot and TFTP

You probably don't want to do this: there are better ways to reflash your Slug. In particular, see Main.Upslug2 and Main.SercommFirmwareUpgrade?. If you have read those pages and still think that you want to use the method described here, I encourage you to ask for advice on the mailing lists before continuing.

The method described here involves accessing the Redboot bootloader's command prompt and then transferring the new flash data from a TFTP or HTTP server on your PC. You first transfer the data into the Slug's RAM and then program it into the flash. The danger with this method is that you need to enter various memory addresses at the Redboot command prompt, and if you get them wrong you will write to the wrong areas of the flash. If you accidentally write over Redboot itself, your Slug will require special JTAG hardware to repair. The authors of this page do not guarantee that the commands listed here are correct, so you should be sure that you personally understand the memory map and believe them to be right before continuing.

Installing a TFTP or HTTP server

The first thing you will need to do is set up a TFTP or HTTP server on your PC, if you do not already have one installed. Linux users have a variety of TFTP servers available. Apparently one is available on MacOS? X (someone wrote "If you're using OS X, feel free to contact me for details", but exactly who wrote that is now lost). On windows, see SetupSolarWindsTFTPServer. Although TFTP is the "traditional" choice, apparently HTTP can also be used.

Obtain the firmware and place it in the TFTP serving directory

One option is to re-flash with the Linksys firmware: NSLU2 Firmware 2.3R63 - unzip this file and put the 8 MByte? firmware file in the TFTP directory. Alternatively you can use a firmware file distributed by this project, or one you have saved yourself using "cat /dev/mtdblock* > firmware". In any case you should have an 8 MByte? file.

With Linux and MacOS? X you generally need to pay attention to file permissions in the TFTP server directory: the files being server must be world-readable.

Connect to Redboot

You have two choices for accessing the Redboot command prompt: you can either connect over the network (see HowTo.TelnetIntoRedBoot) or you can use the serial port, if you have the necessary hardware (see HowTo.AddASerialPort).

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.

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

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. Run the "cksum" program on your TFTP server for comparison (cksum should be available on all Linux systems; not sure about Windows and Macs). Apparently the checksums for the Linksys firmware are:

R25: 3007264634 8388608 NSLU2_V23R63.bin: 4056400472 8388608

If this doesn't match, try again. DO NOT CONTINUE with a wrong checksum.

Write the firmware to the flash.

This is your last chance to change your mind and use Upslug2 instead. If you're sure you want to continue, 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

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.

view · edit · print · history · Last edited by Toby Speight.
Based on work by Alfonso Reyes, Rob Lockhart, Phil Endecott, and JoLu.
Originally by Phil Endecott.
Page last modified on April 22, 2010, at 02:09 PM