I accidentally wrote some .iso data to a disk through dd by mistake. I cancelled the command after just 2 seconds but that was enough to wipe the first EFI partition (200MB) and a bit of the second partition where OS X and some files I do really like are stored.

The ISO image I accidentally wrote with dd was 600mb in size so the total damage would be a maximum of 400 MB since I dd from sector 0 until I hit Ctrl + C and EFI partition was gone.

I don't know much about HFS+ but on any EXT Linux partition I could pretty much recover everything that wasn't wiped by dd, even if overwritten. Here however I don't know where to start. There are some fancy GUI tools but they probably won't do anything else then fsck does.

It can't be that the whole partition is gone because 400 MB (if the whole ISO would be written - but that wasn't the case) out of 400 GB was overwritten with data by accident. Partition table seems to be alright - gdisk on Linux says it's OK and Disk Utility on Mac as well.

Volume was journaled (seems to be a problem for HFS+ utilities on Linux)

3 Answers
3

Download Testdisk. You would have to run it from an external disk. It’s a command line tool. It will diagnose problems with your partition table or filesystem and repair them. It’s very verbose so you won’t need any readmes. First recover your OS X partition and then your EFI partition. Comment back if you need any help using Testdisk.

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.