I know the process for upgrading a Cisco router is very well documented, so this is just so I can find it next time without having to search the Internet.
From the router type:
config t
copy tftp: flash:
Then, enter the tftp server's IP Address when requested [10.0.0.1] without brackets
Enter the IOS binary name when requested [c3640-ik9o3s-mz.124-25d.bin] without brackets
File will copy and will probably ask to erase flash. I say ok, with the knowledge the existing image will be deleted. I'm ok with that, so I confirm it.
The image is copied to the router's flash memory.
Now I want to verify the image's integrity so I type the following command:
verify flash:c3640-ik9o3s-mz.124-25d.bin
As long as the image is ok, then I set the router system boot:
boot system flash:c3640-ik9o3s-mz.124-25d.bin
Then I save the configuration:
wr mem
Finally, I reload the router:
reload
Finished.