Erase successful, but not automatically formatting. Can't determine partition type - Jelly bean 4.1.2 with Nexus S
I had a similar issue with my Nexus 4 after flashing the factory images

What fixed it for me was going into [stock] recovery and selecting clear cache and doing a factory wipe, that seemed to fix the partition sizes

Oh also check to see that you have the latest bootloader on the device too, check out https://developers.google.com/android/nexus/images for the most recent factory images