I find I do this on a normal basis and figured I write this up so I never forget it.

  1. on the front of the switch or router find the mode button and hold it in while the unit is powering on and release it after it get to the ‘password-recovery mode is enabled’ appears.
  2. type ‘flash_init’
  3. type ‘load_helper’ – if applicable.
  4. dir flash:
  5. rename flash:config.text flash:config.text.old
  6. boot
  7. Continue with the configuration dialog? [yes/no]: N
  8. rename flash:config.text.old flash:config.text
  9. copy flash:config.text system:running-config
  10. wr mem
  11. config t
  12. enable secret password
  13. exit
  14. wr mem or copy running-config startup-config
  15. reload

 

=======================================================================

Upload a new IOS image to a Switch or Router via FTP

I personally have solarwind FTP on my laptop and make a root folder for FTP on the C:/ drive and copy my intended IOS images to this folder and startup the FTP program. I set my laptop to say 192.168.200.2 /24 and then setup a port on the router or switch interface to 192.168.200.1 /24 and then I issue the following commands:

  1. dir flash:
  2. Find the amount of free space and delete the old .bin flash if needed with this command:
    delete flash:[insert flash image name].bin
  3. Then I type this:
    copy tftp: flash:
  4. 
    
    The IP address is the FTP server or the laptop which is 192.168.200.2 and then I enter in the exact name of the image into the field
  5. Then I press enter and away it goes.
  6. One it’s finished upload the image I fo this:
  7. Switch(config)#boot system switch all flash:/
    [insert flash image name].bin
  8. Switch(config)#exit
  9. Switch#write memory
  10. Then I just reload the switch and off I go to configration. 🙂