Bootldr Commands
Bootldr Commands
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.
A-1
Appendix A arp
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.
Command Modes
Boot loader
Command History
Release 12.2(53)SE2
Usage Guidelines
Examples
A-2
OL-21522-02
Appendix A
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
(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. (Optional) Pause for the Cisco IOS debugger immediately after starting. (Optional) Pause for the JTAG debugger right after loading the image. Alias for a flash file system. Use flash: for the system board flash device. (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 12.2(53)SE2
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.
A-3
Appendix A boot
Related Commands
Command set
Description Sets the BOOT environment variable to boot a specific image when the BOOT keyword is appended to the command.
A-4
OL-21522-02
Appendix A
cat
Use the cat boot loader command to display the contents of one or more files. cat filesystem:/file-url ...
Syntax Description
filesystem: /file-url
Alias for a flash file system. Use flash: for the system board flash device. Path (directory) and name of the files to display. Separate each filename with a space.
Command Modes
Boot loader
Command History
Release 12.2(53)SE2
Usage Guidelines
Filenames and directory names are case sensitive. If you specify a list of files, the contents of each file appears sequentially.
Examples
This example shows how to display the contents of an image file. An example of an image file is c3750e-universal-mz.122-53.SE2:
switch: cat flash:image_file_name/info version_suffix: universal-122-xx.SEx version_directory: image_file_name image_system_type_id: 0x00000002 image_name: image_file_name.bin ios_image_file_size: 8919552 total_image_file_size: 11592192 image_feature: IP|LAYER_3|PLUS|MIN_DRAM_MEG=128 image_family: family stacking_number: 1.34 board_ids: 0x00000068 0x00000069 0x0000006a 0x0000006b info_end:
Related Commands
Description Displays the contents of one or more files. Displays the contents of one or more files.
A-5
Appendix A copy
copy
Use the copy boot loader command to copy a file from a source to a destination. copy [-b block-size] filesystem:/source-file-url filesystem:/destination-file-url
Syntax Description
(Optional) This option is used only for internal development and testing. Alias for a flash file system. Use flash: for the system board flash device. Path (directory) and filename (source) to be copied. Path (directory) and filename of the destination.
Defaults
Command Modes
Boot loader
Command History
Release 12.2(53)SE2
Usage Guidelines
Filenames and directory names are case sensitive. Directory names are limited to 45 characters between the slashes (/); the name cannot contain control characters, spaces, deletes, slashes, quotes, semicolons, or colons. Filenames are limited to 45 characters; the name cannot contain control characters, spaces, deletes, slashes, quotes, semicolons, or colons. If you are copying a file to a new directory, the directory must already exist.
Examples
You can verify that the file was copied by entering the dir filesystem: boot loader command.
Related Commands
Command delete
Description Deletes one or more files from the specified file system.
A-6
OL-21522-02
Appendix A
delete
Use the delete boot loader command to delete one or more files from the specified file system. delete filesystem:/file-url ...
Syntax Description
filesystem: /file-url
Alias for a flash file system. Use flash: for the system board flash device. Path (directory) and filename to delete. Separate each filename with a space.
Command Modes
Boot loader
Command History
Release 12.2(53)SE2
Usage Guidelines
Filenames and directory names are case sensitive. The switch prompts you for confirmation before deleting each file.
Examples
You can verify that the files were deleted by entering the dir flash: boot loader command.
Related Commands
Command copy
A-7
Appendix A dir
dir
Use the dir boot loader command to display a list of files and directories on the specified file system. dir filesystem:/file-url ...
Syntax Description
filesystem: /file-url
Alias for a flash file system. Use flash: for the system board flash device. (Optional) Path (directory) and directory name whose contents you want to display. Separate each directory name with a space.
Command Modes
Boot loader
Command History
Release 12.2(53)SE2
Usage Guidelines
Examples
01 2002 00:48:15 01 2002 04:18:48 01 2002 00:01:39 01 2002 23:11:42 01 2002 00:01:11 01 2002 01:14:05 01 2002 00:01:39 06 2002 23:22:03 bytes free)
Field 2 -rwx
Description Index number of the file. File permission, which can be any or all of the following:
1644045
A-8
OL-21522-02
Appendix A
Table A-1
Related Commands
A-9
Appendix A flash_init
flash_init
Use the flash_init boot loader command to initialize the flash file system. flash_init
Syntax Description
Defaults
The flash file system is automatically initialized during normal system operation.
Command Modes
Boot loader
Command History
Release 12.2(53)SE2
Usage Guidelines
During the normal boot process, the flash file system is automatically initialized. Use this command to manually initialize the flash file system. For example, you use this command during the recovery procedure for a lost or forgotten password.
A-10
OL-21522-02
Appendix A
format
Use the format boot loader command to format the specified file system and destroy all data in that file system. format filesystem:
Syntax Description
filesystem:
Alias for a flash file system. Use flash: for the system board flash device.
Command Modes
Boot loader
Command History
Release 12.2(53)SE2
Usage Guidelines
Caution
Use this command with care; it destroys all data on the file system and renders your system unusable.
A-11
Appendix A fsck
fsck
Use the fsck boot loader command to check the file system for consistency. fsck [-test | -f] filesystem:
Syntax Description
-test
(Optional) Initialize the file system code and perform extra POST on flash memory. An extensive, nondestructive memory test is performed on every byte that makes up the file system. (Optional) Initialize the file system code and perform a fast file consistency check. Cyclic redundancy checks (CRCs) in the flashfs sectors are not checked. Alias for a flash file system. Use flash: for the system board flash device.
-f filesystem:
Defaults
Command Modes
Boot loader
Command History
Release 12.2(53)SE2
Usage Guidelines
To stop an in-progress file system consistency check, disconnect the switch power and then reconnect the power.
Examples
This example shows how to perform an extensive file system check on flash memory:
switch: fsck -test flash:
A-12
OL-21522-02
Appendix A
help
Use the help boot loader command to display the available commands. help
Syntax Description
Command Modes
Boot loader
Command History
Release 12.2(53)SE2
Usage Guidelines
You can also use the question mark (?) to display a list of available boot loader commands.
A-13
Appendix A memory
memory
Use the memory boot loader command to display memory heap utilization information. memory
Syntax Description
Command Modes
Boot loader
Command History
Release 12.2(53)SE2
Examples
Bottom heap utilization is 22 percent. Top heap utilization is 0 percent. Total heap utilization is 22 percent. Total bytes: 0xa9068 (692328) Bytes used: 0x26888 (157832) Bytes available: 0x827e0 (534496) Alternate heap utilization is 0 percent. Total alternate heap bytes: 0x6fd000 (7327744) Alternate heap bytes used: 0x0 (0) Alternate heap bytes available: 0x6fd000 (7327744)
Description Beginning and ending address of the text storage area. Beginning and ending address of the read-only text storage area. This part of the data segment is grouped with the Text entry. Beginning and ending address of the data segment storage area. Beginning and ending address of the block started by symbol (Bss) storage area. It is initialized to zero.
A-14
OL-21522-02
Appendix A
Table A-2
Description Beginning and ending address of the area in memory allocated to the software to store automatic variables, return addresses, and so forth. Beginning and ending address of the area in memory that memory is dynamically allocated to and freed from.
A-15
Appendix A mgmt_clr
mgmt_clr
Use the mgmt_clr boot loader command to clear the Ethernet management port statistics. mgmt_clr
Syntax Description
Command Modes
Boot loader
Command History
Release 12.2(53)SE2
Examples
This example shows how to clear the Ethernet management port statistics:
switch: mgmt_clr
A-16
OL-21522-02
Appendix A
mgmt_init
Use the mgmt_init boot loader command to initialize the Ethernet management port. mgmt_init
Syntax Description
Command Modes
Boot loader
Command History
Release 12.2(53)SE2
Usage Guidelines
Use the mgmt_init command only during debugging of the Ethernet management port.
Examples
A-17
Appendix A mgmt_show
mgmt_show
Use the mgmt_show boot loader command to display the Ethernet management port statistics. mgmt_show
Syntax Description
Command Modes
Boot loader
Command History
Release 12.2(53)SE2
Examples
This example shows how to display the Ethernet management port statistics:
switch: mgmt_show Statistics Received Transmitted --------------------------------------------------good frame bytes : 60 120 good frames : 1 2 bad frames : 0 0 dropped frames : 0 0 queue overflowed : 0 0 memory access errors : 0 0
A-18
OL-21522-02
Appendix A
mkdir
Use the mkdir boot loader command to create one or more new directories on the specified file system. mkdir filesystem:/directory-url ...
Syntax Description
filesystem: /directory-url
Alias for a flash file system. Use flash: for the system board flash device. Name of the directories to create. Separate each directory name with a space.
Command Modes
Boot loader
Command History
Release 12.2(53)SE2
Usage Guidelines
Directory names are case sensitive. Directory names are limited to 45 characters between the slashes (/); the name cannot contain control characters, spaces, deletes, slashes, quotes, semicolons, or colons.
Examples
You can verify that the directory was created by entering the dir filesystem: boot loader command.
Related Commands
Description Displays a list of files and directories on the specified file system. Removes one or more directories from the specified file system.
A-19
Appendix A more
more
Use the more boot loader command to display the contents of one or more files. more filesystem:/file-url ...
Syntax Description
filesystem: /file-url
Alias for a flash file system. Use flash: for the system board flash device. Path (directory) and name of the files to display. Separate each filename with a space.
Command Modes
Boot loader
Command History
Release 12.2(53)SE2
Usage Guidelines
Filenames and directory names are case sensitive. If you specify a list of files, the contents of each file appears sequentially.
Examples
This example shows how to display the contents of a file. An example of an image file is c3750e-universal-mz.122-53.SE2:
switch: more flash:image_file_name/info version_suffix: universal-122-xx.SEx version_directory: image_file_name image_system_type_id: 0x00000002 image_name: image_file_name.bin ios_image_file_size: 8919552 total_image_file_size: 11592192 image_feature: IP|LAYER_3|PLUS|MIN_DRAM_MEG=128 image_family: family stacking_number: 1.34 board_ids: 0x00000068 0x00000069 0x0000006a 0x0000006b info_end:
Related Commands
Description Displays the contents of one or more files. Displays the contents of one or more files.
A-20
OL-21522-02
Appendix A
rename
Use the rename boot loader command to rename a file. rename filesystem:/source-file-url filesystem:/destination-file-url
Syntax Description
Alias for a flash file system. Use flash: for the system board flash device. Original path (directory) and filename. New path (directory) and filename.
Command Modes
Boot loader
Command History
Release 12.2(53)SE2
Usage Guidelines
Filenames and directory names are case sensitive. Directory names are limited to 45 characters between the slashes (/); the name cannot contain control characters, spaces, deletes, slashes, quotes, semicolons, or colons. Filenames are limited to 45 characters; the name cannot contain control characters, spaces, deletes, slashes, quotes, semicolons, or colons.
Examples
You can verify that the file was renamed by entering the dir filesystem: boot loader command.
Related Commands
Command copy
A-21
Appendix A reset
reset
Use the reset boot loader command to perform a hard reset on the system. A hard reset is similar to power-cycling the switch, clearing the processor, registers, and memory. reset
Syntax Description
Command Modes
Boot loader
Command History
Release 12.2(53)SE2
Examples
Related Commands
Command boot
Description Loads and boots an executable image and enters the command-line interface.
A-22
OL-21522-02
Appendix A
rmdir
Use the rmdir boot loader command to remove one or more empty directories from the specified file system. rmdir filesystem:/directory-url ...
Syntax Description
filesystem: /directory-url
Alias for a flash file system. Use flash: for the system board flash device. Path (directory) and name of the empty directories to remove. Separate each directory name with a space.
Command Modes
Boot loader
Command History
Release 12.2(53)SE2
Usage Guidelines
Directory names are case sensitive and limited to 45 characters between the slashes (/); the name cannot contain control characters, spaces, deletes, slashes, quotes, semicolons, or colons. Before removing a directory, you must first delete all the files in the directory. The switch prompts you for confirmation before deleting each directory.
Examples
You can verify that the directory was deleted by entering the dir filesystem: boot loader command.
Related Commands
Description Displays a list of files and directories on the specified file system. Creates one or more new directories on the specified file system.
A-23
Appendix A set
set
Use the set boot loader command to set or display environment variables, which can be used to control the boot loader or any other software running on the switch. set variable value
Syntax Description
variable value
Use one of these keywords for variable and value: MANUAL_BOOTDecides whether the switch automatically or manually boots. 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. BOOT filesystem:/file-urlA semicolon-separated 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_BREAKDecides 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. HELPER filesystem:/file-urlA 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 promptA string that is used as the command-line prompt in boot loader mode. CONFIG_FILE flash:/file-urlThe filename that Cisco IOS uses to read and write a nonvolatile copy of the system configuration. BAUD rateThe 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-urlThe 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.
A-24
OL-21522-02
Appendix A
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). HELPER: No default value (helper files are not automatically loaded). PS1: switch: CONFIG_FILE: config.text BAUD: 9600 b/s HELPER_CONFIG_FILE: No default value (no helper configuration file is specified). SWITCH_NUMBER: 1 SWITCH_PRIORITY: 1
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 12.2(53)SE2
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.
A-25
Appendix A set
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 (=).
Examples
You can verify your setting by using the set boot loader command.
Related Commands
Command unset
A-26
OL-21522-02
Appendix A
type
Use the type boot loader command to display the contents of one or more files. type filesystem:/file-url ...
Syntax Description
filesystem: /file-url
Alias for a flash file system. Use flash: for the system board flash device. Path (directory) and name of the files to display. Separate each filename with a space.
Command Modes
Boot loader
Command History
Release 12.2(53)SE2
Usage Guidelines
Filenames and directory names are case sensitive. If you specify a list of files, the contents of each file appears sequentially.
Examples
This example shows how to display the contents of a file. An example of an image file is c3750e-universal-mz.122-53.SE2:
switch: type flash:image_file_name/info version_suffix: universal-122-xx.SEx version_directory: image_file_name image_system_type_id: 0x00000002 image_name: image_file_name.bin ios_image_file_size: 8919552 total_image_file_size: 11592192 image_feature: IP|LAYER_3|PLUS|MIN_DRAM_MEG=128 image_family: family stacking_number: 1.34 board_ids: 0x00000068 0x00000069 0x0000006a 0x0000006b info_end:
Related Commands
Description Displays the contents of one or more files. Displays the contents of one or more files.
A-27
Appendix A unset
unset
Use the unset boot loader command to reset one or more environment variables. unset variable ...
Syntax Description
variable
Use one of these keywords for variable: MANUAL_BOOTDecides whether the switch automatically or manually boots. BOOTResets 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_BREAKDecides whether the automatic boot process can be interrupted by using the Break key on the console after the flash file system has been initialized. HELPERA 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. PS1A string that is used as the command-line prompt in boot loader mode. CONFIG_FILEResets the filename that Cisco IOS uses to read and write a nonvolatile copy of the system configuration. BAUDResets 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_FILEResets 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 12.2(53)SE2
A-28
OL-21522-02
Appendix A
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:
switch: unset PS1 switch:
Related Commands
Command set
A-29
Appendix A version
version
Use the version boot loader command to display the boot loader version. version
Syntax Description
Command Modes
Boot loader
Command History
Release 12.2(53)SE2
Examples
This example shows how to display the boot loader version on a switch:
switch: version C3750-X Boot Loader (C3750-X-HBOOT-M) Version 12.2(53)SE2 Compiled Wed 21-Feb-02 14:58 by devgoyal switch:
A-30
OL-21522-02