I have a 2Tb 2.5" hard disk that was formatted for a PC (but had errors), and have now connected it to my Mac. It is connected externally via a USB to SATA cable - I have tried two different USB to SATA cables that both work with other drives.
I first tried to erase the disk in Disk Utility (HFS+, GUID Partition Map), and got an error, saying could not write to last block. Since then the disk will now no longer show in Disk Utility, but will show in Terminal, like this:
/dev/disk1 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: *2.0 TB disk11
Nothing else. No Partition Scheme.
Trying this:
diskutil eraseDisk ExFAT DiskName /dev/disk1
Or this:
diskutil eraseDisk HFS+ DiskName /dev/disk1
Gives:
Started erase on disk1
Unmounting disk
[ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ]
Error: -69888: Couldn't unmount disk
So then:
sudo diskutil unmountDisk force /dev/disk1
Gets:
Forced unmount of disk1 failed: at least one volume could not be unmounted
But then despite that error, the disk has been unmounted - it does not appear in diskutil list. But then repeating:
diskutil eraseDisk HFS+ DiskName /dev/disk1
Gives:
Could not find disk for /dev/disk1
There is a post with a roughly similar issue here.
This command:
sudo dd if=/dev/zero of=/dev/disk1 bs=4096 count=8
Gives:
8+0 records in
8+0 records out
32768 bytes transferred in 0.000559 secs (58609362 bytes/sec)
Nothing happens for about 2 minutes, then the Terminal prompt reappears. diskutil list then does not show /dev/disk1
Unplugging the USB cable and reattaching it then starts the whole process as before!
Any assistance would be most welcome! I can't find an exactly equivalent case on the forum here, hence posing the new question here now.
sudo dd if=/dev/zero of=/dev/diskX seek=(disk_size_in_blocks(512)-64) bs=512 count=64
. Else: the drive is simply broken or the power consumption too high. – klanomath Apr 17 '20 at 16:56syntax error near unexpected token '('
- and searching StackExchange for disk_size_in_blocks gives me precisely zero posts... Googling it comes up with next to nothing too. I am afraid the PC errors were not from my machine, so I cannot post those. @Allan - I am not giving up so soon! – Jon Worth Apr 17 '20 at 17:55diskutil info /dev/diskX
orsudo gpt -r -v show /dev/diskX
. Example for the latter with my internal 3TB HDD:... blocks=5860533168 ...
. Then... seek=(disk_size_in_blocks(512)-64) ...
is... seek=(5860533168-64) ...
and finally:sudo dd if=/dev/zero of=/dev/diskX seek=5860533104 bs=512 count=64
. – klanomath Apr 17 '20 at 18:57