C²S Consulting logo
C²S Consulting | Primers | Catalyst 3750 Switch recovery

Recovery process for Cisco Catalyst 3750

The Catalyst 3750 ends up at the bootloader prompt, then the software is corrupted.

Install Kermit on Linux

  • ckermit: is an all-purpose communications software package from the Kermit Project at Columbia University.
  • lrzsz: lrzsz is a unix communication package providing the XMODEM, YMODEM ZMODEM file transfer protocols.
~$ sudo apt-get install ckermit lrzsz

Catalyst 3750/3750G

The Catalyst 3750 or Catalyst 3750G does not have an Ethernet management port at the back so it is necessary to recover using XMODEM over the serial interface.

Connect to the switch, format the flash: and change the switch terminal speed to 115200 (way faster than 9600 for upload).

~$ kermit
(/home/dobriain/) C-Kermit>
(/home/dobriain/) C-Kermit>set line /dev/ttyUSB0
(/home/dobriain/) C-Kermit>set carrier-watch off
(/home/dobriain/) C-Kermit>set speed 9600
(/home/dobriain/) C-Kermit>connect

switch: set BAUD 115200

switch: format flash:
Are you sure you want to format "flash:" (all data will be lost) (y/n)? y
flashfs[0]: 0 files, 1 directory
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 32514048
flashfs[0]: Bytes used: 1024
flashfs[0]: Bytes available: 32513024
flashfs[0]: flashfs fsck took 7 seconds.
Filesystem "flash:" formatted

switch: flash_init
Initializing Flash...
...The flash is already initialized.

Change kermit terminal speed to 115200 to match the switch

Ctrl-\ press C

(/home/dobriain/) C-Kermit>set speed 115200
(/home/dobriain/) C-Kermit>connect

Tell the switch to expect an XMODEM upload

switch: copy xmodem:c3750-ipservicesk9-mz122-55se12.bin flash:c3750-ipservicesk9-mz122-55se12.bin
Begin the Xmodem or Xmodem-1K transfer now...

Proceed with upload

Ctrl-\ press C

(/home/dobriain/) C-Kermit>send /protocol:xmodem c3750-ipservicesk9-mz122-55se12.bin
Sending /home/dobriain/c3750-ipservicesk9-mz122-55se12.bin, 101665 blocks: Give your local XMODEM receive command now.
Xmodem sectors/kbytes sent: 24630/3140k
Bytes Sent:13013248   BPS:7503                            

Transfer complete

Connect to the switch again and change speed back to 9600.

(/home/dobriain/) C-Kermit>connect 
File "xmodem:c3750-ipservicesk9-mz122-55se12.bin" successfully copied to "flash:c3750-ipservicesk9-mz122-55se12.bin"

switch: set BAUD 9600

Ctrl-\ press C

(/home/dobriain/) C-Kermit>set speed 9600
(/home/dobriain/) C-Kermit>connect

switch:

Set the boot boot environment variable.

switch: set BOOT flash:c3750-ipservicesk9-mz122-55se12.bin

Boot the new image.

switch: boot flash:c3750-ipservicesk9-mz122-55se12.bin
Are you sure you want to reset the system (y/n)? y
System resetting...

Catalyst 3560X/3750X

It is possible to use Trival File Transfer Protocol (TFTP) via the Ethernet management port at the back instead of over the terminal cable which is slow. Establish a TFTP Server as described here

switch: set IP_ADDR 192.168.10.2/255.255.255.0
switch: set DEFAULT_ROUTER 192.168.10.1
switch: copy tftp://192.168.10.1/c3750-ipservicesk9-mz122-55se12.bin flash:c3750-ipservicesk9-mz122-55se12.bin
File "tftp://192.168.10.1/c3750-ipservicesk9-mz122-55se12.bin" successfully copied to "c3750-ipservicesk9-mz122-55se12.bin"
switch: boot flash:c3750-ipservicesk9-mz122-55se12.bin

Copyright © 2024 C²S Consulting