How to flash an Android Device manually

fastboot erase boot
fastboot erase cache
fastboot erase recovery
fastboot erase system
fastboot flash bootloader "name of bootloader"
fastboot reboot-bootloader
fastboot flash radio "name of radio"
fastboot reboot-bootloader
fastboot -w update "name of zip file"

or 

fastboot flash system system.img
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash cache cache.img
fastboot erase userdata
fastboot flash userdata userdata.img
fastboot reboot

References
http://androidforums.com/threads/guide-how-to-flash-a-nexus-factory-image-manually.706533/