The switches covered in this guide feature two flash memory locations for storing switch software image files:
With the Primary/Secondary flash option you can test a new image in your system without having to replace a previously existing image. You can also use the image options for troubleshooting. For example, you can copy a problem image into Secondary flash for later analysis and place another, proven image in Primary flash to run your system. The switch can use only one image at a time.
The following tasks involve primary/secondary flash options:
Use the commands in this section to:
Viewing the currently active flash image version. This command identifies the software version on which the switch is currently running, and whether the active version was booted from the primary or secondary flash image.
Syntax
For example, if the switch is using a software version of K.12.XX stored in Primary flash, show version
produces the following:
The identity of the current flash image
1 2 3 4 5 6 7 |
HP Switch(config)# show version Image stamp: /su/code/build/info(s01) Dec 01 2006 10:50:26 K.12.XX 1223 Boot Image: Primary |
Determining whether the flash images are different versions. If the flash image sizes in primary and secondary are the same, then in almost every case, the primary and secondary images are identical. This command provides a comparison of flash image sizes, plus the boot ROM version and from which flash image the switch booted. For example, in the following case, the images are different versions of the switch software, and the switch is running on the version stored in the secondary flash image:
Different flash image versions
1 2 3 4 5 6 7 8 |
HP Switch(config)# show flash Image Size(Bytes) Date Version ----- ---------- -------- ------------- Primary Image : 7493854 03/21/10 K.15.01.0001 Secondary Image : 7463821 03/23/10 K.15.01.0001 Boot Rom Version: K.15.08 Default Boot : Primary |
Determining which flash image versions are installed. The show version command displays which software version the switch is currently running and whether that version booted from primary or secondary flash. Thus, if the switch booted from primary flash, you will see the version number of the software version stored in primary flash, and if the switch booted from secondary flash, you will see the version number of the software version stored in secondary flash. Thus, by using show version
, then rebooting the switch from the opposite flash image and using show version
again, you can determine the version(s) of switch software in both flash sources. For example:
Determining the software version in Primary and Secondary flash
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
HP Switch(config)# show version Management Module 1: Active Image stamp: /sw/code/build/btm(ec_K_15) Aug 2 2012 09:06:58 K.15.12.001 152 Boot Image: Primary HP Switch(config)# boot system flash secondary Device will be rebooted, do you want to continue [y/n]? y . . . HP Switch(config)# show version Management Module 1: Active Image stamp: /sw/code/build/btm(ec_K_15) Aug 2 2012 09:06:58 K.15.12.001 1753 Boot Image: Secondary |
The following table shows the switch’s options for downloading a software version to flash and booting the switch from flash.
Primary/Secondary memory access
Action | Menu | CLI | Web Agent | SNMP |
---|---|---|---|---|
Download to Primary | Yes | Yes | Yes | Yes |
Download to Secondary | No | Yes | No | Yes |
Boot from Primary | Yes | Yes | Yes | Yes |
Boot from Secondary | No | Yes | No | Yes |
The different software download options involve different copy commands, plus xmodem, usb, and tftp.
Download interruptions. In most cases, if a power failure or other cause interrupts a flash image download, the switch reboots with the image previously stored in primary flash. In the unlikely event that the primary image is corrupted, as a result of an interruption, the switch will reboot from secondary flash and you can either copy the secondary image into primary or download another image to primary from an external source.
This section describes commands for erasing a software version and copying an existing software version between primary and secondary flash.
Copying a switch software image from one flash location to another. When you copy the flash image from primary to secondary or the reverse, the switch overwrites the file in the destination location with a copy of the file from the source location. This means you do not have to erase the current image at the destination location before copying in a new image.
|
|
CAUTION: Verify that there is an acceptable software version in the source flash location from which you are going to copy. Use the show flash command or, if necessary, the procedure under Displaying the current flash image data to verify an acceptable software version. Attempting to copy from a source image location that has a corrupted flash image overwrites the image in the destination flash location. In this case, the switch will not have a valid flash image in either flash location, but will continue running on a temporary flash image in RAM. Do not reboot the switch. Instead, immediately download another valid flash image to primary or secondary flash. Otherwise, if the switch is rebooted without a software image in either primary or secondary flash, the temporary flash image in RAM will be cleared and the switch will go down. To recover, see “Restoring a Flash Image” in the Management and Configuration Guide for your switch. | |
|
Syntax
For example, to copy the image in secondary flash to primary flash:
- Verify that there is a valid flash image in the secondary flash location. The following figure indicates that a software image is present in secondary flash. (If you are unsure whether the image is secondary flash is valid, try booting from it before you proceed by using
boot system flash secondary
.)
Indicating two different software versions in Primary and Secondary flash
1 2 3 4 5 6 7 8 |
HP Switch(config)# show flash Image Size (bytes) Date Version ----------------- ------------ -------- -------------------- Primary Image : 10167529 10/14/11 K.14.89 Secondary Image : 15085139 08/17/12 K.15.10.0001 Boot ROM Version : K.15.28 Default Boot : Primary |
Execute the copy command as follows:
1 |
HP Switch(config)# copy flash flash primary |
Erasing the contents of Primary or Secondary flash. This command deletes the software image file from the specified flash location.
|
|
CAUTION: No undo! Before using this command in one flash image location (primary or secondary), ensure that you have a valid software file in the other flash image location (secondary or primary). If the switch has only one flash image loaded (in either primary or secondary flash) and you erase that image, then the switch does not have a software image stored in flash. In this case, if you do not reboot or power cycle the switch, you can recover by using xmodem or tftp to download another software image. | |
|
Syntax
For example, to erase the software image in primary flash, do the following:
- First verify that a usable flash image exists in secondary flash. The most reliable way to ensure this is to reboot the switch from the flash image you want to retain. For example, if you are planning to erase the primary image, then first reboot from the secondary image to verify that the secondary image is present and acceptable for your system:
1HP Switch# boot system flash secondary
- Then erase the software image in the selected flash (in this case, primary):
- Type ‘y’ at the prompt to complete the flash erase.
- Use
show flash
to verify erasure of the selected software flash image. The “0” shows that the primary flash has been erased.
In redundant management systems, this command will erase the selected flash in both the active and the standby management modules. If redundancy has been disabled or the standby module has failed self-test, this command only affects the active management module.
Default boot source. The switch reboots from primary flash by default unless you specify the secondary flash by entering either the boot system flash [primary | secondary] or boot set-default flash [primary | secondary] command. Both the boot command and the reload command will reboot based on how these options have been selected.
Boot attempts from an empty flash location. In this case, the switch aborts the attempt and displays:
1 2 |
Image does not exist Operation aborted. |
Interaction of Primary and Secondary flash images with the current configuration. The switch has one startup-config file (see Configuration file management), which it always uses for reboots, regardless of whether the reboot is from primary or secondary flash. Also, for rebooting purposes, it is not necessary for the software image and the startup-config file to support identical software features. For example, suppose you have just downloaded a software upgrade that includes new features that are not supported in the software you used to create the current startup-config file. In this case, the software simply assigns factory-default values to the parameters controlling the new features. Similarly, If you create a startup-config file while using a version “Y” of the switch software, and then reboot the switch with an earlier software version “X” that does not include all of the features found in “Y”, the software simply ignores the parameters for any features that it does not support.
Scheduled reload. If no parameters are entered after the reload command, an immediate reboot is executed. The reload at and reload after command information is not saved across reboots. If the switch is rebooted before a scheduled reload command is executed, the command is effectively cancelled. When entering areload at or reload after command, a prompt will appear to confirm the command before it can be processed by the switch. For the reload at command, if mm/dd/yy are left blank, the current day is assumed.
The scheduled reload feature removes the requirement to physically reboot the switch at inconvenient times (for example, at 1:00 in the morning). Instead, a reload at 1:00 mm/dd command can be executed (where mm/dd is the date the switch is scheduled to reboot).
The switch offers reboot options through the boot and reload commands, plus the options inherent in a dual-flash image system. Generally, using boot provides more comprehensive self-testing; using reload gives you a faster reboot time.
Comparing the boot and reload commands
Actions | Included in Boot? | Included in Reload | Note |
---|---|---|---|
Save all configuration changes since the last boot or reload | Optional, with prompt | Optional with reload <cr>, when prompt displays. Not saved with reload at/aftercommands; No prompt is displayed. | Config changes saved to the startup-config file if “y” is selected (reload command). |
Perform all system self-tests | Yes | No | The reload command provides a faster system reboot. |
Choice of primary or secondary flash image | Yes | No—Uses the current flash image. | |
Perform a scheduled reboot | No | Yes | Use the reload command with after/at parameters (see Using reload for details). |
You can specify the default flash to boot from on the next boot by entering the boot set-default flash command.
Syntax
Boot set-default command with default flash set to Secondary (with a redundant management module present)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
HP Switch(config)# boot set-default flash secondary HP Switch(config)# show flash Image Size(Bytes) Date Version ------ ---------- ------- ------------- Primary Image : 7476770 03/15/10 K.15.01.0001 Secondary Image : 7476770 03/15/10 K.15.01.0001 Boot Rom Version: K.15.08 Default Boot : Secondary HP Switch(config)# boot This management module will now reboot from secondary and will become the standby module! You will need to use the other management module's console interface. Do you want to continue [y/n]? |
The boot command boots the switch from the flash image that you are currently booted on, or the flash image that was set either by the boot set-default command or by the last executed boot system flash <primary | secondary> command. This command also executes the complete set of subsystem self-tests. You have the option of specifying a configuration file.
Syntax
Reboots the switch from the flash that you are currently booted on (primary or secondary). You can select which image to boot from during the boot process itself. When using redundant management, the switch will failover to the standby management module.
Note: This is changed from always booting from primary flash. You are prompted with a message which will indicate the flash being booted from.
system: Boots the switch. You can specify the flash image to boot from. When using redundant management, boots both the active and standby management modules.
config: You can optionally select a configuration file from which to boot.
Boot command (default Primary flash) with redundant management
1 2 3 4 5 6 7 |
HP Switch(config)# boot This management module will now reboot from primary image and will become the standby module! You will need to use the other management module's console interface. Do you want to continue [y/n]? y Do you want to save current configuration [y/n]? n |
In the above example, typing either a ‘y’ or ‘n’ at the second prompt initiates the reboot operation. (Entering ‘y’ saves any configuration changes from the running-config file to the startup-config file; entering ‘n’ discards them.)
Boot command booting from a different flash than the current flash (with redundant management module present)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
HP Switch(config)# show flash Image Size(Bytes) Date Version Primary Image : 7497114 03/29/10 K.15.01.0001 Secondary Image : 7497114 03/29/10 K.15.01.0001 Boot Rom Version: K.15.08 Default Boot : Primary HP Switch(config)# boot set-default flash secondary This command changes the location of the default boot. This command will change the default flash image to boot from secondary. Hereafter, 'reload' 'boot' commands will boot from secondary. Do you want to continue [y/n]? y HP Switch(config)# boot This management module will now reboot from secondary image and will become the standby module! You will need to use the other management module's console interface. Do you want to continue [y/n]? n |
This version of the boot command gives you the option of specifying whether to reboot from primary or secondary flash, and is the required command for rebooting from secondary flash. This option also executes the complete set of subsystem self-tests.
Syntax
For example, to reboot the switch from secondary flash when there are no pending configuration changes in the running-config file:
Boot command with secondary flash option
1 2 |
HP Switch(config)# boot system flash secondary System will be rebooted from secondary image. Do you want to continue [y/n]? |
In the above example, typing either a [y] or [n] at the second prompt initiates the reboot operation.
Using the fastboot feature. The fastboot command allows a boot sequence that skips the internal power-on self-tests, resulting in a faster boot time. When using redundant management and fastboot is enabled, it is saved to the standby management module when the config files are synchronized. Fastboot is used during the next bootup on either management module.
Syntax
Syntax
The fastboot command is shown below.
1 |
HP Switch(config)# fastboot |
Thereload command reboots the switch from the flash image that you are currently booted on (primary or secondary) or the flash image that was set either by the boot set-default command or by the last executed boot system flash <primary | secondary> command. Because reload bypasses some subsystem self-tests, the switch reboots faster than if you use either of the boot command options. If you are using redundant management and redundancy is enabled, the switch will failover to the other management module.
Syntax
For example, if you change the number of VLANs the switch supports, you must reboot the switch in order to implement the change. Thereload command prompts you to save or discard the configuration changes.
Using reload with redundant management and pending configuration changes
1 2 3 4 5 6 7 |
HP Switch(config)# max-vlans 12 Command will take effect after saving configuration and reboot. HP Switch(config)# reload This command will cause a switchover to the other management module which may not be running the same software image and configurations. Do you want to continue [y/n]? y |
Scheduled reload. Beginning with software release K.11.34, additional parameters have been added to thereload command to allow for a scheduled reboot of the switch via the CLI.
Syntax
Enables a scheduled warm reboot of the switch. The switch boots up with the same startup config file and using the same flash image as before the reload.
|
|
CAUTION: When using redundant management, the reload at/after command causes a switchover at the scheduled time to the other management module, which may not be running the same software image or have the same configurations. | |
|
The no form of the command removes a pending reboot request.
For more details and examples, see below.
The scheduled reload feature removes the requirement to physically reboot the switch at inconvenient times (for example, at 1:00 in the morning). Instead, a reload at 1:00 mm/dd command can be executed (where mm/dd is the date the switch is scheduled to reboot).
|
|
NOTE: Configuration changes are not saved withreload at or reload after commands. No prompt to save configuration file changes is displayed. See Comparing the boot and reload commands. | |
|
Examples of scheduled reload commands:
The reload command with a redundant management system
1 2 3 4 5 6 |
HP Switch(config)# reload after 04:14:00 Reload scheduled in 4 days, 14 hours, 0 minutes This command will cause a switchover at the scheduled time to the other management module which may not be running the same software image and configurations. Do you want to continue [y/n]? |
Module reload. The module reload feature allows you to reset a module by initiating a warm reboot of a specified module or modules. This saves time over rebooting the entire switch, which can take several minutes to complete and disrupts all users on the switch. The specified module has its power turned off, and then turned on again. This causes the module to reset to a known good state and reload its software.
Syntax
[no] reload
[[after <[[DD:]HH:]MM>] | [[at HH:MM[:SS] [MM/DD[/[YY]YY]]]] | [[module<slot-id-range>
]]]
When specified with the module parameter, initiates a reload of the module in the specified slot or slots by turning the slot power off, then on again. A valid slot or range of slots must be specified. The at and after parameters are not allowed with the module option. The no version of the command is not valid with the module option.
When the reload command is executed without any parameters, an immediate switch reload occurs.
NOTE: This feature is not supported for HP One modules.
module
: Powers the module on or off, forcing a software reload of the specified module or modules.
Reloading a specified module
1 2 3 4 5 6 7 8 9 |
HP Switch(config)# reload module C The ‘reload module’ command will shutdown the specified modules. Ports on specified modules will no longer pass traffic. Any management traffic to the switch which passes through the affected modules will be interrupted (e.g. ssh, telnet, snmp). This command may take up to 2 minutes to power down all specified modules. Please check the event log for current status of module power down, power up cycle. Continue [y/n]? |
Displaying reload information. Use theshow reload command to display the reload information. This can include:
The scheduled reload at information
1 2 3 4 5 6 7 8 9 10 11 |
HP Switch(config)# reload at 23:45 Reload scheduled at 23:45:47 6/16/2012 (in 0 days, 1 hours, 41 minutes HP Switch(config)# show reload at Reload scheduled for 23:45:47 06/16/2012 (in 0 days, 1 hours, 40 minutes) HP Switch(config)# show reload after Reload scheduled for 23:45:47 6/16/2012 (in 0 days, 1 hours, 40 minutes) |