Network Guys

Share your knowledge!

Copy IOS image to a Cisco router from ROMmon

If you accidentally erased your flash or have a Cisco router with an empty flash, you can upload an IOS image from ROMmon to recover the device to a functional router. Connect your router via console-cable to a PC and use PuTTY to connect to your device. I use TFTPD32 from Philippe Jounin. When starting in rommon you need to type the following commands manually, don’t copy them from a texteditor to the console. When you make a mistake, press Enter and type it again because you can’t correct your words by pressing backspace. You also need to configure a gateway even if you configure the TFTP server IP address within the same subnet:

IP_ADDRESS=172.16.1.254
IP_SUBNET_MASK=255.255.255.0
DEFAULT_GATEWAY=172.16.1.2
TFTP_SERVER=172.16.1.100
TFTP_FILE=c1841-adventerprisek9-mz.124-9.T7.bin

Now you can decide how recovering the IOS image to your device. If you want to download the file to the flash you will use this command:

tftpdnld -u
reset

After this the download will start immediately. In the past I had often problems downloading IOS files from TFTP to flash within ROMmon, so I copy the IOS to DRAM without writing it to the flash file system and booted it with this command:

tftpdnld -r

After the IOS image is loaded into DRAM it boots automatically the IOS file image (keep in mind that your flash keeps still empty). Now you can copy the IOS file from TFTP to flash with

copy tftp flash

Address or name of remote host []? 172.16.1.100
Source filename []? c1841-adventerprisek9-mz.124-9.T7.bin
Destination filename [c1841-adventerprisek9-mz.124-9.T7.bin]?
Accessing tftp://172.16.1.100/c1841-adventerprisek9-mz.124-9.T7.bin…
Loading c1841-adventerprisek9-mz.124-9.T7.bin from 172.16.1.100 (via FastEthernet0):
!!!!!!!!!!!!!!!!!!!

Check your flash file system after the download:

Router#show flash
24576K bytes of processor board System flash (Intel Strataflash)
Directory of flash:/
2  -rwx    19063988  Apr 27 2002 16:49:50 +00:00  c1841-adventerprisek9-mz.124-9.T7.bin

Have a nice weekend! :)

One Response

Leave a Reply

Click on the button to load the content from jetpack.wordpress.com.

Load content

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Certificates

ekahau Certified Survey Engineer
ATP_wsrgb
ACMP2
suca
Post Categories
Post Archives