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

01-基础配置命令参考

目录

09-软件升级命令

本章节下载 09-软件升级命令  (199.43 KB)

docurl=/cn/Service/Document_Software/Document_Center/Home/Security/00-Public/Command/Command_Manual/H3C_SecPath_F50X0_D_F5000_AK_V7_R9608-2294/01/202203/1561294_30005_0.htm

09-软件升级命令


1 软件升级

如果将可插拔存储介质内的软件包指定为设备下次启动时使用的软件包,重启设备时不要将可插拔存储介质从设备上拔出,否则可能导致设备无法正常启动。建议将设备出厂时的缺省介质作为设备下次启动时使用软件包的存储位置。

1.1  软件升级配置命令

1.1.1  boot-loader file

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

【命令】

boot-loader file boot filename system filename [ feature filename&<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包。

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:指定系统中软件包适用的所有的硬件。

chassis chassis-number slot slot-number:表示待升级的主控板或安全插卡所在成员设备编号及槽位号。chassis-number表示IRF成员设备的编号,slot-number表示主控板或安全插卡所在的槽位号。

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

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

【使用指导】

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

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

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

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

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

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

【举例】

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

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

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

F5080lpu images in IPE:

  Boot.bin

  System.bin

This command will set the main startup software images. Please do not reboot any MPU during the upgrade. Continue? [Y/N]:

Add images to chassis 1 slot 1.

File flash:/Boot.bin already exists on chassis 1 slot 1.

File flash:/System.bin already exists on chassis 1 slot 1.

Overwrite the existing files? [Y/N]:

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 chassis 1 slot 1...Done.

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

File sda0:/Boot.bin already exists on chassis 1 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]:y

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

File sda0:/System.bin already exists on chassis 1 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]:y

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

Verifying the file sda0:/Boot.bin on chassis 1 slot 2...Done.

Verifying the file sda0:/System.bin on chassis 1 slot 2............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 2.

Specify the startup software image files for F5080lpu to load from the parent device? [Y/N]:y

The images that have passed all examinations will be used as the load software image files for F5080lpu.

Decompression completed.

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

【相关命令】

·     display boot-loader

1.1.2  boot-loader update

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

【命令】

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

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

all:表示同步升级所有全局备用主控板。

chassis chassis-number slot slot-number:表示待升级的全局备用主控板所在位置。chassis-number表示设备的成员编号,slot-number表示全局备用主控板所在的槽位号。

【使用指导】

对于新增的主控板,可以使用本命令同步启动软件包。

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

通过该命令指定全局备用主控板的下次启动软件包时,系统会进行如下处理:

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

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

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

【举例】

# 同步所有备用主控板的软件版本。

<Sysname> boot-loader update all

This command will update all the standby MPU. Please do not reboot any MPU during the upgrade. 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

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

1.1.3  bootrom backup

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

【命令】

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

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

chassis chassis-number:表示需要备份BootWare程序的设备在IRF中的成员编号。

slot slot-number-list:槽位号列表,表示同时备份多个单板的BootWare程序。表示方式为slot-number-list = { slot-number [ to slot-number ] }&<1-7>。其中,slot-number表示需要备份的单板所在的槽位号。&<1-7>表示前面的参数最多可以输入7次。

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

part:只操作BootWare程序的扩展段(BootWare程序分为两部分:基本段和扩展段,基本段提供BootWare菜单的基本操作项,扩展段提供更多的BootWare菜单操作项)。不指定allpart参数时,默认使用all

【使用指导】

BootWare分为Normal区和Backup区:

·     Normal区用于存放BootWare程序。设备启动时,会自动读取Normal区的BootWare程序。如果Normal区的BootWare程序不可用,再自动读取Backup区的BootWare程序。

·     Backup区用于存放BootWare程序的副本。如果在设备运行过程中,Normal区的BootWare程序被损坏或者需要版本回退,可以使用bootrom restore命令将BootWare程序从Backup区恢复到Normal区。

【举例】

# 将BootWare程序从BootWare的Normal区备份到Backup区。

<Sysname> bootrom backup chassis 1 slot 1

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

......Done.

【相关命令】

·     bootrom restore

1.1.4  bootrom read

bootrom read命令用来将BootWare程序从BootWare的Normal区读取到缺省存储介质中。

【命令】

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

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

chassis chassis-number:表示需要读取BootWare程序的设备在IRF中的成员编号。

slot slot-number-list:槽位号列表,表示同时读取多个单板的BootWare程序。表示方式为slot-number-list = { slot-number [ to slot-number ] }&<1-7>。其中,slot-number表示需要读取的单板所在的槽位号。&<1-7>表示前面的参数最多可以输入7次。

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

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

【使用指导】

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

【举例】

# 读取BootWare程序。

<Sysname> bootrom read chassis 1 slot 1

Now reading the Boot ROM, please wait...

.........Done.

【相关命令】

·     bootrom update

1.1.5  bootrom restore

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

【命令】

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

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

chassis chassis-number:表示需要恢复BootWare程序的设备在IRF中的成员编号。

slot slot-number-list:槽位号列表,表示同时恢复多个单板的BootWare程序。表示方式为slot-number-list = { slot-number [ to slot-number ] }&<1-7>。其中,slot-number表示需要恢复的单板所在的槽位号。&<1-7>表示前面的参数最多可以输入7次。

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

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

【举例】

# 恢复BootWare程序。

<Sysname> bootrom restore chassis 1 slot 1

This command will restore the Boot ROM file on the specified board(s), Continue? [Y/N]:y

Now restoring the Boot ROM, please wait...

......Done.

【相关命令】

·     bootrom backup

1.1.6  bootrom update

bootrom update命令用来将文件系统中的BootWare程序加载到BootWare的Normal区。

【命令】

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

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

file file:文件系统中包含BootWare程序的文件,file表示用于BootWare程序升级的文件的名称,为1~63个字符的字符串。

chassis chassis-number:表示需要升级BootWare程序的设备在IRF中的成员编号。

slot slot-number-list:槽位号列表,表示同时升级多个单板的BootWare程序。表示方式为slot-number-list = { slot-number [ to slot-number ] }&<1-7>。其中,slot-number表示需要升级的单板所在的槽位号。&<1-7>表示前面的参数最多可以输入7次。

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

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

【使用指导】

BootWare程序通过Boot包(*.bin)或*.btw文件发布,产品会将需要升级的单板的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 chassis 1 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.7  bootrom-update security-check enable

bootrom-update security-check enable命令用来开启BootWare程序合法性检查功能。

undo bootrom-update security-check enable命令用来关闭BootWare程序合法性检查功能。

【命令】

bootrom-update security-check enable

undo bootrom-update security-check enable

【缺省情况】

BootWare程序合法性检查功能处于开启状态。

【视图】

系统视图

【缺省用户角色】

network-admin

【使用指导】

如果开启了本功能,则在升级BootWare程序时,设备会先检查BootWare文件的合法性:包括BootWare文件是否有效以及是否和硬件匹配等。检查通过后,才会升级。

【举例】

# 启动BootWare升级时的合法性检查功能。

<Sysname> system-view

[Sysname] bootrom-update security-check enable

1.1.8  display boot-loader

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

【命令】

display boot-loader [ chassis chassis-number [ slot slot-number ] ]

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【参数】

chassis chassis-number [ slot slot-number ]:表示指定成员设备上的指定主控板。chassis chassis-number表示设备在IRF中的成员编号,slot slot-number表示主控板所在的槽位号。不指定该参数时,表示IRF中的所有主控板;指定该参数但不指定主控板时,表示指定IRF成员设备上的所有主控板。

【举例】

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

<Sysname> display boot-loader

Software images on chassis 1 slot 1:

Current software images:

  flash:/f5080mpu-cmw710-boot-E9608P03.bin

  flash:/f5080mpu-cmw710-system-E9608P03.bin

Main startup software images:

  flash:/f5080mpu-cmw710-boot-E9608P03.bin

  flash:/f5080mpu-cmw710-system-E9608P03.bin

Backup startup software images:

  None

Software images on chassis 1 slot 2:

Current software images:

  sda0:/f5080lpu-cmw710-boot-e9608p03.bin

  sda0:/f5080lpu-cmw710-system-e9608p03.bin

Main startup software images:

  sda0:/f5080lpu-cmw710-boot-e9608p03.bin

  sda0:/f5080lpu-cmw710-system-e9608p03.bin

Backup startup software images:

  sda0:/F5080LPU-CMW710-BOOT-E9608P03.bin

  sda0:/F5080LPU-CMW710-SYSTEM-E9608P03.bin

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

字段

描述

Software images

启动软件包的相关信息

Current software images

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

Main startup software images

主用下次启动软件包列表

Backup startup software images

备用下次启动软件包列表

 

【相关命令】

·     boot-loader file

 

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

新华三官网
联系我们