06-软件升级命令
本章节下载: 06-软件升级命令 (122.38 KB)
【命令】
分布式设备:
boot-loader file file-url slot slot-number { main | backup }
分布式IRF设备:
boot-loader file file-url chassis chassis-number slot slot-number { main | backup }
【视图】
用户视图
【缺省级别】
3:管理级
【参数】
file file-url:文件名,为1~63个字符的字符串,如果用户输入的是相对路径,则执行命令时系统会自动将相对路径转换为绝对路径,同时要求绝对路径最多不能超过63个字符,否则,命令执行失败。格式为[drive:/]file-name,其中,
l [ ]表示该参数可选。
l drive用来指定文件在设备的哪个存储介质上,取值为存储介质的名称。如果设备上只有一个存储介质,可以不用输入该参数。
l file-name表示文件的名称,一般以.app或.bin作为后缀名,不同型号的设备支持的后缀名不同,请以设备的实际情况为准。
slot slot-number:表示单板所在的槽位号。(分布式设备)
chassis chassis-number slot slot-number:用来设置指定成员设备上指定单板的下次启动文件为指定文件。chassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。(分布式IRF设备)
main:指定该文件为主用启动文件。主用启动文件用于引导、启动设备。
backup:指定该文件为备用启动文件。备用启动文件只用于异常情况下,当主用启动文件不可用时,引导、启动设备。
【描述】
(1) 分布式设备
boot-loader命令用来指定主用主控板或者备用主控板的下次启动文件。
需要注意的是:
l 必须先将下次启动文件保存到相应主控板存储介质的根目录下,boot-loader命令才能执行成功。
l 主用主控板上的存储介质直接用存储介质的名称表示,比如flash;备用主控板的存储介质需要使用slotslot-number#存储介质的名称(slot-number表示备用主控板所在的槽位号),比如slot1#flash。
l 设置主用主控板的下次启动文件时,file-url参数不能携带槽位号,slot-number为主用主控板所在的槽位号;设置备用主控板的下次启动文件时,file-url参数需要携带备用主控板所在的槽位号(形如slot1#flash:/test.bin),slot-number为备用主控板所在的槽位号。
l 主用主控板和备用主控板的下次启动文件名称可以不同,但是版本必须一致,否则,可能会导致设备不能正常启动。
相关配置可参考命令display boot-loader。
(2) 分布式IRF设备
boot-loader命令用来指定IRF中某个主控板的下次启动文件。
需要注意的是:
l 必须先将下次启动文件保存到相应成员设备某个主控板存储介质的根目录下,boot-loader命令才能执行成功。
l 全局主用主控板(Master设备的主用主控板)的存储介质直接用存储介质的名称表示,比如flash;全局备用主控板(IRF中全局主用主控板外的其它主控板)的存储介质需要使用chassischassis-number#slotslot-number#存储介质的名称,比如chassis2#slot1#flash。
l 设置全局主用主控板的下次启动文件时,file-url参数不能携带成员编号和单板编号,chassis-number参数指定为Master设备的成员编号,slot-number参数指定为全局主用主控板所在的槽位号;设置全局备用主控板的下次启动文件时,file-url参数必须携带该主控板所在设备的成员编号和单板的槽位号(形如chassis3#slot1#flash:/test.bin),chassis-number和slot-number指定为设备的成员编号和单板所在的槽位号。
l 全局主用主控板和全局备用主控板的下次启动文件名称可以不同,但是版本最好一致,否则,可能会导致备用主控板不能加入IRF。
相关配置可参考命令display boot-loader。
【举例】
# 指定主用主控板(所在槽位为0)的主用下次启动文件为test.bin(请先保证test.bin已经存储在主用主控板的存储介质中,否则系统会提示错误,命令执行失败)。(分布式设备)
<Sysname> boot-loader file test.bin slot 0 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 0!
# 指定备用主控板(所在槽位为1)的主用下次启动文件为test.bin(请先保证test.bin已经存储在备用主控板的存储介质中,否则系统会提示错误,命令执行失败)。(分布式设备)
<Sysname> boot-loader file slot1#flash:/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!
# 指定全局主用主控板(所在设备的成员编号为1,槽位号为0)的主用下次启动文件为test.bin(请先保证test.bin已经存储在该单板的存储介质中,否则系统会提示错误,命令执行失败)。(分布式IRF设备)
<Sysname> boot-loader file test.bin chassis 1 slot 0 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 chassis 1 slot 0!
# 指定全局备用主控板(所在设备的成员编号为1,槽位号为1)的主用下次启动文件为test.bin(请先保证test.bin已经存储在该单板的存储介质中,否则系统会提示错误,命令执行失败)。(分布式IRF设备)
<Sysname> boot-loader file chassis1#slot1#flash:/test.bin chassis 1 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 chassis 1 slot 1!
【命令】
分布式设备:
bootrom { backup | read | restore | update file file-url } slot slot-number-list [ all | part ]
分布式IRF设备:
bootrom { backup | read | restore | update file file-url } chassis chassis-number slot slot-number-list [ all | part ]
【视图】
用户视图
【缺省级别】
3:管理级
【参数】
read:读取BootWare,即将BootWare程序从BootWare存储器的Normal区读取到Flash中以作备份。当BootWare存储器损坏,可以重新运行Flash上的BootWare文件来恢复BootWare。
restore:恢复BootWare,即将BootWare代码从BootWare存储器的Backup区恢复到Normal区。如果当前的BootWare被损坏,并且在损坏前备份了BootWare,可以用restore操作来恢复BootWare。backup:备份BootWare,即将BootWare代码从BootWare存储器的Normal区备份到Backup区,以便Normal区损坏时,可以从Backup区恢复BootWare程序。建议在升级BootWare前备份BootWare。
update file file-url:升级BootWare,file-url表示用于升级的文件名,为1~63个字符的字符串。
slot slot-number-list:单板的槽位号列表,表示多个单板。表示方式为slot-number-list = { slot-number [ to slot-number ] }&<1-7>。其中,slot-number表示需要升级的单板所在的槽位号。&<1-7>表示前面的参数最多可以输入7次。(分布式设备)
chassis chassis-number:表示需要升级的设备在IRF中的成员编号。不指定该参数时,表示所有成员设备。(分布式IRF设备)
slot slot-number-list:单板的槽位号列表,表示多个单板。表示方式为slot-number-list = { slot-number [ to slot-number ] }&<1-7>。其中,slot-number表示需要升级的单板所在的槽位号。&<1-7>表示前面的参数最多可以输入7次。(分布式IRF设备)
all:操作BootWare的全部内容。不指定all和part参数时,默认使用all。
part:只操作BootWare的扩展内容(BootWare分两部分:常规部分和扩展部分,常规部分提供BootWare的基本操作项,扩展部分提供更多的BootWare操作项)。不指定all和part参数时,默认使用all。
【描述】
(1) 分布式设备
bootrom命令用来读取、恢复、备份或升级指定单板的BootWare程序。
需要注意的是:
l 如果升级主控板,需要先将对应的BootWare程序保存到该主控板存储介质的根目录下;如果升级业务板或者网板,需要先将对应的BootWare程序保存到主用主控板存储介质的根目录下。
l 升级主用主控板、业务板或者网板的BootWare程序时,file-url参数不能携带槽位号;升级备用主控板的BootWare程序时,file-url参数需要携带该板的槽位号(形如slot1#flash:/test.btw)。
l 设备上各单板的BootWare程序名称可以不同,但是版本必须兼容(是否兼容请查看BootWare版本说明书),否则,可能会导致单板不能正常启动。
(2) 分布式IRF设备
bootrom命令用来读取、恢复、备份或升级指定成员设备上指定单板的BootWare程序。
需要注意的是:
l 如果升级主控板,需要先将对应的BootWare程序保存到该主控板存储介质的根目录下;如果升级业务板或者网板,需要先将对应的BootWare程序保存到业务板或者网板所在成员设备的主用主控板存储介质的根目录下。
l 升级全局主用主控板以及Master上业务板或者网板的BootWare程序时,file-url参数不能携带成员编号和单板的槽位号;升级IRF中其它主控板的BootWare程序时, file-url参数必须携带该主控板所在设备的成员编号以及主控板所在的槽位号(形如chassis3#slot1#flash:/test.btw);升级IRF中其它业务板或者网板的BootWare程序时,file-url参数必须携带该单板所在设备的成员编号以及单板所在的槽位号(形如chassis3#slot5#flash:/test.btw)。
【举例】
# 使用a.btw文件升级主用主控板(所在槽位号为0)的BootWare程序(本命令的显示信息请以设备的实际情况为准)。(分布式设备)
<Sysname> bootrom update file a.btw slot 0
This command will update bootrom file on the specified board(s), Continue? [Y/N]:y
Now updating bootrom, please wait...
Start accessing bootflash chip...
Attention:don't power down device, don't execute restart command such as slave
switchover!!!
Bootrom update succeeded in slot 0.
# 使用a.btw文件升级备用主控板(所在槽位号为1)的BootWare程序(本命令的显示信息请以设备的实际情况为准)。(分布式设备)
<Sysname> bootrom update file slot1#flash:/a.btw slot 1
This command will update bootrom file on the specified board(s), Continue? [Y/N]:y
Now updating bootrom, please wait...
Start accessing bootflash chip...
Attention:don't power down device, don't execute restart command such as slave
switchover!!!
Bootrom update succeeded in slot 1.
# 使用a.btw文件升级全局主用主控板(所在设备的成员编号为1,槽位号为0)的BootWare程序。(本命令的显示信息请以设备的实际情况为准)(分布式IRF设备)
<Sysname> bootrom update file a.btw chassis 1 slot 0
This command will update bootrom file on the specified board(s), Continue? [Y/N]:y
Now updating bootrom, please wait...
Start accessing bootflash chip...
Attention:don't power down device, don't execute restart command such as slave
switchover!!!
Bootrom update succeeded in slot 0.
# 使用a.btw文件升级Master上业务板(所在设备的成员编号为1,槽位号为3)的BootWare程序。(本命令的显示信息请以设备的实际情况为准)(分布式IRF设备)
<Sysname> bootrom update file a.btw chassis 1 slot 3
This command will update bootrom file on the specified board(s), Continue? [Y/N]:y
Now updating bootrom, please wait...
Start accessing bootflash chip...
Bootrom update succeed in chassis 1 slot 3.
# 使用a.btw文件升级全局备用主控板(所在设备的成员编号为1,槽位号为1)的BootWare程序(本命令的显示信息请以设备的实际情况为准)。(分布式IRF设备)
<Sysname> bootrom update file chassis1#slot1#flash:/a.btw chassis 1 slot 1
This command will update bootrom file on the specified board(s), Continue? [Y/N]:y
Now updating bootrom, please wait...
Start accessing bootflash chip...
Bootrom update succeed in chassis 1 slot 1.
# 使用a.btw文件升级Slave设备业务板(所在设备的成员编号为2,槽位号为5)的BootWare程序(本命令的显示信息请以设备的实际情况为准)。(分布式IRF设备)
<Sysname> bootrom update file chassis2#slot0#flash:/a.btw chassis 2 slot 5
This command will update bootrom file on the specified board(s), Continue? [Y/N]:y
Now updating bootrom, please wait...
Start accessing bootflash chip...
Bootrom update succeed in chassis 2 slot 5.
【命令】
分布式设备:
display boot-loader [ slot slot-number ] [ | { begin | exclude | include } regular-expression ]
分布式IRF设备:
display boot-loader [ chassis chassis-number [ slot slot-number ] ] [ | { begin | exclude | include } regular-expression ]
【视图】
任意视图
【缺省级别】
2:系统级
【参数】
slot slot-number:显示指定单板的启动文件的信息。slot-number表示单板所在的槽位号。(分布式设备)
chassis chassis-number:显示指定成员设备的启动文件的信息。chassis-number表示设备在IRF中的成员编号。不使用该参数时,表示所有成员设备。(分布式IRF设备)
slot slot-number:显示指定单板的启动文件的信息。slot-number表示单板所在的槽位号。不使用该参数时,表示该成员设备的所有主控板。(分布式IRF设备)
|:使用正则表达式对显示信息进行过滤。有关正则表达式的详细介绍,请参见“基础配置指导”中的“CLI”。
begin:从包含指定正则表达式的行开始显示。
exclude:只显示不包含指定正则表达式的行。
include:只显示包含指定正则表达式的行。
regular-expression:表示正则表达式,为1~256个字符的字符串,区分大小写。
【描述】
display boot-loader命令用来显示启动文件信息。
相关配置可参考命令boot-loader。
【举例】
# 显示本次启动和下次启动所采用的启动文件(本命令的显示信息请以设备的实际情况为准)。(分布式设备)
<Sysname> display boot-loader
The primary app to boot of board 0 at this time is: flash:/test.bin
The primary app to boot of board 0 at next time is: flash:/test.bin
The slave app to boot of board 0 at next time is: flash:/test.bin
The primary app to boot of board 1 at this time is: flash:/test.bin
The primary app to boot of board 1 at next time is: flash:/test.bin
The slave app to boot of board 1 at next time is: flash:/test.bin
表1-1 display boot-loader命令显示信息描述表(分布式设备)
字段 |
描述 |
The primary app to boot of board slot-number at this time is |
单板(slot-number表示单板所在的槽位号)本次启动时使用的启动文件 |
The primary app to boot of board slot-number at next time is |
单板(slot-number表示单板所在的槽位号)下次启动时使用的主用启动文件 |
The slave app to boot of board slot-number at next time is |
单板(slot-number表示单板所在的槽位号)下次启动时使用的备用启动文件 |
# 显示本次启动和下次启动所采用的启动文件(本命令的显示信息请以设备的实际情况为准)。(分布式IRF设备)
<Sysname> display boot-loader
The primary app to boot of chassis 1 board 0 at this time is: flash:/test.bin
The primary app to boot of chassis 1 board 0 at next time is: flash:/test.bin
The slave app to boot of chassis 1 board 0 at next time is: flash:/test.bin
The primary app to boot of chassis 2 board 0 at this time is: flash:/test.bin
The primary app to boot of chassis 2 board 0 at next time is: flash:/test.bin
The slave app to boot of chassis 2 board 0 at next time is: flash:/test.bin
表1-2 display boot-loader命令显示信息描述表(分布式IRF设备)
字段 |
描述 |
The primary app to boot of chassis 1 board 0 at this time is |
成员设备1上的0号单板本次启动时使用的启动文件 |
The primary app to boot of chassis 1 board 0 at next time is |
成员设备1上的0号单板下次启动时使用的主用启动文件 |
The slave app to boot of chassis 1 board 0 at next time is |
成员设备1上的0号单板下次启动时使用的备用启动文件 |
【命令】
display patch [ | { begin | exclude | include } regular-expression ]
【视图】
任意视图
【缺省级别】
3:管理级
【参数】
|:使用正则表达式对显示信息进行过滤。有关正则表达式的详细介绍,请参见“基础配置指导”中的“CLI”。
begin:从包含指定正则表达式的行开始显示。
exclude:只显示不包含指定正则表达式的行。
include:只显示包含指定正则表达式的行。
regular-expression:表示正则表达式,为1~256个字符的字符串,区分大小写。
【描述】
display patch命令用来显示当前安装的补丁包文件及其版本。
【举例】
# 显示当前安装的补丁文件和补丁包版本(本命令的显示信息请以设备的实际情况为准)。(分布式设备)
<Sysname> display patch
The following patch packages are loaded:
flash:/S10500R1120Patch001.bin, Package-Version-001, loaded on slot(s):
0, 1, 2, 3, 4, 5,
# 显示当前安装的补丁文件和补丁包版本(本命令的显示信息请以设备的实际情况为准)。(分布式IRF设备)
<Sysname> display patch
The following patch packages are loaded:
flash:/S10500R1120Patch001.bin, Package-Version-001, loaded on slot(s):
Chassis 1, slot(s): 0
表1-3 display patch命令显示信息描述表
字段 |
描述 |
flash:/ S10500R1120Patch001.bin |
安装的补丁包文件的路径 |
Package-Version-001 |
补丁包的版本 |
loaded on slot(s): |
加载补丁的设备单板编号,如果单板上只有一个CPU,则直接显示slot-number,如果单板上有多个CPU,则主CPU显示为slot-number,辅助CPU显示为slot-number.cpu-id |
【命令】
display patch information [ | { begin | exclude | include } regular-expression ]
【视图】
任意视图
【缺省级别】
3:管理级
【参数】
|:使用正则表达式对显示信息进行过滤。有关正则表达式的详细介绍,请参见“基础配置指导”中的“CLI”。
begin:从包含指定正则表达式的行开始显示。
exclude:只显示不包含指定正则表达式的行。
include:只显示包含指定正则表达式的行。
regular-expression:表示正则表达式,为1~256个字符的字符串,区分大小写。
【描述】
display patch information命令用来显示补丁的信息。
【举例】
# 显示补丁的信息(本命令的显示信息请以设备的实际情况为准)。(分布式设备)
<Sysname> display patch information
The location of patches: flash:
Slot Version Temporary Common Current Active Running Start-Address
----------------------------------------------------------------------
0 MPU 0 0 0 0 0 0x86c58f88
0.1 MPO 0 0 0 0 0 0x80a547bc
1 MPU 0 0 0 0 0 0x86c58f88
1.1 MPO 0 0 0 0 0 0x80a547bc
2 LPU 0 0 0 0 0 0x8567e0d0
2.1 LPO 0 0 0 0 0 0x80a547bc
3 LPU 0 0 0 0 0 0x8567e0d0
4 LPU 0 0 0 0 0 0x8567e0d0
5 LPU 0 0 0 0 0 0x8567e0d0
6 LPU 0 0 0 0 0 0x8567e0d0
7 LPU 0 0 0 0 0 0x8567e0d0
8 LPU 0 0 0 0 0 0x8567e0d0
9 LPU 0 0 0 0 0 0x8567e0d0
# 显示补丁的信息(本命令的显示信息请以设备的实际情况为准)。(分布式IRF设备)
<Sysname> display patch information
The location of patches: flash:
Chassis Slot Version Temporary Common Current Active Running Start-Address
----------------------------------------------------------------------
1 0 MPU 0 0 0 0 0 0x86c58f88
1 0.1 MPO 0 0 0 0 0 0x80a547bc
1 1 MPU 0 0 0 0 0 0x86c58f88
1 1.1 MPO 0 0 0 0 0 0x80a547bc
1 2 LPU 0 0 0 0 0 0x8567e0d0
1 2.1 LPO 0 0 0 0 0 0x80a547bc
1 3 LPU 0 0 0 0 0 0x8567e0d0
1 4 LPU 0 0 0 0 0 0x8567e0d0
1 5 LPU 0 0 0 0 0 0x8567e0d0
1 6 LPU 0 0 0 0 0 0x8567e0d0
1 7 LPU 0 0 0 0 0 0x8567e0d0
1 8 LPU 0 0 0 0 0 0x8567e0d0
1 9 LPU 0 0 0 0 0 0x8567e0d0
表1-4 display patch information命令显示信息描述表
字段 |
描述 |
The location of patches |
补丁文件的加载路径,可以通过patch location命令设置 |
Chassis |
设备的成员编号(分布式IRF设备) |
Slot |
单板所在的槽号,如果单板上只有一个CPU,则直接显示slot-number,如果单板上有多个CPU,则主CPU显示为slot-number,辅助CPU显示为slot-number.cpu-id(分布式设备) |
Slot |
单板所在的槽号,如果单板上只有一个CPU,则直接显示slot-number,如果单板上有多个CPU,则主CPU显示为slot-number,辅助CPU显示为slot-number.cpu-id(分布式IRF设备) |
Version |
补丁版本号 |
Temporary |
临时补丁数目 |
Common |
正式补丁数目 |
Current |
当前补丁总数目 |
Running |
处于运行状态的补丁数目 |
Active |
处于激活状态的补丁数目 |
Start-Address |
内存补丁区在内存中的起始地址 |
【命令】
patch install file filename
undo patch install
【视图】
系统视图
【缺省级别】
3:管理级
【参数】
filename:表示补丁包文件的名称。
【描述】
patch install file命令用来安装补丁包文件中的补丁。undo patch install命令用来卸载补丁包文件中的补丁。
在执行patch install file命令时,系统会提示“Do you want to continue running patches after reboot? [Y/N]:”,
l 如果输入<Y>或者<y>,设备或单板重启后所安装的补丁继续生效。
l 如果输入<N>或者<n>,设备或单板重启后所安装的补丁不再继续生效。
执行该命令前,请将补丁包文件保存所有主控板Flash的根目录下。
【举例】
# 加载补丁文件包,并且要求设备重启后补丁继续生效(本命令的显示信息请以实际情况为准)。
<Sysname> system-view
[Sysname] patch install file S10500R1120Patch001.bin
Patches will be installed. Continue? [Y/N]:y
Do you want to run patches after reboot? [Y/N]:y
Installing patches…
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!