Chapter: Catalyst 3750-X and 3560-X Switch Bootloader Commands

Catalyst 3750-X and 3560-X Switch Boot Loader Commands

This appendix describes the boot loader commands on the Catalyst 3750-X and 3560-X switch. Unless otherwise noted, the term switch refers to a standalone switch and to a switch stack.

During normal boot loader operation, you are not presented with the boot loader command-line prompt. You gain access to the boot loader command line if the switch is set to manually boot, if an error occurs during power-on self test (POST) DRAM testing, or if an error occurs while loading the operating system (a corrupted Cisco IOS image). You can also access the boot loader if you have lost or forgotten the switch password.

Note The default switch configuration allows an end user with physical access to the switch to recover from a lost password by interrupting the boot process while the switch is powering up and then entering a new password. The password recovery disable feature allows the system administrator to protect access to the switch password by disabling part of this functionality and allowing the user to interrupt the boot process only by agreeing to set the system back to the default configuration. With password recovery disabled, the user can still interrupt the boot process and change the password, but the configuration file (config.text) and the VLAN database file (vlan.dat) are deleted. For more information, see the software configuration guide for this release.

You can access the boot loader through a switch console connection at 9600 b/s. Unplug the switch power cord, and press the switch Mode button while reconnecting the power cord. You can release the Mode button a second or two after the LED above port 1X goes off. You should then see the boot loader Switch: prompt. The boot loader performs low-level CPU initialization, performs POST, and loads a default operating system image into memory.

arp

Use the arp boot loader command to display the contents the Address Resolution Protocol (ARP) table.

arp [ ip_address ]

Syntax Description

ip_address

(Optional) Show the ARP table or the mapping for a specific IP address.

Examples

boot

Use the boot boot loader command to load and boot an executable image and to enter the command-line interface.

boot [ -post | -n | -p | flag ] filesystem:/file-url...

Syntax Description

-post

(Optional) Run the loaded image with an extended or comprehensive power-on self-test (POST). Using this keyword causes POST to take longer to complete.

-n

(Optional) Pause for the Cisco IOS debugger immediately after starting.

-p

(Optional) Pause for the JTAG debugger right after loading the image.

filesystem :

Alias for a flash file system. Use flash: for the system board flash device.

/ file-url

(Optional) Path (directory) and name of a bootable image. Separate image names with a semicolon.

Defaults

The switch attempts to automatically boot the system by using information in the BOOT environment variable. If this variable is not set, the switch attempts to load and execute the first executable image it can by performing a recursive, depth-first search throughout the flash file system. In a depth-first search of a directory, each encountered subdirectory is completely searched before continuing the search in the original directory.

Command Modes

Boot loader

Command History

Release

Modification

12.2(53)SE2

This command was introduced.

Usage Guidelines

When you enter the boot command without any arguments, the switch attempts to automatically boot the system by using the information in the BOOT environment variable, if any. If you supply an image name for the file-url variable, the boot command attempts to boot the specified image.

When you set boot loader boot command options, they are executed immediately and apply only to the current boot loader session. These settings are not saved for the next boot operation.

Filenames and directory names are case sensitive.

Examples

This example shows how to boot the switch using the new-image.bin image:

switch: boot flash:/new-images/new-image.bin

After entering this command, you are prompted to start the setup program.

Syntax Description

Valid values are 1, yes, 0, and no. If it is set to no or 0, the boot loader attempts to automatically boot the system. If it is set to anything else, you must manually boot the switch from the boot loader mode.

If the BOOT environment variable is not set, the system attempts to load and execute the first executable image it can find by using a recursive, depth-first search through the flash: file system. If the BOOT variable is set but the specified images cannot be loaded, the system attempts to boot the first bootable file that it can find in the flash file system.

ENABLE_BREAK —Decides whether the automatic boot process can be interrupted by using the Break key on the console.

Valid values are 1, yes, on, 0, no, and off. If it is set to 1, yes, or on, you can interrupt the automatic boot process by pressing the Break key on the console after the flash file system has initialized.

PS1 prompt —A string that is used as the command-line prompt in boot loader mode.

CONFIG_FILE flash:/ file-url —The filename that Cisco IOS uses to read and write a nonvolatile copy of the system configuration.

BAUD rate —The rate in bits per second (b/s) used for the console. The Cisco IOS software inherits the baud rate setting from the boot loader and continues to use this value unless the configuration file specifies another setting. The range is from 0 to 4294967295 b/s. Valid values are 50, 75, 110, 150, 300, 600, 1200, 1800, 2000, 2400, 3600, 4800, 7200, 9600, 14400, 19200, 28800, 38400, 56000, 57600, 115200, and 128000.

The most commonly used values are 300, 1200, 2400, 9600, 19200, 57600, and 115200.

HELPER_CONFIG_FILE filesystem :/ file-url —The name of the configuration file to be used by the Cisco IOS helper image. If this is not set, the file specified by the CONFIG_FILE environment variable is used by all versions of Cisco IOS that are loaded, including the helper image. This variable is used only for internal development and testing.

Defaults

The environment variables have these default values:

MANUAL_BOOT: No (0)

BOOT: Null string

ENABLE_BREAK: No (Off or 0) (the automatic boot process cannot be interrupted by pressing the Break key on the console).

Note Environment variables that have values are stored in the flash file system in various files. The format of these files is that each line contains an environment variable name and an equal sign followed by the value of the variable. A variable has no value if it is not listed in this file; it has a value if it is listed in the file even if the value is a null string. A variable that is set to a null string (for example, “ ”) is a variable with a value. Many environment variables are predefined and have default values.

Command Modes

Boot loader

Command History

Release

Modification

12.2(53)SE2

This command was introduced.

Usage Guidelines

Environment variables are case sensitive and must be entered as documented.

Environment variables that have values are stored in flash memory outside of the flash file system.

Under normal circumstances, it is not necessary to alter the setting of the environment variables.

The MANUAL_BOOT environment variable can also be set by using the boot manual global configuration command.

The BOOT environment variable can also be set by using the boot system filesystem :/ file-url global configuration command.

The ENABLE_BREAK environment variable can also be set by using the boot enable-break global configuration command.

The HELPER environment variable can also be set by using the boot helper filesystem :/ file-url global configuration command.

The CONFIG_FILE environment variable can also be set by using the boot config-file flash:/ file-url global configuration command.

The HELPER_CONFIG_FILE environment variable can also be set by using the boot helper-config-file filesystem :/ file-url global configuration command.

For Catalyst 3750-X switches, the SWITCH_NUMBER environment variable can also be set by using the switch current-stack-member-number renumber new-stack-member-number global configuration command.

For Catalyst 3560-X switches, the SWITCH_PRIORITY environment variable can also be set by using the switch stack-member-number priority priority-number global configuration command.

The boot loader prompt string (PS1) can be up to 120 printable characters except the equal sign (=).

Syntax Description

BOOT —Resets the list of executable files to try to load and execute when automatically booting. If the BOOT environment variable is not set, the system attempts to load and execute the first executable image it can find by using a recursive, depth-first search through the flash file system. If the BOOT variable is set but the specified images cannot be loaded, the system attempts to boot the first bootable file that it can find in the flash file system.

ENABLE_BREAK —Decides whether the automatic boot process can be interrupted by using the Break key on the console after the flash file system has been initialized.

HELPER —A semicolon-separated list of loadable files to dynamically load during the boot loader initialization. Helper files extend or patch the functionality of the boot loader.

PS1 —A string that is used as the command-line prompt in boot loader mode.

CONFIG_FILE —Resets the filename that Cisco IOS uses to read and write a nonvolatile copy of the system configuration.

BAUD —Resets the rate in bits per second (b/s) used for the console. The Cisco IOS software inherits the baud rate setting from the boot loader and continues to use this value unless the configuration file specifies another setting.

HELPER_CONFIG_FILE —Resets the name of the configuration file to be used by the Cisco IOS helper image. If this is not set, the file specified by the CONFIG_FILE environment variable is used by all versions of Cisco IOS that are loaded, including the helper image. This variable is used only for internal development and testing.

Command Modes

Boot loader

Command History

Release

Modification

12.2(53)SE2

This command was introduced.

Usage Guidelines

Under normal circumstances, it is not necessary to alter the setting of the environment variables.

The MANUAL_BOOT environment variable can also be reset by using the no boot manual global configuration command.

The BOOT environment variable can also be reset by using the no boot system global configuration command.

The ENABLE_BREAK environment variable can also be reset by using the no boot enable-break global configuration command.

The HELPER environment variable can also be reset by using the no boot helper global configuration command.

The CONFIG_FILE environment variable can also be reset by using the no boot config-file global configuration command.

The HELPER_CONFIG_FILE environment variable can also be reset by using the no boot helper-config-file global configuration command.

Examples

This example shows how to reset the prompt string to its previous setting: