<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>ROMMON on Barash Helvadzhaoglu</title><link>https://barashhelvadzhaoglu.com/en/tags/rommon/</link><description>Recent content in ROMMON on Barash Helvadzhaoglu</description><generator>Hugo -- 0.170.1</generator><language>en</language><lastBuildDate>Thu, 22 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://barashhelvadzhaoglu.com/en/tags/rommon/index.xml" rel="self" type="application/rss+xml"/><item><title>Cisco ROMMON Recovery: Boot a Switch or Router from Flash, TFTP or USB</title><link>https://barashhelvadzhaoglu.com/en/posts/cisco-rommon-recovery/</link><pubDate>Thu, 22 Oct 2026 00:00:00 +0000</pubDate><guid>https://barashhelvadzhaoglu.com/en/posts/cisco-rommon-recovery/</guid><description>Cisco switch or router stuck at the switch: or rommon prompt? Recovery scenarios for Catalyst 9300, 9200, 3850, 2960, 3560 and ISR 4000 — boot from flash, set ROMMON network variables, boot over TFTP or USB, and fix an outdated ROMMON.</description><content:encoded><![CDATA[<p>After a reload, the device does not come back. On the console you see only <code>switch:</code> (Catalyst switches) or <code>rommon 1 &gt;</code> (routers). This is ROMMON, also called the boot loader: the small program that starts IOS. It stopped because it could not find or start a valid image.</p>
<p>This is not a hardware failure in most cases, and you do not need to replace the device. Which way out you take depends on one question: <strong>is a good image still in flash?</strong></p>
<table>
	<thead>
			<tr>
					<th>Scenario</th>
					<th>Situation</th>
					<th>Way out</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>1</td>
					<td>The correct image is in flash</td>
					<td>Boot it, fix the boot variable</td>
			</tr>
			<tr>
					<td>2</td>
					<td>The image is missing or corrupted</td>
					<td>Boot over TFTP or from USB, then copy the image to flash</td>
			</tr>
			<tr>
					<td>3</td>
					<td>The image is there, but ROMMON is too old for it</td>
					<td>Boot an older image, upgrade ROMMON, then upgrade</td>
			</tr>
	</tbody>
</table>
<h2 id="before-you-start-console-access">Before You Start: Console Access</h2>
<p>ROMMON is only reachable over the console. In a branch office that means a laptop and a console cable. In a data center, where you are rarely next to the rack, a console server is what makes recovery possible at all: <a href="/en/posts/next-gen-console-server-architecture/">Next-Gen Console Server Architecture</a>.</p>
<p>Look at the environment first:</p>
<pre tabindex="0"><code>switch: dir flash:
switch: set
</code></pre><p>On routers:</p>
<pre tabindex="0"><code>rommon 1 &gt; dir bootflash:
rommon 2 &gt; set
</code></pre><p><code>set</code> shows the boot loader variables. The important ones are <code>BOOT</code> (which image to start) and, on some switches, <code>MANUAL_BOOT</code> (if <code>yes</code>, the switch always stops at the prompt). On routers, also check the configuration register with <code>confreg</code>. A value of <code>0x2100</code> keeps the router in ROMMON. The normal value is <code>0x2102</code>.</p>
<p><code>help</code> or <code>?</code> lists the commands your ROMMON version supports.</p>
<h2 id="scenario-1-the-correct-image-is-in-flash">Scenario 1: The Correct Image Is in Flash</h2>
<p>The image is there, but the boot variable is wrong: a typo after an upgrade, a deleted file name, or <code>MANUAL_BOOT=yes</code>.</p>
<h3 id="boot-it-manually">Boot It Manually</h3>
<p>Catalyst 9000 and other IOS-XE switches in install mode:</p>
<pre tabindex="0"><code>switch: boot flash:packages.conf
</code></pre><p>In bundle mode, or on classic Catalyst switches:</p>
<pre tabindex="0"><code>switch: boot flash:&lt;image&gt;.bin
</code></pre><p>On classic Catalyst switches, images installed with <code>archive download-sw</code> are in a subdirectory. Check the full path with <code>dir flash:&lt;directory&gt;</code>.</p>
<p>Routers:</p>
<pre tabindex="0"><code>rommon 1 &gt; boot bootflash:&lt;image&gt;.bin
</code></pre><p>If the router stayed in ROMMON because of the configuration register:</p>
<pre tabindex="0"><code>rommon 1 &gt; confreg 0x2102
rommon 2 &gt; reset
</code></pre><h3 id="fix-the-boot-variable-in-ios">Fix the Boot Variable in IOS</h3>
<p>Once IOS is running, make the fix permanent, otherwise the problem returns at the next reload:</p>
<pre tabindex="0"><code>configure terminal
no boot system
boot system flash:packages.conf
end
write memory
show boot
</code></pre><p>Use the <code>.bin</code> file name instead of <code>packages.conf</code> in bundle mode, and <code>bootflash:</code> on routers.</p>
<h2 id="scenario-2-the-image-is-missing-or-corrupted">Scenario 2: The Image Is Missing or Corrupted</h2>
<p>The image was deleted by mistake, the copy was interrupted, or flash is empty. You need to bring an image to the device from outside. There are two practical ways.</p>
<table>
	<thead>
			<tr>
					<th></th>
					<th>TFTP from ROMMON</th>
					<th>USB</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Needs someone on site</td>
					<td>No</td>
					<td>Yes</td>
			</tr>
			<tr>
					<td>Works over a console server</td>
					<td>Yes</td>
					<td>Only if someone inserts the stick</td>
			</tr>
			<tr>
					<td>Speed</td>
					<td>Depends on the network</td>
					<td>Fast</td>
			</tr>
			<tr>
					<td>Typical use</td>
					<td>Data center, remote sites</td>
					<td>Branch office, lab</td>
			</tr>
	</tbody>
</table>
<h3 id="option-a-boot-over-tftp-from-rommon">Option A: Boot over TFTP from ROMMON</h3>
<p>If you are connected remotely through a console server and the network around the device works, TFTP is the most practical option. The hard part is the network configuration in ROMMON, because ROMMON has no IOS, no routing and no DHCP. You set everything by hand.</p>
<p><strong>Requirements:</strong></p>
<ul>
<li>The <strong>management port</strong> is connected and reachable. On Catalyst 9000 switches that is the dedicated management port (Gi0/0). ROMMON does not use the front-panel ports.</li>
<li>A TFTP server with the image is reachable from the management network. Setup and firewall rules: <a href="/en/posts/tftp-ftp-server-cisco-upgrades/">TFTP, FTP and SCP Servers for Cisco Upgrades</a>.</li>
</ul>
<p><strong>Catalyst 9000 switches:</strong></p>
<pre tabindex="0"><code>switch: set IP_ADDRESS 192.0.2.50
switch: set IP_SUBNET_MASK 255.255.255.0
switch: set DEFAULT_GATEWAY 192.0.2.1
switch: ping 192.0.2.10
switch: boot tftp://192.0.2.10/cat9k_iosxe.&lt;version&gt;.SPA.bin
</code></pre><p>Test with <code>ping</code> first. If the ping fails, there is no point starting the boot. Check the cable on the management port, the gateway and the firewall on the TFTP server.</p>
<p>Two limits apply, according to Cisco:</p>
<ul>
<li>The switch boots <strong>in bundle mode</strong> when you boot over TFTP.</li>
<li>The image is <strong>not copied to flash</strong>. It only runs from memory. After the next reload, you are back at the prompt.</li>
</ul>
<p><strong>ISR 4000 and other IOS-XE routers:</strong></p>
<pre tabindex="0"><code>rommon 1 &gt; IP_ADDRESS=192.0.2.50
rommon 2 &gt; IP_SUBNET_MASK=255.255.255.0
rommon 3 &gt; DEFAULT_GATEWAY=192.0.2.1
rommon 4 &gt; TFTP_SERVER=192.0.2.10
rommon 5 &gt; TFTP_FILE=isr4300-universalk9.&lt;version&gt;.SPA.bin
rommon 6 &gt; set
rommon 7 &gt; boot tftp://192.0.2.10/isr4300-universalk9.&lt;version&gt;.SPA.bin
</code></pre><p>Variable names and the exact boot syntax differ between ROMMON versions. Check with <code>set</code> and <code>help</code>. Older routers (ISR G2) use the <code>tftpdnld</code> command instead, which writes the image directly to flash.</p>
<p><strong>After the device has booted over TFTP:</strong> copy the image to flash, verify it and set it up properly, as described in the <a href="/en/posts/cisco-ios-xe-upgrade-guide/">upgrade guide</a>:</p>
<pre tabindex="0"><code>copy tftp://192.0.2.10/&lt;image&gt;.bin flash:
verify /md5 flash:&lt;image&gt;.bin
install add file flash:&lt;image&gt;.bin activate commit
</code></pre><p>On devices in bundle mode or classic IOS, set <code>boot system</code> to the copied file instead of <code>install add</code>.</p>
<h3 id="option-b-boot-from-usb">Option B: Boot from USB</h3>
<p>When someone can insert a USB stick, this is the easiest and fastest way. Format the stick with FAT32 and copy the image to it.</p>
<pre tabindex="0"><code>switch: dir usbflash0:
switch: boot usbflash0:&lt;image&gt;.bin
</code></pre><p>On ISR routers the USB device is usually called <code>usb0:</code> (on some models <code>usb1:</code>):</p>
<pre tabindex="0"><code>rommon 1 &gt; dir usb0:
rommon 2 &gt; boot usb0:&lt;image&gt;.bin
</code></pre><p>When the device is up, copy the image from USB to flash and fix the boot variable:</p>
<pre tabindex="0"><code>copy usbflash0:&lt;image&gt;.bin flash:
verify /md5 flash:&lt;image&gt;.bin
</code></pre><p>Then install it or set <code>boot system</code> as in Scenario 1.</p>
<h3 id="option-c-emergency-install-catalyst-9000">Option C: emergency-install (Catalyst 9000)</h3>
<p>Catalyst 9000 switches (except the 9200 series) have an <code>emergency-install</code> command in ROMMON. It installs an image from TFTP straight into flash:</p>
<pre tabindex="0"><code>switch: emergency-install tftp://192.0.2.10/cat9k_iosxe.&lt;version&gt;.SPA.bin
switch: boot flash:packages.conf
</code></pre><p>Warning: this <strong>erases the entire flash file system</strong>, including the configuration. Use it only when Options A and B are not possible, and only when you have a configuration backup.</p>
<h3 id="option-d-xmodem-over-the-console-classic-catalyst">Option D: Xmodem over the Console (Classic Catalyst)</h3>
<p>Classic Catalyst switches like the 2960 and 3560 have no network stack in the boot loader and often no USB port. The last resort is a transfer over the console with Xmodem:</p>
<pre tabindex="0"><code>switch: flash_init
switch: set BAUD 115200
switch: copy xmodem: flash:&lt;image&gt;.bin
</code></pre><p>After <code>set BAUD</code>, change your terminal program to 115200 baud. Even at this speed the transfer takes a long time. Reset the speed afterwards with <code>set BAUD 9600</code>, otherwise the next person connecting at 9600 baud sees only garbage.</p>
<h2 id="scenario-3-rommon-is-too-old-for-the-new-image">Scenario 3: ROMMON Is Too Old for the New Image</h2>
<p>The image is in flash and correct, but the device still does not start it. On ISR 4000 routers this happens when the target release needs a newer ROMMON than the device has, for example 17.x releases that need ROMMON 16.12(2r).</p>
<p>As far as I know, ROMMON cannot be upgraded from the ROMMON prompt on these platforms. The upgrade runs from IOS-XE. The way out:</p>
<ol>
<li>Boot an <strong>older image</strong> that works with the current ROMMON. From flash if you kept it, otherwise over TFTP or USB as in Scenario 2.</li>
<li>In IOS-XE, upgrade ROMMON: <code>upgrade rom-monitor filename bootflash:&lt;rommon&gt;.pkg R0</code>, then reload.</li>
<li>Check with <code>show rom-monitor r0</code>.</li>
<li>Now install the new image.</li>
</ol>
<p>This is why the <a href="/en/posts/cisco-ios-xe-upgrade-guide/">upgrade guide</a> puts the ROMMON check before the upgrade.</p>
<p>A related case: the boot variable points to an image for another platform family, for example an ISR 4300 image on an ISR 4400. The device stays in ROMMON. Boot the correct image manually and fix the boot variable.</p>
<h2 id="prevention">Prevention</h2>
<ul>
<li>Keep the current and the previous image on a server you can reach from the management network.</li>
<li>Check <code>show boot</code> (or <code>show bootvar</code>) and the ROMMON requirement before every planned reload.</li>
<li>Connect and test the management port before you need it.</li>
<li>Have console access ready for every upgrade: <a href="/en/posts/next-gen-console-server-architecture/">Next-Gen Console Server Architecture</a>.</li>
</ul>
<h2 id="related-articles">Related Articles</h2>
<ul>
<li><a href="/en/posts/cisco-ios-xe-upgrade-guide/">Cisco IOS and IOS-XE Upgrade Guide</a></li>
<li><a href="/en/posts/tftp-ftp-server-cisco-upgrades/">TFTP, FTP and SCP Servers for Cisco Upgrades</a></li>
<li><a href="/en/posts/cisco-switch-password-recovery/">Cisco Switch and Router Password Recovery</a></li>
<li><a href="/en/posts/cisco-nexus-nxos-upgrade-guide/">Cisco Nexus NX-OS Upgrade Guide (with ROMMON recovery)</a></li>
</ul>
<p>Sources: <a href="https://cisco.com/c/en/us/support/docs/switches/catalyst-9300-series-switches/216944-troubleshoot-bootloader-rommon-and-pas.html">Cisco: Troubleshoot Bootloader and Password Recovery on Catalyst 9000</a> · <a href="https://www.cisco.com/c/en/us/support/docs/routers/4000-series-integrated-services-routers/200678-Troubleshoot-Cisco-4000-Series-ISR-Stuck.html">Cisco: ISR 4000 Stuck in ROMMON</a></p>
]]></content:encoded></item><item><title>Cisco Switch and Router Password Recovery: Catalyst 9000, 2960, 3560 and ISR</title><link>https://barashhelvadzhaoglu.com/en/posts/cisco-switch-password-recovery/</link><pubDate>Thu, 22 Oct 2026 00:00:00 +0000</pubDate><guid>https://barashhelvadzhaoglu.com/en/posts/cisco-switch-password-recovery/</guid><description>Recover a lost enable or console password on Cisco devices without losing the configuration — classic Catalyst (2960, 3560, 3750), Catalyst 9000 and 3850 with SWITCH_IGNORE_STARTUP_CFG, ISR routers with confreg 0x2142, and what to do when password recovery is disabled.</description><content:encoded><![CDATA[<p>You inherit a device without documentation, or a lab switch comes back from storage and asks for a password nobody knows. On Cisco switches and routers you can recover from this without losing the configuration, as long as you have physical access and a console cable.</p>
<p>The principle is the same everywhere: interrupt the boot, start IOS <strong>without</strong> loading the startup configuration, then put the configuration back and set new passwords. Only the way you tell the device to skip the configuration differs:</p>
<table>
	<thead>
			<tr>
					<th>Platform</th>
					<th>Typical models</th>
					<th>How the configuration is skipped</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Classic Catalyst</td>
					<td>2960, 2960-X, 3560, 3750</td>
					<td>Rename <code>config.text</code> in the boot loader</td>
			</tr>
			<tr>
					<td>IOS-XE Catalyst</td>
					<td>3650, 3850, 9200, 9300, 9400, 9500</td>
					<td><code>SWITCH_IGNORE_STARTUP_CFG=1</code></td>
			</tr>
			<tr>
					<td>Routers</td>
					<td>ISR 4000, ISR 1100, Catalyst 8000, ISR G2</td>
					<td>Configuration register <code>0x2142</code></td>
			</tr>
	</tbody>
</table>
<h2 id="what-you-need">What You Need</h2>
<ul>
<li>Physical access to the device, or a console server. Password recovery is deliberately not possible over the network. See <a href="/en/posts/next-gen-console-server-architecture/">Next-Gen Console Server Architecture</a>.</li>
<li>A console cable and a terminal program. Settings: <strong>9600 baud, 8 data bits, no parity, 1 stop bit, no flow control</strong>.</li>
<li>A maintenance window. The device reboots and does not forward traffic during the procedure.</li>
</ul>
<h2 id="switches-get-to-the-switch-prompt">Switches: Get to the switch: Prompt</h2>
<p>On Catalyst switches you interrupt the boot with the <strong>Mode</strong> button:</p>
<ol>
<li>Connect the console and open the terminal session.</li>
<li>Unplug the power.</li>
<li>Hold the <strong>Mode</strong> button on the front panel and reconnect the power.</li>
<li>Keep holding until the console shows that the boot was interrupted, about 10 to 15 seconds, then release.</li>
</ol>
<p>You are now at the <code>switch:</code> prompt.</p>
<p>On a Catalyst 9400 with two supervisors, Cisco recommends removing the secondary supervisor before you start.</p>
<h2 id="classic-catalyst-2960-3560-3750-rename-configtext">Classic Catalyst (2960, 3560, 3750): Rename config.text</h2>
<pre tabindex="0"><code>switch: flash_init
switch: dir flash:
switch: rename flash:config.text flash:config.text.old
switch: boot
</code></pre><p>Some older boot loaders also need <code>load_helper</code> after <code>flash_init</code>. Do <strong>not</strong> delete <code>config.text</code>. Renaming is enough, and you need the contents later.</p>
<p>The switch boots without configuration. Answer <strong>no</strong> to the initial configuration dialog, then:</p>
<pre tabindex="0"><code>Switch&gt; enable
Switch# rename flash:config.text.old flash:config.text
Switch# copy flash:config.text system:running-config
</code></pre><p>Continue with the section &ldquo;Set New Passwords and Save&rdquo; below.</p>
<h2 id="catalyst-9000-and-3850-switch_ignore_startup_cfg">Catalyst 9000 and 3850: SWITCH_IGNORE_STARTUP_CFG</h2>
<p>IOS-XE switches do not need the rename. A boot loader variable tells IOS to ignore the startup configuration:</p>
<pre tabindex="0"><code>switch: SWITCH_IGNORE_STARTUP_CFG=1
switch: boot flash:packages.conf
</code></pre><p>Use <code>boot flash:&lt;image&gt;.bin</code> if the switch runs in bundle mode. After the boot, answer <strong>no</strong> to the initial configuration dialog, then load the configuration:</p>
<pre tabindex="0"><code>Switch&gt; enable
Switch# copy startup-config running-config
</code></pre><p><strong>Important:</strong> reset the variable from IOS. Otherwise the switch ignores its configuration at every reload:</p>
<pre tabindex="0"><code>Switch# configure terminal
Switch(config)# no system ignore startupconfig switch all
Switch(config)# end
</code></pre><p>Continue with the next section, then save.</p>
<h2 id="routers-isr-4000-isr-1100-catalyst-8000-confreg-0x2142">Routers (ISR 4000, ISR 1100, Catalyst 8000): confreg 0x2142</h2>
<p>Routers do not have a Mode button. Interrupt the boot by sending a <strong>Break</strong> from the terminal program during the first seconds after power-on. You land at the <code>rommon 1 &gt;</code> prompt.</p>
<pre tabindex="0"><code>rommon 1 &gt; confreg 0x2142
rommon 2 &gt; reset
</code></pre><p>The value <code>0x2142</code> tells the router to ignore the startup configuration. After the boot, answer <strong>no</strong> to the initial configuration dialog:</p>
<pre tabindex="0"><code>Router&gt; enable
Router# copy startup-config running-config
Router# configure terminal
Router(config)# config-register 0x2102
</code></pre><p>Setting the register back to <code>0x2102</code> is essential. Otherwise the router ignores its configuration at every reload.</p>
<h2 id="set-new-passwords-and-save">Set New Passwords and Save</h2>
<p>You are now in privileged mode with the original configuration loaded. Set new credentials to match how authentication was set up before:</p>
<pre tabindex="0"><code>configure terminal
enable secret &lt;new-enable-secret&gt;
username admin privilege 15 secret &lt;new-password&gt;
line con 0
 login local
line vty 0 15
 login local
end
</code></pre><p>If the device uses TACACS+ or RADIUS, check that the local fallback account works.</p>
<p>Copying a configuration into the running configuration merges it. Interfaces may stay administratively down, especially VLAN interfaces (SVIs) on switches. Check and fix:</p>
<pre tabindex="0"><code>show ip interface brief
</code></pre><p>Bring up interfaces that should be up with <code>no shutdown</code>. Then save and test:</p>
<pre tabindex="0"><code>write memory
reload
</code></pre><p>Log in with the new credentials after the reload to confirm that the configuration and the passwords survive.</p>
<h2 id="when-password-recovery-is-disabled">When Password Recovery Is Disabled</h2>
<p>If <code>no service password-recovery</code> is configured, the procedure behaves differently. The device does not let you skip the configuration. Instead it says that password recovery is disabled and asks whether to reset to the factory default configuration.</p>
<ul>
<li><strong>Yes:</strong> the configuration (and on switches the VLAN database) is deleted. The device boots with default settings. The IOS image stays.</li>
<li><strong>No:</strong> the device boots normally with the current configuration, and you are back at the password prompt.</li>
</ul>
<p>This is the purpose of the feature. Someone with physical access cannot read the configuration, but you lose it too. Before you answer yes, make sure you have a recent configuration backup from another source. After the reset, restore the configuration and recreate the VLANs if the backup does not contain them.</p>
<p><code>no service password-recovery</code> makes sense for devices in public or unlocked locations, as long as the configuration is backed up somewhere else.</p>
<h2 id="common-mistakes">Common Mistakes</h2>
<ul>
<li><strong>Deleting <code>config.text</code> instead of renaming it.</strong> Only a backup helps then.</li>
<li><strong>Forgetting <code>no system ignore startupconfig switch all</code> or <code>config-register 0x2102</code>.</strong> The device boots without configuration at the next reload.</li>
<li><strong>Not saving after setting the passwords.</strong> The old passwords come back at the next reload.</li>
<li><strong>SVIs left shut down after the merge.</strong> Management access over the network fails although the configuration looks correct.</li>
</ul>
<h2 id="related-articles">Related Articles</h2>
<ul>
<li><a href="/en/posts/cisco-rommon-recovery/">Cisco ROMMON Recovery: Boot from Flash, TFTP or USB</a></li>
<li><a href="/en/posts/cisco-ios-xe-upgrade-guide/">Cisco IOS and IOS-XE Upgrade Guide</a></li>
<li><a href="/en/posts/next-gen-console-server-architecture/">Next-Gen Console Server Architecture</a></li>
</ul>
<p>Source: <a href="https://cisco.com/c/en/us/support/docs/switches/catalyst-9300-series-switches/216944-troubleshoot-bootloader-rommon-and-pas.html">Cisco: Troubleshoot Bootloader and Password Recovery on Catalyst 9000</a></p>
]]></content:encoded></item></channel></rss>