Router/Switch Stuck in ROMmon Mode
ROMMON (ROM Monitor) or also known as bootstrap program is you can say a mini operating system in the Cisco devices that helps to initialize the processor hardware and boot the operating system software (Cisco IOS).
Or it is a bootstrap program that initializes the hardware and boots the Cisco IOS software when you power on or reload a router or switch. It’s the mode that allows you change the configuration registry and most commonly used to recover login password.
Cisco Internetwork Operating System (IOS) is the system software in Cisco devices, and is usually (and by default) stored in a memory area called flash as a .bin file (it can also be stored on a TFTP server). Flash memory provides non-volatile storage, which means that the content of the memory is not lost when the device loses power or reloads. When you power up a Cisco router or switch, it first begins the power-on self-test (POST) to ensure that the device functions properly, and then it looks for the IOS from flash memory. The IOS image is decompressed, which can be seen as a string of hashtags (#), and loaded into DRAM.
These are three ways the router can enter ROM Monitor (ROMmon) mode (rommon#>):
- Reload, initialize, or power cycle the router/Switch with the configuration register boot field set to 0.
- Reload, initialize, or power cycle the router/Switch without having a Cisco IOS Software image to boot from.
- Press the Break key within the first 60 seconds of the system boot. The break function is enabled during this period
If you have ever experienced the ROMmon mode problem, you probably came across one of the following:
- Configuration register forced the router to go to ROMmon mode during the boot process
- Corrupt image (IOS) on Flash (indicated by bad_checksum message)
- Router was unable to find the IOS (either on Flash or TFTP server)
- An IOS on a router has been (accidentally) deleted from flash
- You did not upgrade the amount of DRAM before upgrading the IOS
- You ”accidentally” entered a break key sequence to the console of your router, found yourself in ROMmon mode and do not know how to get out of it
- Or you experienced a physical layer problem.
How to Use XMODEM on a Switch Stuck in ROMMON
(XMODEM is a half-duplex communication protocol that has an effective error detection strategy. It breaks the original data into a series of packets, which are sent to the receiver together with additional information that permits the receiver to determine whether packets were properly received.)
- The first thing you need to do is turn the switch on while pressing the express setup button on the switch with a paperclip or thumbtack. You need to hold the button in for around 10 seconds and then let go.
- After you let the button go you should now be in ROMMON mode. The easiest way to tell if you are in ROMMON mode is by looking at the switch prompt. If you see switch: as your prompt then you know you are in ROMMON.
- Once you are in ROMMON mode the next step is to initialize the flash on the switch using the flash_init command.
- Next you will then start the Xmodem transfer process. First use the command copy xmodem: flash: ie2000-universalk9-mz.150-2.EA1.bin. once this command has been applied the transfer will begin on the switches end. (note that the .bin file will be different for different switches and different versions of IOS.
- Now that the transfer is started on the switches side it also needs to be started on the computers side as well. You do this by going to the menu bar of your console program and click the transfer section and select send Xmodem. Then you just need to select the IOS file you want to transfer and the transfer will begin.
- Now the transfer has been started correctly you will see a progress bar at the bottom giving you useful information such as how much data has been transferred and how fast it is being transferred.
- Now that the transfer is done the only things left to do are check the flash to make sure the file was transferred and to boot to the new IOS.
- Now that there is confirmation that the IOS has been successfully transferred to the flash you can now use the command boot flash: ie2000-universalk9-mz.150-2.EA1.bin to boot to the new IOS. And that’s it! Now your switch that was stuck in ROMMON can now boot correctly and can be configured.