Recovery From Corrupt or Missing IOS on Cisco Catalyst 2900XL Switch
By admin on Oct 28, 2011 with Comments 0
In this post I covered how to recover Cisco Catalyst Switch from corrupt or missing software IOS image. We can confirm that there is boot IOS image problem when we are getting below errors from Cisco Catalyst Switch:
- · The switch is in a continuous reboot.
- · The switch displays the switch: prompt.
- · The error loading flash: message appears.
The error loading IOS from flash: on Cisco Switch
The switch: prompt indicates that the switch has not booted completely and requires the user to complete the boot process.
- The error loading flash:<image> message indicates that the switch failed to load an image because of a corrupt or missing image.
The corrupt or missing image can be the result of a failed download. In this case, the image has a bad checksum or a failed software upgrade, and the upgrade procedure was not followed properly. There is the possibility that the user deleted the image but did not replace the image. A boot variable can have been set incorrectly.
- You can see an error message that is similar to this on console session
Error loading “flash:c2950−i6q4l2−mz.121−12c.EA1.bin
Normally, the switch attempts to automatically boot the next valid image in the Flash file system. Here is an
Example1:
Error loading “flash:c2950−i6q4l2−mz.121−12c.EA1.bin”
Interrupt within 5 seconds to abort boot process.
Loading “flash:/c2950−i6q4l2−mz.121−13.EA1.bin”…######
########################################################
If there is no valid backup image from which to boot, the boot process fails completely. Here is an
Example2:
Error loading “flash:c2950−i6q4l2−mz.121−12c.EA1.bin”
Interrupt within 5 seconds to abort boot process.
Boot process failed…
If you receive the error loading flash message, this indicates that there is a problem loading the current image in Flash. The image may be corrupt, an incorrect image, or the image in Flash may be missing.
If the system is unable to load a software image in Flash, the system loads the boot helper and brings up a prompt switch:
Step−by−Step Cisco Switch IOS Recovery Procedure
1) Issue the flash_init command and the load_helper command.
If the Flash has already initialized, you see this:
switch: flash_init
Initializing Flash…
…The flash is already initialized.
switch:
If the Flash has not initialized, you see this:
switch: flash_init
Initializing Flash…
flashfs[0]: 21 files, 2 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 7741440
flashfs[0]: Bytes used: 4499456
flashfs[0]: Bytes available: 3241984
flashfs[0]: flashfs fsck took 7 seconds.
…done initializing flash.
Boot Sector Filesystem (bs:) installed, fsid: 3
Parameter Block Filesystem (pb:) installed, fsid: 4
2) Issue the load_helper command in order to load any boot helper images. Here is an example:
switch: load_helper
switch:
3) Issue the dir flash: command in order to view the contents of the Flash file system and find f there are any Cisco IOS® image files or image directories in flash:. The Cisco IOS image files are .bin files, and the image directories are named with the image filename, excluding the .bin extension. If no Cisco IOS image files or image directories exist, you see this:
switch: dir flash:
Directory of flash:/
2 −rwx 5 <date> private−config.text
3 −rwx 110 <date> info
4 −rwx 976 <date> vlan.dat
6 −rwx 286 <date> env_vars
26 −rwx 1592 <date> config.text
8 drwx 1088 <date> html
19 −rwx 110 <date> info.ver
4393472 bytes available (3347968 bytes used)
switch:
4) From the above result, there is no IOS file in the Flash:, If any IOS file is there, Check the memory capacity. If the size of the file to be loaded is larger than the available capacity, delete the existing image in Flash to make space for a new image.
Switch : delete flash: filname
Filename is the name of the file to be deleted
Switch: delete flash:cat2900XL−h2s−mz.112−8.5−SA6.bin
5) Xmodem transfer is a very slow procedure. It takes longer to copy the larger images. Change Buad rate value on Cisco Switch.
Switch: set BAUD 115200
6) You have to change the Baud rate (Bits per Second) for HyperTerminal also from File –>
Properties –> Configure –> Change Bits per second to 115200 –> click OK.
7) Copy the image to the Flash using HyperTerminal.
Enter this command
Switch: copy xmodem: flash:filename
Here filename is the name of file that you want to upload . In HyperTerminal, go to the TRANSFER –> SEND FILE.
Select options using the XMODEM protocol and IOS image path on your PC.
Start the XMODEM download within three seconds. Otherwise, the switch times out the XMODEM copy. After successful transfer.
An example is shown here.
switch:
switch: copy xmodem: flash: cat2900XL−h2s−mz.112−8.5−SA6.bin
CCC……………………………………………………………………….
………………………………………………………………………………
………………………………………………………………………………
File “xmodem:” successfully copied to “flash: Cat2900XL−h2s−mz.112−8.5−SA6.bin”
8. After the new image has been loaded, boot the new image using the below command.
Switch: boot flash: cat2900XL−h2s−mz.112−8.5−SA6.bin
9. After switch booted save the flash .
Switch # wr
Related Articles........
Filed Under: Switch General
About the Author:



