Make sure you have a TFTP server running on a device with network connectivity to the switch you are upgrading.
Save the running configuration of the switch:
copy running-config startup-config
Backup the running configuration to the TFTP server:
copy running-config tftp://xxx.xxx.xxx.xxx/FileName.txt
Make sure you have pointed the TFTP server to the location where the firmware file is.
Copy the firmware file from the TFTP server to the switch:
Once the file has been successfully copied, switch will validate/verify the file. If you have multiple switches stacked, firmware image will be pushed out to all of the other stack members.
You can issue the show version command to see which switch(es) are running what version of firmware currently as well as which firmware should be applied to the switch on next boot.
To specify which image to use on next boot use:
boot system image2
This will apply to the whole stack. You can also specify which firmware should be used with which stack member by doing:
boot system unit 3 image1