Table Of Contents
Using the ROM Monitor
Entering ROM Monitor Mode
Enter ROM Monitor Mode by Using the reload Command
Enter ROM Monitor Mode by Resetting the Configuration Register
ROM Monitor Commands
ROM Monitor Syntax Conventions
ROM Monitor Command Descriptions
Boot Commands in the ROM Monitor
Informational Commands in the ROM Monitor
Other Useful ROM Monitor Commands
Debugging Commands in the ROM Monitor
Configuration Register
Modifying the Configuration Register in Menu Mode
Modifying the Configuration Register by Hexadecimal Entry
Recovering Cisco IOS Software Images
Description and Options of the xmodem Command
Console Requirements
Procedure for the xmodem Command
Using the ROM Monitor
This appendix describes the ROM monitor (also called the bootstrap program), the firmware that runs when your Cisco 3700 series router is powered up or reset. During normal operation, the ROM monitor helps to initialize the processor hardware and boot the operating system software. You can also use the ROM monitor to isolate or eliminate hardware problems and recover a corrupted Cisco IOS software image.
This appendix includes the following sections:
•
Entering ROM Monitor Mode
•
ROM Monitor Commands
•
ROM Monitor Syntax Conventions
•
ROM Monitor Command Descriptions
•
Recovering Cisco IOS Software Images
Entering ROM Monitor Mode
To use the ROM monitor, you must have access to the console port. See the "Connecting to a Console Terminal or Modem" section for information on connecting the console cable.
There are two ways of entering the ROM monitor mode:
•
Use the reload command and the Break key to enter the ROM monitor mode for one-time use.
Break (system interrupt) is always enabled for 60 seconds after the router reboots, regardless of whether Break is configured on or off in the configuration register (see "Configuration Register"). During this 60-second period, you can break to the ROM monitor prompt by pressing the Break key.
Note
If your console terminal does not have a Break key, see the terminal emulator documentation for instructions on generating a break (system interrupt).
•
Set the configuration register so that the router enters the ROM monitor mode whenever it boots.
The new configuration register value, 0x0, is effective after the router is rebooted with the reload command. The router remains in the ROM monitor and does not boot the operating system.
As long as the configuration register value remains 0x0, you must manually boot the operating system from the console. See the boot command in the "ROM Monitor Command Descriptions" section.
The two methods of entering the ROM monitor mode are as follows.
Enter ROM Monitor Mode by Using the reload Command
Connect to the router from a console, and follow these steps:
Step 1
Restart the router with the reload command.
Step 2
Press the Break key during the first 60 seconds of the system booting.
This forces the router into ROM monitor mode, and the ROM monitor prompt appears:
Enter ROM Monitor Mode by Resetting the Configuration Register
Connect to the router from a console, and follow these steps:
Step 1
Set the bits 3, 2, 1, and 0 of the configuration register to zero.
Router# configuration-register 0x0
Step 2
Restart the router with the reload command.
The router boots into ROM monitor mode, and the ROM monitor prompt is displayed:
Note
The number that appears in the ROM monitor prompt (1>, 2>, and so forth) is the line number. It increments each time you enter a ROM monitor command.
ROM Monitor Commands
Enter ? or help at the ROM monitor prompt to see a list of available commands. For example:
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
dev list the device table
dir list files in the file system
dis display instruction stream
dnld serial download a program module
frame print out a selected stack frame
help monitor builtin command help
history monitor command history
iomemdef set IO mem to a default 25%
meminfo main memory information
repeat repeat a monitor command
rommon-pref select ROMMON
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
unset unset a monitor variable
xmodem x/ymodem image download
Note
Not all ROM monitor commands are available on all platforms.
To display information about command syntax, enter the command name followed by -?. ROM monitor commands are case-sensitive. Enter commands exactly as shown. You can end any command by generating a Break (system interrupt) at the console.
ROM Monitor Syntax Conventions
ROM monitor syntax in this appendix uses the following conventions:
•
Square brackets [ ] denote an optional element. In the following example, the element abc is not required, but you can specify it if you choose:
command [abc]
•
If a minus option is followed by a colon (for example, [-s:]) you must provide an argument for the option.
•
A term in italics means that you must fill in the appropriate information. In the following example, you replace the term in italics with the interface type you are using:
command interface-type
ROM Monitor Command Descriptions
This section describes some useful ROM monitor commands. See the Cisco IOS configuration guides and command references for more information on ROM monitor commands.
Boot Commands in the ROM Monitor
The router always boots first from a Cisco IOS software image in CompactFlash memory, because there is no separate, dedicated boot helper image ([rx]boot). The first image in CompactFlash memory functions as the boot helper image, but you can override this by setting the BOOTLDR Monitor environment variable to point to another image. The first image in CompactFlash memory is invoked if the ROM monitor does not recognize a device ID specified in the boot command. The router cannot boot if there is no Cisco IOS software image in CompactFlash memory.
To boot a router from a Cisco IOS software image on a TFTP server (netboot), the installed DRAM must be adequate to hold two uncompressed Cisco IOS software images: the image from CompactFlash memory and the image downloaded from the TFTP server.
If the router is configured to boot from a TFTP server (boot bits in the configuration register are set from 2 to 15), the router first boots from the image in CompactFlash memory. It decompresses that image in DRAM, parses the boot system commands, downloads the Cisco IOS software image from the TFTP server, and decompresses it in DRAM. After the Cisco IOS software image from the TFTP server is in DRAM, the DRAM memory occupied by the boot helper image is released.
Note
Booting from a TFTP server is useful if the router does not have enough CompactFlash memory to hold large images. With a small image in CompactFlash memory (just large enough to support the necessary interfaces), the router boots from CompactFlash, and then the larger image is downloaded from the TFTP server.
The boot command syntax is as follows, where:
•
partition is a partition number in CompactFlash memory
•
filename is the Cisco IOS software image file name
•
tftpserver is the IP address of the TFTP server
•
-x directs the router to load the image but not execute the boot process
•
-v (Verbose) specifies that progress print setting messages and error information be displayed
boot [flash: [partition: [filename]] | slot0: [partition: [filename]] | slot1: [partition: [filename]] | filename tftpserver] [-x] [-v]
Some examples of boot commands are as follows:
Note
In all boot commands, boot can be entered as b.
•
boot—Boots from the first Cisco IOS software image in internal CompactFlash memory.
•
boot flash:—Boots from the first Cisco IOS software image in internal CompactFlash memory.
•
boot flash: partition:—Boots from the first Cisco IOS software image in the specified partition in internal CompactFlash memory.
•
boot flash: filename—Boots from the specified IOS software image in internal CompactFlash memory.
•
boot flash: partition: filename—Boots from the specified Cisco IOS software image in the specified partition in internal CompactFlash memory.
•
boot slot0:—Boots from the first Cisco IOS software image in the first partition in the CompactFlash memory card in slot 0.
•
boot slot0:2:—Boots from the first Cisco IOS software image in the second partition in the CompactFlash memory card in slot 0.
•
boot slot0: filename— Boots from the specified Cisco IOS software image in the CompactFlash memory card in slot 0.
•
boot slot1:3: filename—Boots from the specified Cisco IOS software image in the third partition in the CompactFlash memory card in slot 1.
•
boot filename tftpserver— Boots from the specified Cisco IOS software image on the specified TFTP server (after first booting from CompactFlash); for example:
boot c3725-is-mz 172.15.19.11
Note
Use the CLI commands show version and show hardware to see the source of the currently running Cisco IOS software image.
Informational Commands in the ROM Monitor
dev—Lists boot device identifications on the router; for example:
dir device:[partition:]—Lists the files on the named device; for example:
File size Checksum File name
2229799 bytes (0x220627) 0x469e C3700-j-m2
help—Shows a summary of ROM monitor commands (equivalent to ?).
meminfo—Displays main memory size, starting address, and available range; size of packet memory; and size of NVRAM. The following example shows the meminfo command:
Main memory size: 16 MB in 32-bit mode.
Available main memory starts at 0xa000e000, size 16328KB
IO (packet) memory size: 25 percent of main memory.
meminfo [-l]—Shows supported DRAM configurations. The following example shows an example of the meminfo -l command:
The following 64 bit memory configs are supported:
-------------------------------------------------
DIMM SOCKET 0 DIMM SOCKET 1 TOTAL MEMORY
------------- ------------- ------------
Other Useful ROM Monitor Commands
reset or i—Resets and initializes the router, similar to power up.
Debugging Commands in the ROM Monitor
Most debugging commands are functional only when Cisco IOS software has crashed or failed to initialize (boot). Debugging commands should normally be entered only under the direction of a Cisco engineer. If you enter a debugging command and Cisco IOS crash information is not available, the following error message appears:
"xxx: kernel context state is invalid, cannot proceed."
The following ROM monitor debugging commands provide information about software failures:
•
stack or k—Produces a stack trace.
•
context—Displays processor context.
•
frame—Displays an individual stack frame.
•
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:
count: 19, reason: a SegV exception
pc:0x802b1040, error address: 0x802b1040
FP: 0x80908398, PC: 0x802b102c
FP: 0x809083b0, PC: 0x802b0b88
FP: 0x809083d8, PC: 0x8017039c
FP: 0x809083e8, PC: 0x8016f764
Configuration Register
The configuration register resides in NVRAM. You can view or modify the configuration register from either the ROM monitor or the operating system software.
For procedures used to change the configuration register from the operating system, and for information about configuration register settings, see "Configuration Register."
To modify the configuration register from the ROM monitor, use one of these methods:
•
Enter the confreg command by itself for menu mode. See the "Modifying the Configuration Register in Menu Mode" section below.
•
Enter the confreg command plus the new hexadecimal value of the configuration register. See the next section, "Modifying the Configuration Register by Hexadecimal Entry."
In either case, the new configuration register value is written into NVRAM, but is not effective until you reboot (using the ROM monitor reset command) or power cycle the router.
Modifying the Configuration Register in Menu Mode
Entering the confreg command without an argument displays the contents of the configuration register, and prompts you to alter the contents by describing the meaning of each bit.
The following display shows an example of menu mode:
do you wish to change the configuration? y/n [n]: y
enable "diagnostic mode"? y/n [n]: y
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]: 0
change the boot characteristics? y/n [n]: y
1 = the boot helper image
do you wish to change the configuration? y/n [n]:
You must reset or power cycle for new config to take effect
Modifying the Configuration Register by Hexadecimal Entry
Entering the confreg command plus a hexadecimal value changes the contents of the configuration register. The syntax is confreg [hexnum]; values entered are always interpreted as hexadecimal. The following example changes the value of the configuration register to the factory default:
You must reset or power cycle the router for new configuration to take effect.
Recovering Cisco IOS Software Images
If both the boot and system images have been erased and only the ROM monitor is available, you can use the ROM monitor xmodem command to copy a Cisco IOS software image to CompactFlash memory from the console. The console can be connected directly to the router through the console port, or remotely through a modem connected to the auxiliary port.
Note
Copying a Cisco IOS software image from the console is very slow. This procedure should be used only in an emergency and is not recommended for normal Cisco IOS software image upgrades.
For the fastest possible download from a console, set the console speed to 115200 bps by using the ROM monitor confreg command. See the "Configuration Register" procedure.
Note
Using a CompactFlash memory card to update the Cisco IOS software image is much faster than using the console port and, when available, is the recommended method of recovering a software image.
Description and Options of the xmodem Command
The xmodem command establishes a connection between a console and the router console port for disaster recovery, if both the boot and system images are erased from CompactFlash memory.
xmodem [filename]—Establishes an Xmodem connection between the console and the router. The optional argument filename specifies the source file containing the Cisco IOS software image.
Other options include the following:
•
c—Uses cyclic redundancy check (CRC-16).
•
y—Uses Ymodem transfer protocol.
•
r—Copies the image to dynamic random-access memory (DRAM) for launch.
•
x—Does not launch image on completion of download.
Console Requirements
The console must have the following files to use this procedure:
•
Terminal emulation application program supporting one of the following file transfer protocols:
–
Xmodem
–
Xmodem-CRC
–
Xmodem-1K
–
Ymodem
•
Cisco IOS software image file
Procedure for the xmodem Command
To copy the Cisco IOS software image from a console to CompactFlash memory, perform the following steps:
Step 1
Connect the console using the instructions in the "Connecting to a Console Terminal or Modem" section.
Step 2
Power up the router. The power-on self-test diagnostics run, and the boot ROM searches for a valid boot image and Cisco IOS software image in CompactFlash memory. If the boot image and Cisco IOS software image are not found, the ROM monitor prompt appears:
Step 3
Enter the xmodem command and the name of the source file containing the Cisco IOS software image:
rommon 1> xmodem filename
Step 4
Messages similar to the following appear:
Do not start upload program yet...
File size Checksum File name
2537948 bytes (0x26b9dc) 3700-boot-l
WARN: This operation will ERASE bootflash. If the xmodem
download to bootflash fails, you will lose any good image
you may already have in bootflash.
Invoke this application only for disaster recovery.
Do you wish to continue? [yes/no]:
Step 5
Enter yes to copy the Cisco IOS software image into CompactFlash memory. Messages similar to the following appear:
Ready to receive file prog ...
Erasing flash at 0x3000000
program flash location 0x3000000
The router is now ready to boot from the Cisco IOS software image. Enter the ROM monitor reset command to reboot the router.
Note
If you have set the console speed to 115200, you may wish to reset it to the previous speed or to the factory default speed (typically 9600 bps). See the "Configuration Register" procedure.