• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

01-基础配置命令

目录

07-软件升级命令

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

docurl=/cn/Service/Document_Software/Document_Center/Wlan/WiNet_WX/WX2500H-WiNet/Command/Command_Manual/H3C_WiNet_CR(R5223)-5W100/01/201807/1094271_30005_0.htm

07-软件升级命令


1 软件升级

说明

仅WX2500H-WiNet系列不支持slot参数。

 

1.1  软件升级配置命令

1.1.1  boot-loader file

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作为后缀名,从flash、cf、usb开始最多可输入63个字符,不区分大小写。

all:用来升级整个系统。当用户获取的IPE包中包含IRF系统升级需要的所有软件包时,使用这样的IPE包,并指定all参数,执行一次boot-loader file命令,就能指定系统中所有硬件下次启动时使用的软件包/IPE文件。不同型号的设备对本参数支持的情况不同,详细差异信息如下:

系列

型号

参数

描述

WX2500H-WiNet系列

WX2510H-PWR-WiNet

WX2560H-WiNet

all

不支持

WX3500H-WiNet系列

WX3508H-WiNet

支持

 

slot slot-number:表示待升级的成员设备的编号。

backup:指定该软件包为备用启动软件包,并将该软件包的名称添加到备用启动软件包列表。备用启动软件包用于主用启动软件包不可用或异常情况时,引导设备启动。

main:指定该软件包为主用启动软件包,并将该软件包的名称添加到主用启动软件包列表。主用启动软件包用于引导设备启动。

【使用指导】

请不要通过多个用户同时执行该命令,以免配置失败。

(1)     对于不支持IRF的设备:

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

·     对于boot-loader file boot boot-package system system-package [ feature feature-package&<1-30> ] { backup | main }命令,只要指定某个的软件包当前没有有效的License,就会导致整条命令配置失败。

·     对于boot-loader file ipe-filename { backup | main }命令,只有当前没有有效的License的软件包配置失败,其它软件包会配置成功。

当配置该命令时,命令中指定的软件包/IPE文件必须放在文件系统的根目录下,文件名中必须包含存储介质的名称,形如flash:/xx.bin(flash:/xx.ipe)。

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

(2)     对于支持IRF的设备:

·     请先查看软件包版本发布说明书,如果软件包需要License才能运行,且设备当前没有对应的有效的License时,需安装对应的License,再执行该命令。否则,当使用软件包配置该命令时,只要指定的某个软件包当前没有有效的License,则会导致整条命令配置失败;当使用IPE文件配置该命令时,只有当前没有有效的License的软件包配置失败,其它软件包会配置成功。

·     当配置该命令时,命令中指定的软件包/IPE文件必须放在文件系统的根目录下,文件名中必须包含存储介质的名称。

·     系统会自动检查指定单板上对应路径下是否存在同名文件,如果不存在,则直接从指定路径拷贝一份并设置为下次启动软件包;如果存在,则提示用户是否从指定路径拷贝一份并设置为下次启动软件包。

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

【举例】

# 对于不支持IRF的设备,指定设备下次启动时所用的主用启动文件为flash:/all.ipe。

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

Verifying the IPE file and the images............Done.

H3C WX2560H-WiNet 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 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 the device..

# 对于不支持IRF的设备,指定设备下次启动时所用的主用启动文件为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.

# 对于支持IRF的设备,指定成员设备1下次启动时所用的主用启动文件为flash:/all.ipe。

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

Verifying the IPE file and the images............Done.

H3C WX3508H-WiNet 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.

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

# 对于支持IRF的设备,指定IRF的主用下次启动软件为flash:/all.ipe(slot 1为主设备,slot 2为备设备)。

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

Verifying the IPE file and the images............................................................................Done.

H3C WX3508H-WiNet 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.

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

File flash:/Boot.bin already exists on slot 2.

Do you want to overwrite the file?

 Y: Overwrite the file.

 N: Not overwrite the file.

 A: From now on, overwrite or not overwrite without prompt.

Please make a choice. [Y/N/A]:a

What type of overwrite operation do you want to perform?

 Y: Overwrite without prompt.

 N: Not overwrite or display prompt.

 Q: Return to the previous step.

Please make a choice. [Y/N/Q]:y

An existing file will be overwritten without prompt if it has the same name as any upgrade file.

Loading......................Done.

Loading......................Done.

Loading......................Done.

Loading......................Done.

Loading......................Done.

Loading......................Done.

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

Decompression completed.

Do you want to delete flash:/all.ipe now? [Y/N]:n

【相关命令】

·     display boot-loader

1.1.2  boot-loader update

boot-loader update命令用来将从设备的软件版本与主设备的当前软件版本进行同步。

【命令】

boot-loader update { all | slot slot-number }

设备各款型对于本节所描述的命令支持情况有所不同,详细差异信息如下:

系列

型号

命令

描述

WX2500H-WiNet系列

WX2510H-PWR-WiNet

WX2560H-WiNet

boot-loader update

不支持

WX3500H-WiNet系列

WX3508H-WiNet

支持

 

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

all:表示同步升级所有备设备。

slot slot-number:表示待升级的成员设备的编号。

【使用指导】

本命令用于备用主控板和主用主控板软件版本不一致时,刷新备用主控板的软件版本,使其和主用主控板的软件版本相同。

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

通过该命令指定从设备的下次启动软件包时,系统会进行如下处理:

·     如果主设备当前是使用主用启动软件包列表启动的,则将其主用下次启动软件包列表中的软件包拷贝到从设备的对应目录下,并设置为从设备的主用下次启动软件包。如果这些软件包中有任一软件包不存在或者不可用,则命令执行失败。

·     如果主设备当前是使用备用启动软件包列表启动的,则将其备用下次启动软件包列表中的软件包拷贝到从设备的对应目录下,并设置为从设备的主用下次启动软件包。如果这些软件包中有任一软件包不存在或者不可用,则命令执行失败。

【举例】

# 将所有成员设备上的软件版本与主设备的软件版本同步。

<Sysname> boot-loader update all

This command will update all the standby MPU. Continue? [Y/N]:y

Updating. Please wait...

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

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

Successfully updated the startup software images of all the standby MPU.

【相关命令】

·     display boot-loader

1.1.3  bootrom backup

bootrom backup命令用来将Boot ROM程序从Boot ROM的Normal区备份到Backup区。

【命令】

bootrom backup slot slot-number-list [ all | part ]

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

slot slot-number-list:成员编号列表,表示同时备份多个成员设备的Boot ROM程序。表示方式为slot-number-list = { slot-number [ to slot-number ] }&<1-7>。其中,slot-number表示需要备份的设备在IRF中的成员编号。

all:操作Boot ROM程序的全部内容。不指定allpart参数时,默认使用all

part:只操作Boot ROM程序的扩展段(Boot ROM程序分为两部分:基本段和扩展段,基本段提供Boot ROM菜单的基本操作项,扩展段提供更多的Boot ROM菜单操作项)。不指定allpart参数时,默认使用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 all

Now backing up the Boot ROM, please wait........Done.

【相关命令】

·     bootrom restore

1.1.4  bootrom read

bootrom read命令用来将Boot ROM程序从Boot ROM的Normal区读取到Flash中。

【命令】

bootrom read slot slot-number-list [ all | part ]

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

slot slot-number-list:成员编号列表,表示同时读取多个成员设备的Boot ROM程序。表示方式为slot-number-list = { slot-number [ to slot-number ] }&<1-7>。其中,slot-number表示需要读取的设备在IRF中的成员编号。

all:操作Boot ROM程序的全部内容。不指定allpart参数时,默认使用all

part:只操作Boot ROM程序的扩展段。不指定allpart参数时,默认使用all

【使用指导】

成功执行bootrom read命令后,系统会自动生成basicbtm.bin和extendbtm.bin文件并保存到Flash中。其中,basicbtm.bin存储了Boot ROM程序的基本段,extendbtm.bin存储了Boot ROM程序的扩展段。如果在设备运行过程中,Normal区的Boot ROM程序被损坏或者需要版本回退,可以使用bootrom update命令重新加载之前生成的basicbtm.bin和extendbtm.bin。

【举例】

# 读取Boot ROM程序。

<Sysname> bootrom read all

  Now reading the Boot ROM, please wait............Done.

【相关命令】

·     bootrom update

1.1.5  bootrom restore

bootrom restore命令用来将Boot ROM程序从Boot ROM的Backup区恢复到Normal区。

【命令】

bootrom restore slot slot-number-list [ all | part ]

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

slot slot-number-list:成员编号列表,表示同时恢复多个成员设备的Boot ROM程序。表示方式为slot-number-list = { slot-number [ to slot-number ] }&<1-7>。其中,slot-number表示需要恢复的设备在IRF中的成员编号。

all:操作Boot ROM程序的全部内容。不指定allpart参数时,默认使用all

part:只操作Boot ROM程序的扩展段。不指定allpart参数时,默认使用all

【举例】

# 恢复Boot ROM程序。

<Sysname> bootrom restore all

  This command will restore the Boot ROM file, Continue? [Y/N]:y

  Now restoring the Boot ROM, please wait.........Done.

【相关命令】

·     bootrom backup

1.1.6  bootrom update

bootrom update命令用来加载Boot ROM程序。

【命令】

bootrom update file file-url slot slot-number-list [ all | part ]

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

file file-url:Flash中包含Boot ROM程序的文件,file-url表示用于Boot ROM程序升级的文件的名称,为1~63个字符的字符串。

slot slot-number-list:成员编号列表,表示同时升级多个成员设备的Boot ROM程序。表示方式为slot-number-list = { slot-number [ to slot-number ] }&<1-7>。其中,slot-number表示需要升级的设备在IRF中的成员编号。

all:操作Boot ROM程序的全部内容。不指定allpart参数时,默认使用all

part:只操作Boot ROM程序的扩展段。不指定allpart参数时,默认使用all

【使用指导】

Boot ROM程序通过Boot包(*.bin)发布,产品会将需要升级的单板的Boot ROM程序集成到Boot包中。此时,可是使用bootrom update命令,将升级文件指定为Boot包,系统会根据单板的型号自动将相应的Boot ROM程序加载到Boot ROM中;也可以在升级Boot包的同时完成Boot ROM程序的加载。

执行该命令后,设备会将Flash中的Boot ROM程序加载到Boot ROM的Normal区。设备启动时,会直接使用Normal区的Boot ROM程序。因此,如果Flash空间不足,Boot ROM程序加载完成之后,Boot ROM文件可以删除。

加载后,要使新的Boot ROM程序生效,需要重启设备。

【举例】

# 使用a.bin文件升级设备的Boot ROM程序。

<Sysname> bootrom update file a.bin

   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

1.1.7  display boot-loader

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

【命令】

display boot-loader [ slot slot-number ]

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【参数】

slot slot-number:表示成员设备的编号。不指定该参数时,表示IRF中的所有成员设备。

【举例】

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

<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.bin

  flash:/system.bin

# 对于支持IRF的设备,显示本次启动和下次启动所采用的启动软件包的名称。

<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.bin

  flash:/system.bin

表1-1 display boot-loader命令显示信息描述表

字段

描述

Software images on the device

仅对于不支持IRF的设备,启动软件包的相关信息

Software images on slot n

仅对于支持IRF的设备,成员编号为n的某成员设备的启动软件包的相关信息

Current software images

最近一次启动使用的启动软件包列表

Main startup software images

主用下次启动软件包列表

Backup startup software images

备用下次启动软件包列表

 

【相关命令】

·     boot-loader file

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

新华三官网
联系我们