07-软件升级命令
本章节下载: 07-软件升级命令 (209.12 KB)
目 录
如果将可插拔存储介质内的软件包指定为设备下次启动时使用的软件包,重启设备时不要将可插拔存储介质从设备上拔出,否则可能导致设备无法正常启动。建议将固定存储介质中的软件包指定为设备下次启动时使用的软件包。
boot-loader file命令用来配置设备下次启动时使用的软件包。
【命令】
boot-loader file boot filename system filename [ feature filename&<1-30> ] [ patch filename&<1-16> ] { all | slot slot-number } { backup | main }
boot-loader file ipe-filename [ patch filename&<1-16> ] { all | slot slot-number } { backup | main }
【视图】
用户视图
【缺省用户角色】
network-admin
【参数】
boot:Boot包。
system:System包。
feature:Feature包。
patch:Patch包。该参数只能指定非叠加补丁。由于每个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:指定设备编号,取值只能为1。
backup:指定该软件包为备用启动软件包。备用启动软件包用于主用启动软件包不可用或异常情况时,引导设备启动。
main:指定该软件包为主用启动软件包。主用启动软件包用于引导设备启动。
【使用指导】
成功执行本命令后,系统在用命令中指定的软件包替换现有的软件包列表前会对软件包进行数字签名校验,如果软件包通过校验则会替换现有的软件包列表;如果软件包未通过校验则不会替换现有的软件包列表,并返回错误提示信息。
当前软件不能满足现网运行或用户业务需求时,可以使用本命令进行软件升级,实现设备性能优化,以满足用户的业务需求。
成功执行该命令后,系统会用命令中指定的软件包替换现有的软件包列表。如果命令行中没有指定Feature包,则更新后的软件包列表中不会有Feature包。
系统会自动检查指定slot上对应路径下是否存在同名文件,如果不存在,则直接从指定路径拷贝一份并设置为下次启动软件包;如果存在,则提示用户是否从指定路径拷贝一份并设置为下次启动软件包。
成功执行本命令后,系统在用命令中指定的软件包替换现有的软件包列表前会对软件包进行数字签名校验,如果软件包通过校验则会替换现有的软件包列表;如果软件包未通过校验则不会替换现有的软件包列表,并返回错误提示信息。
需要重启系统来完成指定下次启动软件包的加载。
【举例】
# 配置指定slot下次启动时所用的主用启动文件为flash:/all.ipe。
<Sysname> boot-loader file flash:/all.ipe slot 1 main
Verifying digital signature of the file flash:/all.ipe on slot 1..............Done.
H3C S6826-48Y8C 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 digital signature of the file flash:/boot.bin on slot 1...Done.
Verifying digital signature of 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.
【相关命令】
· display boot-loader
boot-loader update命令用来实现当前软件版本的自动同步。
【命令】
boot-loader update { all | slot slot-number }
【视图】
用户视图
【缺省用户角色】
network-admin
【参数】
all:表示同步升级所有设备。
slot slot-number:指定设备编号,取值只能为1。
【举例】
# 同步指定slot的软件版本。
<Sysname> boot-loader update slot 2
This command will update the specified standby MPU. Continue? [Y/N]:y
Updating. Please wait...
Verifying digital signature of the file flash:/boot.bin on slot 1...Done.
Verifying digital signature of 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
bootrom update命令用来将文件系统中的BootWare程序加载到BootWare的Normal区。
【命令】
bootrom update file file slot slot-number-list [ subslot subslot-number-list ]
【视图】
用户视图
【缺省用户角色】
network-admin
【参数】
file file:文件系统中包含BootWare程序的文件,file表示用于BootWare程序升级的文件的名称,为1~63个字符的字符串。
slot slot-number-list:成员编号列表,表示同时升级多个成员设备的BootWare程序。表示方式为slot-number-list = { slot-number [ to slot-number ] }&<1-7>。其中,slot-number表示需要升级的设备在IRF中的成员编号。
subslot subslot-number-list:子槽位号列表,表示同时升级多个子卡的BootWare程序。表示方式为subslot-number-list = { subslot-number [ to subslot-number ] }&<1-7>。其中,subslot-number表示需要升级的子卡所在的子槽位号。&<1-7>表示前面的参数最多可以输入7次。不使用该参数时,表示不升级子卡。
【使用指导】
BootWare程序通过Boot包(*.bin)发布,产品会将需要升级的设备的BootWare程序集成到Boot包中。此时可以使用本命令将升级文件指定为Boot包,系统会根据设备的型号自动将相应的BootWare程序加载到BootWare中;也可以在升级Boot包的同时完成BootWare程序的加载。
执行该命令后,设备会将文件系统中的BootWare程序加载到BootWare的Normal区。设备启动时,会直接使用Normal区的BootWare程序。因此,如果文件系统空间不足,BootWare程序加载完成之后,BootWare文件可以删除。
系统将文件系统中的BootWare程序加载到BootWare的Normal区前会对文件系统中包含BootWare程序的文件进行数字签名校验,如果文件通过校验则会被加载;如果文件未通过校验则不会被加载,并返回错误提示信息。
加载后,要使新的BootWare程序生效,需要重启设备。
【举例】
# 使用Flash根目录下的a.bin文件升级设备的BootWare程序。
<Sysname> bootrom update file flash:/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
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:
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
表1-1 display boot-loader命令显示信息描述表
字段 |
描述 |
Software images |
启动软件包的相关信息 |
Current software images |
最近一次启动使用的启动软件包列表 |
Main startup software images |
主用下次启动软件包列表 |
Backup startup software images |
备用下次启动软件包列表 |
【相关命令】
· boot-loader file
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!