07-软件升级命令
本章节下载: 07-软件升级命令 (253.88 KB)
目 录
1.1.5 display version-update-record
1.1.6 reset version-update-record
1.1.7 version auto-update enable
如果将可插拔存储介质内的软件包指定为设备下次启动时使用的软件包,重启设备时不要将可插拔存储介质从设备上拔出,否则可能导致设备无法正常启动。建议将固定存储介质中的软件包指定为设备下次启动时使用的软件包。
boot-loader file命令用来配置设备下次启动时使用的软件包。
【命令】
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 [ undecompressed ] }
【视图】
用户视图
【缺省用户角色】
network-admin
【参数】
boot:Boot包。
system:System包。
feature:Feature包。
patch:Patch包。该参数既可以指定叠加补丁也可以指定非叠加补丁。叠加补丁最多可以同时安装30个;由于每个非叠加补丁包只能为一个Boot、System和Feature包打补丁,所以非叠加补丁最多只能同时安装16个。
filename&<1-30>:软件包的名称,形如filesystemname/filename.bin。该文件必须保存在设备任一文件系统的根目录下,该参数中必须包含文件系统的名称,从存储介质名称开始最多可输入63个字符。&<1-30>表示前面的参数最多可以输入30次。有关指定文件夹和文件详细介绍请参见“基础配置指导”中的“文件系统管理”。
ipe-filename:IPE(Image Package Envelope,复合软件包套件)文件的名称,形如filesystemname/filename.ipe。该文件必须保存在设备任一文件系统的根目录下,该参数中必须包含文件系统的名称,从存储介质名称开始最多可输入63个字符。有关指定文件夹和文件详细介绍请参见“基础配置指导”中的“文件系统管理”。
all:指定系统中软件包适用的所有的硬件。
slot slot-number:表示待升级的主控板或安全插卡所在的槽位号。
backup:指定该软件包为备用启动软件包。备用启动软件包用于主用启动软件包不可用或异常情况时,引导设备启动。
main:指定该软件包为主用启动软件包。主用启动软件包用于引导设备启动。
undecompressed:表示不解压IPE包,直接将其设置为下次启动软件包。不指定该参数时,设备将立即解压IPE包并将解压出的BIN包设置为下次启动软件包。当设备存储介质上空间足够的时候,建议不要指定该参数。
【使用指导】
成功执行本命令后,系统在用命令中指定的软件包替换现有的软件包列表前会对软件包进行数字签名校验,如果软件包通过校验则会替换现有的软件包列表;如果软件包未通过校验则不会替换现有的软件包列表,并返回错误提示信息。
成功执行该命令后,系统会用命令中指定的软件包替换现有的软件包列表。如果命令行中没有指定Feature包,则更新后的软件包列表中不会有Feature包。
需要重启系统来完成指定下次启动软件包的加载。
系统会自动检查指定slot上对应路径下是否存在同名文件,如果不存在,则直接从指定路径拷贝一份并设置为下次启动软件包;如果存在,则提示用户是否从指定路径拷贝一份并设置为下次启动软件包。
【举例】
# 配置指定slot下次启动时所用的主用启动文件为flash:/all.ipe。
<Sysname> boot-loader file flash:/all.ipe slot 1 main
Verifying the file flash:/all.ipe on slot 1..............Done.
XX 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.
# 配置设备的主用下次启动软件为flash:/all.ipe。
<Sysname> boot-loader file flash:/all.ipe all main
Verifying the file flash:/all.ipe on slot 1..............Done.
XX Switch 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
# 配置指定slot下次启动时所用的主用启动文件为flash:/all.ipe,且不解压IPE包。
<Sysname> boot-loader file flash:/all.ipe slot 1 main undecompressed
Verifying the file flash:/all.ipe on slot 1..............Done.
XX images in IPE:
boot.bin
system.bin
This command will set the main startup software image. Continue? [Y/N]:Y
File flash:/all.ipe already exists on slot 1.
Overwrite the existing files? [Y/N]:Y
Copying file flash:/all.ipe to slot1#flash:/all.ipe...Done.
The image that have passed all examinations will be used as the main startup software image at the next reboot on slot 1.
# 配置设备的主用下次启动软件为flash:/all.ipe,且不解压IPE包。
<Sysname> boot-loader file flash:/all.ipe all main undecompressed
Verifying the file flash:/all.ipe on slot 1..............Done.
XX Switch images in IPE:
Boot.bin
System.bin
This command will set the main startup software images. Continue? [Y/N]:Y
The image that have passed all examinations will be used as the main startup software image at the next reboot on slot 1.
File flash:/all.ipe 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.
The image that have passed all examinations will be used as the main startup software image at the next reboot on slot 0.
【相关命令】
· display boot-loader
boot-loader update命令用来实现当前软件版本的自动同步。
【命令】
boot-loader update { all | slot slot-number }
【视图】
用户视图
【缺省用户角色】
network-admin
【参数】
all:表示同步升级所有备用主控板。
slot slot-number:表示待升级的备用主控板所在的槽位号。
【使用指导】
对于新增的主控板,可以使用本命令同步启动软件包。
通过该命令指定备用主控板的下次启动软件包时,系统会进行如下处理:
如果主用主控板当前是使用主用启动软件包列表启动的,则将其主用下次启动软件包列表中的软件包拷贝到备用主控板的对应目录下,并设置为备用主控板的主用下次启动软件包。如果这些软件包中有任一软件包不存在或者不可用,则命令执行失败。
如果主用主控板当前是使用备用启动软件包列表启动的,则将其备用下次启动软件包列表中的软件包拷贝到备用主控板的对应目录下,并设置为备用主控板的主用下次启动软件包。如果这些软件包中有任一软件包不存在或者不可用,则命令执行失败。
【举例】
# 同步指定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命令用来显示本次启动和下次启动所采用的启动软件包的名称。
【命令】
display boot-loader [ slot slot-number ]
【视图】
任意视图
【缺省用户角色】
network-admin
network-operator
【参数】
slot slot-number:表示主控板所在的槽位号。不指定该参数时,表示设备上的所有主控板。
【举例】
# 显示本次启动和下次启动所采用的启动软件包的名称。
<Sysname> display boot-loader
Software images on slot 0:
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.bin
flash:/system.bin
# 显示本次启动和下次启动所采用的启动软件包的名称。
<Sysname> display boot-loader
Software images on slot 1:
Current software images:
Image Version
flash:/boot.bin Release 0053
flash:/system.bin Release 0053
Main startup software images:
Image Version
flash:/boot.bin Release 0054
flash:/system.bin Release 0054
Backup startup software images:
Image Version
flash:/b-boot.bin --
flash:/b-system.bin --
表1-1 display boot-loader命令显示信息描述表
字段 |
描述 |
Software images |
启动软件包的相关信息 |
Current software images |
最近一次启动使用的启动软件包列表 |
Main startup software images |
主用下次启动软件包列表 |
Image |
软件包的名称 |
Version |
软件包的版本号 当软件包被损坏或删除导致无法读取到版本号,则显示为— |
Backup startup software images |
备用下次启动软件包列表 |
【相关命令】
· boot-loader file
display version命令用来显示系统版本信息。
【命令】
display version
【视图】
任意视图
【缺省用户角色】
network-admin
network-operator
【举例】
# 查看系统版本信息。
<Sysname> display version
H3C Comware Software, Version 9.1.057, ESS 9135
Copyright (c) 2004-2020 New H3C Technologies Co., Ltd. All rights reserved.
H3C MSR2600 uptime is 0 weeks, 0 days, 2 hours, 14 minutes
Last reboot reason : Cold reboot
Boot image: flash:/msr26e-cmw710-boot-e9135.bin
Boot image version: 9.1.057, ESS 9135
Compiled Jan 15 2020 16:00:00
System image: flash:/msr26e-cmw710-system-e9135.bin
System image version: 9.1.057, ESS 9135
Compiled Jan 15 2020 16:00:00
其它显示信息略……
表1-2 display version命令显示信息描述表
字段 |
描述 |
H3C Comware Software, Version 9.1.057, ESS 9135 |
表示设备使用的软件版本 |
Copyright (c) 2004-2020 New H3C Technologies Co., Ltd. All rights reserved. |
表示设备的版权申明 |
H3C MSR2600 uptime is 0 weeks, 0 days, 2 hours, 14 minutes |
表示设备的型号以及本次启动后的持续运行时间 |
Last reboot reason |
表示设备上次重启的原因,主要取值有: · User reboot:表示用户通过命令行、SNMP等方式重启设备 · Cold reboot:表示断电导致的重启 · Kernel abnormality reboot:表示内核异常导致的重启 · DeadLoop reboot:表示内核死循环导致的重启 · DEV HandShake reboot:表示设备管理握手失败导致的重启 · SlaveSwitch reboot:表示主备倒换导致的重启 · Auto Update reboot:表示版本自动升级导致的重启 · Memory exhaust reboot:表示设备内存耗尽导致的重启 · Recover GOLD-detected error:GOLD检查失败重启 · Criticalprocess abnormality reboot:设备核心进程异常重启 |
Boot image: flash:/msr26e-cmw710-boot-e9135.bin Boot image version: 9.1.057, ESS 9135 Compiled Jan 15 2020 16:00:00 |
表示设备当前运行过程中使用的Boot包以及该软件包的版本、编译时间 |
display version-update-record命令用来显示启动软件包版本更新操作的记录。
【命令】
display version-update-record
【视图】
任意视图
【缺省用户角色】
network-admin
network-operator
【使用指导】
设备启动时会记录当前使用的启动软件包版本信息,如果在运行过程中进行启动软件包版本更新操作,系统会记录该次更新的简要信息,包括升级时间和版本,以便管理员了解相关信息。设备重启这些记录也不会被删除。
【举例】
# 显示设备启动软件包版本更新操作的记录。
<Sysname> display version-update-record
Record 1 (updated on Jan 18 2020 at 06:23:54):
*Name : comware-cmw710-boot.bin
Version : 7.1.070 Test 0001
Compile time: Jan 25 2020 15:52:43
*Name : comware-cmw710-system.bin
Version : 7.1.070 Test 0001
Compile time: Jan 25 2020 15:52:43
表1-3 display version-update-record命令显示信息描述表
字段 |
描述 |
Record n (updated on Jan 18 2020 at 06:23:54) |
最近的第n次更新的UTC时间,Record 1为最新的一次更新 |
*Name |
软件包的名称。带*符号,表示软件包的版本和升级前的版本有变化;不带*符号,表示版本没有变化 |
Version |
软件包的版本号 |
Compile time |
版本编译时间 |
【相关命令】
· reset version-update-record
reset version-update-record命令用来清除启动软件包版本更新操作的记录。
【命令】
reset version-update-record
【视图】
系统视图
【缺省用户角色】
network-admin
【举例】
# 清除设备启动软件包版本更新操作的记录。
<Sysname> system-view
[Sysname] reset version-update-record
This command will delete all records of version update. Continue? [Y/N]:y
【相关命令】
· display version-update-record
version auto-update enable命令用来开启备用主控板自动加载启动软件包的功能。
undo version auto-update enable命令用来关闭备用主控板自动加载启动软件包的功能。
【命令】
version auto-update enable
undo version auto-update enable
【缺省情况】
备用主控板自动加载启动软件包的功能处于开启状态。当启动过程中,当备用主控板发现自己版本和主用主控板版本不一致时,会自动加载主用主控板的当前启动软件包。
【视图】
系统视图
【缺省用户角色】
network-admin
【使用指导】
配置undo version auto-update enable和version check ignore命令后,在设备启动过程中,如果备用主控板和主用主控板启动软件包版本不一致,备用主控板仍然使用不一致的版本启动,可能会造成设备功能问题。
备用主控板自动加载的是主用主控板当前的启动软件包。
配置version auto-update enable及undo version check ignore命令后,在设备启动过程中,当备用主控板发现自己当前启动软件包版本和主用主控板的当前启动软件包版本不一致时,会自动拷贝主用主控板的当前启动软件包列表中的所有软件包,设置为自己的主用下次启动软件包,并自动重启。这样,能够使得备用主控板启动后,和主用主控板启动软件包的版本一致。
【举例】
# 开启备用主控板自动加载启动软件包的功能。
<Sysname> system-view
[Sysname] version auto-update enable
【相关命令】
· version check ignore
version check ignore命令用来关闭对备用主控板进行启动软件包版本一致性检查功能。
undo version check ignore命令用来恢复缺省情况。
【命令】
version check ignore
undo version check ignore
【缺省情况】
对备用主控板启动软件包版本一致性检查功能处于开启状态。
【视图】
系统视图
【缺省用户角色】
network-admin
【使用指导】
如果关闭对备用主控板进行启动软件包版本一致性检查功能,当备用主控板和主用主控板启动软件包版本不一致时,备用主控板仍然使用不一致的版本启动,可能会造成设备功能问题。
如果开启对备用主控板进行启动软件包版本一致性检查功能,当备用主控板和主用主控板启动软件包版本不一致时,备用主控板会停留在启动阶段,不能正常启动。
建议用户不要关闭启动软件包版本一致性检查功能。
【举例】
# 开启对备用主控板进行版本一致性检查功能。
<Sysname> system-view
[Sysname] undo version check ignore
【相关命令】
· version auto-update enable
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!