- Table of Contents
-
- 01-Fundamentals Command Reference
- 00-Preface
- 01-CLI commands
- 02-RBAC commands
- 03-Login management commands
- 04-FTP and TFTP commands
- 05-File system management commands
- 06-Configuration file management commands
- 07-Software upgrade commands
- 08-Automatic configuration commands
- 09-Target configuration management commands
- 10-ISSU commands
- Related Documents
-
Title | Size | Download |
---|---|---|
07-Software upgrade commands | 121.88 KB |
Contents
Software upgrade commands
As a best practice, store the startup images in a fixed storage medium. If you store the startup images in a hot swappable storage medium, do not remove the hot swappable storage medium during the startup process.
boot-loader file
Use boot-loader file to specify startup image files.
Syntax
boot-loader file boot filename system filename [ feature filename&<1-30> ] [ patch filename&<1-30> ] { all | slot slot-number } { backup | main }
boot-loader file ipe-filename [ patch filename&<1-30> ] { all | slot slot-number } { backup | main }
Views
User view
Predefined user roles
network-admin
Parameters
boot: Specifies a boot image file.
system: Specifies a system image file.
feature: Specifies a space-separated list of up to 30 feature image files.
patch: Specifies a space-separated list of up to 30 incremental patch image files or 16 non-incremental patch image files. Because the boot, system, and feature images each can have one non-incremental patch image file, you can specify a maximum of 16 non-incremental patch image files.
filename: Specifies a .bin file in the filesystemname/filename.bin format. The file must be stored in the root directory of a file system on the device. Excluding the file system location section (if any), the value string can have a maximum of 63 characters. For more information about specifying a file, see Fundamentals Configuration Guide.
ipe-filename: Specifies an .ipe image package file in the filesystemname/filename.ipe format. The file must be stored in the root directory of a file system on the device. Excluding the file system location section (if any), the value string can have a maximum of 63 characters. For more information about specifying a file, see Fundamentals Configuration Guide.
all: Specifies all hardware components to which the specified images apply.
slot slot-number: Specifies the slot number of an MPU.
backup: Specifies the files as backup startup image files. Backup images are used only when main images are not available.
main: Specifies the files as main startup image files. The device always first attempts to start up with main startup files.
Usage guidelines
Application scenarios
When the current software cannot meet the requirements of network operation or user services, you can use this command to upgrade the software to optimize device performance to meet the requirements.
Operating mechanism
The boot-loader file command overwrites the entire startup image list. To add new startup feature images, specify all feature image files in the old startup image list, including feature image files. The new startup image list will contain only the feature image files that are specified in the command.
If the upgrade images are not found in the file system on the slot specified to upgrade, the system automatically copies the images to that file system. The destination directory is the root directory of the file system. If the destination root directory already contains a startup image with the same name as an upgrade image, you must choose whether to overwrite the image.
Restrictions and guidelines
The system will verify the digital signature of the specified images before it updates the startup image list with the specified images. If the digital signature verification fails, the system will not update the startup image list and you will receive a digital signature verification failure message.
To load the specified startup software images, you must reboot the system.
Examples
# Specify flash:/all.ipe as the main startup image file for slot 1.
<Sysname> boot-loader file flash:/all.ipe slot 1 main
Verifying the file flash:/all.ipe on slot 1..............Done.
H3C MSR5680-X3 images in IPE:
boot.bin
system.bin
This command will set the main startup software images. Continue? [Y/N]:Y
Add images to slot 1.
File flash:/boot.bin already exists on slot 1.
File flash:/system.bin already exists on slot 1.
Overwrite the existing files? [Y/N]:Y
Decompressing file boot.bin to flash:/boot.bin........................Done.
Decompressing file system.bin to flash:/system.bin...............................Done.
Verifying the file flash:/boot.bin on slot 1...Done.
Verifying the file flash:/system.bin on slot 1.............Done.
The images that have passed all examinations will be used as the main startup software images at the next reboot on slot 1.
# Specify flash:/all.ipe as the main startup image file.
<Sysname> boot-loader file flash:/all.ipe all main
Verifying the file flash:/all.ipe on slot 1..............Done.
H3C MSR5680-X3 images in IPE:
boot.bin
system.bin
This command will set the main startup software images. Continue? [Y/N]:y
Add images to slot 1.
File flash:/boot.bin already exists on slot 1.
File flash:/system.bin already exists on slot 1.
Overwrite the existing files? [Y/N]:y
Decompressing file boot.bin to flash:/boot.bin........................Done.
Decompressing file system.bin to flash:/system.bin...............................Done.
Verifying the file flash:/boot.bin on slot 1...Done.
Verifying the file flash:/system.bin on slot 1.............Done.
The images that have passed all examinations will be used as the main startup software images at the next reboot on slot 1.
File flash:/boot.bin already exists on slot 0.
Do you want to overwrite the file?
Y: Overwrite the file.
N: Not overwrite the file.
A: From now on, overwrite or not overwrite without prompt.
Please make a choice. [Y/N/A]:a
What type of overwrite operation do you want to perform?
Y: Overwrite without prompt.
N: Not overwrite or display prompt.
Q: Return to the previous step.
Please make a choice. [Y/N/Q]:y
An existing file will be overwritten without prompt if it has the same name as any upgrade file.
Loading......................Done.
Loading......................Done.
The images that have passed all examinations will be used as the main startup software images at the next reboot on slot 0.
Decompression completed.
Do you want to delete flash:/all.ipe now? [Y/N]:n
Related commands
display boot-loader
boot-loader update
Use boot-loader update to synchronize startup images.
Syntax
boot-loader update { all || slot slot-number}
Views
User view
Predefined user roles
network-admin
Parameters
all: Synchronizes startup images from the active MPU to the standby MPU.
slot slot-number: Specifies the slot number of the standby MPU.
Usage guidelines
Application scenarios
You can use this command to synchronize startup images after adding new MPUs.
Operating mechanism
The images used for synchronization are in the main or backup startup software images list instead of the current software images list (see the display boot-loader command).
· The main images list is used if the active MPU started up with the main startup images.
· The backup image list is used if the active MPU started up with the backup startup images.
The startup images synchronized to a standby MPU are set as main startup images, regardless of whether the source startup images are main or backup.
Restrictions and guidelines
If a patch has been installed, use the install commit command to update the main startup images on the active MPU (in standalone mode) or global active MPU (in IRF mode) before software synchronization. This command ensures startup image consistency between the active MPU or (in standalone mode) or global active MPU (in IRF mode) and standby MPUs.
Startup image synchronization fails if any software image being synchronized is not available or is corrupted.
Examples
# Synchronize startup images to a slot.
<Sysname> boot-loader update slot 2
This command will update the specified standby MPU. Continue? [Y/N]:y
Updating. Please wait...
Verifying the file flash:/boot.bin on slot 1...Done.
Verifying the file flash:/system.bin on slot 1....Done.
Copying main startup software images to slot 2. Please wait...
Done.
Setting copied images as main startup software images for slot 2...
The images that have passed all examinations will be used as the main startup software images at the next reboot on slot 2.
Done.
Successfully updated the startup software images of slot 2.
display boot-loader
display boot-loader
Use display boot-loader to display current software images and startup software images.
Syntax
display boot-loader [ slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
slot slot-number: Specifies the slot number of an MPU. If you do not specify an MPU, this command displays the software images on each MPU.
Examples
# Display the current software images and startup software images.
<Sysname> display boot-loader
Software images on slot 1:
Current software images:
flash:/boot.bin
flash:/system.bin
Main startup software images:
flash:/boot.bin
flash:/system.bin
Backup startup software images:
flash:/boot_backup.bin
flash:/system_backup.bin
Table 1 Command output
Field |
Description |
Current software images |
Comware images that have been loaded. |
Main startup software images |
Primary Comware images for the next startup. |
Backup startup software images |
Backup Comware images for the next startup. |
Related commands
boot-loader file
display version
Use display version to display system version information.
Syntax
display version
Views
Any view
Predefined user roles
network-admin
network-operator
Examples
# Display system version information.
<Sysname> display version
H3C Comware Software, Version 9.1.063, ESS 9141L09
Copyright (c) 2004-2024 New H3C Technologies Co., Ltd. All rights reserved.
H3C MSR5680-X3 uptime is 0 weeks, 3 days, 4 hours, 22 minutes
Last reboot reason : Power on
Boot image: flash:/msr56x3msu2xx-cmw910-boot-e9141l09.bin
Boot image version: 9.1.063, ESS 9141L09
Compiled Apr 15 2024 14:00:00, DEBUG SOFTWARE
System image: flash:/msr56x3msu2xx-cmw910-system-e9141l09.bin
System image version: 9.1.063, ESS 9141L09
Compiled Apr 15 2024 14:00:00
…
Table 2 Command output
Field |
Description |
Last reboot reason |
Reason for the last reboot: · User reboot—The reboot was manually initiated from a user interface, such as the CLI or SNMP. · Cold reboot—The reboot was caused by a power cycle. · Kernel abnormality reboot—The reboot was caused by kernel exceptions. · DeadLoop reboot—The reboot was caused by a kernel thread dead loop. · DEV HandShake reboot—The reboot was caused by a device management handshake failure. · SlaveSwitch reboot—The reboot was caused by a master/subordinate switchover. · IRF Merge reboot—The reboot was caused by an IRF merge. · Auto Update reboot—The reboot was caused by an automatic software upgrade. · Memory exhaust reboot—The reboot was caused by a card-memory-exhausted event. · Recover GOLD-detected error—The reboot was caused by a failed GOLD test. · Critical process abnormality reboot—The reboot was caused by core process abnormality. |
display version-update-record
Use display version-update-record to display startup software image upgrade records.
Syntax
display version-update-record
Views
Any view
Predefined user roles
network-admin
network-operator
Usage guidelines
The device records its current startup software version information whenever it starts up, and records all software version update information. Such information can survive reboots.
Examples
# Display the startup software image upgrade records.
Record 1 (updated on Jan 18 2020 at 06:23:54):
*Name : comware-cmw910-boot.bin
Version : 7.1.070 Test 0001
Compile time: Jan 25 2020 15:52:43
*Name : comware-cmw910-system.bin
Version : 7.1.070 Test 0001
Compile time: Jan 25 2020 15:52:43
Field |
Description |
Record n (updated on Jan 18 2020 at 06:23:54) |
Number of the startup software image upgrade record. Record 1 is the most recent record. The time in parentheses is UTC time. |
Name |
Software image file name. |
* |
The software image version changed during the upgrade. |
Related commands
reset version-update-record
reset version-update-record
Use reset version-update-record to clear startup software image upgrade records.
Syntax
reset version-update-record
Views
System view
Predefined user roles
network-admin
Examples
# Clear the startup software image upgrade records.
<Sysname> system-view
[Sysname] reset version-update-record
This command will delete all records of version update. Continue? [Y/N]:y
Related commands
display version-update-record
version auto-update enable
Use version auto-update enable to enable software synchronization from active MPU to standby MPU at startup.
Use undo version auto-update enable to disable this feature.
Syntax
version auto-update enable
undo version auto-update enable
Default
Software synchronization from active MPU to standby MPU is enabled. If software inconsistency is detected at startup, the standby MPU loads the current software images of the active MPU.
Views
System view
Predefined user roles
network-admin
Usage guidelines
Operating mechanism
To make sure the standby MPU always runs the same software images as the active MPU, configure both the version auto-update enable command and the undo version check ignore command.
The startup software version check feature examines the standby MPU's startup software images for version inconsistency with the active MPU's current software images at startup. If their software versions are different, the standby MPU copies the current software images of the active MPU, specifies them as main startup software images, and reboots with these images.
Restrictions and guidelines
Use the undo version auto-update enable and version check ignore commands with caution. Configured with these two commands, the system will not examine the standby MPU's startup software images for version inconsistency with the active MPU's current software images. The standby MPU can start up with a different software version than the active MPU. This might cause the device to malfunction.
To ensure a successful synchronization in a multiuser environment, make sure no one reboots or swaps MPUs during the software synchronization process. You can configure the information center to output the synchronization status to configuration terminals (see Network Management and Monitoring Configuration Guide).
Examples
# Enable software auto-update for the standby MPU.
<Sysname> system-view
[Sysname] version auto-update enable
Related commands
version check ignore
version check ignore
Use version check ignore to disable startup software version check for inconsistency when the standby MPU starts up.
Use undo version check ignore to enable this feature.
Syntax
version check ignore
undo version check ignore
Default
The startup software images on the standby MPU are checked for version inconsistency with the current software images on the active MPU.
Views
System view
Predefined user roles
network-admin
Usage guidelines
Operating mechanism
When the standby MPU starts up, this command disables the system to examine the standby MPU's startup software images for version inconsistency with the active MPU's current software images. The standby MPU can start up with a different software version than the active MPU.
If you enable startup software version check on standby MPU at startup, the system will prevent the standby MPU from starting up with a different software version than the active MPU.
Restrictions and guidelines
To avoid anomalies, do not disable startup software version check unless for software upgrade. The device might malfunction if the standby MPU starts up with a different software version than the active MPU.
To make sure the standby MPU always runs the same software images as the active MPU, use both the version auto-update enable command and the undo version check ignore command.
Examples
# Enable startup software version check on the standby MPU at startup.
<Sysname> system-view
[Sysname] undo version check ignore
Related commands
version auto-update enable