本產品的文件集力求使用無偏見用語。針對本文件集的目的,無偏見係定義為未根據年齡、身心障礙、性別、種族身分、民族身分、性別傾向、社會經濟地位及交織性表示歧視的用語。由於本產品軟體使用者介面中硬式編碼的語言、根據 RFP 文件使用的語言,或引用第三方產品的語言,因此本文件中可能會出現例外狀況。深入瞭解思科如何使用包容性用語。
思科已使用電腦和人工技術翻譯本文件,讓全世界的使用者能夠以自己的語言理解支援內容。請注意,即使是最佳機器翻譯,也不如專業譯者翻譯的內容準確。Cisco Systems, Inc. 對這些翻譯的準確度概不負責,並建議一律查看原始英文文件(提供連結)。
本文說明如何將Cisco Catalyst固定組態交換器從損毀的系統映像或錯誤設定的開機變數中復原。
如果尚未執行,請將PC連線到交換機的控制檯埠。有關如何將終端機連線到Catalyst固定組態交換器的資訊,請參閱將終端機連線到Catalyst交換器上的主控台連線埠。使用終端模擬程式(例如Microsoft Windows HyperTerminal)建立控制檯會話。
以下是設定:
每秒位元數:9600
資料位:8
同位:無
停止位元:1
流量控制:無
埠設定
本文所述的Catalyst固定組態交換器包括2940、2950/2955、2970、3550、3560、3750和3750 Metro系列交換器。
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路運作中,請確保您瞭解任何指令可能造成的影響。
如需文件慣例的詳細資訊,請參閱思科技術提示慣例。
當Catalyst固定組態交換器遇到開機錯誤時,以下條件可能會適用:
交換器處於連續重新開機中。
交換器顯示switch:提示。
其 error loading flash:
消息。
switch: 提示表示交換器尚未完全開機並要求使用者完成開機程式。
其 error loading flash:
消息表明交換機由於映像損壞或丟失而無法載入映像。
下載失敗可能導致映像損壞或丟失。在這種情況下,映像的總和檢查碼或軟體升級失敗,且升級程式未正確執行。使用者可能已刪除了映像,但沒有替換該映像。引導變數可能設定不正確。
開啟控制檯會話後,您會看到類似以下的錯誤消息:
Error loading "flash:c2950-i6q4l2-mz.121-12c.EA1.bin"
通常,交換器會嘗試自動啟動快閃檔案系統中的下一個有效映像。以下是範例:
Error loading "flash:c2950-i6q4l2-mz.121-12c.EA1.bin" Interrupt within 5 seconds to abort boot process. Loading "flash:/c2950-i6q4l2-mz.121-13.EA1.bin"...###### ######################################################## !--- Output suppressed.
如果沒有可供啟動的有效備份映像,則啟動過程將完全失敗。以下是範例:
Error loading "flash:c2950-i6q4l2-mz.121-12c.EA1.bin" Interrupt within 5 seconds to abort boot process. Boot process failed...
註:PC必須連線到交換機的控制檯埠。
步驟1.如果交換器處於持續重新開機中,請完成此步驟中的任一程式,取決於您的交換器型號。
注意:如果交換機未處於連續重新啟動狀態,但已經處於switch:提示狀態,請直接繼續執行步驟2。
STAT LED和「模式」按鈕
a.拔下電源線。
b.將電源線重新接上交換機時,按住MODE按鈕。
MODE按鈕位於前面板的左側。
c.在STAT LED熄滅後放開「模式」按鈕。
附註:視型號而定,LED 位置可能會略有不同。
d.現在您處於switch: 提示中。請繼續執行步驟2。
埠1x LED
a.拔下電源線。
b.將電源線重新接上交換機時,按住MODE按鈕。
MODE按鈕位於前面板的左側。
c.在上一個LED埠1x熄滅後,放開「模式」按鈕。
附註:視型號而定,LED 位置可能會略有不同。
d.現在您處於switch: 提示中。請繼續執行步驟2。
a.從鍵盤發出break序列以進入switch: mode。
您使用的終端應用程式和作業系統確定要使用的中斷順序。在Windows 2000上執行的超級終端機使用Ctrl-Break。如需詳細資訊,請參閱密碼復原期間的標準 Break 按鍵順序組合。
此範例在2955上使用超級終端機進入switch: mode:
C2955 Boot Loader (C2955-HBOOT-M) Version 12.1(0.508)EA1, BETA TEST SOFTWARE Compiled Wed 30-Oct-02 15:24 by antonino WS-C2955T-12 starting... Base ethernet MAC Address: 00:03:fd:62:7c:00 Xmodem file system is available. Initializing Flash... flashfs[0]: 19 files, 2 directories flashfs[0]: 0 orphaned files, 0 orphaned directories flashfs[0]: Total bytes: 7741440 flashfs[0]: Bytes used: 4628480 flashfs[0]: Bytes available: 3112960 flashfs[0]: flashfs fsck took 7 seconds. ...done initializing flash. Boot Sector Filesystem (bs:) installed, fsid: 3 Parameter Block Filesystem (pb:) installed, fsid: 4 *** The system will autoboot in 15 seconds *** Send break character to prevent autobooting. !--- Wait until you see this message before
!--- you issue the break sequence.
!--- Enter Ctrl-Break with the use of HyperTerminal. The system has been interrupted prior to initializing the flash filesystem. The following commands will initialize the flash filesystem, and finish loading the operating system software: flash_init load_helper boot switch:
b.繼續執行步驟2。
步驟2.發出 flash_init
命令和 load_helper
指令。
如果快閃記憶體已初始化,您會看到以下內容:
switch: flash_init Initializing Flash... ...The flash is already initialized. switch:
如果快閃記憶體尚未初始化,您會看到:
switch: flash_init Initializing Flash... flashfs[0]: 21 files, 2 directories flashfs[0]: 0 orphaned files, 0 orphaned directories flashfs[0]: Total bytes: 7741440 flashfs[0]: Bytes used: 4499456 flashfs[0]: Bytes available: 3241984 flashfs[0]: flashfs fsck took 7 seconds. ...done initializing flash. Boot Sector Filesystem (bs:) installed, fsid: 3 Parameter Block Filesystem (pb:) installed, fsid: 4
發出 load_helper
命令載入任何引導幫助程式映像。以下是範例:
switch: load_helper switch:
步驟3.發出 dir flash:
命令,以便檢視Flash檔案系統的內容。
確定flash:中是否存在任何Cisco IOS®映像檔案或映像目錄。Cisco IOS映像檔案是 .bin
檔案和影象目錄均以影象檔名命名,但不包括 .bin
分機。如果沒有Cisco IOS映像檔案或映像目錄,您將看到以下內容:
switch: dir flash: Directory of flash:/ 2 -rwx 5 <date> private-config.text 3 -rwx 110 <date> info 4 -rwx 976 <date> vlan.dat 6 -rwx 286 <date> env_vars 26 -rwx 1592 <date> config.text 8 drwx 1088 <date> html 19 -rwx 110 <date> info.ver 4393472 bytes available (3347968 bytes used) switch: !--- No Cisco IOS images or image directories exist in Flash.
如果Flash目錄如下所示,請直接繼續執行步驟5。步驟5使用Xmodem檔案傳輸恢復交換機。
如果快閃記憶體中仍有映像,請發出 boot
命令(步驟4),嘗試將交換器復原。在您發出 boot
命令,驗證Cisco IOS映像儲存在Flash目錄中的位置。映像的儲存位置可能不同,這取決於您的交換機型號。
Catalyst 2940、2950和2955快閃記憶體檔案系統
Cisco IOS映像檔案(.bin
檔案)始終位於Catalyst 2940、2950和2955系列交換器上的flash:目錄中。以下是範例:
switch: dir flash: Directory of flash:/ 3 -rwx 2888547 <date> c2950-i6q4l2-mz.121-13.EA1.bin !--- The Cisco IOS image file (.bin file) is stored in
!--- the flash: directory on Catalyst 2940, 2950, and 2955 series switches. 4 -rwx 976 <date> vlan.dat 6 drwx 832 <date> html 22 -rwx 110 <date> info 23 -rwx 110 <date> info.ver 25 -rwx 38 <date> env_vars 3132928 bytes available (4608512 bytes used) !--- This output is from a Catalyst 2950 switch. Output from a
!--- Catalyst 2940 or 2955 varies slightly.
Catalyst 2970、3550、3560和3750快閃記憶體檔案系統
Catalyst 2970、3550、3560和3750上的快閃記憶體檔案系統的組織略有不同。您可以將Cisco IOS映像檔案儲存在 flash:
目錄。但是,如果您使用叢集管理套件 (CMS) 映像來管理具有 Web 介面的交換器,則可以將 Cisco IOS 映像檔案儲存在其自身的目錄中。發出 flash:
目錄命令,以便在此情況下顯示影象檔案。
switch: dir flash: Directory of flash:/ 2 -rwx 976 <date> vlan.dat 3 -rwx 386 <date> system_env_vars 4 -rwx 5 <date> private-config.text 6 -rwx 1554 <date> config.text 24 drwx 192 <date> c3550-i5q3l2-mz.121-13.EA1 !--- You can store the Cisco IOS image file in its own directory.
!--- Name the directory with the image name, but exclude the .bin extension. 42 -rwx 33 <date> env_vars !--- Output suppressed. switch: dir flash:c3550-i5q3l2-mz.121-13.EA1 !--- Issue the dir flash:Directory of flash:c3550-i5q3l2-mz.121-13.EA1/ 25 drwx 832 <date> html 40 -rwx 3993612 <date> c3550-i5q3l2-mz.121-13.EA1.bin !--- This is where the Cisco IOS image file is stored for a CMS image. 41 -rwx 252 <date> info 9992192 bytes available (6006784 bytes used) !--- This output is from a Catalyst 3550 switch. Output from a
!--- command in order to view the Cisco IOS image file.
!--- Catalyst 2970, 3560, or 3750 varies slightly. switch:
步驟4.驗證Cisco IOS映像檔案所在的位置後,嘗試啟動映像。發出 boot flash:
命令或 boot flash:
指令。
Catalyst 2950
switch: boot flash:c2950-i6q4l2-mz.121-13.EA1.bin !--- This example uses the boot flash:!--- command on a 2950. Loading "flash:c2950-i6q4l2-mz.121-13.EA1.bin"...########### ########################################################### !--- Output suppressed.
!--- This command syntax is the same for Catalyst 2940 and 2955 series
!--- switches.
Catalyst 3550
switch: boot flash:c3550-i5q3l2-mz.121-13.EA1/c3550-i5q3l2-mz.121-13.EA1.bin !--- This example uses the boot flash:/
!--- command on a 3550. Loading "flash:c3550-i5q3l2-mz.121-13.EA1/c3550-i5q3l2-mz.121-13.EA1.bin"...#### ################################################################################ !--- Output suppressed.
!--- This command syntax is the same for Catalyst 2970, 3560, and 3750
!--- series switches.
如果您發出boot命令,且結果成功啟動,則將顯示預設的switch:提示符或hostname:提示。
Press RETURN to get started! Switch> !--- The boot up was successful.
請確保在交換機上配置了正確的引導語句。請參見驗證部分。
如果您發出boot命令,但該命令並未導致成功啟動,則將會顯示switch: 提示或您再次陷入持續重新啟動中。恢復交換機的唯一選項是Xmodem檔案傳輸。步驟5涵蓋此檔案傳輸。
步驟5.如果boot命令失敗,或者沒有有效的映像在快閃記憶體中啟動,請執行Xmodem檔案傳輸。
典型的Xmodem檔案傳輸可能需要2小時,具體取決於映像大小。
下載Cisco IOS映像( .bin
檔案),您可以從思科技術支援與下載升級至該檔案。
注意:本文中提到的所有工具只能由思科註冊客戶端訪問。
註:請勿使用CMS映像( .tar
檔案)。此影象較大,需要較長的時間進行傳輸。
發出 dir flash:
命令,將映像的大小(以位元組為單位)與快閃記憶體中剩餘的可用空間進行比較。以下是範例:
switch: dir flash: Directory of flash:/ !--- Output suppressed. 3132928 bytes available (4608512 bytes used) !--- There are approximately 3 MB of Flash space available for a new image.
如有必要,請發出 delete
命令,以便刪除剩餘的所有損壞映像。以下是範例:
switch: delete flash:c2950-i6q4l2-mz.121-12c.EA1.bin !--- Issue the delete flash:Are you sure you want to delete "flash:c2950-i6q4l2-mz.121-12c.EA1.bin" (y/n)? y !--- Enter y for yes if you want to delete the image. File "flash:c2950-i6q4l2-mz.121-12c.EA1.bin" deleted switch:
!--- command in order to delete a Cisco IOS image.
下一個範例顯示使用超級終端的2955上的Xmodem程式。對於本文檔介紹的任何Catalyst固定配置交換機,其過程都相同。
發出 copy xmodem: flash:
命令時,才能停用自動交涉。
以下是範例:
switch: copy xmodem: flash:c2955-i6q4l2-mz.121-13.EA1.bin Begin the Xmodem or Xmodem-1K transfer now... CCC
傳輸傳送檔案
c.在Send File對話方塊中選擇Xmodem協定,然後按一下Browse以選擇Cisco IOS映像( .bin
檔案)。
d.按一下Send以開始Xmodem傳輸。
開始Xmodem傳輸
Xmodem檔案傳輸開始。此傳輸可能需要長達2小時,具體取決於影象的大小。
CCCCCC......................................................................... ................................................................................ ................................................................................ ................................................................................ ................................................................................ ................................................................................ ................................................................................ ................................................................................ ............................................................................. File "xmodem:" successfully copied to "flash:c2955-i6q4l2-mz.121-13.EA1.bin" !--- If the Xmodem file transfer fails for some reason, restart the process.
!--- If the Xmodem file transfer is successful, you return to the
!--- switch: prompt. switch:
步驟6.使用Xmodem過程引導您剛剛複製的新映像。
發出 boot flash:
命令,如以下範例所示:
switch: boot flash:c2955-i6q4l2-mz.121-13.EA1.bin Loading "flash:c2955-i6q4l2-mz.121-13.EA1.bin"...############################### ################################################################################ !--- Output suppressed. Press RETURN to get started! Switch> !--- The boot up was successful.
請確保您的引導語句設定正確。
當使用者嘗試將交換機從損壞或丟失的Cisco IOS中恢復時, copy xmodem: flash:[Cisco IOS filename]
switch:提示下未顯示命令。其 copy
命令會顯示在switch:提示符下,但 copy xmodem:
命令不是。
完成以下步驟以加速Xmodem恢復:
在switch:提示處將波特率設定為15200。
switch: set BAUD 115200 !--- The screen goes blank after you enter this command.
重新啟動超級終端。
在COM埠屬性下,選擇每秒位數,如115200。隨即顯示switch:提示。
啟動Xmodem恢復。
在Xmodem恢復後,將BAUD速率設定為9600。如果set BAUD 9600命令未將波特率設定為9600,請發出
unset
BAUD
命令,將波特率設定為預設值9600 bps。
請完成以下步驟:
發出 show version
命令,以驗證您運行的軟體的當前版本。
以下是範例:
2955#show version Cisco Internetwork Operating System Software Cisco IOS (tm) C2955 Software (C2955-I6Q4L2-M), Version 12.1(13)EA1, RELEASE SOFTWARE !--- This is the current version of software.
發出 dir flash:
命令以顯示Cisco IOS映像(.bin
檔案)。
2950#dir flash: Directory of flash:/ 3 -rwx 5 Mar 01 1993 00:12:55 private-config.text 4 -rwx 2905856 Jan 01 1970 03:06:25 c2955-i6q4l2-mz.121-13.EA1.bin !--- The Cisco IOS image (.bin file) is stored in flash:
!--- on a Catalyst 2940, 2950 or 2955.
!--- Output suppressed.
如果您在Catalyst 2970、3550、3560或3750上運行CMS映像,則可以在映像目錄中儲存Cisco IOS映像:
3550#dir flash: Directory of flash:/ 2 -rwx 976 Mar 01 1993 21:47:00 vlan.dat 4 -rwx 5 Mar 06 1993 23:32:04 private-config.text 6 -rwx 1554 Mar 06 1993 23:32:04 config.text 7 drwx 192 Mar 01 1993 00:14:02 c3550-i5q3l2-mz.121-13.EA1 !--- Notice the "d" for directory in the permission statement.
!--- This is an image directory that is installed when you upgrade the
!--- switch with a CMS image.
!--- The Cisco IOS image (.bin file) is inside this directory. 5 -rwx 3823261 Mar 01 1993 00:46:01 c3550-i5q3l2-mz.121-12c.EA1.bin !--- This is another Cisco IOS image (.bin file). 8 -rwx 33 Mar 01 1993 00:14:06 env_vars 9 -rwx 384 Mar 01 1993 00:14:06 system_env_vars 15998976 bytes total (6168576 bytes free) !--- This output is from a Catalyst 3550 switch. Output from a
!--- Catalyst 2970, 3560, or 3750 varies slightly. 3550#
您需要發出 dir flash:
命令以顯示Cisco IOS映像( .bin
檔案)。
3550#dir flash:c3550-i5q3l2-mz.121-13.EA1 Directory of flash:/c3550-i5q3l2-mz.121-13.EA1/ 23 drwx 832 Mar 01 1993 00:12:00 html 40 -rwx 3993612 Mar 01 1993 00:14:02 c3550-i5q3l2-mz.121-13.EA1.bin 41 -rwx 252 Mar 01 1993 00:14:02 info 15998976 bytes total (6168576 bytes free) !--- This output is from a Catalyst 3550 switch. Output from a
!--- Catalyst 2970, 3560, or 3750 varies slightly. 3550#
發出show boot指令,確認開機陳述式是否正確設定:
Switch#show boot BOOT path-list: !--- No boot system statement is set in this case.
!--- Output suppressed.
發出show boot命令以顯示開機陳述式。如果未設定引導語句,或者如果引導語句指向軟體的舊版本或丟失版本,請配置正確的引導語句。發出 boot system flash:
指令。
2955#configure terminal 2955(config)#boot system flash:c2955-i6q4l2-mz.121-13.EA1.bin !--- This is how to set a boot system statement on a Catalyst 2940, 2950, or 2955. 2955(config)#end 2955# 2955#show boot BOOT path-list: flash:c2955-i6q4l2-mz.121-13.EA1.bin !--- Output suppressed.
如果您在Catalyst 2970、3550、3560或3750上使用CMS映像,可以將Cisco IOS映像(.bin檔案)儲存在其自己的映像目錄中。發出 boot system flash:directory/filename
指令:
3550#configure terminal 3550(config)#boot system flash:c3550-i5q3l2-mz.121-13. EA1/c3550-i5q3l2-mz.121-13.EA1.bin !--- This command should be on one line.
!--- This is how to set a boot system statement on a Catalyst
!--- 3550 if the Cisco IOS image (.bin file) is in its own image directory. 3550#end 3550# 3550#show boot BOOT path-list: flash:c3550-i5q3l2-mz.121-13.EA1/c3550-i5q3l2-mz.121-13.EA1.bin !--- Output suppressed.
修訂 | 發佈日期 | 意見 |
---|---|---|
2.0 |
11-Aug-2023 |
重新認證 |
1.0 |
02-Apr-2003 |
初始版本 |