cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4407
Views
4
Helpful
16
Replies

How to recover cisco catalyst 3850 software image from another Switch?

hogr fatih
Level 1
Level 1

Hey Everyone!

I accidently factory reset one of the switches and used command "factory-reset all" instead of just a config. Now I lost the software image in the flash/: and lost all the pkg files inside the flash.

how I can recover the software image from the same switch version on the stack and load it up again?

Any help will be appreciated. you can look at the output in the image attached

 


switch: dir flash
unable to stat flash/: no such device

1 Accepted Solution

Accepted Solutions

Leo Laohoo
Hall of Fame
Hall of Fame
emergency-install usbflash0:cat3k_caa-universalk9.16.12.08.SPA.bin

View solution in original post

16 Replies 16

Copy the ios from working SW to tftp then copy from tftp to SW (factory reset)

Thanks Sir for the reply but our company doesn't let use tftp application on the PC otherwise I had this idea in mind to copy the files but unfortunately is not allowed 

 

Can you be "creative" in solving this dilemma? A Raspberry Pi Zero might cost $20-30 USD and can be configured as a tftp server. Would it be a security violation to call such a Pi Zero a "flash recover appliance", connect it to the Cat 3850 (after disconnecting the 3850 from your company network), and pull in the IOS image via the console?

I used to keep a Pi Zero around for just this purpose of being a tftp server in a lab when I needed one quickly.

Disclaimers: I am long in CSCO. Bad answers are my own fault as they are not AI generated.

Thanks Ramblin I found cisco flash usb I think that will be better to recover from it! I really don't have a time to order Pi Zero and use it by today

Dustin Anderson
VIP Alumni
VIP Alumni

Assuming you can download the bin file from cisco, download and put on a flash drive, you should be able to have it boot from the flash and then once booted run the install command to install it to the flash.

This happened to us years ago, and I think the cavate is you couldn't install from the booted file, so may have to copy the bin to flash then install from there, but should be able to recover that way.

 

Found this recovery info:

https://community.cisco.com/t5/networking-knowledge-base/recovering-from-a-3850-boot-failure/ta-p/3136638 

Hi @hogr fatih 

 Usb drive might help you.

I tried the flash and it show below error 

switch: boot usbflash0:packages.conf

Getting rest of image
Reading full image into memory...Check base package header ...: done = 16384
Getting rest of image
Reading full image into memory....done
Reading full base package into memory...: done = 32794466
Bundle Image
--------------------------------------
Kernel Address : 0x556e33c4
Kernel Size : 0x438356/4424534
Initramfs Address : 0x55b1b71a
Initramfs Size : 0x1ab5848/28006472
Compression Format: mzip

usbflash0:packages.conf: boot path not allowed to boot package
Boot process failed...

 

@hogr fatih does you switch run in bundle mode or install mode?

 If they run in bundle mode you need to copy the bin file to a pen driver.

 You may check other switch with command show version

.conf <<- this file for run/startup config not for IOS image as I know 

Leo Laohoo
Hall of Fame
Hall of Fame
emergency-install usbflash0:cat3k_caa-universalk9.16.12.08.SPA.bin

Thanks Leo!
I was able to solve with above command you mentioned appreciate it.

Copied from you

switch: emergency-install usbflash0:cat3k_caa-universalk9.16.12.08.SPA.bin
The bootflash will be erased during install operation, continue (y/n)?y
Starting emergency recovery (usbflash0:cat3k_caa-universalk9.16.12.08.SPA.bin)...

Cannot access recovery file (sda9:cat3k_caa-recovery.bin and sda9:c3850-recovery.bin)
Call Cisco Systems Technical Support
usage: emergency-install url://<url>

Latest file from cisco

switch: emergency-install usbflash0:cat3k_caa-universalk9.16.12.13.SPA.bin
The bootflash will be erased during install operation, continue (y/n)?y
Starting emergency recovery (usbflash0:cat3k_caa-universalk9.16.12.13.SPA.bin)...

Cannot access recovery file (sda9:cat3k_caa-recovery.bin and sda9:c3850-recovery.bin)
Call Cisco Systems Technical Support
usage: emergency-install url://<url>


Mine cant work for both. Anything else i can do?

boot usbflash0:cat3k_caa-universalk9.16.12.13.SPA.bin

aircon_0-1764034994969.png

//after reseat power cord, i can communicate with switch again. but this time it shows this message:

 

Booting...cf_identify_drive: cf_waitfor(CMD_READY): timed out.
Boot bus: Failed to detect any IDE storage!

Interface GE 0 link down***ERROR: PHY link is down
The "IP_ADDR" environment variable is not set.
flash:cat3k_caa-universalk9.16.12.07.SPA.bin: no such device
Cannot open file flash:cat3k_caa-universalk9.16.12.07.SPA.bin
flash:cat3k_caa-universalk9.16.12.07.SPA.bin: no such device
flash:cat3k_caa-universalk9.16.12.07.SPA.bin: no such device

Error loading "flash:cat3k_caa-universalk9.16.12.07.SPA.bin"

Interrupt within 5 seconds to abort boot process.
Boot process failed...
:

The system is unable to boot automatically. The
BOOT environment variable needs to be set to a
bootable image.

 

//after boot flash command:

 

switch: boot usbflash0:cat3k_caa-universalk9.16.12.13.SPA.bin
Reading full image into memory................................................................................................................................................................................................................................................................................................................................................................................................................................................................................done
Bundle Image
--------------------------------------
Kernel Address : 0x537a26ec
Kernel Size : 0x43857f/4425087
Initramfs Address : 0x53bdac6b
Initramfs Size : 0x1cac6da/30066394
Compression Format: mzip

Bootable image at @ ram:0x537a26ec
Bootable image segment 0 address range [0x81100000, 0x81da6400] is in range [0x80180000, 0x90000000].
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
File "usbflash0:cat3k_caa-universalk9.16.12.13.SPA.bin" uncompressed and installed, entry point: 0x818968e0
Loading Linux kernel with entry point 0x818968e0 ...
Bootloader: Done loading app on core_mask: 0x3f

### Launching Linux Kernel (flags = 0x5)

Linux version 4.9.187 (deeratho@sjc-ads-7586) (gcc version 5.3.0 (GCC) ) #1 SMP Sun Jul 2 23:04:41 PDT 2023
CVMSEG size: 2 cache lines (256 bytes)
Cavium Inc. SDK-5.1.0
bootconsole [early0] enabled
CPU0 revision is: 000d900a (Cavium Octeon II)
Checking for the multiply/shift bug... no.
Checking for the daddiu bug... no.
● localhost
State: initializing
Jobs: 3789385 queued
Failed: 3789385 units
Since: Thu 1970-01-01 00:00:03 Universal; 55 years 10 months ago
CGroup: /
├─init.scope
│ └─1 /init splash SKIP_POST
└─system.slice
├─report_fails.service
│ └─335 systemctl status -l -n 100 -o short-monotonic --no-pager
├─systemd-udevd.service
│ └─186 /lib/systemd/systemd-udevd
└─systemd-journald.service
└─165 /lib/systemd/systemd-journald
>>> Rebooting
Failed to connect to bus: No such file or directory
Failed to connect to bus: No such file or directory
watchdog: watchdog0: watchdog did not stop!
reboot: Restarting system


Booting...
*** Illegal Opcode Exception ***
PC = 0x00000000 00000000
SP = 0xffffffff 80049670
Cause Reg = 0x00000000 40008028, Status Reg = 0x00000000 505000e7

 

//after hard reboot

 

..
*** Coprocessor Unusable Exception ***
PC = 0x00000000 00000000
SP = 0xffffffff 80049670
Cause Reg = 0x00000000 5000802c, Status Reg = 0x00000000 504000e7

 

//pressing enter doesnt get the switch to response.