IOS Recovery from corrupt or missing image from ROMMON
Indrodution:
hereby i describe how to recover from a corrupt or missing software image on
a Cisco Catalyst switch 2900XL and 3500XL. I will show you the steps and 2 examples to load
a software image with the hyperterminal software ‘tera term’ or ‘SecureCRT’.
If you have a failure to reload or boot up a switch the following message appears on the
command-line interface. The switch try to load the image
c2960-lanbasek9-mz.122-58.SE2/c2960-lanbasek9-mz.122-58.SE2.bin
but didn’t find it in the flash. The boot parameter will be set on the switch at an earlier time.
Base ethernet MAC Address: a4:18:75:d8:43:80
Xmodem file system is available.
The password-recovery mechanism is enabled.
Initializing Flash…
mifs[2]: 0 files, 1 directories
mifs[2]: Total bytes : 3870720
mifs[2]: Bytes used : 1024
mifs[2]: Bytes available : 3869696
mifs[2]: mifs fsck took 0 seconds.
mifs[3]: 0 files, 1 directories
mifs[3]: Total bytes : 27998208
mifs[3]: Bytes used : 1024
mifs[3]: Bytes available : 27997184
mifs[3]: mifs fsck took 1 seconds.
…done Initializing Flash.
done.
Loading "flash:/c2960-lanbasek9-mz.122-58.SE2/c2960-lanbasek9-mz.122-58.SE2.bin"…flash:/c2960-lanbasek9-mz.122-58.SE2/c2960-lanbasek9-mz.122-58.SE2.bin: no such file or directory</p>
Error loading "flash:/c2960-lanbasek9-mz.122-58.SE2/c2960-lanbasek9-mz.122-58.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.
Step 1:
It is not mandatory to format the flash before loading the IOS image via xmodem, but to be on the safe side, it is preferable to reformat the flash. If you do not, it is possible that the download process will getting interrupted.
At the first time type ‘flash_init’ to prepare the flash to be writable for data respectively for access the flash.
After that follow with the format command ‘format flash:’ and approve with y.
Initializing Flash…
…The flash is already initialized.
switch: format flash:
Are you sure you want to format "flash:" (all data will be lost) (y/n)?y
mifs[3]: 0 files, 1 directories
mifs[3]: Total bytes : 27998208
mifs[3]: Bytes used : 1024
mifs[3]: Bytes available : 27997184
mifs[3]: mifs fsck took 0 seconds.
Filesystem "flash:" formatted
switch:
Step 2.
To grant a higher bandwidth download speed to the device, set the BAUD rate to max. 115200. Normally, the default
bandwidth speed for hyperterminals is set to 9600 BAUD rate. With these settings the download need at least
more than 3 hours to copy a 8 mbit file into the flash.
On the serial command-line interfae connection type in the following statement.
‘set BAUD 115200’
ÿ–XüXøXø8ü8ü8ü
In a moment the output change to an unreadable output. So you have to adjust the
hyperterminal settings and reconnect.
Search the serial – ‘session options’ and change the baud rate to the same as the cli settings.
Step 3.
After that the resolution is proper again and you can go further with the copy command.
‘copy xmodem: flash:[file]‘ – you do not need slashes after the colons.’
The xmodem process start and the output show CCCC.
Begin the Xmodem or Xmodem-1K transfer now…
CCCCC
Starting xmodem transfer. Press Ctrl+C to cancel.
CCCC. Jump to the TAB transfer and click the button ‘send Xmodem’.
You have also the opportunity to accelerate the speed with the 1k setting in secureCRT.
The settings have to be adjusted under the ‘session-options’ Xmodem/Zmodem.
Choose the file you want to download and type ‘send’.
Here you can see that the download takes approximately 20min. to downlaod into flash.
Perfect!
Begin the Xmodem or Xmodem-1K transfer now…
CCCCC
Starting xmodem transfer. Press Ctrl+C to cancel.
Transferring c2960-lanbasek9-mz.122-58.SE2.bin…
100% 11387 KB 9 KB/s 00:19:33 0 Errors
…………………………………………………………………………………………………………………………………………….
File "xmodem:" successfully copied to "flash:c2960-lanbasek9-mz.122-58.SE2.bin"
Step 4.
The same procedure with the hyperterminal software ‘Tera Term’.
At first type ‘set BAUD 115200’.
Choose the serial speed setting at the tera term serial opitons. Adjust it…
…and start the copy process…
CCCC appears…. and now choose the file.
File -> transfer -> xmodem -> send.
Watch the Tera Term download processbar.