Yesterday evening, the evening before my birthday (which is today, yes, thank you!) I tried to upgrade my iPhone to the newly released iOS 4 (formerly known as iPhone OS 4.0). However, when after an hour and a half the upgrade was still at around 60% (according to my iPhone) and about 99% (according to iTunes), I got worried. I unplugged my iPhone, restarted iTunes. My iPhone was unusable and asking to be plugged into iTunes.
Crap.
Restarting the restore didn’t help. Same problem. Today after some searching I found other people [are having the same problem](http://discussions.apple.com/thread.jspa?messageID=11715341�). In case you find this post before the one I just linked to, here’s how I solved it: reinstall iTunes. First [completely uninstall](http://support.apple.com/kb/ht1224), and also clear out your `Library/iPhone Software Upgrades/` (or something) directory. Then download and install iTunes again. That solved it for me, hope it will for you too.
Happy iOS4-ing!