3

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.

1 Answer 1

7

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.

6
  • 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
    Commented Apr 16, 2016 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! Commented Apr 16, 2016 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
    Commented Apr 16, 2016 at 2:03
  • 1
    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
    Commented Apr 16, 2016 at 4:32
  • 1
    This worked, but I had to erase to JFHS+ using terminal. Erasing to ExFAT didn't work.
    – NoahL
    Commented May 28, 2016 at 19:18

You must log in to answer this question.

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