Latest version of IOS can be downloaded from cisco website with appropriate CCO login.
Setup TFTP server it means you can ping tftp server from your router/ switch hardware.
#write mem
To save the config from running to startup
#Copy flash: tftp
Source filename [full file name of ios]
Address or name of remote host [ip address of server]
Destination filename
#Copy tftp flash:
mention the name of new ios file on tftp
verify by issueing
# Show flash:
this will show you newly copied IOS file in the flash , if we have less file on flash we need to delete the old ios file .
#boot system flash:/
#reload
sh ver