Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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 tried running fsck -fy on that partition but it's a no-go.

sudo fsck_hfs -fy /dev/disk2s2
** /dev/rdisk2s2
Using cacheBlockSize=32K cacheTotalBlock=32768 cacheSize=1048576K.
Executing fsck_hfs (version diskdev_cmds-557~393).
** Checking Journaled HFS Plus volume.
Invalid B-tree node size

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)

Any tips how to rescue my files?

share|improve this question
    
    
Read this apple.stackexchange.com/questions/56461/… –  Buscar 웃 May 16 '13 at 11:24
add comment

2 Answers

Use DiskWarrior. Has saved many of my client's disks! DiskWarrior

share|improve this answer
add comment

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.

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.

share|improve this answer
    
Hi Guys. Thanks for the answer. TestDisk does not goes well with journaled volumes == everything past 10.4 is journaled by default as far as I can say. –  PJJ Sep 5 '12 at 21:45
    
Um, no. Testdisk was developed after Apple introduced jorunaled HFS+. It works very well with all types of filesystems. –  duci9y Sep 6 '12 at 9:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.