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

01-基础配置命令参考

目录

07-软件升级命令

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

docurl=/cn/Service/Document_Software/Document_Center/Routers/Catalog/IPRAN_Converge/IPRAN_Converge/Command/Command_Manual/H3C_SR6600-F_CR-R7607-6W100/01/201703/975260_30005_0.htm

07-软件升级命令


1 软件升级

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

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作为后缀名,从存储介质名称开始最多可输入63个字符,不区分大小写。

all:用来升级整个系统。

slot slot-number:表示待升级的主控板所在的槽位号。

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

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

【使用指导】

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

当配置该命令时,命令中指定的软件包/IPE文件文件名中必须包含存储介质的名称。

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

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

【举例】

# 指定0号板下次启动时所用的主用启动文件为flash:/all.ipe。

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

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

H3C SR6605-F images in IPE:

  boot.bin

  system.bin

This command will set the main startup software images. Continue? [Y/N]:Y

Add images to slot 0.

File flash:/boot.bin already exists on slot 0.

File flash:/system.bin already exists on slot 0.

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

# 指定设备的主用下次启动软件为flash:/all.ipe(slot 1为主用主控板,slot 0为备用主控板)。

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

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

H3C SR6605-F 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 0.

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.

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

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 }

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

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

slot slot-number:表示待升级的备用主控板所在的槽位号。

【使用指导】

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

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

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

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

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

【举例】

# 将1号槽位的备用主控板上的软件版本与主用主控板的软件版本同步。

<Sysname> boot-loader update slot 1

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

Updating. Please wait...

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

Done.

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

Done.

Successfully updated the startup software images of slot 1.

【相关命令】

·     display boot-loader

1.1.3  display boot-loader

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

【命令】

display boot-loader [ slot slot-number ]

【视图】

任意视图

【缺省用户角色】

network-admin

network-operator

【参数】

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

【举例】

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

<Sysname> display boot-loader

Software images on slot 0:

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 slot n

位于槽位n上的某主控板的启动软件包的相关信息

Current software images

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

Main startup software images

主用下次启动软件包列表

Backup startup software images

备用下次启动软件包列表

 

【相关命令】

·     boot-loader file

1.1.4  version auto-update enable

version auto-update enable命令用来开启备用主控板自动加载启动软件包的功能。

undo version auto-update enable命令用来关闭备用主控板自动加载启动软件包的功能。

【命令】

version auto-update enable

undo version auto-update enable

【缺省情况】

备用主控板自动加载启动软件包的功能处于开启状态。当启动过程中,当备用主控板发现自己版本和主用主控板版本不一致时,会自动加载主用主控板的当前启动软件包。

【视图】

系统视图

【缺省用户角色】

network-admin

【使用指导】

备用主控板自动加载的是主用主控板当前的启动软件包。

配置undo version check ignoreversion auto-update enable命令后,在设备启动过程中,当备用主控板发现自己当前启动软件包版本和主用主控板的当前启动软件包版本不一致时,会自动拷贝主用主控板的当前启动软件包列表中的所有软件包,设置为自己的主用下次启动软件包,并自动重启。这样,能够使得备用主控板启动后,和主用主控板启动软件包的版本一致。

【举例】

# 开启备用主控板自动加载启动软件包的功能。

<Sysname> system-view

[Sysname] version auto-update enable

【相关命令】

·     version check ignore

1.1.5  version check ignore

version check ignore命令用来关闭对备用主控板进行启动软件包版本一致性检查功能,即不检查备用主控板的版本是否与主用主控板的启动软件包版本一致。

undo version check ignore命令用来开启对备用主控板进行启动软件包版本一致性检查功能。

【命令】

version check ignore

undo version check ignore

【缺省情况】

对备用主控板启动软件包版本一致性检查功能处于开启状态。

【视图】

系统视图

【缺省用户角色】

network-admin

【使用指导】

如果关闭对备用主控板进行启动软件包版本一致性检查功能,当备用主控板和主用主控板启动软件包版本不一致时,备用主控板仍然使用不一致的版本启动,可能会造成设备功能问题。

如果开启对备用主控板进行启动软件包版本一致性检查功能,当备用主控板和主用主控板启动软件包版本不一致时,备用主控板会停留在启动阶段,不能正常启动。

建议用户不要关闭启动软件包版本一致性检查功能。

【举例】

# 开启对备用主控板进行版本一致性检查功能。

<Sysname> system-view

[Sysname] undo version check ignore

【相关命令】

·     version auto-update enable

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

新华三官网
联系我们