Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 

Loading an IOS on a switch via Xmodem

Cisco Employee

A very good evening to all!

There are times when the IOS on a switch may crash and (as a last resort) you need to use the painfully slow Xmodem transfer to save your life. I bought a 3550 a while back and that is precisely what happened with me. Without much else to try, I decided to give Xmodem a shot. I want to share how this can be used and I hope that this may be useful to others.

Since the device is in ROMMON, there’s not much that you can do.  There is, however, a method to transfer another IOS using a direct  console connection with a PC (the transfer is over your console cable itself). This wonderful little thing is called  Xmodem. Now the rate of transfer depends on the baud rate that you set  for your console connection. I tried this with baud set to 9600 and man,  it seemed like it would take over 3 hours for the transfer to complete.  With a little trial and error, I found that the maximum baud rate I  could set it up to work perfectly with was 57600. You can set the baud  rate in ROMMON using the set BAUD <value> command. See below:

switch: set BAUD 57600

This MUST also match on the terminal program setting as well. So (I’m  using TeraTerm) under Setup -> Serial Port, set the baud rate to  match whatever you set it as in ROMMON. Now we’re ready to transfer the  file. The command is very straight forward:

switch: copy xmodem: flash:c3550-ipservicesk9-mz.122-44.SE6.bin

Once you press enter, you see the following:

Begin the Xmodem or Xmodem-1K transfer now…
C

At this point, you need to choose the file location from the terminal  program. Go under File -> Transfer -> Xmodem -> Send and  choose the file that you wish the transfer. The transfer will start and  you will see a transfer window pop up like this:

untitled.png

Once completed, you should get a prompt back to your ROMMON:

Begin the Xmodem or Xmodem-1K transfer now…
C…………………………………………………………………….                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                 ……………………………………………………………………..                                                                                                ……………………………………………
File “xmodem:” successfully copied to “flash:c3550-ipservicesk9-mz.122-44.SE6.bin”

Now from ROMMON, boot from flash using the following command:

switch: boot flash:c3550-ipservicesk9-mz.122-44.SE6.bin

This will try to boot the IOS specified and if the transfer was good, then this should go smoothly.

Loading  “flash:c3550-ipservicesk9-mz.122-44.SE6.bin”…#########################                                                                                                 ################################################################################                                                                                                 ################################################################################                                                                                                 ################################################################################                                                                                                 ################################################################################                                                                                                 ################################################################################                                                                                                 ################################################################################                                                                                                 ################################################################################                                                                                                 ################################################################################                                                                                                 ################################################################################                                                                                                 ################################################################################                                                                                                 ################################################################################                                                                                                 ################################################################################                                                                                                 ################################################################################                                                                                                 ################################################################################                                                                                                ########

File “flash:c3550-ipservicesk9-mz.122-44.SE6.bin” uncompressed and installed, entry point: 0×3000
executing…

All’s good again!! The switch runs a POST, once everything checks out, you’re back into the familiar territory! :)

        — System Configuration Dialog —

Would you like to enter the initial configuration dialog? [yes/no]: no

I hope this was informative.

30 Comments
Silver
Community Member

I like doing it at 115200. Reminds me of the good ole days of BBS's

I was once in pre-production environment with two 6513 doing Xmodem!!! Brilliant.... !! but trust me guys... how much i desired having 1 Mbps!!!!!!

Alessio

Community Member

Thank you very much this was very helpful.

 

Community Member

Great job! Thank so much.

Community Member

Excellent post.

The only addition would be;

switch: set BAUD 9600

after the transfer is finished

 

Community Member

Running properly on my switch Ws-2960-24-TCL
in Indonesian languange:

http://danijuntak.blogdetik.com/2014/06/26/memasukkan-ios-ke-switch-melalui-xmodem/

Community Member

Brilliant. You've saved me hours! Thank you!

Community Member

I just wanted to thank you.  I was in serious trouble, but your post brought me back from the dead!

Very informative and helpful to me.

You are the man!

 

 

Community Member

Good article. But please anyone tell me "How to decide, when to use "xmodem method" and when to use "tftpdnld method" while recovering the router from ROMMON mode??? means what is differences in these 2 methods????"

Community Member

thank you... nice jobs . i like this!

Community Member

Thank you! This is the best, most straightforward post about reinstalling your ios with xmodem. I was fixing my 3560 and this did it for me! I only had trouble with changing baud rate. Once I would change it to anything other than 9600 my switch would go berserk, displaying random letters and becoming useless. Only way of fixing it would be to turn it off and back on holding the mode button for 15 seconds. Changing it back to 9600 was a challenge of it's own. At the end I took my time (2-3 hours) and did the transfer at 9600. Curious if anyone else had similar experience?

Community Member

Because you also must set up the baud rate on TeraTerm:

This MUST also match on the terminal program setting as well. So (I’m  using TeraTerm) under Setup -> Serial Port, set the baud rate to  match whatever you set it as in ROMMON

Community Member

Hello ,

When you have changed baud from default to anything , you will see random letter / signs.For this you need to change your hyper terminal settings.Suppose you have made baud to 56700 of the Switch, then disconnect hyperterminal and connect again hyperterminal by baud of 56700.I am sure it will work 100%.

Community Member

Reconnecting the hyperterminal is the fix... that's what I was doing wrong. Thanks! I guess it depends what program you use. With putty you can choose baud rate before you connect but with teraterm you change baud after you connect and that's where I got stuck. I guess it works better when you reconnect with putty. Thanks again for reply.

Community Member

Thanks!

Community Member

Thank you so much it worked for me as well. 

Community Member

hey guys. i have a prob just as stated but I cant copy my image file. it always fails. What i noticed though was that there are no files when i run the "dir flash:" command. Could that be where my problem lies?! i am using a cisco switch 2960 series.

Community Member

Hello! One question: 

How can establish the new flash: like the default, because first it try to connect from old flash:, give me an error and then from the new one which works without problem. But i would like to skip the first error.

Thanks!

Community Member

i m trying to this process for ws - C2950 C but not working. on that can anyone help in the same

Community Member

Good work!

Worked perfectly! 

Thanks for help

Community Member

This saved the day on a couple of 2960x switches that refused to stack.  Thanks!

Anonymous
N/A

My 3750 has a corrupt ios and I am trying to use the xmodem to install one. I follow the steps above but I keep getting:

switch: copy xmodem:flash:c3750e-universalk9-mz.150-2.SE5.bin
Begin the Xmodem or Xmodem-1K transfer now...
CCCCCCCCCCxmodem:: I/O error

It is like it doesn't know where to get the ios from my thumb drive.

I see you said you have a thumb drive connected that you want to copy from. Looking at the command, you are directing the xmodem to copy from the flash: and not from usbflash: 

You need to point it to the correct directory to reach that file.

Anonymous
N/A

I was able to get it. I am using secureCRT.

I entered the commands the same.

switch: copy xmodem:flash:c3750e-universalk9-mz.150-2.SE5.bin

Then I selected Transfer and Send Xmodem at the top of CRT and selected the file from my computer.

shif

Community Member

Great work...

Community Member

CCCCCCCCCCxmodem:: I/O error showing this error message so what to do 

am using tera term vt

 

Community Member

I work at a college. We teach Router classes with cisco equipment, currently 2960 series. One of the students apparently corrupted the IOS. Our 2960's do not have a flash drive on the switch. However, we do have the IOS on a lot of other switches. Can we copy what's on another switch to the PC via xmodem, then upload it to the broken switch with the corrupted IOS? What's the command to do that?

Community Member

A problem that I ran into was that the copy command on my Catalyst 2960 switch, has a limit of 45 characters. I resolved this by renaming the OS file on my PC to a shorter name. So the OS was stored in "c:\temp\c2960-150-2.SE9.bin" but the copy command looked like this: 

"copy xmodem: flash:c2960-lanbasek9-mz.150-2.SE9.bin". Hope this helps someone out.

Community Member

I can't belive, cisco turned back to the dark age... here's a lot of switch/router which is not at EOL, and we've got IOS 12.xx and 15.xx and still have to use bloody Xmodem to recovery... I've got an very old 2621 that knows tftpdnld already... my ironic question is what happend?! (at this moment I still sitting on C3560G V2 revovery via xmodem)

144429
Views
90
Helpful
30
Comments