Cisco 3750 software recovery

7 06 2007

A colleague of mine just called, having done an “erase flash” on a 3750. He did this because there was only 16MB of flash on the switch and therefore not enough room for two images at the same time. What he didn’t expect was that the switch would subsequently reboot and end up in bootloader mode with no software on it…

So here’s what we did. I thought I’d write this up because I found it a bit difficult locating the information on Cisco.com.

The software for these switches comes as a .tar file. Tar is an old Unix file archive type – it actually stands for “tape archive” and was used for archiving things to tape. The .tar file contains the .bin image that the switch needs to boot, and some other stuff (for Cisco View Device Manager etc). When the switch is running normally, you’d use the command “archive download-sw tftp://<ipaddress>/<filename>” – this command copies the .tar file over and extracts it onto the filesystem.

However when you’re stuck in bootloader mode, there’s no such command. So we need to do something different:

1. Use Winzip (or similar) to extract the .bin file from the .tar file on your computer.

2. Connect to the switch using Hyperterminal at 9600 baud, 8 N 1.

3. You should see a prompt that says “switch:”. This is the bootloader mode. If you don’t see that, either you’re booted up, and you don’t need these instructions, your switch is properly broken, or you’ve got your terminal settings wrong. Try power-cycling the Catalyst while holding the “Mode” button on the front in to get the bootloader.

4. Now downloading the .bin file at 9600 baud is going to take a loooong time (about 2 hours), so we will change the baud rate of the console port temporarily. Enter the command “set BAUD 115200″. After you enter this command, you will start to get funny characters in Hyperterminal because its baud rate and the Catalyst’s are now mis-matched.

5. Close Hyperterminal and re-connect using 115200 baud instead. You should get intelligible stuff on the screen once more.

6. Type “flash_init” to initialise the filesystem. (In our case, this wasn’t necessary)

7. Type “load_helper” to load any helper files (in our case there weren’t any since we’d just wiped the flash).

8. Tell the switch to expect a file by Xmodem, and put it on the flash: “copy xmodem: flash:<filename.bin>” The filename should be the same as what you extracted from the .tar file.

9. In Hyperterminal click Transfer | Send File. In the dialogue box, make sure the protocol is XModem and put in the location of your .bin file. Click “Send” and you should see the process start.

10. Once that’s done, issue the command “boot flash:<filename.bin>” and the IOS will load up.

11. When the switch has booted, you may want to install the full .tar file in the correct manner using the “archive” command.

12. Check that you can reboot OK without ending up in the bootloader again.

13. Finally, you’d better set the console baud rate back to 9600, otherwise you or someone else will be really confused when they next try to use it. Go back into the bootloader by power-cycling the switch and holding down the “Mode” button. Enter the command “set BAUD 9600″ Then type “reset” to reboot the switch.

About these ads

Actions

Information

36 responses

17 07 2008
ericsquest

Thank you for taking the time to write this out. It came in very handy this evening.

28 08 2008
helpdeskdan

you can save yourself a reboot by setting the baud back to 9600 after you download the image.

3 09 2008
stu

hi, im having issues trying to bopy across a .bin file using xmodem

i type in the following on a 3750 with no IOS

copy xmodem:flash:c3750-i9-mz.121-19.EA1d

this comes up

usage: copy [-b ]

i then try to copy using xmodem and it errors with no response from remote system

pls can you help?

4 09 2008
DataPlumber

Hi Stu –
Unless I am mistaken, you don’t have a space between “xmodem:” and “flash:”, and you are also missing the .bin extension from the filename.
Hope that helps,
DP

6 02 2013
Eric B

I am re-imaging one at the moment. The correct formatting for these switches (because I ran into the same problem erroring) is
copy xmodem:c3750e-ipbasek9-mz.150-2.SE1.bin flash:c3750e-ipbasek9-mz.15
0-2.SE1.bin or it will not work…..

7 10 2008
RoUtermOnKey

Nice article! Thank you for your contribution to the R& S community! We had occasion in our shop to use this info today and glad that you had published it!

-notoriousBG

10 10 2008
karthik

hi

thx for the detailed procedure,

17 12 2008
Joe Harris

Here is consolidated link which details the password recovery procedures for many of our products Password Recovery Procedures

19 12 2008
huydd

Why don’t you set bigger BAUD? Eg set BAUD 921600
Thanks for your guide

22 12 2008
DataPlumber

Yeah – I guess that might be an option. I think I just used 115200 because (as far as I know), the serial UART chips on some devices can’t go any faster than that.

31 12 2008
Ash

Hey man, this was mega useful. Thank you for taking the time…

29 01 2009
KDAVE

Hey thanks for that, it came in useful.

have another question, if you want to recover a switch from a remote location, how would you do this?? for example, a console management switch is connected to the 3750, there is also a 56k modem attached to the modem….how can u xmodem a file via PSTN line?

29 01 2009
DataPlumber

Hmm- good question. I’ve never had to do that, so I can’t say whether it’d work either way. If i have a chance to try it, I’ll post something.

16 06 2009
shahjad

Thanks a lot.

29 06 2009
Amir

Hi… This is my first experience of recovering IOS in Catalyst 3750 PoE switch. But the switch is in “Switch:” (Switch Column mode). I’m confused that how would I get it out of that mode and reload the IOS from TFTP? I’ll be grateful, if anyone can resolve my problem. I’ll be much thankful.
Rgds
Amir

30 06 2009
Nicholas

Thanks for the detailed instructions on setting it to 115k. I tried to do it with 9600 bauds and I gave up.

8 01 2010
thebarfly

Hi,

Just want to say thanks for the post. this HOW-TO saved me a lot of time.

THANKS!!!

30 08 2010
thanks4this

Hi-5 for this!

Thanks for helping others!

27 09 2010
azam

if the baud cant set to 9600,use this command

Router(config)#line con 0
Router(config-line)# speed 9600

13 12 2010
Michael

Remember if you are emulating serial cable with a terminal server and you know the line (port) you are using:

ts-server#conf t
Enter configuration commands, one per line. End with CNTL/Z.
ts-server(config)#line 5
ts-server(config-line)#speed 115200
ts-server(config-line)#^Z
ts-server#

Thanks this was an awesome post.

15 01 2012
Touseef

Thnx for the Great information Guys.

But I am unable to set back BAUD rate to 9600. I gave set BAUD 9600 command.

When I am in bootloader is works on 9600. when the ios is loaded it works only on 115200.

22 02 2012
DataPlumber

Interesting – what happens if you do:

conf t
line con 0
speed 9600

Are you still stuck with 115200?

20 03 2012
Joey

Thanks. That worked for me

21 02 2012
Erica

Thank you so much…you guys are my heros!!!

28 03 2012
Justin

Thank you for this, flash_init was the key step I was missing.

25 05 2012
John

Thank you…Thank you…Thank you :)

18 10 2012
Big Mook

Thanks for putting this out. It’s been years since I’ve had to do this and it was much easier finding your page than searching Cisco.com for the procedure.

By the way, my 17MB+ bin file is going to take about 1 hour, 15 minutes at 115200, so it would take about 15 hours to transfer at 9600.

13 04 2013
green coffee bean extract 800 mg 50 chlorogenic acid

Howdy! This is my first visit to your blog! We are a group of volunteers and starting a new
project in a community in the same niche. Your blog provided us valuable information to work on.
You have done a extraordinary job!

14 04 2013
how to increase stamina in bed for men

Every weekend i used to pay a visit this web site, for the reason
that i want enjoyment, as this this web page conations truly fastidious funny stuff too.

15 04 2013
fox new girl full episodes free

Hi there, all the time i used to check weblog posts here in the early
hours in the daylight, as i like to find out more and more.

15 04 2013
how i met your mother wiki episode list

Very shortly this web site will be famous among all blog users, due to it’s good articles

15 04 2013
ncis tv show website

Oh my goodness! Amazing article dude! Many thanks, However I am encountering difficulties with your RSS.
I don’t understand the reason why I can’t join it.
Is there anyone else having the same RSS problems?
Anyone who knows the solution will you kindly respond? Thanx!
!

27 09 2013
Mrudula

Thank you so much for the article. I was able to bring up the 3120 switch with the help of this article.

29 06 2014
green coffee bean extract 800 mg with svetol

green coffee bean extract 800 mg with svetol

Cisco 3750 software recovery | The Data Plumber

1 08 2014
Green coffee

Whats up very nice website!! Man .. Excellent .. Superb ..

I will bookmark your web site and take the feeds also?
I’m satisfied to search out numerous useful information right
here in the publish, we’d like develop more strategies on this regard,
thanks for sharing. . . . . .

21 10 2014
free fuck

Sex is a all-natural antihistamine.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.

%d bloggers like this: