07-软件升级命令
本章节下载: 07-软件升级命令 (169.32 KB)
如果将CF卡内的软件包指定为设备下次启动时使用的软件包,重启设备时不要将CF卡从设备上拔出,否则可能导致设备无法正常启动。H3C推荐您将设备出厂时的缺省介质作为设备下次启动软件包/IPE文件的存储位置。
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 }
IRF模式:
boot-loader file boot boot-package system system-package [ feature feature-package&<1-30> ] { all | chassis chassis-number slot slot-number } { backup | main }
boot-loader file ipe-filename { all | chassis chassis-number 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:用来升级整个系统。当用户获取的IPE包中包含IRF系统升级需要的所有软件包时,使用这样的IPE包,并指定all参数,执行一次boot-loader file命令,就能指定系统中所有硬件下次启动时使用的软件包/IPE文件。
slot slot-number:表示待升级的设备,slot-number表示槽位号(固定取值为0)。(独立运行模式)
chassis chassis-number slot slot-number:表示待升级的成员设备,slot-number表示槽位号(固定取值为0)。(IRF模式)
backup:指定该软件包为备用启动软件包,并将该软件包的名称添加到备用启动软件包列表。备用启动软件包用于主用启动软件包不可用或异常情况时,引导设备启动。
main:指定该软件包为主用启动软件包,并将该软件包的名称添加到主用启动软件包列表。主用启动软件包用于引导设备启动。
【使用指导】
请不要通过多个用户同时执行该命令,以免配置失败。
请先查看软件包版本发布说明书,如果软件包需要License才能运行,且设备当前没有对应的有效的License时,需安装对应的License,再执行该命令。否则,当使用软件包配置该命令时,只要指定的某个软件包当前没有有效的License,则会导致整条命令配置失败;当使用IPE文件配置该命令时,只有当前没有有效的License的软件包配置失败,其它软件包会配置成功。
当配置该命令时,命令中指定的软件包/IPE文件文件名中必须包含存储介质的名称。
系统会自动检查指定设备对应路径下是否存在同名文件,如果不存在,则直接从指定路径拷贝一份并设置为下次启动软件包;如果存在,则提示用户是否从指定路径拷贝一份并设置为下次启动软件包。
成功执行该命令后,系统会用命令中指定的软件包替换现有的软件包列表。如果命令行中没有指定Feature包,则更新后的软件包列表中不会有Feature包。
【举例】
# 指定0号板下次启动时所用的主用启动文件为flash:/all.ipe。(独立运行模式)
<Sysname> boot-loader file flash:/all.ipe slot 0 main
Verifying the IPE file and the images............Done.
H3C SR6602-X images in IPE:
boot.bin
system.bin
This command will set the main startup software images. Continue? [Y/N]:Y
Add images to slot 0.
File flash:/boot.bin already exists on slot 0.
File flash:/system.bin already exists on slot 0.
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.
The images that have passed all examinations will be used as the main startup software images at the next reboot on slot 0.
# 指定成员设备1的slot 0下次启动时所用的主用启动文件为flash:/all.ipe。(IRF模式)
<Sysname> boot-loader file flash:/all.ipe chassis 1 slot 0 main
Verifying the IPE file and the images............Done.
H3C SR6602-X images in IPE:
boot.bin
system.bin
This command will set the main startup software images. Continue? [Y/N]:Y
Add images to chassis 1 slot 0.
File flash:/boot.bin already exists on chassis 1 slot 0.
File flash:/system.bin already exists on chassis 1 slot 0.
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.
The images that have passed all examinations will be used as the main startup software images at the next reboot on chassis 1 slot 0.
【相关命令】
· display boot-loader
boot-loader update命令用来将备用设备的软件版本与主设备的当前软件版本进行同步。(IRF模式)
【命令】
IRF模式:
boot-loader update all
【视图】
用户视图
【缺省用户角色】
network-admin
【参数】
all:表示同步升级所有备用设备。(IRF模式)
【使用指导】
(1) IRF模式
请先查看软件包版本发布说明书,如果软件包需要License才能运行,且设备当前没有对应的有效的License时,需安装对应的License,再执行该命令。否则,会导致命令执行失败。
通过该命令指定从设备的下次启动软件包时,系统会进行如下处理:
· 如果主设备当前是使用主用启动软件包列表启动的,则将其主用下次启动软件包列表中的软件包拷贝到从设备的对应目录下,并设置为从设备的主用下次启动软件包。如果这些软件包中有任一软件包不存在或者不可用,则命令执行失败。
· 如果主设备当前是使用备用启动软件包列表启动的,则将其备用下次启动软件包列表中的软件包拷贝到从设备的对应目录下,并设置为从设备的主用下次启动软件包。如果这些软件包中有任一软件包不存在或者不可用,则命令执行失败。
【举例】
# 将所有备用设备的软件版本与主设备同步。(IRF模式)
<Sysname> boot-loader update all
This command will update all the standby MPU. Continue? [Y/N]:y
Updating. Please wait...
Verifying the file flash:/SR6602X-CMW710-BOOT-test.bin on chassis 1 slot 0..
.Done.
Verifying the file flash:/SR6602X-CMW710-SYSTEM-test.bin on chassis 1 slot 0
..............Done.
Successfully updated the startup software images of all the standby MPU.
【相关命令】
· display boot-loader
· install commit(基础配置命令参考/ISSU)
display boot-loader命令用来显示本次启动和下次启动所采用的启动软件包的名称。
【命令】
独立运行模式:
display boot-loader [ slot slot-number ]
IRF模式:
display boot-loader [ chassis chassis-number slot slot-number ]
【视图】
任意视图
【缺省用户角色】
network-admin
network-operator
【参数】
slot slot-number:表示槽位号(固定取值为0)。不指定该参数时,命令执行效果相同。(独立运行模式)
chassis chassis-number slot slot-number:表示指定的成员设备。chassis chassis-number表示设备在IRF中的成员编号,slot slot-number表示槽位号(固定取值为0)。不指定该参数时,表示IRF中所有的成员设备。(IRF模式)
【举例】
# 显示本次启动和下次启动所采用的启动软件包的名称。(独立运行模式)
<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
# 显示本次启动和下次启动所采用的启动软件包的名称。(IRF模式)
<Sysname> display boot-loader
Software images on chassis 1 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
表1-1 display boot-loader命令显示信息描述表
字段 |
描述 |
Software images on slot n |
位于本设备上的启动软件包的相关信息(独立运行模式) |
Software images on chassis m slot n |
某成员设备的启动软件包的相关信息(IRF模式) |
Current software images |
最近一次启动使用的启动软件包列表 |
Main startup software images |
主用下次启动软件包列表 |
Backup startup software images |
备用下次启动软件包列表 |
【相关命令】
· boot-loader file
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!