2

I have a 250GB hard drive that I tried to "burn" an ISO to (to make it bootable). Something went terribly wrong.This is what the disk looks like in Disk Utility (unmounted).

Unmounted

When I mount it, this happens.

Mounted

I have tried formatting, erasing, verifying, and repairing the disk through Disk Utility and terminal's diskutil command, all to no avail. I have tried deleting the files contained on this hard drive (Windows boot folders/executables) using both the GUI and a sudo command in terminal with no luck. This is a partial output of diskutil list:

diskutil list

The drive is /dev/disk4.

I consider myself decently knowledgable in technology in general, but this problem has been very difficult. Can someone please help me? Please feel free to leave any questions or comments below.

4

Remove all external disks (just for safety reasons). If possible also remove all internal disks except the boot disk or "refresh" your backups.

The proposed command (dd) used improperly can be deadly for your data.

Open Terminal.app and get the disk identifier of the disk containing the DVD partition:

diskutil list

Unmount the disk:

#replace diskX by the disk identifier of the "DVD disk" you found previously
diskutil umountDisk /dev/diskX

Overwrite the first sectors of the disk with

sudo dd if=/dev/zero of=/dev/diskX bs=4096 count=8

This will zero the first 8 physical blocks (or 8 4k/64 512b logical blocks) of the partition and should remove any "DVD hints".

Open Disk Utility and try to erase/repartition the disk again.

  • Thank you! I don't have time to try this this weekend, but I will try it sometime soonish (hopefully Monday) and see how it goes. – NoahL Apr 16 '16 at 1:19
  • 1
    @NoahL, While klanomath said "Remove all external disks (just for safety reasons)." and I don't disagree with that, however your system is showing 5 internal disks, so considering how destructive dd can be... while your disconnected external disks are safe from a mistake with dd, your internal disks are not! Make absolutely sure the dd command line is not malformed in that the of= option is absolutely pointing to the correct disk before executing the command! Seriously, double and triple check your command line is accurate before executing! – user3439894 Apr 16 '16 at 1:59
  • @user3439894 It's a tower Mac Pro so I'll remove internal disks as well. I do regular backups and I'll only leave my startup disk in. Thanks for your concern :) – NoahL Apr 16 '16 at 2:03
  • @NoahL Even if you hit the wrong disk (but using bs=4096 count=8) everything can be recovered with ease because all sizes (gpt/efi) are standardized and the (single) data partition won't be affected. With two data partitions (like the system partition & Recovery HD) it's slighlty more difficult. – klanomath Apr 16 '16 at 2:07
  • Recovery from a mistaken dd can be made easier by first doing dd if=/dev/diskX of=/path/to/backup bs=4096 count=8 ... then even if you destroy the partition table on the wrong disk, you can recover it from the backup (by copying it back). I would do that twice, to two separate disks—that way, even if you accidentally hit your backup disk, you can grab the file from the other disk. (BTW: count is essential; without it, it will zero the entire disk) – derobert Apr 16 '16 at 4:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .