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.
Thank you for taking the time to write this out. It came in very handy this evening.
you can save yourself a reboot by setting the baud back to 9600 after you download the image.
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?
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
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…..
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
hi
thx for the detailed procedure,
Here is consolidated link which details the password recovery procedures for many of our products Password Recovery Procedures
Why don’t you set bigger BAUD? Eg set BAUD 921600
Thanks for your guide
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.
Hey man, this was mega useful. Thank you for taking the time…
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?
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.
Thanks a lot.
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
Thanks for the detailed instructions on setting it to 115k. I tried to do it with 9600 bauds and I gave up.
Hi,
Just want to say thanks for the post. this HOW-TO saved me a lot of time.
THANKS!!!
Hi-5 for this!
Thanks for helping others!
if the baud cant set to 9600,use this command
Router(config)#line con 0
Router(config-line)# speed 9600
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.
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.
Interesting – what happens if you do:
conf t
line con 0
speed 9600
Are you still stuck with 115200?
Thanks. That worked for me
Thank you so much…you guys are my heros!!!
Thank you for this, flash_init was the key step I was missing.
Thank you…Thank you…Thank you đŸ™‚
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.
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!
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.
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.
Very shortly this web site will be famous among all blog users, due to it’s good articles
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!
!
Thank you so much for the article. I was able to bring up the 3120 switch with the help of this article.
green coffee bean extract 800 mg with svetol
Cisco 3750 software recovery | The Data Plumber
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. . . . . .
I like this article, but what would you use as xmodem, tried functions from Cattools TFTP and Cisco TFTP but no clear option to use as xmodem, can you explain?