ROM Monitor


This appendix describes the Cisco 806 router 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

Configuration Register

Console Download

Debug Commands

Exiting the ROM Monitor

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 806 Router 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 in this appendix.

After the router reboots, it is in ROM monitor mode. The number in the prompt increments with each new line.

ROM Monitor Commands

Enter ? or help 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
confreg             configuration register utility
dev                 list the device table
dir                 list files in file system
help                monitor builtin command help
history             monitor command history
meminfo             main memory information
repeat              repeat a monitor command
reset               system reset
set                 display the monitor variables
sysret              print out info from last system return
unalias             unset an alias
unset               unset a monitor variable

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 59-1 describes the most commonly used ROM monitor commands.

Table 59-1 Most Commonly Used ROM Monitor Commands 

Command
Description

reset or i

Resets and initializes the router, similar to a power up.

dev

Lists boot device identifications on the router; for example:

rommon 10> dev
Devices in device table:
        id  name
    flash:  flash 

dir device:

Lists the files on the named device; flash, for example:

rommon 4 > dir flash:
      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.


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
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

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:

rommon 7> confreg
 
     Configuration Summary
enabled are:
console baud: 9600
boot: the ROM Monitor
 
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
enter to boot:
 0 = ROM Monitor
 1 = the boot helper image
 2-15 = boot system
    [0]:  0
 
Configuration Summary
enabled are:
diagnostic mode
console baud: 9600
boot: the ROM Monitor
 
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. 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 Trivial File Transfer Protocol (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.



Error Reporting

Because the ROM monitor console download uses the console to perform the data transfer, error messages are only displayed on the console 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 Cisco IOS software has crashed or is halted.

The following are ROM monitor debugging commands:

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:

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: 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 new config 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.