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

01-基础配置命令参考

07-软件升级命令

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

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S7500E/S7500E-XS/Command/Command_Manual/H3C_S7500E-XS_CR-R7523P01-6W100/01/201608/945499_30005_0.htm

07-软件升级命令


1 软件升级

如果将U盘内的软件包指定为设备下次启动时使用的软件包,重启设备时不要将U盘从设备上拔出,否则可能导致设备无法正常启动。建议将Flash中的软件包指定为设备下次启动时使用的软件包。

1.1  软件升级配置命令

1.1.1  boot-loader file

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

【命令】

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

boot-loader file ipe-filename { all | slot slot-number } { backup | main }

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

boot:Boot包。

system:System包。

feature:Feature包。

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

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

all:指定系统中软件包适用的所有的硬件。

slot slot-number:表示待升级的成员设备的编号,或者待升级的本地有存储介质的PEX设备的虚拟槽位号。

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

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

【使用指导】

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

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

·     当使用软件包配置该命令时,只要指定某个的软件包当前没有有效的License,就会导致整条命令配置失败。

·     当使用IPE文件配置该命令时,只有当前没有有效的License的软件包配置失败,其它软件包会配置成功。

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

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

【举例】

# 配置指定slot下次启动时所用的主用启动文件为flash:/all.ipe。

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

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

.....................................Done.                                     

H3C S7502E-XS 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 the file flash:/boot.bin on slot 1...Done.

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

# 配置IRF的主用下次启动软件为flash:/all.ipe。

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

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

.....................................Done.                                     

H3C S7502E-XS 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.

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

Decompression completed.

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

【相关命令】

·     boot-loader pex file

·     display boot-loader

1.1.2  boot-loader pex file

boot-loader pex file命令用来配置PEX设备的加载软件包。

【命令】

boot-loader pex pex-model file boot filename system filename [ feature filename&<1-30> ]

boot-loader pex pex-model file ipe ipe-filename

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

pex pex-model:设备支持的PEX设备的型号,该参数必须完整输入,不区分大小写。可输入boot-loader pex ,来获取该参数的取值。

boot:PEX设备将加载的Boot包。

system:PEX设备将加载的System包。

feature:PEX设备将加载的feature包。

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

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

【使用指导】

当PEX设备首次加入IRF3系统时,必须从父设备加载启动软件包。对于要加入的新型号PEX设备,需要在父设备上配置本命令,为PEX设备加载软件包。

对于已存在于IRF3系统中的PEX设备,可以使用本命令对PEX设备进行软件升级。

PEX设备可以使用本命令或boot-loader file命令加载本地保存的启动软件包。

PEX设备优先查找并加载本地的启动软件包,若本地不存在启动软件包,则从父设备加载启动软件包。

配置该命令后,系统会将指定软件包备份到所有成员设备。PEX设备只使用当前主设备上的软件包作为加载软件包。如果配置该命令后,加入新的成员设备,需要重新配置该命令,以免主备倒换后,影响PEX设备启动。

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

可以使用display boot-loader pex命令查看PEX设备的启动软件包。

关于加载软件包的详细介绍以及下次启动软件包/IPE文件和加载软件包/IPE文件的关系,请参见“基础配置指导”中的“软件升级”。

【举例】

# 将型号为PEX-S6300的PEX设备的加载软件包配置为flash:/all.ipe。

<Sysname> boot-loader pex PEX-S6300 file ipe flash:/all.ipe

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

File flash:/rpu-S6300-boot.bin already exists on slot 1.

File flash:/rpu-S6300-system.bin already exists on slot 1.

Overwrite the existing files? [Y/N]:Y

Decompressing file rpu-S6300-boot.bin to flash:/rpu-S6300-boot.bin.....................Done.

Decompressing file rpu-S6300-system.bin to flash:/rpu-S6300-system.bin............................................ Done.

File flash:/rpu-S6300-boot.bin already exists on slot 2.

File flash:/rpu-S6300-system.bin already exists on slot 2.

Overwrite the existing files? [Y/N]:Y

Copying file flash:/rpu-S6300-boot.bin to slot2#flash:/rpu-S6300-boot.bin.........................Done.

Copying file flash:/rpu-S6300-system.bin to slot2#flash:/rpu-S6300-system.bin...............................................Done.

# 将型号为PEX-S6300的PEX设备的加载软件包配置为flash:/boot.bin和flash:/system.bin。

<Sysname> boot-loader pex PEX-S6300 file boot flash:/boot.bin system flash:/system.bin

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

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

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

【相关命令】

·     boot-loader file

·     display boot-loader pex

1.1.3  boot-loader update

boot-loader update命令用来实现当前软件版本的自动同步。

【命令】

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

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

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

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

【使用指导】

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

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

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

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

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

如果主设备刚安装了补丁或者进行了ISSU升级,在执行本命令前,请执行install commit命令刷新主设备的下次启动软件包列表。否则,可能导致备设备升级后与主设备的版本不一致。

【举例】

# 同步指定slot的软件版本。

<Sysname> boot-loader update slot 1

This command will update the specified 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.                                                          

Copying main startup software images to slot 1. Please wait...

Done.

Setting copied images as main startup software images for slot 1...

Done.

The images that have passed all examinations will be used as the main startup so

ftware images at the next reboot on slot 1.

Successfully updated the startup software images of slot 1.

【相关命令】

·     display boot-loader

·     install commit(基础配置命令参考/ISSU)

1.1.4  bootrom update

bootrom update命令用来将缺省存储介质中的BootWare程序加载到BootWare的Normal区。

【命令】

bootrom update file file slot slot-number-list

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

file file:缺省存储介质中包含BootWare程序的文件,file表示用于BootWare程序升级的文件的名称,为1~63个字符的字符串。

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

【使用指导】

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

执行该命令后,设备会将缺省存储介质中的BootWare程序加载到BootWare的Normal区。设备启动时,会直接使用Normal区的BootWare程序。因此,如果缺省存储介质空间不足,BootWare程序加载完成之后,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

1.1.5  display boot-loader

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

【命令】

display boot-loader [ slot slot-number ]

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【参数】

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

【使用指导】

使用该命令可显示父设备和PEX设备本次启动和下次启动所采用的启动软件包的名称。

【举例】

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

<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

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

<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

Software images on slot 101:

Current software images:

  flash:/rpu-S6300-boot.bin

  flash:/rpu-S6300-system.bin

 Main startup software images:

  flash:/rpu-S6300-boot.bin

  flash:/rpu-S6300-system.bin

 Backup startup software images:

  flash:/rpu-S6300-boot.bin

  flash:/rpu-S6300-system.bin

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

字段

描述

Software images

启动软件包的相关信息

Current software images

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

Main startup software images

主用下次启动软件包列表

Backup startup software images

备用下次启动软件包列表

 

【相关命令】

·     boot-loader file

1.1.6  display boot-loader pex

display boot-loader pex命令用来显示PEX设备的加载软件包列表。

【命令】

display boot-loader pex [ pex-model ]

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【参数】

pex-model:设备支持的PEX设备的型号,该参数必须完整输入,不区分大小写。可输入boot-loader pex ,来获取该参数的取值。不指定该参数时,表示所有型号的PEX设备。

【使用指导】

当PEX设备需要使用加载软件包启动时,就会根据加载软件包列表去当前主设备加载这些软件包。

【举例】

# 显示PEX设备的加载软件包列表。

<Sysname> display boot-loader pex

Startup software image files for PEXs to load from the parent device:

PEX model: PEX-S6300                                                           

  flash:/S6300PEX-BOOT.bin                                 

  flash:/S6300PEX-SYSTEM.bin                               

                                                                                

PEX model: PEX-S5130EI                                                         

  None                             

                                                                                

PEX model: PEX-S5130HI                                                         

  None

1.1.7  reset boot-loader pex

reset boot-loader pex命令用来清除PEX设备的加载软件包配置。

【命令】

reset boot-loader pex pex-model

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

pex-model:设备支持的PEX设备的型号,该参数必须完整输入,不区分大小写。可输入boot-loader pex ,来获取该参数的取值。

【使用指导】

请在设备启动完成、稳定运行后再配置该命令。

执行本命令不会将加载软件包从设备上删除。

【举例】

# 清除指定型号为PEX-S6300的PEX的加载软件包配置。

<Sysname> reset boot-loader pex PEX-S6300

【相关命令】

·     boot-loader pex file

·     display boot-loader pex

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

新华三官网
联系我们