The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This appendix describes the bootloader commands on the switch.
During normal bootloader operation, you are not presented with the bootloader command-line prompt. You gain access to the bootloader command line if the switch is set to manually boot up, 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 bootloader 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 bootup 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 bootup process only by agreeing to set the system back to the default configuration. With password recovery disabled, the user can still interrupt the bootup 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.
To access the boot loader, follow these steps:
Step 1 Press and hold the Express Setup button while the switch is powering on.
Step 2 Release the Express Setup button when the LEDs (System, Alarm, and Setup) turn red.
The LEDs turn off.
Step 3 Press and hold the Express Setup button again.
Step 4 Release the Express Setup button when the LEDs turn red again.
To load and boot up an executable image and to enter the command-line interface, use the boot bootloader command.
boot [ -post | -n | -p | flag ] filesystem:/file-url...
The switch attempts to automatically boot up 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.
|
|
---|---|
When you enter the boot command without any arguments, the switch attempts to automatically boot up 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 up the specified image.
When you set bootloader boot command options, they are executed immediately and apply only to the current bootloader session. These settings are not saved for the next bootup operation.
This example shows how to boot up 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.
|
|
---|---|
Sets the BOOT environment variable to boot a specific image when the BOOT keyword is appended to the command. |
To display the contents of one or more files, use the cat bootloader command.
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. |
|
|
---|---|
Filenames and directory names are case sensitive.
If you specify a list of files, the contents of each file appears sequentially.
This example shows how to display the contents of a backup configuration file with sample output:
|
|
---|---|
To copy a file from a source to a destination, use the copy bootloader command.
copy [ -b block-size ] filesystem :/ source-file-url filesystem :/ destination-file-url
(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. |
|
|
|
---|---|
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.
This example shows how to copy a file at the root:
You can verify that the file was copied by entering the dir filesystem : bootloader command.
|
|
---|---|
To delete one or more files from the specified file system, use the delete bootloader command.
delete 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. |
|
|
---|---|
Filenames and directory names are case sensitive.
The switch prompts you for confirmation before deleting each file.
This example shows how to delete two files:
You can verify that the files were deleted by entering the dir flash: bootloader command.
|
|
---|---|
To display a list of files and directories on the specified file system, use the dir bootloader command.
|
|
---|---|
This example shows how to display the files in flash memory:
Table 1-1 describes the fields in the display.
|
|
---|---|
|
|
---|---|
To initialize the flash file system, use the flash_init bootloader command.
The flash file system is automatically initialized during normal system operation.
|
|
---|---|
During the normal bootup 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.
To format the specified file system and destroy all data in that file system, use the format bootloader command.
Alias for a flash file system. Use flash: for the system board flash device. |
|
|
---|---|
To check the file system for consistency, use the fsck bootloader command.
fsck [ -test | -f ] filesystem :
|
|
---|---|
To stop an in-progress file system consistency check, disconnect the switch power and then reconnect the power.
This example shows how to perform an extensive file system check on flash memory:
To display the available commands, use the help bootloader command.
|
|
---|---|
You can also use the question mark (?) to display a list of available bootloader commands.
To display memory heap utilization information, use the memory bootloader command.
|
|
---|---|
This example shows how to display memory heap utilization information:
Table 1-2 describes the fields in the display.
To create one or more new directories on the specified file system, use the mkdir bootloader command.
mkdir filesystem :/ directory-url...
Alias for a flash file system. Use flash: for the system board flash device. |
|
Displays name of the directories to create. Separate each directory name with a space. |
|
|
---|---|
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.
This example shows how to make a directory called Saved_Configs:
This example shows how to make two directories:
You can verify that the directory was created by entering the dir filesystem : bootloader command.
|
|
---|---|
Displays a list of files and directories on the specified file system. |
|
Removes one or more directories from the specified file system. |
To display the contents of one or more files, use the more bootloader command.
more 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. |
|
|
---|---|
Filenames and directory names are case sensitive.
If you specify a list of files, the contents of each file appears sequentially.
This example shows how to display the contents of the configuration backup file:
|
|
---|---|
To rename a file, use the rename bootloader command.
rename filesystem :/ source-file-url filesystem :/ destination-file-url
Alias for a flash file system. Use flash: for the system board flash device. |
|
|
|
---|---|
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.
This example shows a file named config.text being renamed to config1.text :
You can verify that the file was renamed by entering the dir filesystem : bootloader command.
|
|
---|---|
To perform a hard reset on the system, use the reset bootloader command. A hard reset is similar to power-cycling the switch, clearing the processor, registers, and memory.
|
|
---|---|
This example shows how to reset the system:
|
|
---|---|
Loads and boots up an executable image and enters the command-line interface. |
To remove one or more empty directories from the specified file system, use the rmdir bootloader command.
rmdir 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. |
|
|
---|---|
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.
This example shows how to remove a directory:
You can verify that the directory was deleted by entering the dir filesystem : bootloader command.
|
|
---|---|
Displays a list of files and directories on the specified file system. |
|
Creates one or more new directories on the specified file system. |
To set or display environment variables, which can be used to control the bootloader or any other software running on the switch, use the set bootloader command.
The environment variables have these default values:
ENABLE_BREAK: No (Off or 0) (the automatic bootup process cannot be interrupted by pressing the Break key on the console).
HELPER: No default value (helper files are not automatically loaded).
HELPER_CONFIG_FILE: No default value (no helper configuration file is specified).
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.
|
|
---|---|
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.
The HELPER_CONFIG_FILE environment variable can also be set by using the boot helper-config-file filesystem :/ file-url global configuration command.
The bootloader prompt string (PS1) can be up to 120 printable characters except the equal sign (=).
This example shows how to change the bootloader prompt:
You can verify your setting by using the set bootloader command.
|
|
---|---|
Resets one or more environment variables to its previous setting. |
To display the contents of one or more files, use the type bootloader command.
type 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. |
|
|
---|---|
Filenames and directory names are case sensitive.
If you specify a list of files, the contents of each file appears sequentially.
This example shows how to display the contents of two files:
|
|
---|---|
To reset one or more environment variables, use the unset bootloader command.
|
|
---|---|
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.
The bootloader prompt string (PS1) can be up to 120 printable characters except the equal sign (=).
This example shows how to reset the prompt string to its previous setting:
|
|
---|---|
To display the bootloader version, use the version boot loader command.
|
|
---|---|
This example shows how to display the bootloader version: