How-To Recover a Cisco Switch from Boot Loader 3560/3750
Recovering from a Software Failure
Method 1: Transferring IOS image using TFTP
Switch software can be corrupted during an upgrade, by downloading the wrong file to the switch, and by deleting the image file. In all of these cases, the switch does not pass the power-on self-test (POST), and there is no connectivity.
This procedure uses boot loader commands and TFTP to recover from a corrupted or wrong image file.
This recovery procedure requires that you have physical access to the switch.
You need 2 Cables – 1. Console Cable and 1 Ethernet Cable
Step 1: Console into the Switch.
Step 2: Connect your Labtop/PC (or TFTP Server) to the back port of the Switch (10/100TX, next to console/serial port) via Straight cable..
Power on the Switch
Step 3: Initialize flash:
switch: flash_init
Step4: Initialize Management Interface
switch: mgmt_init
Step5: Assign IP address/Subnet Mask of the Management Interface (Not TFTP Server, which is mentioned in the Cisco documentation and is an error.) and default gateway. Make sure the variable are set in the same format below.
Example:
switch: set IP_ADDR 192.168.1.2/255.255.255.0
switch: set DEFAULT_ROUTER 192.168.1.1
Note : My PC IP address 192.168.1.1 ( which is connected to one of the Switch Port)
Step6: Once the correct image placed in TFTP Folder, To Transfer the image to Switch from Laptop/TFTP server you can enter:
Example:
switch: copy tftp://192.168.1.1/
c3560e-ipbasek9-mz.122-55.SE12.bin flash:c3560e-ipbasek9-mz.122-55.SE12.bin
After completion of Transfer you see successfully copied to “flash:c3560e-ipbasek9-mz.122-55.SE12.bin“
Step 7: Boot up the newly downloaded Cisco IOS image.
switch: boot flash:c3560e-ipbasek9-mz.122-55.SE12.bin
Once boot success setup boot variable :
Step 8 :
switch: set BOOT flash:c3560e-ipbasek9-mz.122-55.SE12.bin
Save and reload and test.
Method 2: Transferring IOS image using USB Flash drive.
Before creating this post I didn’t know the Boot Loader (Rommon) mode supports USB flash drive -The steps as as below.
Step 1: Take a USB of any size, format it using FAT16.
Step 2: Copy a valid IOS to the USB drive.
Step 3: Insert USB to your Router/Switch.
Step 4: Reset you Router/Switch.
Step 5: Enter following comman
switch: dir usbflash0:
Step 6: Once you verify that it has detected the flash you can boot router/Switch using the following command
switch: boot usbflash0:c3560e-ipbasek9-mz.122-55.SE12.bin
Step 7: Boot up the newly downloaded Cisco IOS image.
switch: boot flash:c3560e-ipbasek9-mz.122-55.SE12.bin
Once boot success setup boot variable :
Step 8 :
switch: set BOOT flash:c3560e-ipbasek9-mz.122-55.SE12.bin
Save and reload and test.