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.

How do I recover a HFS Plus partition that somehow I've managed to delete or replace with a Linux command? I didn't do anything else, I mean, I didn't put any files or folders on the drive, so it is "intact". I just want to recover the partition, like I did once using Acronis Disk Director Suite, it was painless, easy and fast, but wasn't HFS+, was a NTFS formatted drive. I use Lion on may Mac and Linux Mint 13 on my PC.

[Edit] There is a method using Testdisk and/or Photorec, but I didn't get it. Does anyone know? [Edit] TestDisk & PhotoRec did the trick

share|improve this question
1  
Please consider adding to your question some information about the affected disk. If you are reasonably comfortable working with Terminal, be prepared to enter your password and run the following two-word command: sudo sysdiagnose … when the end result (an archive) appears in Finder, decompress the archive and consider two files: diskutil.txt and gpt.txt –  Graham Perrin Aug 6 '12 at 18:35

1 Answer 1

up vote 2 down vote accepted

[I'm answering for anybody ending up here, as the original OP most probably is no more interested. I still refer to his problem description.]

I tried using Testdisk 6.13 (latest stable release) and it worked like a breeze for both NTFS and HFS+. I had the luxury of an empty HFS+ partition, so I just removed it and recovered it using Testdisk - it was rather fast.

I followed the following tutorials:

If you indeed just removed one partition, it should be fast. Otherwise, it might take more time, but probably waiting is the most sensible option. But if you're really impatient (as I am) and you know very well what you're doing, you might want to read on.

A (dangerous) tip to speedup Testdisk from my own experience

If the partition entry is just removed, Testdisk will look for the start of the partition in sensible positions (by default, at the start of every cylinder, since partitions should usually be cylinder-aligned), ignoring the existing partition table. Once it thinks it found a partition and you confirm its guess, it will skip searching inside the partition.

If there is a lot of free space (without a filesystem) before the partition, this might be very slow. So I could speed up search a lot by creating a filesystem in an empty partition before the missing one, so that Testdisk would skip that space. However I knew perfectly where to create this filesystem, especially because it did not border with the lost partition. Otherwise, creating such a filesystem can easily destroy the wrong data - hence only attempt this if you know very well what you're doing.

share|improve this answer

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.