• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 关于我们

01-基础命令参考

目录

07-软件升级命令

本章节下载 07-软件升级命令  (238.14 KB)

07-软件升级命令


1 软件升级

1.1  软件升级配置命令

1.1.1  boot-loader file

boot-loader file命令用来配置设备下次启动时使用的软件包。

【命令】

boot-loader file boot filename system filename [ feature filename&<1-30> ] [ patch filename&<1-30> ] { backup | main }

boot-loader file ipe-filename [ patch filename&<1-30> ] { backup | main }

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

boot:Boot包。

system:System包。

feature:Feature包。

filename&<1-30>:软件包的名称,形如filesystemname/filename.bin。该文件必须保存在设备任一文件系统的根目录下,该参数中必须包含文件系统的名称,从存储介质名称开始最多可输入63个字符。&<1-30>表示前面的参数最多可以输入30次。有关指定文件夹和文件详细介绍请参见“基础配置指导”中的“文件系统管理”。

patch:Patch包。该参数既可以指定叠加补丁也可以指定非叠加补丁。叠加补丁最多可以同时安装30个;由于每个非叠加补丁包只能为一个Boot、System或Feature包打补丁,所以非叠加补丁最多只能同时安装16个。

ipe-filename:IPE(Image Package Envelope,复合软件包套件)文件的名称,形如filesystemname/filename.ipe。该文件必须保存在设备任一文件系统的根目录下,该参数中必须包含文件系统的名称,从存储介质名称开始最多可输入63个字符。有关指定文件夹和文件详细介绍请参见“基础配置指导”中的“文件系统管理”。

backup:指定该软件包为备用启动软件包。备用启动软件包用于主用启动软件包不可用或异常情况时,引导设备启动。

main:指定该软件包为主用启动软件包。主用启动软件包用于引导设备启动。

【使用指导】

应用场景

当前软件不能满足现网运行或用户业务需求时,可以使用本命令进行软件升级,实现设备性能优化,以满足用户的业务需求。

工作机制

成功执行该命令后,系统会用命令中指定的软件包替换现有的软件包列表。如果命令行中没有指定Feature包,则更新后的软件包列表中不会有Feature包。

注意事项

成功执行本命令后,系统在用命令中指定的软件包替换现有的软件包列表前会对软件包进行数字签名校验,如果软件包通过校验则会替换现有的软件包列表;如果软件包未通过校验则不会替换现有的软件包列表,并返回错误提示信息。

需要重启系统来完成指定下次启动软件包的加载。

本命令不支持安装叠加补丁。

【举例】

# 配置设备下次启动时所用的主用启动文件为flash:/all.ipe。‌

<Sysname> boot-loader file flash:/all.ipe main

Verifying the file flash:/all.ipe on the device.............Done.

H3C SecPath vLB2000 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 flash:/boot.bin already exists on the device.

File flash:/system.bin already exists on the device.

Overwrite or rename the new file? [Yes/No/Rename]: R

Please input the file name (*.bin)[boot_1.bin]

(To use the recommended file name, press the Enter key):

Decompressing file boot.bin to flash:/boot_1.bin........................Done.

Please input the file name (*.bin)[system_1.bin]

(To use the recommended file name, press the Enter key):system_backup.bin

Decompressing file system.bin to flash:/system_backup.bin...........................Done.

Verifying the file flash:/boot_1.bin on the device...Done.

Verifying the file flash:/system_backup.bin on the device.............Done.

The images that have passed all examinations will be used as the main startup software images at the next reboot on the device..

# 配置设备下次启动时所用的主用启动文件为flash:/boot.bin和flash:/system.bin。‌

<Sysname> boot-loader file boot flash:/boot.bin system flash:/system.bin 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

1.1.2  display boot-loader

display boot-loader命令用来显示本次启动和下次启动所采用的启动软件包的名称。

【命令】

display boot-loader

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【参数】

【举例】

# 显示本次启动和下次启动所采用的启动软件包的名称。‌

<Sysname> display boot-loader

Software images on the device:

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

备用下次启动软件包列表

显示为None时,表示未指定备用下次启动软件包

 

【相关命令】

·     boot-loader file

 

1.1.3  install activate

install activate命令用来激活软件包。

【命令】

install activate { boot filename | system filename | feature filename&<1-30> } * slot slot-number

install activate patch filename { all | slot slot-number }

install activate { boot filename | system filename | feature filename&<1-30> } * chassis chassis-number slot slot-number

install activate patch filename { all | chassis chassis-number slot slot-number }

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

boot:Boot包。

system:System包。

feature:Feature包。

patch:补丁包。该参数一次只能指定一个补丁包,但是可以通过多次执行此命令为设备激活多个补丁包。

filename&<1-30>:软件包的名称,形如filesystemname/filename.bin。该文件必须保存在设备任一文件系统的根目录下,该参数中必须包含文件系统的名称,从存储介质名称开始最多可输入63个字符。&<1-30>表示前面的参数最多可以输入30次。有关指定文件夹和文件详细介绍请参见“基础配置指导”中的“文件系统管理”。

all:升级补丁包对应的所有单板。‌

all:升级补丁包对应的所有单板。‌

slot slot-number:表示单板所在的槽位号。‌

chassis chassis-number slot slot-numberchassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。‌

【使用指导】

请先查看软件包版本发布说明书,如果某软件包需要License才能运行,且设备当前没有对应的有效的License时,需安装对应的License,再执行该命令。否则,会导致命令执行失败。

使用本命令激活指定硬件上的软件包后,被激活的软件包只在本次运行的系统中生效。要使被激活的软件包在设备重启后继续生效,还需要执行install commit命令。激活补丁包时,若使用install activate patch filename all命令同时激活所有硬件上的补丁包,则无需执行install commit命令,所有补丁包在设备重启后继续生效。

执行命令行时,如果filename不是存放在待升级主控板上的文件,则系统会先将该文件拷贝到待升级主控板上,再执行升级动作。

对于安全引擎,执行命令行时,如果filename不是存放在待升级安全引擎上的文件,则系统会先将该文件拷贝到待升级安全引擎上,再执行升级动作。

如果指定的slot参数为主用主控板所在的槽位号,则执行该命令,会同时升级主用主控板和业务板;如果指定的slot参数为备用主控板所在的槽位号,则执行该命令,只会升级备用主控板。‌

如果指定的chassis chassis-number slot slot-number参数为全局主用主控板所在的槽位号,则执行该命令,会同时升级该主控板和所有业务板。如果指定的chassis chassis-number slot slot-number参数为全局备用主控板所在的槽位号,则执行该命令,只会升级该主控板。‌

从设备重启后,会自动批量备份主设备的配置和状态数据。请使用display system stable state命令查看设备是否处于稳定状态。只有System State处于Stable状态,才能执行该命令。否则,命令执行失败。关于display system stable state命令的详细介绍请参见“基础配置命令参考”中的“设备管理”。‌

【举例】

# 激活备用主控板1上的System包system.bin和Feature包feature1.bin。‌

<Sysname> install activate system flash:/system.bin feature flash:/feature1.bin slot 1

Copying file flash:/system.bin to slot1#flash:/system.bin......Done.

Verifying the file flash:/system.bin on slot 1.....Done.

Copying file flash:/feature1.bin to slot1#flash:/feature1.bin......Done.

Verifying the file flash:/feature1.bin on slot 1.....Done.

Verifying the file flash:/feature1.bin on slot 1.....Done.

Verifying the file flash:/system.bin on slot 1.....Done.

Upgrade summary according to following table:

 

flash:/system.bin

  Running Version             New Version

  Test 0001015                Test 0001016

 

flash:/feature1.bin

  Running Version             New Version

  None                        Test 0001016

 

  Slot                        Upgrade Way

  1                           Service Upgrade

Upgrading software images to compatible versions. Continue? [Y/N]:y

This operation might take several minutes, please wait...Done.

表1-2 install activate命令显示信息描述表

字段

描述

Copying file A to B......Done.

将文件从位置A拷贝到位置B

Verifying the file flash:/xx.bin.....Done.

验证文件是否合法

Upgrade summary according to following table

升级摘要信息

Running Version

设备当前运行的相同类型软件包的产品版本号

New Version

目标软件包的产品版本号

Upgrade Way

(暂不支持)兼容升级策略,取值可能为:

·     Service Upgrade:表示服务级增量升级

·     File Upgrade:表示文件级增量升级

·     Reboot:表示通过重启方式升级

Influenced service according to following table

将受影响的功能模块

Upgrading software images to compatible versions. Continue? [Y/N]

询问用户是否执行兼容升级操作

This operation might take several minutes, please wait

升级操作需要花费一定时间,请等待

Done.

表示激活成功

Operation failed.

表示激活失败

Install command does not support incompatible upgrade.

不能使用install命令来升级不兼容版本

 

【相关命令】

·     display install active

·     install commit

·     install deactivate

1.1.4  install add

install add命令用来解压缩IPE文件。

【命令】

install add ipe-filename filesystem

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

ipe-filename:IPE文件的名称,形如filesystemname/filename.ipe。该文件必须保存在设备任一文件系统的根目录下,该参数中必须包含文件系统的名称,从存储介质名称开始最多可输入63个字符。有关指定文件夹和文件详细介绍请参见“基础配置指导”中的“文件系统管理”。

filesystem:解压缩IPE文件保存的目的文件系统的名称。

【使用指导】

由于使用install命令激活的软件包只能是.bin软件包,所以在使用install命令激活软件包之前需要使用install add命令将IPE文件进行解压缩。

用户获取IPE文件后,可以使用display install ipe-info命令查看该IPE文件中包含了哪些软件包,可以通过install add命令将IPE文件解压生成软件包,再利用生成的软件包更新设备软件。

【举例】

# 解压缩all.ipe文件到存储介质flash上。

<Sysname> install add flash:/all.ipe flash:

Verifying the file flash:/all.ipe on slot 1...Done.

Decompressing file boot.bin to flash:/boot.bin.......................Done.

Decompressing file system.bin to flash:/system.bin.................................Done.

1.1.5  install commit

install commit命令用来确认软件包更改。

【命令】

install commit

【视图】

用户视图

【缺省用户角色】

network-admin

【使用指导】

请先查看软件包版本发布说明书,如果某软件包需要License才能运行,且设备当前没有对应的有效的License时,需安装对应的License,再执行该命令。否则,会导致命令执行失败。

该命令会将补丁包文件添加到系统当前使用的软件包列表:

·     如果系统使用了主用软件包启动,该命令会将补丁包文件添加到主用软件包列表中。

·     如果系统使用了备用软件包启动,该命令会将补丁包文件添加到备用软件包列表中。

boot-loader file命令和install commit命令都可以变更主用下次启动软件包列表,最新的配置生效。两条命令的不同之处在于,install commit命令自动使用当前激活的软件包列表作为主用下次启动软件包列表。而boot-loader file命令还可以指定其它当前未激活的软件包,可以配置为主用或者备用下次启动软件包列表。

【举例】

# 确认软件包更改。

<Sysname> install commit

This operation will take several minutes, please wait...........................Done.

【相关命令】

·     install activate

·     install deactivate

·     install rollback

1.1.6  install deactivate

install deactivate命令用来卸载Feature包或补丁包。

【命令】

install deactivate feature filename&<1-30> slot slot-number

install deactivate patch filename { all | slot slot-number }

install deactivate feature filename&<1-30> chassis chassis-number slot slot-number

install deactivate patch filename { all | chassis chassis-number slot slot-number }

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

feature:Feature包。

patch:补丁包。该参数一次只能指定一个补丁包,若要卸载多个补丁包,则需要多次执行此命令。

filename&<1-30>:软件包的名称,形如filesystemname/filename.bin。该参数中必须且只能包含文件系统的名称,不能包含文件系统位置信息,从存储介质名称开始最多可输入63个字符。&<1-30>表示前面的参数最多可以输入30次。有关指定文件夹和文件详细介绍请参见“基础配置指导”中的“文件系统管理”。

all:表示安装了该补丁包的所有单板。‌

all:表示安装了该补丁包的所有单板。‌

slot slot-number:表示单板所在的槽位号。‌

chassis chassis-number slot slot-numberchassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。‌

【使用指导】

从设备重启后,会自动批量备份主设备的配置和状态数据。请使用display system stable state命令查看设备是否处于稳定状态。只有System State处于Stable状态,才能执行该命令。否则,命令执行失败。关于display system stable state命令的详细介绍请参见“基础配置命令参考”中的“设备管理”。

该命令只能对已经激活的Feature包或补丁包进行卸载操作。使用本命令卸载指定slot上的Feature包或补丁包后,卸载的Feature包或补丁包的特性功能在本次系统运行中失效。如果要使卸载的Feature包或补丁包在设备重启后继续失效,请执行install commit命令对卸载操作进行确认。卸载补丁包时,若使用install deactivate patch filename all命令同时卸载所有slot上的补丁包,则无需执行install commit命令,所有补丁包在设备重启后继续失效。

【举例】

# 卸载指定slot上的patch包route-patch.bin。‌

<Sysname> install deactivate patch flash:/route-patch.bin slot 1

This operation might take several minutes, please wait...Done.

【相关命令】

·     display install active

·     display install inactive

1.1.7  install remove

install remove命令用来删除没有激活的软件包。

【命令】

install remove [ slot slot-number ] { filename | inactive }

install remove [ chassis chassis-number slot slot-number ] { filename | inactive }

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

filename:软件包的名称,形如filesystemname/filename.bin。该文件必须保存在设备任一文件系统的根目录下,该参数中必须且只能包含文件系统的名称,不能包含文件系统位置信息,从存储介质名称开始最多可输入63个字符。有关指定文件夹和文件详细介绍请参见“基础配置指导”中的“文件系统管理”。

slot slot-number:表示单板所在的槽位号。不指定该参数时,表示设备上的所有单板。‌

chassis chassis-number slot slot-numberchassis-number表示设备在IRF中的成员编号,slot-number表示单板所在的槽位号。不指定该参数时,表示IRF中的所有单板。‌

inactive:表示将删除指定文件系统根目录下、没有被激活的所有软件包。

【使用指导】

执行该命令后,指定的软件包将从设备上被彻底删除,用户将不能使用该软件包进行回滚或回退操作。

【举例】

# 删除软件包flash:/feature1.bin。

<Sysname> install remove flash:/feature1.bin

1.1.8  install verify

install verify命令用来执行对软件包状态、完整性和一致性的检验。

【命令】

install verify

【视图】

用户视图

【缺省用户角色】

network-admin

【使用指导】

为了保证设备进行install命令升级之后能够正常运行,需要执行本命令对软件包进行如下检验:

完整性:检验Boot包、System包和Feature包的完整性。

一致性:检验系统内各激活的软件包列表的差异,以方便用户知道系统内各软件包版本是否一致。

软件包状态:检查各设备上激活的软件包列表和确认的软件包列表之间的差异,以方便用户知道是否有未确认的软件包。

使用该命令,能帮助用户进行软件包检查:

·     当系统提示软件包不完整时,请重新下载并安装软件包。

·     当系统提示软件包不一致时,请使用install activateinstall deactivate以及install commit命令来确保它们的一致。

【举例】

# 检验设备上软件包状态、完整性和一致性信息。‌

<Sysname> install verify

Active packages on the device are the reference packages.

Packages will be compared with the reference packages.

This operation will take several minutes, please wait...

  Verifying packages on the device:

  Start to check active package completeness.

Verifying the file flash:/boot-t0001015.bin on the device...........Done.

   flash:/boot-t0001015.bin verification successful.

Verifying the file flash:/system-t0001015.bin on the device............Done.

   flash:/system-t0001015.bin verification successful.

  Start to check active package consistency.

    Active packages are consistent with committed packages on their own board.

    Active packages are consistent with the reference packages.

Verification is done.

# 检验设备上软件包状态、完整性和一致性信息。‌

<Sysname> install verify

Active packages on slot 1 are the reference packages.

Packages will be compared with the reference packages.

This operation will take several minutes, please wait...

  Verifying packages on slot 0:

  Start to check active package completeness.

Verifying the file flash:/boot-t0001015.bin on slot 0.....................Done.

    flash:/boot-t0001015.bin verification successful.

Verifying the file flash:/system-t0001015.bin on slot 0.....................Done.

    flash:/system-t0001015.bin verification successful.

  Start to check active package consistency.

    Active packages are consistent with committed packages on their own board.

    Active packages are consistent with the reference packages.

  Verifying packages on slot 1:

  Start to check active package completeness.

Verifying the file flash:/boot-t0001015.bin on slot 1.....................Done.

    flash:/boot-t0001015.bin verification successful.

Verifying the file flash:/system-t0001015.bin on slot 1.....................Done.

    flash:/system-t0001015.bin verification successful.

  Start to check active package consistency.

    Active packages are consistent with committed packages on their own board.

    Active packages are consistent with the reference packages.

Verification is done.

# 检验设备上软件包状态、完整性和一致性信息。‌

<Sysname> install verify

Active packages on slot 1 are the reference packages.

Packages will be compared with the reference packages.

This operation will take several minutes, please wait...

  Verifying packages on slot 1:

  Start to check active package completeness.

Verifying the file flash:/boot-t0001015.bin on slot 1.....................Done.

    flash:/boot-t0001015.bin verification successful.

Verifying the file flash:/system-t0001015.bin on slot 1.....................Done.

    flash:/system-t0001015.bin verification successful.

  Start to check active package consistency.

    Active packages are consistent with committed packages on their own board.

    Active packages are consistent with the reference packages.

  Verifying packages on slot 2:

  Start to check active package completeness.

Verifying the file flash:/boot-t0001015.bin on slot 2.....................Done.

    flash:/boot-t0001015.bin verification successful.

Verifying the file flash:/system-t0001015.bin on slot 2.....................Done.

    flash:/system-t0001015.bin verification successful.

  Start to check active package consistency.

    Active packages are consistent with committed packages on their own board.

    Active packages are consistent with the reference packages.

Verification is done.

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们