Posted on

How to perform the Cisco tftpdnld ROMmon recovery

In this guide, we are going to look at how to load an IOS to a Cisco Router using the tftpdnld ROMmon command recovery procedure with a TFTP server at the 192.168.1.105 address, a 255.255.255.0 subnet mask, and a filename of c3845-adventerprisek9-mz.151-4.M10_2.bin. For those of you who are not familiar with the ROMmon, this is the program a Cisco device will boot in to when there is no IOS in the flash drive.

In this lab, we have connected the TFTP server’s RJ45 Network Card straight to the Gigabit Ethernet 0/0 interface of the Cisco 3845 router. I have also connected my PC to the console port of the Router using a Cisco console cable. I am carrying out all of my configurations shown below via the serial connection I have made to the router. I cannot do a telnet or SSH to the router as it has no configuration on it.

 

TFTP Server IP Settings:

IP address : 192.168.1.105 Subnet mask: 255.255.255.0

Cisco 3845 IP Settings:

IP address : 192.168.1.10 Subnet mask: 255.255.255.0

 

Follow the following steps to carry out the recovery procedure.

 

Step 1: Set the variable commands to provide the TCP/IP Connectivity to the Cisco router

Step 2: Copy the Image into the Router Through the TFTP

Step 3: Reload the Router

Step 4: Verify the Upgrade

 

 

Step 1: Set the variable commands to provide the TCP/IP Connectivity to the Cisco router

 

NOTE: All variable commands must be upper case. The variable itself is case sensitive as in the case of a filename, as shown in the following example:

 

!---Below is the output of the router boot up---!

 

Readonly ROMMON initialized

program load complete, entry point: 0x8000f000, size: 0xcb40

program load complete, entry point: 0x8000f000, size: 0xcb40

loadprog: error - Invalid image for platform

e_machine = 97, cpu_type = 146

boot: cannot load "flash:"

 

 

System Bootstrap, Version 12.4(13r)T, RELEASE SOFTWARE (fc1)

Technical Support: http://www.cisco.com/techsupport

Copyright (c) 2006 by cisco Systems, Inc.

 

Total memory size = 512 MB - DIMM0 = 512 MB, DIMM1 = 0 MB

c3845 platform with 524288 Kbytes of main memory

Main memory is configured to 72/0(dimm 0/1) bit mode with ECC enabled

 

 

Readonly ROMMON initialized

rommon 1 > IP_ADDRESS=192.168.1.10

!---This is the temporary IP address assigned to the router---!

  

rommon 2 > IP_SUBNET_MASK=255.255.255.0

!---Subnet Mask is the same as on the TFTP server---!

 

rommon 3 > DEFAULT_GATEWAY=192.168.1.105

!---Use the IP address of the TFTP server---!

 

rommon 4 > TFTP_SERVER=192.168.1.105

!---TFTP server's IP address---!

 

rommon 5 > TFTP_CHECKSUM=0

!---This prevents checksum errors with earlier 2600 boot ROMs---!

 

rommon 6 > TFTP_FILE=c3845-adventerprisek9-mz.151-4.M10_2.bin

!---Exact Cisco IOS file name is case sensitive---!

 

Step 2: Copy the Image into the Router Through the TFTP

Issue the tftpdnld command to copy the Cisco IOS from the TFTP server’s root directory to the Routers’ flash drive.

 

rommon 9 > tftpdnld

!---This command must be lower case---!
 

IP_ADDRESS: 192.168.1.10

IP_SUBNET_MASK: 255.255.255.0

DEFAULT_GATEWAY: 192.168.1.105

TFTP_SERVER: 192.168.1.105

TFTP_FILE: c3845-adventerprisek9-mz.151-4.M10_2.bin

GE_PORT: Ge0/0

TFTP_MEDIA_TYPE: Copper

GE_SPEED_MODE: Auto

 

Invoke this command for disaster recovery only.

WARNING: all existing data in all partitions on flash: will be lost!

Do you wish to continue? y/n:  [n]:  y

 

Mac Address: 001d.e621.ef50

 

Receiving c3845-adventerprisek9-mz.151-4.M10_2.bin from 192.168.1.105 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!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: 0x8000f000, size: 0xcb40

 

Format: All system sectors written. OK...

Format: Operation completed successfully.

 

Format of flash: complete

program load complete, entry point: 0x8000f000, size: 0xcb40

 

 

 

rommon 10 > dir flash:

!---This commands lists the contents of the flash drive---!

program load complete, entry point: 0x8000f000, size: 0xcb40

Directory of flash:

 

2      47862380  -rw-     c3845-advsecurityk9-mz.151-4.M12a.bin

 

Step 3: Reload the Router.

rommon 11 > reset

!---This commands will reboot the device---!

 

System Bootstrap, Version 12.4(13r)T, RELEASE SOFTWARE (fc1)

Technical Support: http://www.cisco.com/techsupport

Copyright (c) 2006 by cisco Systems, Inc.

 

Total memory size = 512 MB - DIMM0 = 512 MB, DIMM1 = 0 MB

c3845 platform with 524288 Kbytes of main memory

Main memory is configured to 72/0(dimm 0/1) bit mode with ECC enabled

 

 

Readonly ROMMON initialized

program load complete, entry point: 0x8000f000, size: 0xcb40

program load complete, entry point: 0x8000f000, size: 0xcb40

 

program load complete, entry point: 0x80010000, size: 0x2da50a4

Self decompressing the image : #################################################################################################################################################################################################################################################################################### [OK]

 

<< Output Omitted >>

 

 

Restricted Rights Legend

 

Use, duplication, or disclosure by the Government is

subject to restrictions as set forth in subparagraph

(c) of the Commercial Computer Software - Restricted

Rights clause at FAR sec. 52.227-19 and subparagraph

(c) (1) (ii) of the Rights in Technical Data and Computer

Software clause at DFARS sec. 252.227-7013.

 

cisco Systems, Inc.

170 West Tasman Drive

San Jose, California 95134-1706

 

 

 

Cisco IOS Software, 3800 Software (C3845-ADVSECURITYK9-M), Version 15.1(4)M12a, RELEASE SOFTWARE (fc1)

Technical Support: http://www.cisco.com/techsupport

Copyright (c) 1986-2016 by Cisco Systems, Inc.

Compiled Tue 04-Oct-16 04:35 by prod_rel_team

 

 

This product contains cryptographic features and is subject to United

States and local country laws governing import, export, transfer and

use. Delivery of Cisco cryptographic products does not imply

third-party authority to import, export, distribute or use encryption.

Importers, exporters, distributors and users are responsible for

compliance with U.S. and local country laws. By using this product you

agree to comply with applicable laws and regulations. If you are unable

to comply with U.S. and local laws, return this product immediately.

 

A summary of U.S. laws governing Cisco cryptographic products may be found at:

http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

 

<< Output Omitted >>

 

Step 4: Verify the Upgrade

 

You can issue the show version command at the Privileged Exec Mode to verify that the router has booted with IOS we copied earlier.

 

 

Troubleshooting Tips

If the tftpdnld ROMmon command recovery procedure fails, verify that the following conditions are met:

  • The TFTP server is running.
  • The Cisco IOS file is in the root directory of the TFTP server.
  • The file size of the Cisco IOS image being uploaded is correct.
  • If possible, connect directly to the PC running the TFTP server with a crossover cable.
  • The file being uploaded is compatible with hardware and memory requirements.
  • If the router has two built-in Ethernet or fast Ethernet interfaces, always use the first interface (usually 0/0). You must use the built-in interface. For example, if a Cisco router has a WIC-1ENET card installed, the tftpdnld ROMmon command does not work with that card.
  • Ensure all variable commands are in upper case.