Difference between revisions of "Recovering from a corrupt IOS image"

From Peter Pap's Technowiki
Jump to: navigation, search
Line 42: Line 42:
  
 
   switch: '''delete flash:c3750-k9-mz.122-44.se2.bin'''
 
   switch: '''delete flash:c3750-k9-mz.122-44.se2.bin'''
   Are you sure you want to delete "flash:c3750-k9-mz.122-44.se2.bin" (y/n)?'''y'''
+
   Are you sure you want to delete "flash:c375  if you don't do this, it will take literally hours!
 +
 
 +
7. At the '''switch:''' prompt, begin the xmodem transfer of the new IOS image:
 +
 
 +
  switch: '''copy xmodem: flash:''imagefilename'''''
 +
  Begin the Xmodem or Xmodem-1K transfer now...
 +
  CCC
 +
 
 +
8. From HyperTerminal,
 +
 
 +
  a. Choose '''Transfer''' > '''Send File'''.
 +
  b. Choose the '''Xmodem''' protocol in the '''Send File''' dialog box and click '''Browse''' in order to select the Cisco IOS image (.bin file) that you downloaded from Cisco.
 +
  c. Click '''Send''' in order to begin the Xmodem transfer.
 +
 
 +
0-k9-mz.122-44.se2.bin" (y/n)?'''y'''
 
   File "flash:c3750-k9-mz.122-44.se2.bin" deleted
 
   File "flash:c3750-k9-mz.122-44.se2.bin" deleted
  
Line 59: Line 73:
 
   CCC
 
   CCC
  
8. From HyperTerminal,
+
8. From HyperTerminal:
  
 
   a. Choose '''Transfer''' > '''Send File'''.
 
   a. Choose '''Transfer''' > '''Send File'''.
 
   b. Choose the '''Xmodem''' protocol in the '''Send File''' dialog box and click '''Browse''' in order to select the Cisco IOS image (.bin file) that you downloaded from Cisco.
 
   b. Choose the '''Xmodem''' protocol in the '''Send File''' dialog box and click '''Browse''' in order to select the Cisco IOS image (.bin file) that you downloaded from Cisco.
 
   c. Click '''Send''' in order to begin the Xmodem transfer.
 
   c. Click '''Send''' in order to begin the Xmodem transfer.

Revision as of 05:04, 7 March 2011

This is a bit of nastiness! You have a switch that refuses to boot. When you watch what's happening on the console you see errors like this:

 Error loading "flash:c3750-k9-mz.122-44.se2.bin"
 
 Interrupt within 5 seconds to abort boot process.
 Boot process failed...
 
 switch:

You have a corrupt IOS image! Download a new one from the Cisco website! To recover you will need Microsoft Windows HyperTerminal to perform an xmodem transfer of a new IOS image to the switch (obviously you can use other terminal emulators etc, but you'll get no help from me :-). This method has been tested with a Cisco 3750G. You can see more specific info for different switch models here.


1. Connect to the switch with HyperTerminal with these the settings:

 Baud: 9600
 Data bits: 8
 Parity: None
 Stop bits: 1
 Flow control: None

2. If the switch is not already at the switch: prompt, remove the power cord. Hold down the MODE button on the front of the switch and re-insert the power cord. Wait until the SYST light is flashing away and let go of the MODE button.

3. You should be at the switch: prompt. Type the following commands:

 switch: flash_init
 switch: load_helper

4. List the contents of the switches flash memory.

 switch: dir flash:
 Directory of flash:/
 
 2    -rwx  10761792  <date>               c3750-k9-mz.122-44.se2.bin
 3    -rwx  676       <date>               vlan.dat
 4    -rwx  7807      <date>               config.backup
 83   -rwx  98        <date>               private-config.text
 86   -rwx  1048      <date>               multiple-fs
 
 5113856 bytes available (10885120 bytes used)

5. If there is no room in flash for another IOS image, delete the old one:

 switch: delete flash:c3750-k9-mz.122-44.se2.bin
 Are you sure you want to delete "flash:c375  if you don't do this, it will take literally hours!

7. At the switch: prompt, begin the xmodem transfer of the new IOS image:

 switch: copy xmodem: flash:imagefilename
 Begin the Xmodem or Xmodem-1K transfer now...
 CCC

8. From HyperTerminal,

 a. Choose Transfer > Send File.
 b. Choose the Xmodem protocol in the Send File dialog box and click Browse in order to select the Cisco IOS image (.bin file) that you downloaded from Cisco.
 c. Click Send in order to begin the Xmodem transfer.

0-k9-mz.122-44.se2.bin" (y/n)?y

 File "flash:c3750-k9-mz.122-44.se2.bin" deleted

6. To speed the xmodem transfer up, change the Baud rate of the switch

 switch: set BAUD 115200

You will lose access to the console, but a restart of the HyperTerminal session with a new Baud rate of 115200 will fix this!

NOTE: if you don't do this, it will take literally hours! You can change it back later.

7. At the switch: prompt, begin the xmodem transfer of the new IOS image:

 switch: copy xmodem: flash:imagefilename
 Begin the Xmodem or Xmodem-1K transfer now...
 CCC

8. From HyperTerminal:

 a. Choose Transfer > Send File.
 b. Choose the Xmodem protocol in the Send File dialog box and click Browse in order to select the Cisco IOS image (.bin file) that you downloaded from Cisco.
 c. Click Send in order to begin the Xmodem transfer.