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.

26 Comments
Silver
New 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

New Member

Thank you very much this was very helpful.

 

New Member

Great job! Thank so much.

New Member

Excellent post.

The only addition would be;

switch: set BAUD 9600

after the transfer is finished

 

New 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/

New Member

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

New 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!

 

 

New 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????"

New Member

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

New 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?

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

New 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%.

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

New Member

Thanks!

New Member

Thank you so much it worked for me as well. 

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

New 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!

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

New Member

Good work!

Worked perfectly! 

Thanks for help

New 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

New Member

Great work...

127837
Views
75
Helpful
26
Comments