Not sure if it helps, but I was getting error code #13 after updating from 1.1.4 to 2.2.1 and it would NOT restore no matter what I did. So, it would neither update nor restore to factory. I'm no computer tech., but I'm not new to it either...
I was finally able to get it to work by restoring then updating again from a DIFFERENT computer. (Trying to use different usb ports on the same computer may work also, I had no luck).... I'm not sure if it was because I had Vista and that is why it was giving me trouble. But, I restored it from my desktop which has XP and it restored and then updated perfect!! (make sure to update to iTunes 8 or it will not work properly either)...
Uninstalling iTunes and the apple software from you computer then reinstalling (drivers and all) then restoring and updating may help as well....
My shot at offering any assistance... Hope it helps!! I'm very happy with the update (I have not updated in FOREVER!!)..