03-Upgrading Software Commands
Chapters Download (74.52 KB)
Syntax
boot-loader file file-url slot { all | slot-number } { main | backup }
View
User view
Default Level
2: System level
Parameters
file file-url: Specifies a file name, which is a string of 1 to 63 characters. If you enter a relative path, the system automatically converts it to an absolute path. The absolute path should contain no more than 63 characters; otherwise, the command cannot be successfully executed. The file name is in the format of [drive:/]file-name, where
l The items in square brackets [ ] are optional.
l drive specifies the storage medium of the file. The value is the name of the storage medium. If a device has only one Flash, you can execute this command without providing this argument.
l file-name specifies the filename, which is usually suffixed by .bin. Suffixes vary with devices.
slot slot-number: Specifies the ID of a member device of the current IRF virtual device.
l all: Specifies a file as the boot file to be used at the next boot for all member devices of the current IRF virtual device.
l slot-number: Specifies a file as the boot file to be used at the next boot of a member device. slot-number is the member ID of the device, which you can display by using the display irf command. The value range varies with devices.
main: Specifies a file as a main boot file. A main boot file is used to boot a device.
backup: Specifies a file as a backup boot file. A backup boot file is used to boot a device only when a main boot file is unavailable.
Description
Use the boot-loader command to specify a boot file to be used at the next boot of a member device.
Note the following:
l To execute the boot-loader command successfully, you must save the file to be used at the next device boot in the root directory of the storage media on a member device.
l If the storage medium is on the master, you can specify the storage medium by giving its name, such as flash; if the storage medium is on a slave, you can specify the storage medium by giving its name and the member ID of the device, that is, in the format of slotslot-number# StorageMediumName (slot-number represents the member ID of the salve), such as slot2#flash.
l If you specify the boot file of the master, the file-url argument cannot contain the member ID of the device, and slot-number should be specified as the member ID of the master; if you specify the boot file of the slave, the file-url argument must contain the member ID (such as slot2#flash:/test.bin), and slot-number should be specified as the member ID of the slave.
l If you provide the keyword all, the file-url argument cannot contain a member ID, otherwise, the execution of this command fails; you must save the specified boot file on the storage media of all member devices in the same filename, otherwise, member devices without this file fail to be reconfigured during the reboot.
l The names of the files to be used at the next boot of the master and slaves may be different, but the versions of the files must be the same; otherwise, a slave reboots by using the master's boot file and joins the IRF virtual device again.
Related commands: display boot-loader.
Examples
# Specify the main boot file for the master (the member ID is 1) to be used at the next device boot as test.bin (Make sure that the file test.bin is already saved on the storage medium of the master; otherwise, the system prompts error and the execution of the command fails).
<Sysname> boot-loader file test.bin slot 1 main
This command will set the boot file of the specified board. Continue? [Y/N]:y
The specified file will be used as the main boot file at the next reboot on slot 1!
# Specify the main boot file for the slave (the member ID is 2) to be used at the next device boot as test.bin (Make sure that the file test.bin is already saved on the storage medium of the slave; otherwise, the system prompts error and the execution of the command fails).
<Sysname> boot-loader file slot2#flash:/test.bin slot 2 main
This command will set the boot file of the specified board. Continue? [Y/N]:y
The specified file will be used as the main boot file at the next reboot on slot 2!
# Specify the main boot file for all member devices to be used at the next device boot as test.bin (Make sure that the file test.bin is already saved on the storage media of all the member devices; otherwise, the system prompts error and the execution of the command fails).
<Sysname> boot-loader file test.bin slot all main
This command will set the boot file of the specified board. Continue? [Y/N]:y
The specified file will be used as the main boot file at the next reboot on slot 1!
The specified file will be used as the main boot file at the next reboot on slot 2!
Syntax
bootrom update file file-url slot slot-number-list
View
User view
Default Level
2: System level
Parameters
update file file-url: Upgrades Boot ROM, where file-url is a string of 1 to 63 characters and represents name of the file to be upgraded. For details about the file-url argument, see boot-loader.
slot slot-number-list: Specifies a list of IDs of member devices, in the format of { slot-number [ to slot-number ] }&<1-7>. The slot-number is the ID of a member device of the current IRF virtual device.
Description
Use the bootrom command to upgrade the Boot ROM program on specified member devices.
Note the following:
l To execute the bootrom command successfully, you must save the Boot ROM program under the root directory of the storage media on a member device.
l If the storage medium is on the master, specify the storage medium by giving its name, such as flash; If a storage medium is on a slave, specify the storage medium by giving its name and the member ID of the device, that is, in the format of slotslot-number# StorageMediumName (slot-number represents the member ID of the slave), such as slot2#flash.
l When you upgrade the Boot ROM program for the master, the file-url argument cannot contain the member ID of the device, and slot-number should be specified as the member ID of the master; when you upgrade the Boot ROM program for a slave, the file-url argument must contain the member ID (such as slot2#flash:/test.bin), slot-number should be specified as the member ID of the slave, and the subslot-number-list argument should be specified as the subslot number of the slave.
Examples
# Use the a.bin file to upgrade the Boot ROM program on the master with member ID of 1.
<Sysname> bootrom update file a.bin slot 1
This command will update bootrom file on the specified board(s), Continue? [Y/N]:y
Now updating bootrom, please wait...
# Use the a.bin file to upgrade the Boot ROM program on the slave with member ID of 2.
<Sysname> bootrom update file slot2#flash:/a.bin slot 2
This command will update bootrom file on the specified board(s), Continue? [Y/N]:y
Now updating bootrom, please wait...
Syntax
bootrom-update security-check enable
undo bootrom-update security-check enable
View
System view
Default Level
2: System level
Parameters
None
Description
Use the bootrom-update security-check enable command to enable the validity check function.
Use the undo bootrom-update security-check enable command to disable the validity check function.
By default, the validity check function is enabled at the time of upgrading the Boot ROM.
With the validity check function enabled, the device strictly checks whether the Boot ROM upgrade files are valid and can match the hardware.
Examples
# Enable the validity check function when upgrading the Boot ROM.
<Sysname> system-view
[Sysname] bootrom-update security-check enable
Syntax
display boot-loader [ slot slot-number ]
View
Any view
Default Level
2: System level
Parameters
slot slot-number: Displays boot file information about a member device. The slot-number is the ID of a member device of the current IRF virtual device.
Description
Use the display boot-loader command to display information about the boot file.
Related commands: boot-loader.
Examples
# Display the file adopted for the current and next boot of the device. (The output of this command varies with devices.)
<Sysname> display boot-loader
Slot 12
The current boot app is: flash:/test.app
The main boot app is: flash:/test.app
The backup boot app is: flash:/test.app
Table 1-1 display boot-loader command output description (centralized IRF virtual device)
Field |
Description |
Slot 1 |
The member ID of the device is 1 |
The current boot app is |
Boot file used for the device for the current device boot |
The main boot app is |
Main boot file used for the next device boot of the device |
The backup boot app is |
Backup boot file used for the next device boot of the device |
Syntax
display patch information
View
Any view
Default Level
3: Manage level
Parameters
None
Description
Use the display patch information command to display the hotfix information.
Examples
# Display hotfix information.
<Sysname> display patch information
The location of patches: flash:/
Slot Version Temporary Common Current Active Running Start-Address
----------------------------------------------------------------------
1 XXX002 0 1 1 0 0 0x4accf74
Table 1-2 display patch information command output description
Field |
Description |
The location of patches |
Patch file location. You can configure it by using the patch location command. |
Slot |
Member ID |
Version |
Patch version. The first three characters represent the suffix of the PATCH-FLAG. For example, if the PATCH-FLAG of the a card is PATCH-RPE, "RPE" is displayed. The following three digits, if any, represent the patch number. (The patch number can be read after the patch is loaded.) |
Temporary |
Number of temporary patches |
Common |
Number of common patches |
Current |
Total number of patches |
Running |
Number of patches in the RUNNING state |
Active |
Number of patches in the ACTIVE state |
Start-Address |
Starting address of the memory patch area in the memory |
Syntax
patch active patch-number slot slot-number
View
System view
Default Level
3: Manage level
Parameters
patch-number: Sequence number of a patch. The valid values of this argument depend on the patch file used.
slot slot-number: Specifies the ID of a member device of the current IRF virtual device.
Description
Use the patch active command to activate the specified patch. In other words, the system will run the patch.
After you execute the command, all the DEACTIVE patches before the specified patch number are activated.
Note that:
l The command is not applicable to patches in the DEACTIVE state.
l After a system reboot, the original ACTIVE patches change to DEACTIVE and become invalid. To make them effective, activate them again.
Examples
# Activate patch 3 and all the DEACTIVE patches before patch 3 on the device with member ID of 1.
<Sysname> system-view
[Sysname] patch active 3 slot 1
Syntax
patch deactive patch-number slot slot-number
View
System view
Default Level
3: Manage level
Parameters
patch-number: Sequence number of a patch. The valid values of this argument depend on the patch file used.
slot slot-number: Specifies the ID of a member device of the current IRF virtual device.
Description
Use the patch deactive command to stop running the specified patch and all the ACTIVE patches before the specified patch number, and the system will run at the original software version.
All the ACTIVE patches (including the specified patch) turn to DEACTIVE state.
This command is not applicable to the patches in the RUNNING state.
Examples
# Stop running patch 3 and all the ACTIVE patches before patch 3 on the device with member ID of 1.
<Sysname> system-view
[Sysname] patch deactive 3 slot 1
Syntax
patch delete patch-number slot slot-number
View
System view
Default Level
3: Manage level
Parameters
patch-number: Sequence number of a patch. The valid values of this argument depend on the patch file used.
slot slot-number: Specifies the ID of a member device of the current IRF virtual device.
Description
Use the patch delete command to delete the specified patch and all the patches before the specified patch number.
This command only removes the patches from the memory patch area, and does not delete them from the storage medium. The patches are in the IDLE state after execution of this command.
Examples
# Delete patch 3 and all the patches before patch 3 on the device with member ID 1.
<Sysname> system-view
[Sysname] patch delete 3 slot 1
Syntax
patch install patch-location
undo patch install
View
System view
Default Level
3: Manage level
Parameters
patch-location: A string of 1 to 64 characters. It specifies the directory where the patch file locates. It can be a root directory of a storage medium or be in the format of "root directory + patch file name"..
Description
Use the patch install command to install all the patches in one step.
Use the undo patch install to remove the patches.
After you execute the patch install command, a message "Do you want to continue running patches after reboot? [Y/N]:" is displayed.
l Entering y or Y: All the specified patches are installed, and turn to the RUNNING state from IDLE. This equals execution of the commands patch location, patch load, patch active, and patch run. The patches remain RUNNING after system reboot.
l Entering n or N: All the specified patches are installed and turn to the ACTIVE state from IDLE. This equals execution of the commands patch location, patch load and patch active. The patches turn to the DEACTIVE state after system reboot.
Note that:
l Before executing the command, save the patch files to root directories of the member devices' storage media.
l The patch install command changes the patch file location specified with the patch location command to the directory specified by the patch-file argument of the patch install command. For example, if you execute the patch location xxx command and then the patch install yyy command, the patch file location automatically changes from xxx to yyy.
Examples
# Install the patches located on the flash.
<Sysname> system-view
[Sysname] patch-install flash:
Patches will be installed. Continue? [Y/N]:y
Do you want to run patches after reboot? [Y/N]:y
Installing patches…
Installation completed, and patches will continue to run after reboot.
[Sysname]
Syntax
patch load slot slot-number
View
System view
Default Level
3: Manage level
Parameters
slot slot-number: Specifies the ID of a member device of the current IRF virtual device.
Description
Use the patch load command to load the patch file on the storage medium to the memory patch area.
If the device is mounted with multiple storage media, the system loads the patch file from the flash by default.
Before using the command, save the patch files to the root directories of the member devices' storage media.
Examples
# Load the patch file for the device with member ID of 1.
<Sysname> system-view
[Sysname] patch load slot 1
Syntax
patch location patch-location
View
System view
Default Level
3: Manage level
Parameters
patch-location: Specifies the patch file location. It is a string of 1 to 64 characters.
Description
Use the patch location command to configure the patch file location.
By default, the patch file location is flash:.
Note that the patch install command changes the patch file location specified with the patch location command to the directory specified by the patch-location argument of the patch install command. For example, if you execute the patch location xxx command and then the patch install yyy command, the patch file location automatically changes from xxx to yyy.
Examples
# Configure the root directory of the Flash as the patch file location.
<Sysname> system-view
[Sysname] patch location flash:
Syntax
patch run patch-number [ slot slot-number ]
View
System view
Default Level
3: Manage level
Parameters
patch-number: Sequence number of a patch. The valid values of this argument depend on the patch file used.
slot slot-number: Specifies the ID of a member device of the current IRF virtual device.
Description
Use the patch run command to confirm the running of the specified patch and all the ACTIVE patches before the specified patch number.
With the slot keyword specified, the command confirms the running state of all the qualified patches on a member device, including patches on the OAM CPU. If the keyword is not specified, the command confirms the running state of the qualified patches on all member devices.
This command is applicable to patches in the ACTIVE state only.
If the running of a patch is confirmed, after the system reboots, the patch will still be effective.
Examples
# Confirm the running of patch 3 and all the ACTIVE patches before patch 3 on the device with member ID 1.
<Sysname> system-view
[Sysname] patch run 3 slot 1