How to Upload Cisco IOS from ROMmon mode using xmodem via console cable

This document explains how to upload Cisco IOS® software onto Cisco Routers or Switches  from ROMmon mode using xmodem via Cisco console cable. This is used in disaster recovery situations where the Router Cisco IOS software is corrupted or crashed. I suggest you to use this procedure only where there are no Trivial File Transfer Protocol (TFTP) server software or RJ-45 network connections, and a direct PC connection to the router’s console port via console cable is the only viable option. Because this procedure depends on the console speed of the Router and the serial port of the PC, it can take a long time to download an image. The information in this document is based on Cisco IOS Software Release 12.1 and later.

Xmodem command syntax on ROMmon Mode via Console cable

xmodem [-c] [-y] [-e] [-f] [-r] [-x] [-s data-rate]

In order to find out the syntax and available options to use with the xmodem command, enter xmodem -? at the ROMmon prompt. Here is an example of the xmodem command issued on a Cisco 1603 Router:

rommon 9 >xmodem -?
usage: xmodem [-cyrxefs]<destination filename>
-c  CRC-16
-y  ymodem-batch protocol
-r  copy image to dram for launch
-x  do not launch on download completion
-f  Perform full erase of flash
-e  Perform erase of first flash partition
-s<speed>Set speed of Download, where speed may be
1200|2400|4800|9600|19200|38400|115200 Note: xmodem options e, f
and s are only supported on the Cisco 1600 Series Routers

Here is an example of the xmodem command issued on a Cisco 2620 Router:

rommon 1 >xmodem -?
xmodem: illegal option -- ?
usage: xmodem [-cyrx] <destination filename>
-c  CRC-16
-y  ymodem-batch protocol
-r  copy image to dram for launch
-x  do not launch on download completion

Step by Step Procedure to upload Cisco IOS from ROMmon Mode via Console Cable

1. Connect your PC’s serial port to the console port of the router using the light blue Cisco console cable and Configure Windows HyperTerminal for 8-N-1 at 9600 bps. Once connected, you need to get into the ROMmon prompt (rommon 1>). Typically, if the router’s Cisco IOS software image and bootflash image are both corrupt, the router only comes up in ROMmon mode. 2. In ROMmon mode, Use the confreg command to change the console baud rate from 9600 bps to 115200 bps to speed up the download time.  The router will guide you through changing the registry. You want to press to change the configuration. The only change you need to do is console baud rate, set that to 7 (115200).

rommon 1 >confreg
Configuration Summary
enabled are:
break/abort has effect
console baud: 9600 
boot: the ROM Monitor
 
do you wish to change the configuration? y/n [n]: y
enable "diagnostic mode"? y/n [n]:
enable "use net in IP bcast address"? y/n [n]:
enable "load rom after netboot fails"? y/n [n]:
enable "use all zero broadcast"? y/n [n]:
disable "break/abort has effect"? y/n [n]:
enable "ignore system config info"? y/n [n]:
change console baud rate? y/n [n]: y
enter rate: 0 = 9600, 1 = 4800, 2 = 1200, 3 = 2400
4 = 19200, 5 = 38400, 6 = 57600, 7 = 115200 [0]: 7
change the boot characteristics? y/n [n]:
 
Configuration Summary
enabled are:
break/abort has effect
console baud: 115200
boot: the ROM Monitor
do you wish to change the configuration? y/n [n]:
You must reset or power cycle for new config to take effect.
rommon 2 >

3. When you reset the router in your console window you will see characters that you cannot read. You have to stop the session and start new HyperTerminal session with baud rate 115200. This will let you increase the speed that you use to transfer the file.

4. At the rommon prompt enter xmodem -c {filename}

rommon 1 >
rommon 1 >xmodem -?
xmodem: illegal option -- ?
usage: xmodem [-cyrx] <destination filename>
-c  CRC-16
-y  ymodem-batch protocol
-r  copy image to dram for launch
-x  do not launch on download completion
rommon 2 >
rommon 2 >
rommon 2 > xmodem -c c2600-is-mz.122-10a.bin 

5. When prompted, enter Y to continue

6. From your HyperTerminal prompt, click on transfer then send file and Select the IOS image then change the protocol to xmodem via the dropdown box.

Cisco IOS upload from xmodem

 

 

 

 

 

 

 

7. Click on Send to start the transfer. Once the transfer is complete, these messages appear.

Upload cicso ios from rommon mode

 

 

 

 

 

 

 

 

Erasing flash at 0x60fc0000
program flash location 0x60990000
 
Download Complete!

 

Cisco IOS upload from xmodem

 

 

 

 

 

 

 

8. After the IOS has been downloaded, ensure that you reset the console speed back to 9600 and change the boot sequence back to default by changing the configuration register back to 0x2102.

Filed Under: Cisco General

Tags:

About the Author:

RSSComments (0)

Trackback URL

Leave a Reply




If you want a picture to show with your comment, go get a Gravatar.