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

02-基础配置命令参考

目录

07-软件升级命令

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

docurl=/cn/Service/Document_Software/Document_Center/Wlan/WX/WX2500X-LI/Command/Command_Manual/H3C_WX2500X-LI_CR_E5605-977/02/202112/1518852_30005_0.htm

07-软件升级命令


1 软件升级

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

1.1  软件升级配置命令

1.1.1  boot-loader file

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

【命令】

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

boot-loader file ipe-filename { 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个字符。有关指定文件夹和文件详细介绍请参见“基础配置指导”中的“文件系统管理”。

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 WX2560X-LI 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  bootrom backup

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

【命令】

bootrom backup [ all | part ]

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

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

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

......Done.

【相关命令】

·     bootrom restore

1.1.3  bootrom read

bootrom read命令用来将BootWare程序从BootWare的Normal区读取到缺省文件系统中。

【命令】

bootrom read [ all | part ]

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

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

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

【使用指导】

成功执行本命令后,系统会自动生成basicbtm.bin和extendbtm.bin文件并保存到缺省文件系统中。其中,basicbtm.bin存储了BootWare程序的基本段,extendbtm.bin存储了BootWare程序的扩展段。

【举例】

# 读取BootWare程序。

<Sysname> bootrom read

  Now reading the Boot ROM, please wait...

.........Done.

【相关命令】

·     bootrom update

1.1.4  bootrom restore

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

【命令】

bootrom restore [ all | part ]

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

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

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

【举例】

# 恢复BootWare程序。

<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.5  bootrom update

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

【命令】

bootrom update file file [ all | part ]

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

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

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

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

【使用指导】

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

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

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

【相关命令】

·     boot-loader file

1.1.6  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:

  Image                 Version

  flash:/boot.bin       Release 0053

  flash:/system.bin     Release 0053

Main startup software images:

  Image                 Version

  flash:/boot.bin       Releae 0054

  flash:/system.bin     Releae 0054

Backup startup software images:

  Image                 Version

  flash:/boot.bin       --

  flash:/system.bin     --

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

字段

描述

Software images

启动软件包的相关信息

Current software images

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

Main startup software images

主用下次启动软件包列表

Image

软件包的名称

Version

软件包的版本号

当软件包被损坏或删除导致无法读取到版本号,则显示为—

Backup startup software images

备用下次启动软件包列表

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

 

【相关命令】

·     boot-loader file

 

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

新华三官网
联系我们