2022年2月16日 星期三

Cisco 3850 Recovery 回復方式

 

Cisco 3850 Recovery 回復方式

無法開機原因很多,這只是其中的一種,此案是因為韌體更新時,未按照官方的正常程序(導致無法開機,但我依照官方的正常程序也是開不起來,言歸正傳,我還是寫下來,免得日後自己用的到。

ISO版本:cat3k_caa-universalk9.16.06.09.SPA.bin,該版本是免SA帳號的

情境:

原本Switch的版本是 cat3k_caa-universalk9.16.06.09.SPA的版本

原模式Bundel欲轉Install Mode

參考官網提供的手冊後,造成無法開機出現如下圖的畫面,可能是沒從頭到尾的研讀官網文件造成。

官方文件:https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3850/software/release/16-6/release_notes/ol-16-6-3850.html#pgfId-1134103

發生狀況

模式轉換失敗後可能會出現的訊息,找不到開機檔,會出現下列訊息

Booting...

Interface GE 0 link down***ERROR: PHY link is down

The "IP_ADDR" environment variable is not set.

Getting rest of image

Reading full image into memory...flash:cat3k_caa-base.SPA.03.07.05E.pkg: no such file or directory

loading flash:packages.conf

Reading full image into memory....done

Copying 'cat3k_caa-base.SPA.03.07.05E.pkg' into the buffer

Failed to open file: no such file or directory

Getting rest of image

Reading full image into memory...flash:cat3k_caa-base.SPA.03.07.05E.pkg: no such file or directory

loading flash:packages.conf

Reading full image into memory....done

Copying 'cat3k_caa-base.SPA.03.07.05E.pkg' into the buffer

Failed to open file: no such file or directory

The system is unable to boot automatically. The

BOOT environment variable needs to be set to a

bootable image.

switch:

 

解決方式:

1.      找支隨身碟格式化為FAT32

2.      把從官網下載來的bin檔拷進隨身碟裡

3.      在接上交換機器

4.      先在Switch : 下執行,flash_init

5.      Switch: dir usbflash0:

應該會看到以下訊息:

Directory of usbflash0:/

4  -rw-  407542491  cat3k_caa-universalk9.16.06.09.SPA.bin

32080412672 bytes available (407617536 bytes used)

6.      Switch: boot usbflash0:cat3k_caa-universalk9.16.06.09.SPA.bin #指定從usbflash0載入開機檔

7.      若有開機成功,請先確認從USB 開機的版本是哪個版本?

 

Switch>en

Switch#sh version

 

Cisco IOS XE Software, Version 16.06.09

中間略

Technology Package License Information:

 

-----------------------------------------------------------------

Technology-package                   Technology-package

Current             Type             Next reboot 

------------------------------------------------------------------

ipbasek9            Permanent        ipbasek9

 

Base Ethernet MAC Address          : 00:56:2b:7a:50:00

Motherboard Assembly Number       : 73-16297-04

Motherboard Serial Number          : FOC20233B3C

Model Revision Number              : AA0

Motherboard Revision Number        : B0

Model Number                      : WS-C3850-24T

System Serial Number               : FCW2023D0NF

 

Switch Ports  Model          SW Version   SW Image                 Mode  

------  -----   -----             ----------      ----------                  ----  

* 1   32    WS-C3850-24T    16.6.9       CAT3K_CAA-UNIVERSALK9   BUNDLE

 

Configuration register is 0x102

 

接下來要做的是Bundle轉換 Install Mode

 

Switch#request platform software package clean switch all file flash:

 

This operation may take several minutes...

Running command on switch 1

Cleaning up unnecessary package files

Scanning boot directory for packages ... done.

Preparing packages list to delete ...

done.

The following files will be deleted:

[switch 1]:

/flash/cat3k_caa-guestshell.16.06.09.SPA.pkg

/flash/cat3k_caa-rpbase.16.06.09.SPA.pkg

/flash/cat3k_caa-rpcore.16.06.09.SPA.pkg

/flash/cat3k_caa-srdriver.16.06.09.SPA.pkg

/flash/cat3k_caa-universalk9.16.06.09.SPA.conf

/flash/cat3k_caa-webui.16.06.09.SPA.pkg

/flash/packages.conf

 

Do you want to proceed? [y/n]y

[switch 1]:

Deleting file flash:cat3k_caa-guestshell.16.06.09.SPA.pkg ... done.

Deleting file flash:cat3k_caa-rpbase.16.06.09.SPA.pkg ... done.

Deleting file flash:cat3k_caa-rpcore.16.06.09.SPA.pkg ... done.

Deleting file flash:cat3k_caa-srdriver.16.06.09.SPA.pkg ... done.

Deleting file flash:cat3k_caa-universalk9.16.06.09.SPA.conf ... done.

Deleting file flash:cat3k_caa-webui.16.06.09.SPA.pkg ... done.

Deleting file flash:packages.conf ... done.

 SUCCESS: Files deleted.

 

把韌體檔案從隨身碟拷進內建的Flash

Switch#copy usbflash0:cat3k_caa-universalk9.16.06.09.SPA.bin flash:

Destination filename [cat3k_caa-universalk9.16.06.09.SPA.bin]? 直接按下Enter

Copy in progress...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC

中間略

407542491 bytes copied in 61.886 secs (6585375 bytes/sec)

Switch#dir flash:

Directory of flash:/

 

7746  -rw-          2097152  Feb 11 2022 14:28:12 +00:00  nvram_config

7747  -rw-        407542491  Feb 11 2022 14:36:52 +00:00  cat3k_caa-universalk9.16.06.09.SPA.bin

23233  drwx             4096  Feb 11 2022 14:25:13 +00:00  dc_profile_dir

38722  -rw-              616   Feb 7 2022 10:40:28 +00:00  vlan.dat

38723  -rw-             6170   Jun 7 2017 01:46:18 +00:00  startupconfig

15490  drwx             4096  Feb 11 2022 14:24:56 +00:00  .installer

38725  -rw-              555  Feb 11 2022 14:24:56 +00:00  bootloader_evt_handle.log

15492  drwx             4096   Feb 7 2022 14:00:43 +00:00  core

23235  drwx             4096   Feb 7 2022 13:49:32 +00:00  .prst_sync

38726  drwx             4096   Feb 7 2022 13:49:36 +00:00  .rollback_timer

69697  drwx             4096   Feb 7 2022 13:49:39 +00:00  gs_script

77442  drwx             4096   Feb 7 2022 13:49:39 +00:00  tech_support

38727  -rw-           128103  Feb 11 2022 14:25:34 +00:00  memleak.tcl

15493  drwx             4096   Feb 7 2022 15:00:02 +00:00  .dbpersist

38729  -rw-                0   Feb 7 2022 14:00:22 +00:00  rdope_out.txt

38730  -rw-               90   Feb 7 2022 14:00:34 +00:00  rdope.log

38731  -rw-          2097152  Feb 11 2022 14:28:12 +00:00  nvram_config_bkup

15494  drwx             4096   Feb 7 2022 14:00:40 +00:00  onep

 

1621966848 bytes total (1121218560 bytes free)

 

接著展開檔案

利用Switch all 更新所有在Stack上的交換機

利用 auto-copy .bin檔從Flash自動拷貝到在Stack上的其他switch

Switch#request platform software package expand switch all file flash: cat3k_caa-universalk9.16.06.09.SPA.bin auto-copy

[1]: Expanding file

 

*Feb 11 14:41:05.225: %IOSXE-5-PLATFORM: Switch 1 R0/0: Feb 11 14:41:05 packtool.sh: %INSTALL-5-OPERATION_START_INFO: Started expand package flash:cat3k_caa-universalk9.16.06.09.SPA.bin[1]: Finished expanding all-in-one software package in switch 1

SUCCESS: Finished expanding all-in-one software package.

 

*Feb 11 14:42:09.466: %IOSXE-5-PLATFORM: Switch 1 R0/0: Feb 11 14:42:09 packtool.sh: %INSTALL-5-OPERATION_COMPLETED_INFO: Completed expand package flash:cat3k_caa-universalk9.16.06.09.SPA.bin

 

清除開機參數

 

Switch#conf t

Switch(config)# no boot system

Switch(config)# boot system flash:packages.conf

Switch(config)# end

Switch#write memory

 

檢查開機參數值

Switch# show boot

---------------------------

Switch 1

---------------------------

Current Boot Variables:

BOOT variable = flash:packages.conf;

Boot Variables on next reload:

BOOT variable = flash:packages.conf;

Manual Boot = yes

Enable Break = yes

Switch#

 

檢查一下Flash裡有沒有packages.conf

可以把flash:下的packages.conf拷到隨身碟上,在拿到PC上去查看(notepad可開啟)

 

重新開機

Switch# reload

 

確認一下開機版本及模式

Switch# sh version

Cisco IOS XE Software, Version 16.06.09

中間略

Technology Package License Information:

 

-----------------------------------------------------------------

Technology-package                   Technology-package

Current             Type             Next reboot 

------------------------------------------------------------------

ipbasek9            Permanent        ipbasek9

 

Base Ethernet MAC Address          : 00:56:2b:7a:50:00

Motherboard Assembly Number       : 73-16297-04

Motherboard Serial Number          : FOC20233B3C

Model Revision Number              : AA0

Motherboard Revision Number        : B0

Model Number                      : WS-C3850-24T

System Serial Number               : FCW2023D0NF

 

Switch Ports  Model          SW Version   SW Image                 Mode  

------  -----   -----             ----------      ----------                  ----  

* 1   32    WS-C3850-24T    16.6.9       CAT3K_CAA-UNIVERSALK9   Install

 

Configuration register is 0x102

 

沒有留言:

張貼留言