08-軟件升級命令
本章節下載: 08-軟件升級命令 (216.13 KB)
目 錄
如果將可插拔存儲介質內的軟件包指定為設備下次啟動時使用的軟件包,重啟設備時不要將可插拔存儲介質從設備上拔出,否則可能導致設備無法正常啟動。建議將固定存儲介質中的軟件包指定為設備下次啟動時使用的軟件包。
boot-loader file命令用來配置設備下次啟動時使用的軟件包。
【命令】
boot-loader file boot filename system filename [ feature filename&<1-30> ] [ patch filename&<1-16> ] { all | slot slot-number } { backup | main }
boot-loader file ipe-filename [ patch filename&<1-16> ] { all | slot slot-number } { backup | main }
【視圖】
用戶視圖
【缺省用戶角色】
network-admin
【參數】
boot:Boot包。
system:System包。
feature:Feature包。
patch:Patch包。該參數隻能指定非疊加補丁。由於每個Boot、System和Feature包隻能安裝一個非疊加補丁,所以非疊加補丁最多隻能同時安裝16個。
filename&<1-30>:軟件包的名稱,形如filesystemname/filename.bin。該文件必須保存在設備任一文件係統的根目錄下,該參數中必須包含文件係統的名稱,從存儲介質名稱開始最多可輸入63個字符。&<1-30>表示前麵的參數最多可以輸入30次。有關指定文件夾和文件詳細介紹請參見“基礎配置指導”中的“文件係統管理”。
ipe-filename:IPE(Image Package Envelope,複合軟件包套件)文件的名稱,形如filesystemname/filename.ipe。該文件必須保存在設備任一文件係統的根目錄下,該參數中必須包含文件係統的名稱,從存儲介質名稱開始最多可輸入63個字符。有關指定文件夾和文件詳細介紹請參見“基礎配置指導”中的“文件係統管理”。
all:指定係統中軟件包適用的所有的硬件。
slot slot-number:表示待升級的成員設備的編號。
backup:指定該軟件包為備用啟動軟件包。備用啟動軟件包用於主用啟動軟件包不可用或異常情況時,引導設備啟動。
main:指定該軟件包為主用啟動軟件包。主用啟動軟件包用於引導設備啟動。
【使用指導】
成功執行本命令後,係統在用命令中指定的軟件包替換現有的軟件包列表前會對軟件包進行數字簽名校驗,如果軟件包通過校驗則會替換現有的軟件包列表;如果軟件包未通過校驗則不會替換現有的軟件包列表,並返回錯誤提示信息。
當前軟件不能滿足現網運行或用戶業務需求時,可以使用本命令進行軟件升級,實現設備性能優化,以滿足用戶的業務需求。
成功執行該命令後,係統會用命令中指定的軟件包替換現有的軟件包列表。如果命令行中沒有指定Feature包,則更新後的軟件包列表中不會有Feature包。
係統會自動檢查指定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.
S6813-48X6C 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 slot1#flash:/all.ipe all main
Verifying the file flash:/all.ipe on slot 1......................................Done.
S6813-48X6C 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
【相關命令】
· display boot-loader
boot-loader update命令用來實現當前軟件版本的自動同步。
【命令】
boot-loader update { all | slot slot-number }
【視圖】
用戶視圖
【缺省用戶角色】
network-admin
【參數】
all:表示同步升級所有從設備。
slot slot-number:表示待升級的成員設備的編號。
【使用指導】
對於新增的IRF成員設備,可以使用本命令同步啟動軟件包。
通過該命令指定從設備的下次啟動軟件包時,係統會進行如下處理:
· 如果主設備當前是使用主用啟動軟件包列表啟動的,則將其主用下次啟動軟件包列表中的軟件包拷貝到從設備的對應目錄下,並設置為從設備的主用下次啟動軟件包。如果這些軟件包中有任一軟件包不存在或者不可用,則命令執行失敗。
· 如果主設備當前是使用備用啟動軟件包列表啟動的,則將其備用下次啟動軟件包列表中的軟件包拷貝到從設備的對應目錄下,並設置為從設備的主用下次啟動軟件包。如果這些軟件包中有任一軟件包不存在或者不可用,則命令執行失敗。
如果主設備剛安裝了補丁或者進行了ISSU升級,在執行本命令前,請執行install commit命令刷新主設備的下次啟動軟件包列表。否則,可能導致從設備升級後與主設備的版本不一致。
【舉例】
# 同步指定slot的軟件版本。
<Sysname> boot-loader update slot 2
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 2. Please wait...
Done.
Setting copied images as main startup software images for slot 2...
The images that have passed all examinations will be used as the main startup software images at the next reboot on slot 2.
Done.
Successfully updated the startup software images of slot 2.
【相關命令】
· display boot-loader
· install commit(基礎配置命令參考/ISSU)
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:成員編號列表,表示同時升級多個成員設備的BootWare程序。表示方式為slot-number-list = { slot-number [ to slot-number ] }&<1-7>。其中,slot-number表示需要升級的設備在IRF中的成員編號。
【使用指導】
BootWare程序通過Boot包(*.bin)發布,產品會將需要升級的設備的BootWare程序集成到Boot包中。此時可以使用本命令將升級文件指定為Boot包,係統會根據設備的型號自動將相應的BootWare程序加載到BootWare中;也可以在升級Boot包的同時完成BootWare程序的加載。
執行該命令後,設備會將文件係統中的BootWare程序加載到BootWare的Normal區。設備啟動時,會直接使用Normal區的BootWare程序。因此,如果文件係統空間不足,BootWare程序加載完成之後,BootWare文件可以刪除。
係統將文件係統中的BootWare程序加載到BootWare的Normal區前會對文件係統中包含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
display boot-loader命令用來顯示本次啟動和下次啟動所采用的啟動軟件包的名稱。
【命令】
display boot-loader [ slot slot-number ]
【視圖】
任意視圖
【缺省用戶角色】
network-admin
network-operator
【參數】
slot slot-number:表示成員設備的編號。不指定該參數時,表示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_backup.bin
flash:/system_backup.bin
表1-1 display boot-loader命令顯示信息描述表
字段 |
描述 |
Software images |
啟動軟件包的相關信息 |
Current software images |
最近一次啟動使用的啟動軟件包列表 |
Main startup software images |
主用下次啟動軟件包列表 |
Backup startup software images |
備用下次啟動軟件包列表 |
【相關命令】
· boot-loader file
不同款型規格的資料略有差異, 詳細信息請向具體銷售和400谘詢。H3C保留在沒有任何通知或提示的情況下對資料內容進行修改的權利!