Just interlinking this as from your description this sounds like the exact same error that the OP in this thread is having?
i.e. it gets to the
Generating RSA private key, 1024 bit long modulus
bit and then everything comes to a screeching halt at
writing RSA key
However, in your case this is with a Raspberry Pi 3, not a Rasberry Pi 1 B?