It happens… You are updating the IOS firmware on your Cisco device, and you get distracted. You deleted the old firmware to make space for the new, started the TFTP transfer, and somewhere in the 10 minute wait – you get distracted and something goes wrong. You’ll end up with a Cisco (877 router in my case) which is now in recovery mode – displaying ‘rommon’
A great guide put together by my colleague Josh Cunningham, on his Blog is summarised below to recover your deleted or corrupted Cisco IOS firmware.
First we need to get the router and the computer on the same subnet. Set IP as follows:
IP: 10.0.0.2
Subnet: 255.255.255.0
Default Gateway: 10.0.0.1
Connect an ethernet cable between your computer and Eth0. Ensure that your TFTP server is running on your computer, and type the following commands into the terminal window :
rommon 1 > IP_ADDRESS=10.0.0.1 rommon 2 > IP_SUBNET_MASK=255.255.255.0 rommon 3 > DEFAULT_GATEWAY=10.0.0.2 rommon 4 > TFTP_SERVER=10.0.0.2 rommon 5 > TFTP_FILE=c3845-adventerprisek9-mz.124-21.bin (Example file name, this should be your flash file including ext eg: .bin) rommon 6 > tftpdnld
After a fairly lengthy wait – your IOS firmware should have transferred, and should boot as normal. So long as you haven’t factory reset, your configuration file will still be present on the flash so should load.
To clarify; to correctly update the flash firmware on the Cisco, you should follow these steps whilst in enable mode :
sh flash //This will show all current files loaded into the flash del FILENAME //will delete a file from the flash memory copy tftp fl // will copy a flash file from a TFTP server
2 replies on “Cisco IOS deleted by mistake? Recovery guide”
i just want to say THANK YOU
you have helped me out so much!!
[…] Furthermore, the show command does not work on ROMMON mode. I have the IOS that will be uploaded into the switch. But how do I do that? Please help. Thanks. I am doing all this via console. Here is the site I used as a guide: https://www.mikcx.com/cisco-ios-deleted-by-mistake-recovery-guide/ […]