Jalson International Inc.
  • Home
  • Services
    • Managed Services
    • Consulting and Professional Services
  • Contact
  • Blog

Notes to self and to help others along the way...

Recovering a IOS Switch or Router from ROMMON using USB (and avoiding XModem)

6/20/2020

4 Comments

 
For anyone working in Cisco IOS world knows the pain when an IOS gets deleted from flash by mistake or the IOS image on the flash gets corrupt. The device keeps on booting to a state known as ROMMON. The usual XMODEM procedure is painfully long. The IOS image copy process can take more than 9 hours - if the file is around 25 MB. 

To put the IOS back into the switch using USB can be pretty quick. I have done this in under an hour. Here is how to do it.

I am using Catalyst 2960X in my example below. 

​First make sure your IOS device has a USB port. If it does, we need a format a USB flash drive in a way IOS recognizes it. The file format has to be FAT16 (or FAT).
Note: FAT32 and FAT-EX are not supported by the Cisco IOS devices.

The USB drive has to be smaller or equal to 2 GB. If you don't have a USB drive smaller than 2 GB, follow this.

Here are the options I checked on when I formatted my USB drive to FAT on my Windows PC. Don't do Quick Format.

Picture
After formatting, put the IOS image on the USB drive. Now power on the switch or router. It would come to the ROMMON state.

Insert the USB flash drive in the USB port. Make sure that switch is able to see the IOS image on the USB. Issue the command dir usbflash0:
Picture
​Now enter boot usbflash0:c2960x-universalk9-mz.152-7.E2.bin so the the switch boots using the image on the USB.
Picture
For some reason, my switch came back to ROMMON after this above step as well - which it shouldn't have. So I had to repeat the above step once again. After the next time it came up fine.
Picture
Now the flash doesn't have a valid IOS image. We need to copy the image on the switch's flash.
I copied it by making the laptop as the FTP server. I use Filezilla. I gave my PC IP address of 10.10.10.2/24

On Switch

en
conf t
int vlan 1
ip address 10.10.10.1 255.255.255.0
no shut



ip ftp username cisco
ip ftp password cisco
exit

On PC

Control Panel >> Network and Internet >> Network Connections >> Ethernet >> Properties >> Internet Protocol  Version 4  (TCP/IPv4)
Picture
Make sure you are able to ping each other (from switch ping 10.10.10.2 and from laptop ping 10.10.10.1)

Once both PC and switch have IP connectivity, issue the command:

copy ftp: flash:

Provide the IP Address of FTP server (10.10.10.2 - in my example) and file name (c2960x-universalk9-mz.152-7.E2.bin - in my example)

Make sure you get the exclamations (!), and not the dots (.). If you get dots, that means either there isn't IP connectivity or (T)FTP server is not properly setup.
Picture
Issue dir to make sure that you see the IOS bin file in the switch's flash.
Picture
Make sure the config register is the right value before reloading by issuing sh ver
Picture
Reload the switch by reload command. Enter no to saving the config - this is so that on the boot, you get a fresh install of IOS.
Picture
Hopefully this will save you time just like it did to me and you can avoid xmodem IOS transfer.
4 Comments
Chris
1/9/2023 08:29:55 am

Thanks so much for this!

Reply
Pandora Heinstein link
8/20/2023 08:49:31 pm

Great share thanks for writing this

Reply
G. Putman
2/23/2024 08:37:52 pm

For you reading audience, please update your post with the make and model of 2GB (2.0) USB drive. Most network engineers will agree that may brands of USB manufacturers are not compatible with Cisco 2960X switches (ie. SanDisk 8Gb USB drives do not work, I tried for hours).

Reply
Happy Ending South Boston link
5/19/2025 03:28:48 pm

This USB method for restoring an iOS image seems much faster than XMODEM.

Reply



Leave a Reply.

    Author

    Saad is a Senior Collaboration Engineer. He is CCIE x 3 (Collaboration, R&S and Data Center)
    ​

    Picture

    Categories

    All
    Cisco
    Collaboration
    IOS
    Microsoft
    Pakistan
    Politics
    Virtualization
    Webex

    Archives

    May 2022
    April 2022
    March 2022
    June 2020
    July 2018
    April 2018
    March 2018
    January 2018
    April 2017
    March 2017
    February 2017

    RSS Feed

Powered by Create your own unique website with customizable templates.
  • Home
  • Services
    • Managed Services
    • Consulting and Professional Services
  • Contact
  • Blog