I'm trying to zero out a drive to use it as a Time Machine backup, firstly tried to format and "unable to write to last block" showed up. I tried to zero it out, but it took a large amount of time, because the bs= was relatively small (using sudo dd if=/dev/zero of=/dev/rdisk1 bs=15b) 15b is the maximum that I can use because of the specific amount of space left on the drive. The drive had corrupted data that erased drive space, so it has an irregular amount of space. Disk Util reads it as this:

Media Name: Indigita Generic 1394 dev Media Type: Generic Connection Bus: FireWire Writable: Yes Ejectable: Yes Total Capacity: 137.44 GB (137438952960 Bytes)

I did the math and found the least common multiple of 512 (1 byte) and 137438952960 (137.44GB), and it came out 137438952960. So I continued the math and found the maximum was 7680 (15 bytes), 1024 yields higher numbers.

I used that in the dd command to zero out the drive:

sudo dd if=/dev/zero of=/dev/rdisk1 bs=15b

After quite the while, I see the red light on the drive stop flashing, and I am quite disappointed to find this in my terminal:

dd: /dev/rdisk1: Input/output error 17895697+0 records in 17895696+0 records out 137438945280 bytes transferred in 12473.965643 secs (11018063 bytes/sec)

I am completely unsure of why it failed to write the last 15B block, because 15B should be 7680, and 137438945280 + 7680 = 137438952960 (Hard drive's capacity). The math should have worked out correctly. Any thoughts of why I'm getting an I/O error?

  • First I'm going to say that under no circumstances whatsoever would I ever use a HDD that wasn't 100% writable for a backup disk, Time Machine or otherwise. Not sure exactly why you are doing the math you did, it really in't necessary, and if a disk isn't writable near the end like it appears to be you can simply partition it to exclude the section of the disk that's not writable at this point since it zeroed out, sans the little bit at the end. I've done it in the past when I've wanted to use a disk for testing stuff that wasn't mission critical, like backups are. – user3439894 May 1 '15 at 0:55
  • How should I partition per se at the point where it's not writable? – 智障的人 May 2 '15 at 5:02

You must log in to answer this question.

Browse other questions tagged .