I was working on a switch recently and ran into something I hadnt seen before. I uploaded an updated IOS binary to the flash memory, verified the file using the IOS Verify command and used the boot system command to tell the switch which IOS binary to boot from. I rebooted the switch stack and the one switch still wouldnt boot from the correct IOS. I recopied the switch binary from another switch in the stack and rebooted again. It still wouldnt boot from the correct IOS. I then used the delete command to remove the older binary and to my surprise that the entire flash drive was wiped out. I wasnt able to recopy the binary from another switch. I rebooted the switch and was presented with the Switch: prompt. If you havent seen this before, this is the ROMMON prompt for a switch.
To make sure that the flash memory was available and ready, I ran the next two commands -
I got error messages that said the flash was already available. The trick I had to manage next was to upload the binary image using the console port, a console cable and a terminal program that had xmodem support built in. Windows 7 lacks Hyperterminal as in earlier versions but I was able to find TeraTerm. I downloaded and installed it. Next on the switch I used the following command -
switch: copy xmodem: flash:Image.bin
As soon as I saw the prompt that the switch was trying to download the binary, I started the process of uploading the file to the switch. This can take quite a while. A 12 Megabyte file can take upwards of an hour and a half to transfer. Once the file is on the switch, you can use the following command to get the switch to boot from the uploaded binary -
switch: boot flash:image.bin
The switch came up as I would have expected. Subsequent reboots had the switch continuing to boot from the prior IOS binary. Hopefully you wont need to use this but it is a good think to have in your back pocket.