Today I had to update a 3560x but when I consoled into the switch it was at Boot Loader prompt (switch:) and I wasn’t sure so I tried to boot and this is what happened.
switch: boot Loading "flash:/c3560e-universalk9-mz.122-53.SE2/c3560e-universalk9-mz.122-53.SE2.bin"...flash:/c3560e-universalk9-mz.122-53.SE2/c3560e-universalk9-mz.122-53.SE2.bin: no such file or directory Error loading "flash:/c3560e-universalk9-mz.122-53.SE2/c3560e-universalk9-mz.122-53.SE2.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.
I would like to show you how to recover a Cisco switch (ex. 3560x/3750x) from Boot Loader prompt (switch:) because from my experience the documentation I found on Cisco is incorrect or I am really stupid for not able to understand.
Here what I think is incorrect in the documentation and else where they copy pasted the instructions without verifying it.
Step 8 Start the file transfer by using TFTP. a. Specify the IP address of the TFTP server: switch: set IP_ADDR ip_address/mask
The above statement “Specify the IP address of the TFTP server” in the documentation is incorrect as I have repeatedly failed transferring the file and the reason is because it should have said “Specify the IP address of the Switch Managment Interface“.
So follow the steps below if you are also trying to recover the switch from boot load using TFTP to transfer file. If you like to use USB flash drive to transfer image to the flash click here.
Method 1: Transferring IOS image using TFTP
Step 1: Console into the Switch.
Step 2: Connect your Labtop (or TFTP Server) to the back port of the Switch (10/100TX, next to console/serial port) via Straight cable.
Note: I was using my Mac book and activated TFTP on it. You can do the same on your windows or mac laptop if you don’t have a separate TFTP Server.
Step 3: Initialize flash:
Step4: Initialize Management Interface
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.
switch:set IP_ADDR ip_address/mask
switch:set DEFAULT_ROUTER ip_address Example: switch: set IP_ADDR 10.1.100.2/255.255.255.0 switch: set DEFAULT_ROUTER 10.1.100.1
Note: After setting the variable you can check simply by typing “set“. If you make a mistake just type “unset” and the variable. (ex. unset IP_ADDR)
Step6: Once the correct image is transferred to your Laptop/TFTP server you can enter:
switch:copy tftp://TFTP_Server_IP_Add/IOS_image_filename.bin flash:IOS_image_filename.bin Example: switch: copy tftp://10.1.100.3/c3560e-universalk9-mz.122-53.SE2 flash:c3560e-universalk9-mz.122-53.SE2
Note: After flash: you need to specify full file name or else it will not accept.
If your attempt failed you will get the following message after a long wait.
connection timed out
If your attempt was successful you will see following.
.......................................................................................................................................... File "tftp://10.1.100.3/c3560e-universalk9-mz.122-53.SE2" successfully copied to "flash:c3560e-universalk9-mz.122-53.SE2"
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, until a gentle man (Leo) on Cisco forum share this little secret that’s not mention in Cisco docs. The steps as as below. (Thanks to Leo L. & Muhammad Y. for these instructions on Cisco Forum: Source, I haven’t tested this method yet so I am not 100% if this works.)
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:IOS_name.bin
Note: In case it’s not accepting the USB drive, try formatting it to 256 MB. Also “boot usbflash0:” is not only hidden but you might need to upgrade the router’s Bootstrap before you can use the command. Newer switches, like the 2960X/X, 3650 and 3850, and ISR G2s now support this command.
I hope I have covered every step here. Please leave a comment and let me know if there is anything you feel is incorrect and if this have helped you or not.
If the above didn’t resolve your issue. Please also look at this blog post.