The ROM monitor firmware runs when the router is powered up or reset. The firmware helps to initialize the processor hardware and boot the operating system software. You can use the ROM monitor to perform certain configuration tasks, such as recovering a lost password or downloading software over the console port. If there is no Cisco IOS software image loaded on the router, the ROM monitor runs the router.
To use the ROM monitor, you must be using a terminal or PC that is connected to the router over the console port.
Perform these steps to configure the router to boot up in ROM monitor mode the next time it is rebooted.
Enters privileged EXEC mode.
Enter your password if prompted.
Enters global configuration mode.
Resets the configuration register.
Exits global configuration mode.
Reboots the router with the new configuration register value. The router remains in ROM monitor and does not boot the Cisco IOS software.
As long as the configuration value is 0x0, you must manually boot the operating system from the console. See the
command in the “Command Descriptions” section.
After the router reboots, it is in ROM monitor mode. The number in the prompt increments with each new line.
Timesaver Break (system interrupt) is always enabled for 60 seconds after the router reboots, regardless of whether it is set to on or off in the configuration register. During this 60-second window, you can break to the ROM monitor prompt by pressing the Break key.
ROM Monitor Commands
at the ROM monitor prompt to display a list of available commands and options, as follows:
rommon 1 > ?
alias set and display aliases command
boot boot up an external process
break set/show/clear the breakpoint
confreg configuration register utility
cont continue executing a downloaded image
context display the context of a loaded image
cookie display contents of cookie PROM in hex
copy Copy a file-copy [-b <buffer_size>] <src_file> <dst_file>
more Concatenate (type) file(s)-cat <filenames ...>
rename Rename a file-rename <old_name> <new_name>
repeat repeat a monitor command
reset system reset
rmdir Remove a directory
set display the monitor variables
stack produce a stack trace
sync write monitor environment to NVRAM
sysret print out info from last system return
tftpdnld tftp image download
unalias unset an alias
unset unset a monitor variable
xmodem x/ymodem image download
Commands are case sensitive. You can halt any command by pressing the Break key on a terminal. If you are using a PC, most terminal emulation programs halt a command when you press the Ctrl and the Break keys at the same time. If you are using another type of terminal emulator or terminal emulation software, see the documentation for that product for information on how to send a
Table C-1 describes the most commonly used ROM monitor commands.
Table C-1 Commonly Used ROM Monitor Commands
Displays a summary of all available ROM monitor commands.
Displays information about command syntax; for example:
rommon 16 >
usage : dis [addr] [length]
The output for this command is slightly different for the
rommon 11 >
xmodem: illegal option -- ?
usage: xmodem [-cyrxu] <destination filename>
-y ymodem-batch protocol
-r copy image to dram for launch
-x do not launch on download completion
-u upgrade ROMMON, System will reboot after upgrade
Resets and initializes the router, similar to a power up.
Lists the files on the named device; for example, flash memory files:
Attempts to boot the image directly from the first partition of flash memory. If you do not enter a filename, this command will boot this first image in flash memory.
Disaster Recovery with TFTP Download
The standard way to load new software on your router is to use the
copy tftp flash privileged EXEC command from the Cisco IOS software command-line interface (CLI). However, if the router is unable to boot Cisco IOS software, you can load new software while in ROM monitor mode.
This section describes how to load a Cisco IOS software image from a remote TFTP server to the router flash memory. Use the
tftpdnld command only for disaster recovery because it erases all existing data in flash memory before downloading a new software image to the router.
TFTP Download Command Variables
This section describes the system variables that can be set in ROM monitor mode and that are used during the TFTP download process. There are both required variables and optional variables.
Note The commands described in this section are case sensitive and must be entered exactly as shown.
These variables must be set with these commands before you use the
WAN GE setting
Switch port setting
IP address of the router
Subnet mask of the router
IP address of the default gateway of the router
IP address of the TFTP server from which the software will be downloaded
Name of the file that will be downloaded to the router
These variables can be set with these commands before using the
Configures how the router displays file download progress.
0—No progress is displayed.
1—Exclamation points (!!!) are displayed to indicate file download progress. This is the default setting.
2—Detailed progress is displayed during the file download process; for example:
Interface link state up.
ARPing for 220.127.116.11
ARP reply for 18.104.22.168 received. MAC address 00:00:0c:07:ac:01
Number of times the router attempts ARP and TFTP download. The default is 7.
Length of time, in seconds, before the download process times out. The default is
2400 seconds (40 minutes).
Whether or not the router performs a checksum test on the downloaded image:
1—Checksum test is performed.
0—No checksum test is performed.
Using the TFTP Download Command
To download a file through TFTP, perform these steps in ROM monitor mode.
Step 1 Use the appropriate commands to enter all the required variables and any optional variables described in preceding sections.
Step 2 Enter the
command as follows:
rommon 1 > tftpdnld -r
Note The -r variable is optional. Entering this variable downloads and boots the new software but does not save the software to flash memory. You can then use the image that is in flash memory the next time you enter the reload command.
You will see an output similar to the following:
Do you wish to continue? y/n: [n]:
Step 3 If you are sure that you want to continue, enter
in response to the question in the output:
Do you wish to continue? y/n: [n]:y
The router begins to download the new file.
If you mistakenly entered yes, you can enter
to stop the transfer before the flash memory is erased.
The following shows the example configuration for TFTP support with WAN interface:
rommon 1 >
rommon 1 >
rommon 1 > set
PS1=rommon ! >
RET_2_RTS=22:51:49 UTC Fri Jul 13 2012
rommon 2 >
rommon 2 >
rommon 2 > tftpdnld -r
Receiving c800-universalk9-mz.SPA.152-3.16.M0.1 from 22.214.171.124 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
NAME: "Modem 0 on Cellular0", DESCR: "Sierra Wireless Mini Card MC8705 HSPA+R7 modem"
PID: MC8705 , VID: 1.0, SN: 357115040057411
The virtual configuration register is in nonvolatile NVRAM and has the same functionality as other Cisco routers. You can view or modify the virtual configuration register from either the ROM monitor or the operating system software. Within the ROM monitor, you can change the configuration register by entering the register value in hexadecimal format or by allowing the ROM monitor to prompt you for the setting of each bit.
Changing the Configuration Register Manually
To change the virtual configuration register from the ROM monitor manually, enter the
confreg command followed by the new value of the register in hexadecimal format, as shown in the following example:
rommon 1 > confreg 0x2101
You must reset or power cycle for new config to take effect
rommon 2 >
The value is always interpreted as hexadecimal. The new virtual configuration register value is written into NVRAM but does not take effect until you reset or reboot the router.
Changing the Configuration Register Using Prompts
command without an argument displays the contents of the virtual configuration register and a prompt to alter the contents by describing the meaning of each bit.
In either case, the new virtual configuration register value is written into NVRAM but does not take effect until you reset or reboot the router.
The following display shows an example of entering the confreg command:
rommon 7> confreg
console baud: 9600
boot: the ROM Monitor
do you wish to change the configuration? y/n [n]: y
You must reset or power cycle for new config to take effect
You can use console download, which is a ROM monitor function, to download either a software image or a configuration file over the router console port. After download, the file is either saved to the mini-flash memory module or to main memory for execution (image files only).
Use console download when you do not have access to a TFTP server.
Note If you want to download a software image or a configuration file to the router over the console port, you must use the ROM monitor dnld command.
Note If you are using a PC to download a Cisco IOS image over the router console port at 115,200 bps, ensure that the PC serial port is using a 16550 universal asynchronous transmitter/receiver (UART). If the PC serial port is not using a 16550 UART, we recommend using a speed of 38,400 bps or less when downloading a Cisco IOS image over the console port.
The following are the syntax and descriptions for the
xmodem console download command:
Optional. Performs the download using 16-bit cyclic redundancy check (CRC-16) error checking to validate packets. Default is 8-bit CRC.
Optional. Sets the router to perform the download using Ymodem protocol. The default is Xmodem protocol. The protocols differ as follows:
Xmodem supports a 128-block transfer size. Ymodem supports a 1024-block transfer size.
Ymodem uses CRC-16 error checking to validate each packet. Depending on the device that the software is being downloaded from, this function might not be supported by Xmodem.
Optional. Image is loaded into DRAM for execution. The default is to load the image into flash memory.
Optional. Image is loaded into DRAM without being executed.
Name of the system image file or the system configuration file. For the router to recognize it, the name of the configuration file must be
Follow these steps to run Xmodem:
Step 1 Move the image file to the local drive where Xmodem will execute.
Step 2 Enter the xmodem command.
Because the ROM monitor console download uses the console to perform the data transfer, when an error occurs during a data transfer, error messages are only displayed on the console once the data transfer is terminated.
If you have changed the baud rate from the default rate, the error message is followed by a message telling you to restore the terminal to the baud rate specified in the configuration register.
Most ROM monitor debugging commands are functional only when Cisco IOS software has crashed or is halted. If you enter a debugging command and Cisco IOS crash information is not available, the following error message is displayed:
"xxx: kernel context state is invalid, can not proceed."
The following are ROM monitor debugging commands:
—Produces a stack trace; for example:
rommon 6> stack
PC = 0x801111b0
Frame 00: FP = 0x80005ea8 PC = 0x801111b0
Frame 01: FP = 0x80005eb4 PC = 0x80113694
Frame 02: FP = 0x80005f74 PC = 0x8010eb44
Frame 03: FP = 0x80005f9c PC = 0x80008118
Frame 04: FP = 0x80005fac PC = 0x80008064
Frame 05: FP = 0x80005fc4 PC = 0xfff03d70
context—Displays processor context; for example:
rommon 7> context
CPU context of the most recent exception:
PC = 0x801111b0 MSR = 0x00009032 CR = 0x53000035 LR = 0x80113694
sysret—Displays return information from the last booted system image. This information includes the reason for terminating the image, a stack dump of up to eight frames, and, if an exception is involved, the address where the exception occurred; for example:
rommon 8> sysret
System Return Info:
count: 19, reason: user break
pc:0x801111b0, error address: 0x801111b0
FP: 0x80005ea8, PC: 0x801111b0
FP: 0x80005eb4, PC: 0x80113694
FP: 0x80005f74, PC: 0x8010eb44
FP: 0x80005f9c, PC: 0x80008118
FP: 0x80005fac, PC: 0x80008064
FP: 0x80005fc4, PC: 0xfff03d70
FP: 0x80005ffc, PC: 0x00000000
FP: 0x00000000, PC: 0x00000000
meminfo—Displays size in bytes, starting address, available range of main memory, the starting point and size of packet memory, and size of NVRAM; for example:
rommon 9> meminfo
Main memory size: 40 MB.
Available main memory starts at 0x10000, size 40896KB
IO (packet) memory size: 5 percent of main memory.
NVRAM size: 32KB
Exiting the ROM Monitor
You must set the configuration register to a value from 0x2 to 0xF for the router to boot a Cisco IOS image from flash memory upon startup or reloading.
The following example shows how to reset the configuration register and cause the router to boot a Cisco IOS image stored in flash memory:
rommon 1 > confreg 0x2101
You must reset or power cycle for the new configuration to take effect:
rommon 2 > boot
The router will boot the Cisco IOS image in flash memory. The configuration register will change to 0x2101 the next time the router is reset or power cycled.