Catalyst 5000 Family Software Configuration Guide (6.3 and 6.4)
Modifying the Switch Boot Configuration

Table Of Contents

Modifying the Switch Boot Configuration

Understanding How the Switch Boot Configuration Works

Understanding the Boot Process

Understanding the ROM Monitor

Understanding the Configuration Register

Understanding the BOOT Environment Variable

Understanding the CONFIG_FILE Environment Variable

Default Switch Boot Configuration

Setting the Configuration Register

Setting the Boot Field in the Configuration Register

Setting the ROM-Monitor Console Port Baud Rate

Setting CONFIG_FILE Recurrence

Setting the Switch to Ignore the NVRAM Configuration

Setting the Complete Configuration Register Value

Setting the BOOT Environment Variable

Setting the BOOT Environment Variable

Clearing the BOOT Environment Variable Settings

Setting the CONFIG_FILE Environment Variable

Setting the CONFIG_FILE Environment Variable

Setting CONFIG_FILE Recurrence on Supervisor Engine II G and III G

Clearing the CONFIG_FILE Environment Variable Settings

Displaying the Switch Boot Configuration


Modifying the Switch Boot Configuration


This chapter describes how to modify the switch boot configuration, including the BOOT environment variable and the configuration register.


Note For complete syntax and usage information for the commands used in this chapter, refer to the Catalyst 5000 Family Command Reference.


This chapter consists of these sections:

Understanding How the Switch Boot Configuration Works

Default Switch Boot Configuration

Setting the Configuration Register

Setting the BOOT Environment Variable

Setting the CONFIG_FILE Environment Variable

Displaying the Switch Boot Configuration

Understanding How the Switch Boot Configuration Works

These sections describe how the boot configuration works on the Catalyst 5000 family Supervisor Engine III switches:

Understanding the Boot Process

Understanding the ROM Monitor

Understanding the Configuration Register

Understanding the BOOT Environment Variable

Understanding the CONFIG_FILE Environment Variable

Understanding the Boot Process

The boot process on the Catalyst 5000 family Supervisor Engine III switches involves two software images: ROM monitor and supervisor engine system code. When the switch is powered up or reset, the ROM-monitor code is executed. Depending on the nonvolatile RAM (NVRAM) configuration, the switch either stays in ROM-monitor mode or loads the supervisor engine system code.

Two user-configurable parameters determine how the switch boots: the configuration register and the BOOT environment variable. The configuration register is described in the "Understanding the Configuration Register" section. The BOOT environment variable is described in the "Understanding the BOOT Environment Variable" section.

Understanding the ROM Monitor

The ROM monitor code executes upon switch power-up, reset, or when a fatal exception occurs. The system enters ROM-monitor mode if the switch does not find a valid system image, if the NVRAM configuration is corrupted, or if the configuration register is set to enter ROM-monitor mode. From ROM-monitor mode, you can manually load a system image from Flash memory, from a network server file, or from bootflash.


Note For complete syntax and usage information for the ROM monitor commands, refer to the Catalyst 5000 Family Command Reference.


You can enter ROM-monitor mode by restarting the switch and then pressing the Break key during the first 60 seconds of startup. If you are connected through a terminal server, you can escape to the Telnet prompt and enter the send break command to enter ROM-monitor mode.


Note The Break key is always enabled for 60 seconds after rebooting the system, regardless of whether the configuration-register setting has the Break key disabled.


The following functionality is built into the ROM monitor:

Power-on confidence test

Hardware initialization

Boot capability (allows manual boot and autoboot)

Debug utility and crash analysis

Monitor call interface (EMT calls—the ROM monitor provides information and some functionality to the running system images via EMT calls)

File system (the ROM monitor knows the simple file system and supports the newly developed file system through the dynamic linked file system library [MONLIB])

Exception handling

Understanding the Configuration Register

The configuration register determines whether the switch loads an operating system image and where the system image is stored. The configuration register boot field determines if and how the ROM monitor loads a supervisor engine system image at startup. You can modify the boot field to force the switch to boot a particular system image at startup instead of using the default system image.

The lowest four bits (bits 3, 2, 1, and 0) of the 16-bit configuration register form the boot field. The default boot field value is 0x10F.

The possible configuration register boot field settings are as follows:

When the boot field equals 0000, the switch does not load a system image. Instead, the switch enters ROM-monitor mode from which you can enter ROM-monitor commands to manually load a system image.

When the boot field equals 0001, the switch loads the first valid system image found in onboard Flash memory.

When the boot field equals a value between 0010 and 1111, the switch loads the system image specified by boot system commands in the NVRAM configuration. The switch attempts to boot the image in the order in which you entered the boot system commands. If it cannot boot any image in the BOOT environment variable list, the switch remains in ROM-monitor mode. The exact booting sequence is defined by the ROM monitor.

The other bits in the configuration register function as follows when set:

Bit 5 (0x0020)—Enables CONFIG_FILE recurrence.

Bit 6 (0x0040)—Causes system software to clear NVRAM contents.

Bit 7 (0x0080)—Enables OEM bit (not used).

Bit 8 (0x0100)—Disables break.

Bit 9 (0x0200)—Uses secondary bootstrap (not used by the ROM monitor).

Bit 10 (0x0400)—Provides IP broadcast with all zeros (not used).

Bits 11/12 (0x0800/0x1000)—On the Catalyst 5000 family switches, provide console line speed: 0/0=9600, 0/1=1200, 1/0=4800, 1/1=2400 (Default is 9600).

Bit 13 (0x2000)—Boots default Flash software if network boot fails (not used).

Bit 14 (0x4000)—IP broadcasts do not have network numbers (not used).

Bit 15 (0x8000)—Enables diagnostic messages and ignores NVRAM contents (not used).

Understanding the BOOT Environment Variable

The BOOT environment variable specifies a list of image files on various devices from which the switch can boot at startup.

You can add several images to the BOOT environment variable to provide a fail-safe boot configuration. If the first file fails to boot the switch, subsequent images specified in the BOOT variable are tried until the switch boots or there are no additional images to attempt to boot. If there is no valid image to boot, the system enters ROM-monitor mode where you can manually specify an image to boot.

The system stores and executes images in the order in which you added them to the BOOT variable. If you want to change the order in which images are tried at startup, you can either prepend and clear images from the BOOT variable to attain the desired order or you can clear the entire BOOT environment variable and then redefine the list in the desired order.

Understanding the CONFIG_FILE Environment Variable

In software release 5.2 and later, you can use the CONFIG_FILE environment variable to specify a list of configuration files on various devices to use to configure the switch at startup. You can specify one of the following functions:

Nonrecurring—When you add a list of configuration files to the CONFIG_FILE environment variable, the next time the switch is restarted, the system erases the configuration in NVRAM and uses the specified files to configure the switch. The CONFIG_FILE variable is cleared before the switch is configured. Nonrecurring is the default setting.

Recurring—When you add a list of configuration files to the CONFIG_FILE environment variable, the list is stored indefinitely in NVRAM. Each time the switch is restarted, the system erases the configuration in NVRAM and configures the switch using the configuration files specified. The CONFIG_FILE variable is not cleared.


Note Remember that the CONFIG_FILE variable can be altered or its recurrence properties changed by commands in the configuration files used to configure the switch at startup.


For information on specifying recurrence or nonrecurrence, see the "Setting CONFIG_FILE Recurrence" section.

On the Supervisor Engine III, you can add multiple configuration files to the CONFIG_FILE environment variable. The specified files can be any valid configuration file stored on a local Flash device (bootflash:, slot0:, or slot1:).

On the Supervisor Engine II G and III G, you can store up to two configuration files to use to configure the switch at startup. The configuration files are cfg1 and cfg2. Each configuration file can be up to 256 KB in size.

When the switch boots up, if any of the files specified in the CONFIG_FILE environment variable are valid configuration files, the configuration in NVRAM is erased and the system uses the specified configuration file to configure the switch. If multiple valid configuration files are specified, each configuration file is executed in the order in which it appears in the CONFIG_FILE environment variable.

If any specified file is not a valid configuration file, the entry is skipped and subsequent files are tried until there are no additional images specified. If no valid configuration file is specified, the system retains the last configuration stored in NVRAM.


Note For more information about using configuration files, see Chapter 34, "Working with Configuration Files."


Default Switch Boot Configuration

Table 31-1 shows the default switch boot configuration.

Table 31-1 Default Switch Boot Configuration 

Feature
Default Configuration

Configuration register value

0x10f

Boot method

System boots from the image specified in the BOOT environment variable

ROM monitor console port baud rate

9600 baud

ignore-config parameter

Disabled

BOOT environment variable

Empty

CONFIG_FILE environment variable

Catalyst 5000 family:
slot0:switch.cfg

CONFIG_FILE recurrence configuration register parameter

Nonrecurring


Setting the Configuration Register


Note Configuration register settings are not copied automatically to a redundant supervisor engine (if present). You must set the configuration register separately for each supervisor engine in the switch.


These sections describe how to modify the configuration register on the Catalyst 5000 family Supervisor Engine III switches:

Setting the Boot Field in the Configuration Register

Setting the ROM-Monitor Console Port Baud Rate

Setting CONFIG_FILE Recurrence

Setting the Switch to Ignore the NVRAM Configuration

Setting the Complete Configuration Register Value

Setting the Boot Field in the Configuration Register

You can determine the boot method the switch will use at the next startup by setting the boot field in the configuration register. This command affects only the configuration register bits that control the boot field and leaves the remaining bits unaltered.

The following boot methods are supported:

ROM monitor—Use the rommon keyword to force the switch to remain in ROM-monitor mode at startup.

Bootflash—Use the bootflash keyword to cause the switch to boot from the first image stored in the onboard Flash.

System—Use the system keyword to boot from the image specified in the BOOT environment variable (the default).


Note We recommend that you use only the rommon and system options to the set boot config-register boot command.



Note This task does not apply to the Catalyst 5000 family Supervisor Engine II G or III G.


To set the configuration register boot field, perform this task in privileged mode:

Task
Command

Specify the boot field in the configuration register.

set boot config-register boot {rommon | bootflash | system} [mod_num]


This example shows how to force the switch to enter ROM-monitor mode at the next startup:

Console> (enable) set boot config-register boot rommon
Configuration register is 0x0
ignore-config: disabled
auto-config: non-recurring
console baud: 9600
boot: the ROM monitor
Console> (enable)

Setting the ROM-Monitor Console Port Baud Rate

You can change the console port baud rate used by the ROM monitor. The new baud rate is used the next time the switch is restarted. This command affects only the configuration register bits that control the baud rate and leaves the remaining bits unaltered.


Note The baud rate specified in the configuration register is used by the ROM monitor only and is different from the baud rate specified by the set system baud command.



Note This task does not apply to the Catalyst 5000 family Supervisor Engine II G or III G.


To change the ROM-monitor console port baud rate in the configuration register, perform this task in privileged mode:

Task
Command

Change the ROM-monitor console port baud rate in the configuration register.

set boot config-register baud {1200 | 2400 | 4800 | 9600} [mod_num]


This example shows how to change the ROM-monitor console port baud rate in the configuration register to 2400:

Console> (enable) set boot config-register baud 2400
Configuration register is 0x1800
ignore-config: disabled
auto-config: non-recurring
console baud: 2400
boot: the ROM monitor
Console> (enable) 

Setting CONFIG_FILE Recurrence

By default, when you set the CONFIG_FILE environment variable, the list of configuration files to use at startup is retained only until the next time the switch is restarted.

You can cause the system software to retain the CONFIG_FILE environment variable settings indefinitely so that each time the switch is restarted, the specified configuration files are used to configure the switch.

This command affects only the configuration register bit that controls whether the CONFIG_FILE environment variable settings are recurring or nonrecurring. The remaining configuration register bits are unaltered.


Caution With the CONFIG_FILE environment variable set to recurring, the current configuration in NVRAM is erased each time the switch is restarted and the switch is configured using the specified configuration files. With the CONFIG_FILE environment variable set to non-recurring, the current configuration in NVRAM is erased at the next restart and the switch is configured using the specified configuration files. The NVRAM configuration is retained after subsequent restarts (unless you again set the CONFIG_FILE variable).


Note This task does not apply to the Catalyst 5000 family Supervisor Engine II G or III G. For information on setting CONFIG_FILE recurrence on Supervisor Engine II G and III G, see the "Setting CONFIG_FILE Recurrence on Supervisor Engine II G and III G" section.


To set the switch to retain the current CONFIG_FILE environment variable indefinitely, perform this task in privileged mode:

Task
Command

Set the switch to retain the current CONFIG_FILE environment variable indefinitely.

set boot config-register auto-config {recurring | non-recurring}


This example shows how to set the switch to retain the current CONFIG_FILE variable indefinitely:

Console> (enable) set boot config-register auto-config recurring
Configuration register is 0x1820
ignore-config: disabled
auto-config: recurring
console baud: 2400
boot: the ROM monitor
Console> (enable)

Setting the Switch to Ignore the NVRAM Configuration

You can cause the system software to ignore the configuration information stored in NVRAM the next time the switch is restarted. This command affects only the configuration register bits that control whether the switch ignores the NVRAM configuration and leaves the remaining bits unaltered. This command affects the next system restart only.


Caution Enabling the ignore-config parameter is the same as entering the clear config all command; that is, it clears the entire configuration stored in NVRAM the next time the switch is restarted.


Note This task does not apply to the Catalyst 5000 family Supervisor Engine II G or III G.


To set the switch to ignore the NVRAM configuration at the next startup, perform this task in privileged mode:

Task
Command

Set the switch to ignore the contents of NVRAM at startup.

set boot config-register ignore-config enable


This example shows how to set the switch to ignore the NVRAM configuration at the next startup:

Console> (enable) set boot config-register ignore-config enable 
Configuration register is 0x1860
ignore-config: enabled
auto-config: recurring
console baud: 2400
boot: the ROM monitor
Console> (enable) 

Setting the Complete Configuration Register Value


Note This task does not apply to the Catalyst 5000 family Supervisor Engine II G or III G.


To set the entire configuration register value, perform this task in privileged mode:

Task
Command

Set the configuration register.

set boot config-register 0xvalue [mod_num]


This example shows how to set the configuration register value to 0x90f:

Console> (enable) set boot config-register 0x90f
Configuration register is 0x90f
ignore-config: disabled
auto-config: non-recurring
console baud: 4800
boot: image specified by the boot system commands
Console> (enable) 

Setting the BOOT Environment Variable


Note BOOT environment variable settings are not copied automatically to a redundant supervisor engine (if present). You must set the BOOT variable separately for each supervisor engine in the switch.


These sections describe how to modify the BOOT environment variable on the Catalyst 5000 family Supervisor Engine III:

Setting the BOOT Environment Variable

Clearing the BOOT Environment Variable Settings

Setting the BOOT Environment Variable


Note This task does not apply to the Catalyst 5000 family Supervisor Engine II G or III G.


To set the BOOT environment variable, perform this task in privileged mode:

Task
Command

Specify a system image to add to the BOOT environment variable.

set boot system flash device:[filename] [prepend] [mod_num]


This example shows how to add system images to the BOOT environment variable:

Console> (enable) set boot system flash bootflash:cat5000-sup3.5-1-1.bin
BOOT variable = bootflash:cat5000-sup3.5-1-1.bin,1;
Console> (enable) set boot system flash bootflash:cat5000-sup3.4-5-2.bin
BOOT variable = bootflash:cat5000-sup3.5-1-1.bin,1;bootflash:cat5000-sup3.4-5-2.
bin,1;
Console> (enable) set boot system flash bootflash:cat5000-sup3.5-2-1.bin prepend
BOOT variable = bootflash:cat5000-sup3.5-2-1.bin,1;bootflash:cat5000-sup3.5-1-1.
bin,1;bootflash:cat5000-sup3.4-5-2.bin,1;
Console> (enable) 

Clearing the BOOT Environment Variable Settings


Note This task does not apply to the Catalyst 5000 family Supervisor Engine II G or III G.


To clear entries from the BOOT environment variable, perform one of these tasks in privileged mode:

Task
Command

Clear a specific image from the BOOT environment variable.

clear boot system flash device:[filename] [mod_num]

Clear the entire BOOT environment variable.

clear boot system all [mod_num]


This example shows how to clear a specific entry from the BOOT environment variable:

Console> (enable) clear boot system flash bootflash:cat5000-sup3.5-1-1.bin
BOOT variable = bootflash:cat5000-sup3.5-2-1.bin,1;bootflash:cat5000-sup3.4-5-2.
bin,1;
Console> (enable) 

This example shows how to clear the entire BOOT environment variable:

Console> (enable) clear boot system all
BOOT variable =
Console> (enable)

Setting the CONFIG_FILE Environment Variable

These sections describe how to modify the CONFIG_FILE environment variable on the Catalyst 5000 family Supervisor Engine III switches:

Setting the CONFIG_FILE Environment Variable

Setting CONFIG_FILE Recurrence on Supervisor Engine II G and III G

Clearing the CONFIG_FILE Environment Variable Settings


Note For more information about using configuration files, see Chapter 34, "Working with Configuration Files."


Setting the CONFIG_FILE Environment Variable

You can specify multiple configuration files with the set boot auto-config command by separating them with a semicolon (;). You must specify both the device name and the filename for each configuration file.


Note You cannot prepend or append configuration files to the CONFIG_FILE environment variable. Entering the set boot auto-config command erases any list of configuration files previously specified using the set boot auto-config command.


To set the CONFIG_FILE environment variable, perform one of these tasks in privileged mode (depending on your supervisor engine and switch type):

Task
Command

Catalyst 5000 family Supervisor Engine III switches:

Specify the list of configuration files to add to the CONFIG_FILE environment variable.

set boot auto-config device:filename[;device:filename...]

Catalyst 5000 family Supervisor Engine II G or III G:

Specify one or both configuration files to add to the CONFIG_FILE environment variable.

set boot auto-config cfg1
set boot auto-config cfg2
set boot auto-config cfg1;cfg2
set boot auto-config cfg2;cfg1


This example shows how to add a list of configuration files to the CONFIG_FILE environment variable on a Catalyst 5000 family switch with Supervisor Engine III:

Console> (enable) set boot auto-config bootflash:generic.cfg;bootflash:5509_1_noc.cfg
CONFIG_FILE variable = bootflash:generic.cfg;bootflash:5509_1_noc.cfg
WARNING: nvram configuration may be lost during next bootup,
         and re-configured using the file(s) specified.
Console> (enable) 

This example shows how to add a list of configuration files to the CONFIG_FILE environment variable on a Catalyst 5000 family switch with Supervisor Engine III G:

Console> (enable) set boot auto-config cfg2;cfg1
Console> (enable) show boot
CONFIG_FILE variable = cfg2;cfg1
auto-config: non-recurring
Console> (enable) 

Setting CONFIG_FILE Recurrence on Supervisor Engine II G and III G


Caution With the CONFIG_FILE environment variable set to recurring, the current configuration in NVRAM is erased each time the switch is restarted and the switch is configured using the specified configuration files. With the CONFIG_FILE environment variable set to non-recurring, the current configuration in NVRAM is erased at the next restart and the switch is configured using the specified configuration files. The NVRAM configuration is retained after subsequent restarts (unless you again set the CONFIG_FILE variable).

To configure a switch with Supervisor Engine II G or III G to retain the current CONFIG_FILE environment variable indefinitely, perform this task in privileged mode:

Task
Command

Step 1 

Configure Supervisor Engine II G or III G to retain the current CONFIG_FILE environment variable indefinitely.

set boot auto-config {recurring | non-recurring}

Step 2 

Verify the CONFIG_FILE recurrence setting.

show boot

This example shows how to set Supervisor Engine II G or III G to retain the current CONFIG_FILE variable indefinitely:

Console> (enable) set boot auto-config recurring
Console> (enable) show boot
CONFIG_FILE variable = cfg2;cfg1
auto-config: recurring
Console> (enable) 

Clearing the CONFIG_FILE Environment Variable Settings

To clear the entries from the CONFIG_FILE environment variable, perform this task in privileged mode:

Task
Command

Clear the entries in the CONFIG_FILE environment variable.

clear boot auto-config


This example shows how to clear the entries in the CONFIG_FILE environment variable:

Console> (enable) clear boot auto-config
CONFIG_FILE variable = 
Console> (enable)

Displaying the Switch Boot Configuration

To display the current configuration register, BOOT environment variable, and CONFIG_FILE environment variable settings, perform this task in privileged mode:

Task
Command

Display the current configuration register, BOOT environment variable, and CONFIG_FILE environment variable settings.

show boot [mod_num]


This example shows how to display the current configuration register, BOOT environment variable, and CONFIG_FILE environment variable settings:

Console> (enable) show boot
BOOT variable = bootflash:cat5000-sup3.5-2-1.bin,1;
CONFIG_FILE variable = bootflash:generic.cfg;bootflash:5509_1_noc.cfg

Configuration register is 0x12f
ignore-config: disabled
auto-config: recurring
console baud: 9600
boot: image specified by the boot system commands

Console> (enable) 

This example shows how to display the current CONFIG_FILE settings on a Catalyst 5000 family switch with Supervisor Engine II G or III G:

Console> (enable) show boot
CONFIG_FILE variable = cfg2;cfg1
auto-config: recurring
Console> (enable)