I have two iphone 3G on 3.1.3 that won't boot past the apple logo. I'm pretty sure they were jailbroken from jailbreakme.com
They just hang there with the swirling circles. One just keeps swirling, the other stops and reboots. They aren't detected by iTunes so I can't restore them, but that's what I want to do.
I've tried putting them into recovery mode by holding the sleep & home buttons and even using redsn0w to re-jailbreak them but they still just hang.

Any ideas would be much appreciated!