Using the ROM Monitor


This appendix describes the ROM monitor (also called the bootstrap program), which is the firmware that runs when you power on or restart the Cisco VG224 voice gateway. 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 help you isolate or rule out hardware problems encountered when installing your router.

This appendix contains the following sections:

Entering the ROM Monitor Mode

ROM Monitor Commands

ROM Monitor Syntax Conventions

Command Descriptions

Recovering Boot and System Images

Entering the ROM Monitor Mode

To use the ROM monitor, you must have access to the console port.


Note For information on connecting the console cable, refer to Quick Start Guide Cisco 2610 Router Cabling and Setup at the following URL:
http://www.cisco.com/univercd/cc/td/doc/product/access/acs_mod/cis2600/hw_inst/cabling/
2610ja.htm


To enter the ROM monitor mode, do the following:

Configuring

 
Command or Action
Purpose

Step 1 

Router> reload

Restarts the Cisco VG224.

Step 2 

Press the Break key during the first 60 seconds while 
the system is starting up.

Forces the router to stop booting and enter the ROM monitor mode.


Verifying

To verify that you are in ROM monitor mode, check that the prompt displayed on your screen is the ROM monitor mode prompt:

rommon # >

The # is the line number and increases incrementally at each prompt.


Tip From the Cisco IOS software, you can configure the router to automatically enter the ROM monitor mode the next time the router boots by setting virtual configuration register bits 3, 2, 1, and 0 to zero. From the console, enter the following configuration command:

configuration-register 0x0

The new configuration register value, 0x0, is effective after the router is rebooted with the reload command. The router remains in 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. Refer to the boot command in the section "Command Descriptions" later in this appendix.


ROM Monitor Commands

Enter ? or help at the ROM monitor mode prompt to display a list of available commands. For example:

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
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
fpga-pref   select an FPGA
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
showcookie  display cookie information
showfpga    display the current selected FPGA
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
rommon 2 >

Note You can abort any command by pressing the Break key at the console.


ROM Monitor Syntax Conventions

The 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 type interface

Command Descriptions

This section lists some useful ROM monitor commands. Refer to the Cisco IOS configuration guides and command references for more information on ROM monitor commands.

boot or b—Boot an image.

Boots the first image in flash memory.

flash:/slot0 [name] boots the Cisco IOS software from flash memory.


Note The above command is not available on the Cisco VG224.


filename tftpserver boots from the specified file over the network from the specified TFTP server. For example:

boot cvg224-i-mz 172.15.19.11

filename boots from the boothelper image because it does not recognize the device ID. This form of the command is used to netboot the image named filename.

The Cisco VG224 does not have a dedicated boothelper image ([rx]boot) as used by some other Cisco routers. With the Cisco VG224, the first image in flash memory is invoked as the default boothelper image anytime the ROM monitor does not recognize the device ID in the boot command.

You can override the default boothelper image setting by setting the BOOTLDR Monitor environment variable to point to another image. Any system image can be used for this purpose.

Options to the boot command are -x, load image but do not execute, and -v, verbose.

Use the Cisco IOS commands show version and show hardware to display the source of the currently running image.

dir device:[partition:]—List the files on the named device. For example:

rommon 8 > dir flash: /dir slot0:

         File size               Checksum   File name
       2229799 bytes (0x220627)   0x469e    CVG224-j-m2.113-4T

help—Display a summary of ROM monitor commands (equivalent to ?).

meminfo—Display size in bytes, starting address, available range of main memory, the starting point and size of packet memory, and size of nonvolatile memory (NVRAM). The following example shows the meminfo command:

rommon 9 > meminfo

-------------------------------------------------
Current Memory configuration is:
Dimm0: Size = 128 MB : Start Addr = 0x00000000
-----Bank 0 128 MB
-----Bank 1   0 MB
Dimm1: Not Installed
-------------------------------------------------
Main memory size: 128 MB in 64 bit mode.
Available main memory starts at 0xa000e000, size 131016KB
IO (packet) memory size: 0 percent of main memory.
NVRAM size: 88KB

meminfo [-l]—The meminfo command with the -l option displays supported DRAM configurations. The following example is a sample of the meminfo -l command output:

rommon 10 > meminfo -l

The following 64 bit memory configs are supported:
-------------------------------------------------
DIMM SOCKET 0           DIMM SOCKET 1           TOTAL MEMORY
Bank 0  Bank1           Bank 0 Bank 1
-------------           -------------           ------------
  0 MB   0 MB            32 MB   0 MB            32 MB
  0 MB   0 MB            64 MB   0 MB            64 MB
  0 MB   0 MB           128 MB   0 MB           128 MB
  0 MB   0 MB           256 MB   0 MB           256 MB
 32 MB   0 MB             0 MB   0 MB            32 MB
 32 MB   0 MB            32 MB   0 MB            64 MB
 32 MB   0 MB            64 MB   0 MB            96 MB
 32 MB   0 MB           128 MB   0 MB           160 MB
 64 MB   0 MB             0 MB   0 MB            64 MB
 64 MB   0 MB            32 MB   0 MB            96 MB
 64 MB   0 MB            64 MB   0 MB           128 MB
 64 MB   0 MB           128 MB   0 MB           192 MB
128 MB   0 MB             0 MB   0 MB           128 MB
128 MB   0 MB            32 MB   0 MB           160 MB
128 MB   0 MB            64 MB   0 MB           192 MB
128 MB   0 MB           128 MB   0 MB           256 MB


showfpga—Show FPGA-related information.

reset or i—Reset and initialize the router, similar to power-on.

tftpdnld—Download an image using Trivial File Transfer Protocol (TFTP) from a remote server.

show rom-monitor—Shows version of read-only ROMMON, and if present, the upgrade version of ROMMON. It also shows the current version of ROMMON, which version will be selected for execution when the Cisco IOS software is booted again. This command is available in the Cisco IOS EXEC mode.

showmon—Available in the ROMMON command mode. Provides the same information as the show rom-monitor command in the Cisco IOS EXEC mode.

upgrade rom-monitor [file<URL>|preference[readonly|upgrade]]—Installs and reloads a new version of ROMMON in the Cisco IOS exec mode. URL refers to the path where the new ROMMON image is stored. Prompts the user to save the configuration.

upgrade rom-monitor preference [readonly|upgrade]—Selects the version of ROMMON to be loaded the next time the router is reloaded. This command is used in the Cisco IOS EXEC mode.

rommon-pref—Used in ROMMON command mode. Provides the same information as upgrade rom-monitor preference command in the Cisco IOS EXEC mode.

fpga-pref [readonly|system]—Field Programmable Gate-Array (FPGA), used in ROMMON command mode. Selects which FPGA to run.

Debugging Commands

Most debugging commands are functional only when Cisco IOS software has crashed or is aborted. 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, can not proceed."

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:

rommon 8 > sysret

System Return Info:
count: 19,  reason: a SegV exception
pc:0x802b1040,  error address: 0x802b1040
Stack Trace:
FP: 0x80908398, PC: 0x802b102c
FP: 0x809083b0, PC: 0x802b0b88
FP: 0x809083d8, PC: 0x8017039c
FP: 0x809083e8, PC: 0x8016f764

Configuration Register Commands

The virtual configuration register resides in NVRAM. You can display or modify the virtual configuration register from either the ROM monitor or the operating system software.

To change the virtual configuration register from the ROM monitor, enter confreg by itself for menu mode, or enter the new value of the register in hexadecimal.

confreg [hexnum]—Change the virtual configuration register to the value specified. The value is always interpreted as hexadecimal.


Note Entering confreg without an argument displays the contents of the virtual configuration register and prompts you 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 is not effective until you reset or power-cycle the router.


The following display shows an example of the confreg command:


rommon 7 > confreg

    Configuration Summary
enabled are:
break/abort has effect
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]: 
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
enter to boot:
 0 = ROM Monitor
 1 = the boot helper image
 2-15 = boot system
    [0]:  0


    Configuration Summary
enabled are:
diagnostic mode
break/abort has effect
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

Using the show rom-monitor command

The show rom-monitor command displays the current version of the read-only ROM monitor and, if present displays the upgrade version of the ROM monitor. The upgrade version is selected when the system is rebooted. This command runs in the Cisco IOS EXEC mode.

You get the following output when the read only ROM monitor is present:

Router# show rom-monitor 

ReadOnly ROMMON version:
System Bootstrap, Version 12.3(4)T, RELEASE SOFTWARE (fc1) 
TAC Support: http://www.cisco.com/tac 
Copyright (c) 2001 by cisco Systems, Inc.
No upgrade ROMMON programmed or not yet run 
Currently running ROMMON from ReadOnly region 
ROMMON from ReadOnly region is selected for next boot
Router#

Following is a sample of an output when both the read-only and the upgrade versions of the ROM monitor are present:

Router# show rom-monitor 

ReadOnly ROMMON version:
System Bootstrap, Version 12.3(4)T, RELEASE SOFTWARE (fc1) 
TAC Support: http://www.cisco.com/tac 
Copyright (c) 2001 by cisco Systems, Inc.
Upgrade ROMMON version:
System Bootstrap, Version 12.3(4)T, RELEASE SOFTWARE (fc1) 
TAC Support: http://www.cisco.com/tac 
Copyright (c) 2002 by cisco Systems, Inc.
Currently running ROMMON from Upgrade region 
ROMMON from Upgrade region is selected for next boot
Router#

Note You can get the same information if you enter the showmon command in ROMMON mode.


Using the upgrade rom-monitor Command

Use the upgrade rom-monitor command to upgrade the ROM monitor to a new version. Depending on where the image is located, use the following commands to upgrade the ROM monitor:

upgrade rom-monitor file [URL]

upgrade rom-monitor preference [readonly | upgrade]

upgrade rom-monitors file [URL] command installs the new version of ROM monitor on the router by taking the image from the location indicated in the URL. The image is in the form of ".srec' file. It will then reload the router.

Following is a sample of the output when the upgrade version of ROM monitor is located at tftp://223.255.254.254/ajayhn/cvg224_RM2.srec:, and the system configuration has not been saved:

.Router# upgrade rom-monitor file tftp://223.225.254.254/ajayhn/cvg224_BM2.SREC
Loading ajayhn/Cvg224_RM2.srec from 223.255.254.254 (via FastEthernet0/0): 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
[OK - 641719/1283072 bytes]
This command will reload the router. Continue? [yes/no]: y
System configuration has been modified. Save? [yes/no]: y 
Building configuration...
Erasing boot flash eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee 
Programming boot flash pppp
Now Reloading 
System Bootstrap, Version 12.3(4)T, RELEASE SOFTWARE (fc1) 
TAC Support: http:_//www.cisco.com/tac 
Copyright (c) 2001 by cisco Systems, Inc.
Running new upgrade for first time
System Bootstrap, Version 12.3(4)T, RELEASE SOFTWARE (fc1) 
TAC Support: http:_//www.cisco.com/tac 
Copyright (c) 2002 by cisco Systems, Inc. 
cvg224 processor with 196608 Kbytes of main memory 
Main memory is configured to 64 bit mode with parity disabled 

Upgrade ROMMON initialized 
rommon 1 > 

Following output example a configuration that has been saved:

Router# upgrade rom-monitor file tftp://223.225.254.254/ajayhn/cvg224_BM2.SREC 
Loading ajayhn/Cvg224_RM2.srec from 223.255.254.254 (via FastEthernet0/0): 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
[OK - 641719/1283072 bytes]
This command will reload the router. Continue? [yes/no]: y
Erasing boot flash eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee 
Programming boot flash pppp
Now Reloading 
System Bootstrap, Version 12.3(4)T, RELEASE SOFTWARE (fc1) 
TAC Support: http://www.cisco.com/tac 
Copyright (c) 2001 by cisco Systems, Inc.
Running new upgrade for first time
System Bootstrap, Version 12.3(4)T, RELEASE SOFTWARE (fc1) 
TAC Support: http://www.cisco.com/tac 
Copyright (c) 2002 by cisco Systems, Inc. 
cvg224 processor with 196608 Kbytes of main memory 
Main memory is configured to 64 bit mode with parity disabled 

Upgrade ROMMON initialized 
rommon 1 > 

Note The rommon-pref in ROMMON mode provides the same information as upgrade rom-monitor preference command in the Cisco IOS EXEC mode.


Recovering Boot and System Images

If your router experiences difficulties and no longer contains a valid Cisco IOS software image in flash memory, you can recover the Cisco IOS image using one of the following ROM monitor commands:

xmodem—Use this command if the computer attached to your console has a terminal emulator that has xmodem capability.

tftpdnld—Use this command if you have a TFTP server directly connected to a Fast Ethernet port.

Using 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 flash memory.

xmodem [filename]—Establishes an xmodem connection between the console and the router. The optional parameter filename specifies the source file containing the Cisco IOS image.

Other options include the following:

-c—Uses cyclic redundancy check (CRC-16)

-y—Uses Ymodem transfer protocol

-r—Copies the image to DRAM for launch

-x—Does not launch image on completion of download

Using the tftpdnld Command

The tftpdnld command downloads a Cisco IOS software image from a remote server into flash memory using TFTP.

tftpdnld—Begins the TFTP copy command.

The following variables are required:

IP_ADDRESS—IP address for the router you are using.

IP_SUBNET_MASK—Subnet mask for the router you are using.

DEFAULT_GATEWAY—Default gateway for the router you are using.

TFTP_SERVER—IP address of the server from which you want to download the image file.

TFTP_FILE—Name of the file that you want to download.

The following variables are optional:

TFTP_VERBOSE—Print setting. 0=quiet, 1=progress, 2=verbose. The default is 1.

TFTP_RETRY_COUNT—Retry count for ARP and TFTP. The default is 7.

TFTP_TIMEOUT—Overall timeout of the download operation in seconds. The default is 2400 seconds.

TFTP_CHECKSUM—Performs a checksum test on the image. 0=no, 1=yes. The default is 1.

The syntax for specifying the variables is:

VARIABLE_NAME=value

After you specify the variables, you must reenter the tftpdnld command. For example:

rommon 1 > tftpdnld

rommon 2 > IP_ADDRESS=172.15.19.11
rommon 3 > IP_SUBNET_MASK=255.255.255.0
rommon 4 > DEFAULT_GATEWAY=172.15.19.1
rommon 5 > TFTP_SERVER=172.15.20.10
rommon 6 > TFTP_FILE=/tftpboot/cVG224-i-mz
rommon 7 > TFTP_VERBOSE=1

rommon 8 > tftpdnld

     IP_ADDRESS=172.15.19.11
     IP_SUBNET_MASK=255.255.255.0
     DEFAULT_GATEWAY=172.15.19.1
     TFTP_SERVER=172.15.20.10
     TFTP_FILE=/tftpboot/VG224-i-mz
     TFTP_VERBOSE=1

Invoke this command for disaster recovery only.
WARNING: all existing data in flash will be lost!
Do you wish to continue? y/n: [n]:

Enter y to begin downloading the Cisco IOS software image. When the process is complete, the ROM monitor mode prompt appears on your screen.