Link to home
Start Free TrialLog in
Avatar of tusunz
tusunz

asked on

Unable to load Cisco image using xmodem

I have a Cisco 2950 switch.  It worked fine for a while until I rebooted the switch.  Once I rebooted it tried initializing the flash but locked up once it got to the console.  After doing some searching I found out the the flash image was bad and needed to be reloaded using xmodem.  Used xmodem to try and reload the image from my hard drive but doing the process the switch stop responding and lock up.  If I reboot the switch the LEDs lights stay on and the switch is locked up.  If I wait for a few mins and try again I can get and start xmodem but the same thing happen again.  The switch lockup doing the transfer process using xmodem.  Any help will be helpful.
Avatar of jonponton
jonponton

Have you tried clearing the partially loaded firmware from the flash?

This web site will show you how to get to the password recovery console - from where you can remove the bad firmware.

http://www.cisco.com/warp/public/474/pswdrec_2900xl.html

I would suggest trying this then reloading the firmware, if possible using TFTP, even if it means using a crossover straight to your PC.
Aren't you able to get to RomMon mode ? If so, you could avoid doing the Xmodem thing and do a TFTP to load the image. Faster and much better.

Cheers,
Rajesh
I wouldn't use xmodem because of it's speed and being unreliable.  Go for tftp, much more stable and faster like Rajesh stated.
Avatar of tusunz

ASKER

I tried to used break and ctrl-c to get into rommon mode but niether one works. The switch continue to boot and and get to the switch prompt> where I am able to enter a few commands but after a few mins the switch locks up. Here is the output from the switch



C2950 Boot Loader (C2950-HBOOT-M) Version 12.1(6)EA2c, RELEASE SOFTWARE (fc1)
Compiled Thu 28-Feb-02 14:59 by antonino
WS-C2950-12 starting...
Base ethernet MAC Address: 00:0a:8a:38:56:c0
Xmodem file system is available.
Initializing Flash...
flashfs[0]: 17 files, 2 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 7741440
flashfs[0]: Bytes used: 1808896
flashfs[0]: Bytes available: 5932544
flashfs[0]: flashfs fsck took 5 seconds.
...done initializing flash.
Boot Sector Filesystem (bs:) installed, fsid: 3
Parameter Block Filesystem (pb:) installed, fsid: 4
Loading "flash:c2950-i6q4l2-mz.121-22.EA4.bin"...####bad mzip file, unknown zip
method

Error loading "flash:c2950-i6q4l2-mz.121-22.EA4.bin"

Interrupt within 5 seconds to abort boot process.

This is where I try ctrl-c and break to get into rommon mode but some reasons it just don't work. I would like to try and use TFTP but maybe I am doing something wrong.
Have you try, ctrl-break?
>>The switch continue to boot and and get to the switch prompt>

  Does it stop there at this stage ? I mean, this is RomMon mode.

Cheers,
Rajesh
I thought the rommon mode says,   ROMMON>,  not prompt>


Pentrix2
At least in my experience it does.  :)
Avatar of tusunz

ASKER

Tried ctrl-break as well and yeah the same thing happen.  I don't have a clue on whats going on and I really need to get this back up and running ASAP


C2950 Boot Loader (C2950-HBOOT-M) Version 12.1(6)EA2c, RELEASE SOFTWARE (fc1)                                                                            
Compiled Thu 28-Feb-02 14:59 by antonino                                        
WS-C2950-12 starting...                      
Base ethernet MAC Address: 00:0a:8a:38:56:c0                                            
Xmodem file system is available.                                
Initializing Flash...                    
flashfs[0]: 17 files, 2 directories                                  
flashfs[0]: 0 orphaned files, 0 orphaned directories                                                    
flashfs[0]: Total bytes: 7741440                                
flashfs[0]: Bytes used: 1808896                              
flashfs[0]: Bytes available: 5932544                                    
flashfs[0]: flashfs fsck took 5 seconds.                                        
...done initializing flash.                          
Boot Sector Filesystem (bs:) installed, fsid: 3                                              
Parameter Block Filesystem (pb:) installed, fsid: 4                                                  
Loading "flash:c2950-i6q4l2-mz.121-22.EA4.bin"...####bad mzip file, unknown zip                                                                              
method      

Error loading "flash:c2950-i6q4l2-mz.121-22.EA4.b                                              
Error loading "flash:c2950-i6q4l2-mz.121-22.EA4.b                                              
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.

switch:
switch:
switch:
switch:


Once I get here I try to do xmodem but the switch lockup after a few mins.  But the odd thing is that when I start xmodem it work for about 4 mins and just stop.  Is the switch done for or can it be fixed?
tusunz,

  Yes that is what I am asking. At the stage where you get the prompt 'Switch:' can you do a question mark (?) and post the output here ?

  You can do a tftp download at this prompt.

Cheers,
Rajesh
Before initializing the TFTP, I believe you have to give it the tcp/ip settings like, ip, dg, where the server is at then should be allow to do this.


Pentrix2
tusunz,
 
  Do you have any directory structure in the flash ?

At the switch: prompt do a 'Dir Flash:' and post the output here.

also at the Switch: prompt try putting this and hit enter;

boot flash:c2950-i6q4l2-mz.121-22.EA4.bin

Cheers,
Rajesh
Avatar of tusunz

ASKER

Here is the output of ? at the switch prompt.  I was thinking the same thing that I could use TFTP here but it look like you can't.  
switch: ?        
           ? -- Present list of available commands                              
        boot -- Load and boot an executable image
         cat -- Concatenate (type) file(s)
        copy -- Copy a file
      delete -- Delete file(s)
         dir -- List files in directories
  flash_init -- Initialize flash filesystem(s)
      format -- Format a filesystem
        fsck -- Check filesystem consistency
        help -- Present list of available commands
 load_helper -- Load and initialize a helper image
      memory -- Present memory heap utilization information
       mkdir -- Create dir(s)
        more -- Concatenate (display) file(s)
      rename -- Rename a file
       reset -- Reset the system
       rmdir -- Delete empty dir(s)
         set -- Set or display environment variables
   set_param -- Set system parameters in flash
        trap -- Cause a software breakpoint to occur
        type -- Concatenate (type) file(s)
       unset -- Unset one or more environment variables
 -- MORE --
     version -- Display boot loader version
switch:


Also this is the output when I tried to list the flash dir.

switch: dir flash
unable to stat flash/: permission denied
switch:

So it look something else is wrong or the switch is bad.
By chance do you have another similar router so you can test out if it's a flash memory chip or the hardware itself being faulty.  As of right now we know the IOS is corrupted.

Pentrix2
Avatar of tusunz

ASKER

Not right now, I going to pick one up within the next couple of days. Pentrix2 by your comment you think the flash memory may be bad?  How hard is it to change that out?
Before you do dir flash:, first do load_helper and then try it.

There isn't a tftp mode for this, XModem is the only obvious way unless the boot command accepts tftp as a parameter.

You can give it a try for that.

like boot ?, do you see only flash or tftp too ?

Cheers,
Rajesh
>I tried to used break and ctrl-c to get into rommon mode but niether one works.
Correct.  Instead, hold down the "mode" button on the front panel when you power up the switch, as mentioned in the following URL posted by jonponton above:  http://www.cisco.com/warp/public/474/pswdrec_2900xl.html

  At the "switch:" prompt...
flash_init
load_helper

  *Now* you could run these (entirely optional):
dir flash:
fsck flash:  <-- this checks the integrity of the flash filesystem

  I'd strongly suggest deleting the current corrupt image(s):
delete flash:c2950-i6q4l2-mz.121-22.EA4.bin

  Then try again to copy via xmodem (apparently your only choice):
copy xmodem:

  See the procedures for recovering from a corrupt/missing image:
http://www.cisco.com/en/US/products/hw/switches/ps628/products_tech_note09186a0080169696.shtml

  If you have problems with copying again, I'd suggest trying a reformat before trying another xmodem copy:
format flash:
  And doing a more thorough test of the filesystem, & note any errors:
fsck -test flash:

cheers
Any luck so far? Still need help with this?
Avatar of tusunz

ASKER

Yes, I am still having the same problem any help you can give me would be helpful.
Did you try the suggestions previously posted, such as fsck & possibly re-format?
Avatar of tusunz

ASKER

Ok, here is an update of where I stand with this switch.  

I still have not been able to get xmodem to work.  What is happening is that I can boot up to the switch> prompt and enter the commands

Flash_init
Load_helper
Copy xmodem: flash: and the file name

Then I start the send process from hyper terminal to copy over the image from my pc to my switch

For about 5 mins everything’s works fine then that’s when I hit a wall.

The switch just locks up at this point and I am unable to do anything further.

I tried formatting flash and fsck -test flash: but still I get the same resolves.  No one been able to tell me if this switch is bad or not or if there something else I can try.

I when out and purchase a new switch but I still would like to get this one up and running.


ASKER CERTIFIED SOLUTION
Avatar of CetusMOD
CetusMOD
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial