09-软件升级命令
本章节下载: 09-软件升级命令 (125.89 KB)
boot-loader file命令用来指定设备下次启动时使用的软件包/IPE文件(以下简称下次启动软件包/IPE文件)。
【命令】
boot-loader file boot boot-package system system-package [ feature feature-package&<1-30> ] { all | slot slot-number } { backup | main }
boot-loader file ipe-filename { all | slot slot-number } { backup | main }
【视图】
用户视图
【缺省用户角色】
network-admin
【参数】
boot boot-package:Boot包的名称,以.bin作为后缀名,存储介质名最多可输入63个字符,不区分大小写。
system system-package:System包的名称,以.bin作为后缀名,存储介质名最多可输入63个字符,不区分大小写。
feature feature-package:Feature包的名称,以.bin作为后缀名,存储介质名最多可输入63个字符,不区分大小写。feature-package&<1-30>表示前面的参数最多可以输入30次。
ipe-filename:表示IPE(Image Package Envelope,复合软件包套件)文件的名称,以.ipe作为后缀名,存储介质名最多可输入63个字符,不区分大小写。
all:用来升级整个系统。
slot slot-number:表示设备本身,限定取值为1。
backup:指定该软件包为备用启动软件包,并将该软件包的名称添加到备用启动软件包列表。备用启动软件包用于主用启动软件包不可用或异常情况时,引导设备启动。
main:指定该软件包为主用启动软件包,并将该软件包的名称添加到主用启动软件包列表。主用启动软件包用于引导设备启动。
【使用指导】
当配置该命令时,命令中指定的软件包/IPE文件必须放在设备存储介质主分区的根目录下,文件名中必须包含存储介质的名称,形如cfa0:/xx.bin(cfa0:/xx.ipe)。
成功执行该命令后,系统会用命令中指定的软件包替换现有的软件包列表。如果命令行中没有指定Feature包,则更新后的软件包列表中不会有Feature包。
【举例】
# 指定设备下次启动时所用的主用启动文件为cfa0:/all.ipe。
<Sysname> boot-loader file cfa0:/all.ipe all main
Verifying the IPE file and the images............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 the device.
File cfa0:/boot.bin already exists on the device.
File cfa0:/system.bin already exists on the device.
Overwrite the existing files? [Y/N]:Y
Decompressing file boot.bin to cfa0:/boot.bin........................Done.
Decompressing file system.bin to cfa0:/system.bin...............................Done.
The images that have passed all examinations will be used as the main startup software images at the next reboot on the device..
# 指定设备下次启动时所用的主用启动文件为cfa0:/boot.bin和cfa0:/system.bin。
<Sysname> boot-loader file boot cfa0:/boot.bin system cfa0:/system.bin all main
This command will set the main startup software images. Continue? [Y/N]:y
The images that have passed all examinations will be used as the main startup software images at the next reboot on the device.
【相关命令】
· display boot-loader
bootrom backup命令用来将Boot ROM程序从Boot ROM的Normal区备份到Backup区。
【命令】
bootrom backup slot slot-number [ all | part ]
【视图】
用户视图
【缺省用户角色】
network-admin
【参数】
slot slot-number:表示备份单板的Boot ROM程序。表示方式为slot-number = slot-number [ to slot-number ]。其中,slot-number表示需要备份的单板所在的槽位号,限定取值为1。
all:操作Boot ROM程序的全部内容。不指定all和part参数时,默认使用all。
part:只操作Boot ROM程序的扩展段(Boot ROM程序分为两部分:基本段和扩展段,基本段提供Boot ROM菜单的基本操作项,扩展段提供更多的Boot ROM菜单操作项)。不指定all和part参数时,默认使用all。
【使用指导】
Boot ROM分为Normal区和Backup区:
· Normal区用于存放Boot ROM程序。设备启动时,会自动读取Normal区的Boot ROM程序。如果Normal区的Boot ROM程序不可用,再自动读取Backup区的Boot ROM程序。
· Backup区用于存放Boot ROM程序的副本。如果在设备运行过程中,Normal区的Boot ROM程序被损坏或者需要版本回退,可以使用bootrom restore命令将Boot ROM程序从Backup区恢复到Normal区。
【举例】
# 将Boot ROM程序从Boot ROM的Normal区备份到Backup区。
<Sysname> bootrom backup slot 1
Now backing up the Boot ROM, please wait...
......Done.
【相关命令】
· bootrom restore
bootrom read命令用来将Boot ROM程序从Boot ROM的Normal区读取到缺省存储介质中。
【命令】
bootrom read slot slot-number [ all | part ]
【视图】
用户视图
【缺省用户角色】
network-admin
【参数】
slot slot-number:表示读取单板的Boot ROM程序。表示方式为slot-number = slot-number [ to slot-number ]。其中,slot-number表示需要读取的单板所在的槽位号,限定取值为1。
all:操作Boot ROM程序的全部内容。不指定all和part参数时,默认使用all。
part:只操作Boot ROM程序的扩展段。不指定all和part参数时,默认使用all。
【使用指导】
成功执行bootrom read命令后,系统会自动生成basicbtm.bin和extendbtm.bin文件并保存到缺省存储介质中。其中,basicbtm.bin存储了Boot ROM程序的基本段,extendbtm.bin存储了Boot ROM程序的扩展段。如果在设备运行过程中,Normal区的Boot ROM程序被损坏或者需要版本回退,可以使用bootrom update命令重新加载之前生成的basicbtm.bin和extendbtm.bin。
【举例】
# 读取Boot ROM程序。
<Sysname> bootrom read slot 1
Now reading the Boot ROM, please wait...
.........Done.
【相关命令】
· bootrom update
bootrom restore命令用来将Boot ROM程序从Boot ROM的Backup区恢复到Normal区。
【命令】
bootrom restore slot slot-number [ all | part ]
【视图】
用户视图
【缺省用户角色】
network-admin
【参数】
slot slot-number:表示恢复单板的Boot ROM程序。表示方式为slot-number = slot-number [ to slot-number ]。其中,slot-number表示需要恢复的单板所在的槽位号,限定取值为1。
all:操作Boot ROM程序的全部内容。不指定all和part参数时,默认使用all。
part:只操作Boot ROM程序的扩展段。不指定all和part参数时,默认使用all。
【举例】
# 恢复Boot ROM程序。
<Sysname> bootrom restore slot 1
This command will restore the Boot ROM file, Continue? [Y/N]:y
Now restoring the Boot ROM, please wait...
......Done.
【相关命令】
· bootrom backup
bootrom update命令用来加载Boot ROM程序。
【命令】
bootrom update file file-url slot slot-number [ all | part ]
【视图】
用户视图
【缺省用户角色】
network-admin
【参数】
file file-url:缺省存储介质中包含Boot ROM程序的文件,file-url表示用于Boot ROM程序升级的文件的名称,为1~63个字符的字符串。
slot slot-number:表示升级单板的Boot ROM程序。表示方式为slot-number = slot-number [ to slot-number ]。其中,slot-number表示需要升级的单板所在的槽位号,限定取值为1。
all:操作Boot ROM程序的全部内容。不指定all和part参数时,默认使用all。
part:只操作Boot ROM程序的扩展段。不指定all和part参数时,默认使用all。
【使用指导】
Boot ROM程序通过Boot包(*.bin)发布,产品会将需要升级的单板的Boot ROM程序集成到Boot包中。此时,可是使用bootrom update命令,将升级文件指定为Boot包,系统会根据单板的型号自动将相应的Boot ROM程序加载到Boot ROM中;也可以在升级Boot包的同时完成Boot ROM程序的加载。
执行该命令后,设备会将缺省存储介质中的Boot ROM程序加载到Boot ROM的Normal区。设备启动时,会直接使用Normal区的Boot ROM程序。因此,如果缺省存储介质空间不足,Boot ROM程序加载完成之后,Boot ROM文件可以删除。
加载后,要使新的Boot ROM程序生效,需要重启设备。
【举例】
# 使用CF卡根目录下的a.bin文件升级设备的Boot ROM程序。
<Sysname> bootrom update file cfa0:/a.bin slot 1
This command will update the Boot ROM file on the specified board(s), Continue? [Y/N]:y
Now updating the Boot ROM, please wait...
.............Done.
【相关命令】
· boot-loader file
bootrom-update security-check enable命令用来开启Boot ROM程序合法性检查功能。
undo bootrom-update security-check enable命令用来关闭Boot ROM程序合法性检查功能。
【命令】
bootrom-update security-check enable
undo bootrom-update security-check enable
【缺省情况】
Boot ROM程序合法性检查功能处于开启状态。
【视图】
系统视图
【缺省用户角色】
network-admin
【使用指导】
如果开启了本功能,则在升级Boot ROM程序时,设备会先检查Boot ROM文件的合法性:包括Boot ROM文件是否有效以及是否和硬件匹配等。检查通过后,才会升级。
【举例】
# 启动Boot ROM升级时的合法性检查功能。
<Sysname> system-view
[Sysname] bootrom-update security-check enable
display boot-loader命令用来显示本次启动和下次启动所采用的启动软件包的名称。
【命令】
display boot-loader [ slot slot-number ]
【视图】
任意视图
【缺省用户角色】
network-admin
network-operator
【参数】
slot slot-number:表示设备本身,限定取值为1,可不指定。
【举例】
# 显示本次启动和下次启动所采用的启动软件包的名称。
<Sysname> display boot-loader
Software images on slot 1:
Current software images:
cfa0:/boot.bin
cfa0:/system.bin
Main startup software images:
cfa0:/boot.bin
cfa0:/system.bin
Backup startup software images:
cfa0:/boot.bin
cfa0:/system.bin
表1-1 display boot-loader命令显示信息描述表
字段 |
描述 |
Software images on slot 1 |
启动软件包的相关信息 |
Current software images |
最近一次启动使用的启动软件包列表 |
Main startup software images |
主用下次启动软件包列表 |
Backup startup software images |
备用下次启动软件包列表 |
【相关命令】
· boot-loader file
firmware update命令用来升级CPLD固件。
【命令】
firmware update slot slot-number cpld cpld-number file filename
【视图】
用户视图
【缺省用户角色】
network-admin
【参数】
slot slot-number:表示设备本身,限定取值为1。
cpld cpld-number:表示需要升级CPLD(Complex Programmable Logical Device 复杂可编程逻辑器件),cpld-number表示固件的编号。
file filename:升级文件的名称。不同固件升级文件的后缀可能不同,文件名最多可输入63个字符,不区分大小写。
【使用指导】
固件升级后需要对设备进行下电后重新上电才能生效。
【举例】
# 升级1号CPLD。
<Sysname> firmware update slot 1 cpld 1 file package.bin
Updating firmware for CPLD on the specified card or subcard. Continue?[Y/N]:y
Updating the firmware…
Please power cycle the card or subcard to activate the firmware.
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!