Page 1 of 1

Restore accidentally formatted partition

Posted: 17 Aug 2016, 20:43
by Nostradamus
I am trying to restore an accidentally formatted flash drive.
The drive was previously formatted on Mac, probably HFS+
It is now formatted in Windows as exFat.

What I have done already:
1. Started TestDisk and selected the correct media
2. Selected [EFI GPT] partition table type, which was detected automatically. (I have also tried Intel and Mac to no avail)
3. Selected [Advanced] and changed the type to Mac HFS -> HFS +
4. Selected [Superblock] (seemed like the only reasonable option, the other option being [Image Creation])
5. After selecting [Superblock] it reproted:
Volume header
Bad

Backup volume header
HFS+ OK

Sectors are not identical.
6. Tried [Backup BS] which reported:
Write error: Can't overwrite HFS/HFS+ main volume header

--------------------------------------------------------------------------------
I have also tried analyzing the media:
[Quick search] brings me:
P MS Data Start 64 End 250068991 Size in sectors 250068928

[Deeper search] brings an MS Data pertiotns and lost of Mac HFS ones with HFS+ blocksize=4096 and NO Backup

--------------------------------------------------------------------------------

The log file is attached.

Any advice is highly appreciated.

Thanks in advance.

Re: Restore accidentally formatted partition

Posted: 18 Aug 2016, 21:40
by cgrenier
TestDisk can't overwrite the superblock because the partition is actually mounted.
Start a Terminal, run "mount", you should see the reformated partition listed, run "umount /dev/XXX" (replace XXX by the correct value)
Once it's done, run TestDisk again, the disk should not be identified as RO (Read Only) this time. Try again to rewrite the superblock.