Rommon
Rommon
ROM Monitor
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.
This appendix contains the following sections:
• Entering the ROM Monitor
• ROM Monitor Commands
• Command Descriptions
• Disaster Recovery with TFTP Download
• Configuration Register
• Console Download
• Debug Commands
• Exiting the ROM Monitor
Command Purpose
Step 1 enable Enters privileged EXEC mode. If an enable password is configured, you
must enter the enable command and the enable password to enter privileged
EXEC mode.
Step 2 configure terminal Enters global configuration mode.
Step 3 config-reg 0x0 Resets the configuration register.
Cisco 1800 Series Integrated Services Routers (Fixed) Software Configuration Guide
OL-6426-02 C-1
Appendix C ROM Monitor
ROM Monitor Commands
Command Purpose
Step 4 exit Exits global configuration mode.
Step 5 reload 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 boot command in the “Command
Descriptions” section in this appendix.
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.
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 Break command.
Cisco 1800 Series Integrated Services Routers (Fixed) Software Configuration Guide
C-2 OL-6426-02
Appendix C ROM Monitor
Command Descriptions
Command Descriptions
Table C-1 describes the most commonly used ROM monitor commands.
Command Description
help or ? Displays a summary of all available ROM monitor commands.
-? Displays information about command syntax; for example:
rommon 16 > dis -?
usage : dis [addr] [length]
The output for this command is slightly different for the xmodem download
command:
rommon 11 > xmodem -?
xmodem: illegal option -- ?
usage: xmodem [-cyrxu] <destination filename>
-c CRC-16
-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
reset or i Resets and initializes the router, similar to a power up.
dir device: Lists the files on the named device; for example, flash memory files:
rommon 4 > dir flash:
Directory of flash:/
2 -rwx 10283208 <date> c1800-advsecurityk9-mz
9064448 bytes available (10289152 bytes used)
boot commands For more information about the ROM monitor boot commands, see the Cisco IOS
Configuration Fundamentals and Network Management Guide.
b Boots the first image in flash memory.
b flash: [filename] 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.
Cisco 1800 Series Integrated Services Routers (Fixed) Software Configuration Guide
OL-6426-02 C-3
Appendix C ROM Monitor
Disaster Recovery with TFTP Download
Note The commands described in this section are case sensitive and must be entered exactly as shown.
Required Variables
These variables must be set with these commands before you use the tftpdnld command:
Variable Command
Optional Variables
These variables can be set with these commands before you use the tftpdnld command:
Variable Command
Cisco 1800 Series Integrated Services Routers (Fixed) Software Configuration Guide
C-4 OL-6426-02
Appendix C ROM Monitor
Disaster Recovery with TFTP Download
Step 1 Use the appropriate commands to enter all the required variables and any optional variables described in
preceding sections.
Step 2 Enter the tftpdnld 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.
Step 3 If you are sure that you want to continue, enter y in response to the question in the output:
Do you wish to continue? y/n: [n]:y
Cisco 1800 Series Integrated Services Routers (Fixed) Software Configuration Guide
OL-6426-02 C-5
Appendix C ROM Monitor
Configuration Register
Configuration Register
The virtual configuration register is in nonvolatile RAM (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.
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.
Configuration Summary
enabled are:
console baud: 9600
boot: the ROM Monitor
Configuration Summary
Cisco 1800 Series Integrated Services Routers (Fixed) Software Configuration Guide
C-6 OL-6426-02
Appendix C ROM Monitor
Console Download
enabled are:
diagnostic mode
console baud: 9600
boot: the ROM Monitor
You must reset or power cycle for new config to take effect
Console Download
You can use console download, 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
CompactFlash 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 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.
Command Description
The following are the syntax and descriptions for the xmodem console download command:
xmodem [-cyrx] destination_file_name
c Optional. Performs the download using 16-bit cyclic redundancy check (CRC-16) error
checking to validate packets. Default is 8-bit CRC.
y 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.
r Optional. Image is loaded into DRAM for execution. The default is to load the image into
flash memory.
x Optional. Image is loaded into DRAM without being executed.
destination_ Name of the system image file or the system configuration file. In order for the router to
file_name recognize it, the name of the configuration file must be router_confg.
Cisco 1800 Series Integrated Services Routers (Fixed) Software Configuration Guide
OL-6426-02 C-7
Appendix C ROM Monitor
Debug Commands
Step 1 Move the image file to the local drive where Xmodem will execute.
Step 2 Enter the xmodem command.
Error Reporting
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.
Debug Commands
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, you see
the following error message:
"xxx: kernel context state is invalid, can not proceed."
Cisco 1800 Series Integrated Services Routers (Fixed) Software Configuration Guide
C-8 OL-6426-02
Appendix C ROM Monitor
Exiting the ROM Monitor
• 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
Stack Trace:
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: 256 MB.
Available main memory starts at 0x80012000, size 0x3ffb8 KB IO (packet) memory size:
10 percent of main memory.
NVRAM size: 192 KB
You must reset or power cycle for new configuration register 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.
Cisco 1800 Series Integrated Services Routers (Fixed) Software Configuration Guide
OL-6426-02 C-9
Appendix C ROM Monitor
Exiting the ROM Monitor
Cisco 1800 Series Integrated Services Routers (Fixed) Software Configuration Guide
C-10 OL-6426-02