I find I do this on a normal basis and figured I write this up so I never forget it.
- 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.
- type ‘flash_init’
- type ‘load_helper’ – if applicable.
-
dir flash:
-
rename flash:config.text flash:config.text.old
- boot
-
Continue with the configuration dialog? [yes/no]:
N -
rename flash:config.text.old flash:config.text
-
copy flash:config.text system:running-config
- wr mem
- config t
-
enable secret password
- exit
- wr mem or copy running-config startup-config
- 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:
- dir flash:
- Find the amount of free space and delete the old .bin flash if needed with this command:
delete flash:[insert flash image name].bin
-
Then I type this:
copy tftp: flash:
-
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
- Then I press enter and away it goes.
- One it’s finished upload the image I fo this:
-
Switch(config)#boot system switch all flash:/
[insert flash image name].bin
-
Switch(config)#exit
-
Switch#write memory
- Then I just reload the switch and off I go to configration. 🙂