I'm not sure why you would get the input/output error on the 2nd partition of the drive you are trying to format. I would expect the ERase disk option to do just that. The dd command you posted...