Table Of Contents
ROM Monitor
Entering the ROM Monitor
Who Should Upgrade ROMMON and Why
Where to Find New Versions of ROMMON
Performing the Upgrade
Updating in Cisco IOS EXEC Mode
ROM Monitor Commands
Command Descriptions
Disaster Recovery with TFTP Download
tftpdnld Command Variables
Required Variables
Optional Variables
Using the TFTP Download Command Without Writing the Image to Flash Memory
Configuration Register
Changing the Configuration Register Manually
Changing the Configuration Register Using Prompts
Console Download
Command Description
Error Reporting
Debug Commands
Disaster Recovery with Console Download of Cisco IOS Software
Command Description
Error Reporting
Debug Commands
Exiting the ROM Monitor
ROM Monitor
This appendix describes the Cisco 820 series routers ROM monitor (also called the bootstrap program). 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
•
Using the TFTP Download Command Without Writing the Image to Flash Memory
•
Configuration Register
•
Console Download
•
Debug Commands
•
Disaster Recovery with Console Download of Cisco IOS Software
Entering the ROM Monitor
To use the ROM monitor, you must be using a terminal or PC that is connected to the router over the console port. Refer to the installation chapter in the Cisco 827 Routers Hardware Installation Guide that came with the router to connect the router to a PC or terminal.
Perform these steps to configure the router to boot up in ROM monitor mode the next time it is rebooted.
| |
Command
|
Task
|
Step 1
|
enable
|
If an enable password is configured, enter the enable command and the enable password to enter privileged EXEC mode.
|
Step 2
|
configure terminal
|
Enter global configuration mode.
|
Step 3
|
config-reg 0x0
|
Reset the configuration register.
|
Step 4
|
exit
|
Exit global configuration mode.
|
Step 5
|
reload
|
Reboot 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.
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.
Who Should Upgrade ROMMON and Why
To ensure proper functionality and prevent router inoperability, upgrade the ROM monitor (ROMMON) image to the latest version before downloading the Cisco IOS image. The ROMMON images are backward compatible with all previously released Cisco IOS software images.
Where to Find New Versions of ROMMON
Go to the following website for a new versions of ROMMON. You will need to enter your Cisco login account to access the website.
http://www.cisco.com/public/sw-center/sw-ios.shtml
Performing the Upgrade
Follow the steps below to upgrade the ROMMON image, beginning in ROMMON mode.
Step 1
Download the ROMMON image from CCO, and place it on your TFTP server.
Step 2
Connect the Ethernet cable to the same hub that the TFTP server is attached to.
Step 3
Place your Cisco router in ROMMON mode by sending the Telnet command break during a router reboot sequence. Make sure that all the parameters are exact and are in capital letters. The following prompt is displayed when the router is in ROMMON mode:
Step 4
Set the following parameters.
rommon 1 > set IP_ADDRESS=ip_address
rommon 1 > set IP_SUBNET_MASK=ip_subnet_mask
rommon 1 > set DEFAULT_GATEWAY=default_gateway
rommon 1 > set TFTP_SERVER=TFTP_server
rommon 1 > set TFTP_FILE=TFTP_file
The parameters have the following meanings.
Parameter
|
Value
|
IP_ADDRESS=
|
IP address of the router
|
IP_SUBNET_MASK=
|
Router subnet mask
|
DEFAULT_GATEWAY=
|
IP address of the router default gateway
|
TFTP_SERVER=
|
IP address of the TFTP server on which the ROMMON image is located
|
TFTP_FILE=
|
The path and file name of the ROMMON image
|
Step 5
Verify parameter settings, using the set command. Correct any errors by reentering the parameters and their values. For example:
IP_SUBNET_MASK=255.255.255.0
TFTP_SERVER=223.255.254.254
TFTP_FILE=/auto/tftpload/ROMMON/C820_RM_ALT.srec.122-1r.XE2
Step 6
Upgrade the ROMMON image, using the tftpdnld -u command.
Note
You might be prompted to reset the router in ROMMON mode by entering the reset command. If you receive this prompt, reset the router before you perform Step 1 througth Step 5 again.
IP_SUBNET_MASK:255.255.255.0
TFTP_SERVER:223.255.254.254
TFTP_FILE:/auto/tftpload/ROMMON/C820_RM_ALT.srec.122-1r.XE2
WARNING: alternate copy of rommon exists, filename:C820_RM_ALT.srec
all existing data in the alternate copy of rommon will be lost.
Do you wish to continue? y/n: [n]:
Step 7
Enter y to start the download. Successive exclamation points (!!!!!!) indicate that the download is occurring. The router reboots when the download is complete.
Updating in Cisco IOS EXEC Mode
Step 1
Download the ROMMON image from CCO, and place it on your TFTP server.
Step 2
In EXEC mode, save the current configuration, using the copy running-config startup-config command.
Step 3
Enter the copy tftp rommon command, and answer the prompts. Replace the variables shown in the following example with the correct values for your router:
Address or name of remote host []? IP_address_of_remote_host
Source filename []? rommon_image_source_file_name
Destination filename [rommon]? rommon_image_destination_file_name
ROM Monitor Commands
Enter ? or help at the ROM monitor prompt to display a list of available commands and options, as follows:
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 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
meminfo main memory information
repeat repeat a monitor command
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
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, refer to the documentation for that product for information on how to send a Break command.
Command Descriptions
Table B-1 describes the most commonly used ROM monitor commands.
Table B-1 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:
usage : dis [addr] [length]
The output for this command is slightly different for the xmodem download command:
xmodem: illegal option -- ?
usage: xmodem [-cyrxu] <destination filename>
-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.
|
dev
|
Lists boot device identifications on the router; for example:
|
dir device:
|
Lists the files on the named device; flash, for example:
File size Checksum File name
2835276 bytes (0x2b434c) 0x2073 c806-oy6-mz
|
boot commands
|
For more information about the ROM monitor boot commands, refer to the Cisco IOS Configuration Guide and the Cisco IOS Command Reference.
|
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.
|
Disaster Recovery with TFTP Download
The standard way to load new software on your router is using the copy tftp flash privileged EXEC command from the Cisco IOS software command-line interface (CLI). However, if the router is unable to boot the 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.
tftpdnld 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.
Required Variables
These variables must be set with these commands before using the tftpdnld command.
Variable
|
Command
|
IP address of the router.
|
IP_ADDRESS=ip_address
|
Subnet mask of the router
|
IP_SUBNET_MASK=ip_address
|
IP address of the default gateway of the router.
|
DEFAULT_GATEWAY=ip_address
|
IP address of the TFTP server from which the software will be downloaded.
|
TFTP_SERVER=ip_address
|
The name of the file that will be downloaded to the router.
|
TFTP_FILE=filename
|
Optional Variables
The following variables should be set with these commands before using the tftpdnld command.
Variable
|
Command
|
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:
• Initializing interface.
• Interface link state up.
• ARPing for 1.4.0.1
• ARP reply for 1.4.0.1 received. MAC address 00:00:0c:07:ac:01
|
TFTP_VERBOSE= setting
|
Number of times the router attempts ARP and TFTP download. The default is 7.
|
TFTP_RETRY_COUNT= retry_times
|
Amount of time, in seconds, before the download process times out. The default is 7,200 seconds (120 minutes).
|
TFTP_TIMEOUT= time
|
Whether or not the router performs a checksum test on the downloaded image:
1—Checksum test is performed.
0—No checksum test is performed.
|
TFTP_CHECKSUM=setting
|
Using the TFTP Download Command Without Writing the Image to Flash Memory
Follow the steps below to do download new file in ROM monitor mode.
Step 1
Use the appropriate commands to enter all the required variables and any optional variables described earlier in this section.
Step 2
Enter the tftpdnld command as follows:
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 output similar to the following:
IP_SUBNET_MASK: 255.255.0.0
TFTP_SERVER: 223.255.254.254
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]:
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
The router begins to download the new file.
Enter Ctrl-C or Break to stop the transfer before the Flash memory is erased.
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 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 command confreg followed by the new value of the register in hexadecimal, as shown in the following example:
rommon 1 > confreg 0x2101
You must reset or power cycle for new config to take effect
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
Entering confreg 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:
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]:
enable "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 [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
Console Download
You can use console download, a ROM monitor function, to download over the router console port either a software image or a configuration file. Make sure that the Cisco IOS image is in the same PC where you are to perform this function. 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 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 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. 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. Default is to load the image into Flash memory.
|
x
|
Optional. Image is loaded into DRAM without being executed.
|
destination_file_name
|
The name of the system image file or the system configuration file. In order for the router to recognize it, the name of the configuration file must be router_confg.
|
Follow the steps below to run Xmodem:
Step 1
Move the image file to the local drive where the 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, error messages are displayed on the console only when the data transfer is terminated.
If an error does occur during a data transfer, the transfer is terminated, and an error message is displayed. 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 the 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, cannot proceed."
The following are ROM monitor debugging commands:
•
stack or k—produces a stack trace; for example:
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:
CPU context of the most recent exception:
PC = 0x801111b0 MSR = 0x00009032 CR = 0x53000035 LR =
0x80113694
CTR = 0x801065e4 XER = 0xa0006d36 DAR = 0xffffffff DSISR =
0xffffffff
DEC = 0xffffffff TBU = 0xffffffff TBL = 0xffffffff IMMR =
0xffffffff
R0 = 0x00000000 R1 = 0x80005ea8 R2 = 0xffffffff R3 =
0x00000000
R4 = 0x8fab0d76 R5 = 0x80657d00 R6 = 0x80570000 R7 =
0x80570000
R8 = 0x00000000 R9 = 0x80570000 R10 = 0x0000954c R11 =
0x00000000
R12 = 0x00000080 R13 = 0xffffffff R14 = 0xffffffff R15 =
0xffffffff
R16 = 0xffffffff R17 = 0xffffffff R18 = 0xffffffff R19 =
0xffffffff
R20 = 0xffffffff R21 = 0xffffffff R22 = 0xffffffff R23 =
0xffffffff
R24 = 0xffffffff R25 = 0xffffffff R26 = 0xffffffff R27 =
0xffffffff
R28 = 0xffffffff R29 = 0xffffffff R30 = 0xffffffff R31 =
0xffffffff
•
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: 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:
Available main memory starts at 0x10000, size 40896KB
IO (packet) memory size: 5 percent of main memory.
Disaster Recovery with Console Download of Cisco IOS Software
You can use console download, a ROM monitor function, to download over the router console port either a software image or a configuration file. Make sure that the Cisco IOS image is in the same PC where you are to perform this function. After downloading, the file is saved either 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 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 UART. If the PC serial port is not using a 16550 UART, we recommend using a speed of 38,400 or less when downloading a Cisco IOS image over the console port.
Command Description
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. 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. Default is to load the image into Flash memory.
|
x
|
Optional. Image is loaded into DRAM without being executed.
|
destination_file_name
|
The name of the system image file or the system configuration file. In order for the router to recognize it, the name of the configuration file must be router_confg.
|
Follow the steps below to run Xmodem:
1.
Move the image file to the local drive where the Xmodem will execute.
2.
Enter the xmodem command.
Error Reporting
Because the ROM monitor console download uses the console to perform the data transfer, error messages are displayed on the console only when the data transfer is terminated.
If an error does occur during a data transfer, the transfer is terminated, and an error message is displayed. 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 the 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, cannot proceed."
The following are ROM monitor debugging commands:
•
stack or k—produce a stack trace; for example:
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:
CPU context of the most recent exception:
PC = 0x801111b0 MSR = 0x00009032 CR = 0x53000035 LR =
CTR = 0x801065e4 XER = 0xa0006d36 DAR = 0xffffffff DSISR =
DEC = 0xffffffff TBU = 0xffffffff TBL = 0xffffffff IMMR =
RO = 0x00000000 R1 = 0x80005ea8 R2 = oxffffffff R3 =
R4 = 0x8fab0d76 R5 = 0x80657d00 R6 = 0x80570000 R7 =
R8 = 0x00000000 R9 = 0x80570000 R10 =0x0000954c R11=
R12 = 0x00000080 R13 = 0xffffffff R14 = 0xffffffff R15 =
R16 = 0xffffffff R17 = 0xffffffff R18 = 0xffffffff R19 =
R20 = 0xffffffff R21 = 0xffffffff R22 = 0xffffffff R23 =
R24 = 0xffffffff R25 = 0xffffffff R26 = 0xffffffff R27 =
R28 = 0xffffffff R29 = 0xffffffff R30 = 0xffffffff R31 =
•
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: 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 nonvolatile random-access memory (NVRAM); for example:
Available main memory starts at 0x10000, size 40896KB
IO (packet) memory size: 5 percent of main memory.
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:
You must reset or power cycle for new config to take effect
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.