Help recovering files from accidentally formatted ext HDD

Using TestDisk to repair the filesystem
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Message
Author
Iamatomics
Posts: 7
Joined: 14 Jan 2018, 16:43

Help recovering files from accidentally formatted ext HDD

#1 Post by Iamatomics »

New user here so any and all help is much appreciated.

I accidentally formatted a 2T External HDD thinking it was a different one. I believe it was originally Mac OS Extended (Journaled) and I formatted as ExFat as I have both Windows and Mac machines now.

I ran Test Disk > Create > Disk /dev/rdisk2 - 2000 GB / 1863 GiB > [EFI GPT] (I chose this because it defaulted on it and wasn't sure) > Analyze
Where I then received this message:

Disk /dev/rdisk2 - 2000 GB / 1863 GiB - 3907029167 sectors
Current partition structure:
Partition Start End Size in sectors

Trying alternate GPT

and I chose > [Quick Search]

I let this run for over 12 hours but it only got to 29% and I ran out of disk space due to a huge log file, 340 GB. I got this over and over again:

file_pread(9,1,buffer,1212475(1212475/0/1)) read err: Device not configured
file_pread(9,8,buffer,1212489(1212489/0/1)) read err: Device not configured
file_pread(9,11,buffer,1212536(1212536/0/1)) read err: Device not configured
file_pread(9,1,buffer,1214459(1214459/0/1)) read err: Device not configured
file_pread(9,1,buffer,1212426(1212426/0/1)) read err: Device not configured
file_pread(9,1,buffer,1212429(1212429/0/1)) read err: Device not configured
file_pread(9,1,buffer,1212476(1212476/0/1)) read err: Device not configured
file_pread(9,1,buffer,1212497(1212497/0/1)) read err: Device not configured
file_pread(9,1,buffer,1212547(1212547/0/1)) read err: Device not configured
file_pread(9,1,buffer,1214460(1214460/0/1)) read err: Device not configured
file_pread(9,1,buffer,1212427(1212427/0/1)) read err: Device not configured

Any ideas? Thank you

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Help recovering files from accidentally formatted ext HDD

#2 Post by cgrenier »

I have never seen this error "Device not configured".
Google says that some users have this error after deleting the directory from where an application (testdisk in your case) was running.

Iamatomics
Posts: 7
Joined: 14 Jan 2018, 16:43

Re: Help recovering files from accidentally formatted ext HDD

#3 Post by Iamatomics »

Thanks for the fast response.
Didn't touch the computer after I started running Testdisk. Testdisk is currently installed in my Applications folder and is still there.
Any ideas as to what to check, or next steps?

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Help recovering files from accidentally formatted ext HDD

#4 Post by cgrenier »

Can you try to recover the data from this external HDD from another computer or from Linux or Windows ?
You should be able to boot from a Linux USB key, see https://www.cgsecurity.org/testdisk.pdf

Iamatomics
Posts: 7
Joined: 14 Jan 2018, 16:43

Re: Help recovering files from accidentally formatted ext HDD

#5 Post by Iamatomics »

Yes, I have a windows machine I can try on. Can I do it without log?
I'm also trying to analyze again using my mac without log, it's only 26% in almost 2 days. Is that normal? Should i quit and move it over to my Windows machine now or wait?

Thanks again

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Help recovering files from accidentally formatted ext HDD

#6 Post by cgrenier »

Do not wait, you can try now on your Windows. If you have the same oversize log file, it's probably due to an electronic or physical damage.
In this case, you should contact a data recovery company.

Iamatomics
Posts: 7
Joined: 14 Jan 2018, 16:43

Re: Help recovering files from accidentally formatted ext HDD

#7 Post by Iamatomics »

I got this on Windows


Disk /dev/sdc - 2000 GB / 1863 GiB - CHS 243201 255 63

The harddisk (2000 GB / 1863 GiB) seems too small! (< 4000 GB / 3726 GiB)
Check the harddisk size: HD jumper settings, BIOS detection...

The following partition can't be recovered:
Partition Start End Size in sectors
> MS Data 3907024127 7814048191 3907024065
[ Continue ]
NTFS, blocksize=4096, 2000 GB / 1863 GiB

> then this

Disk /dev/sdc - 2000 GB / 1863 GiB - CHS 243201 255 63
Partition Start End Size in sectors
D EFI System 40 409639 409600 [EFI System Partition] [EFI]
D MS Data 63 3907024127 3907024065 [FreeAgent GoFlex Drive]
>D Mac HFS 409640 3906766983 3906357344
Structure: Ok. Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
P=Primary D=Deleted
Keys A: add partition, L: load backup, T: change type,
Enter: to continue
HFS+ blocksize=4096 + Backup, 2000 GB / 1862 GiB

Iamatomics
Posts: 7
Joined: 14 Jan 2018, 16:43

Re: Help recovering files from accidentally formatted ext HDD

#8 Post by Iamatomics »

Currently I'm here. Really slow going. to get to 08% has taken me most of the day.

Disk /dev/sdc - 2000 GB / 1863 GiB - CHS 243201 255 63
Analyse cylinder 21712/243200: 08%
Mac HFS 589600 3906946943 3906357344
Mac HFS 589944 3906947287 3906357344
Mac HFS 590016 3906947359 3906357344
Mac HFS 590360 3906947703 3906357344
Mac HFS 590448 3906947791 3906357344
Mac HFS 590584 3906947927 3906357344
Mac HFS 591120 3906948463 3906357344
Mac HFS 591312 3906948655 3906357344
Mac HFS 593936 3906951279 3906357344
Mac HFS 594160 3906951503 3906357344
Mac HFS 594336 3906951679 3906357344
Mac HFS 594464 3906951807 3906357344
Mac HFS 594552 3906951895 3906357344
Mac HFS 594784 3906952127 3906357344
Mac HFS 594960 3906952303 3906357344
Mac HFS 595104 3906952447 3906357344
Mac HFS 595160 3906952503 3906357344
Mac HFS 595328 3906952671 3906357344
Mac HFS 595592 3906952935 3906357344
Mac HFS 595328 3906952671 3906357344

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Help recovering files from accidentally formatted ext HDD

#9 Post by cgrenier »

The correct partition is usually the first HFS+ partition.
Select it, if you see "+ Backup" on the last line of the screen, you have found a valid partition, set it as P(rimary) and on next screen, choose Write, confirm, Quit and restart your computer.

Iamatomics
Posts: 7
Joined: 14 Jan 2018, 16:43

Re: Help recovering files from accidentally formatted ext HDD

#10 Post by Iamatomics »

Okay, and thanks for your patience here.

I see this:
Disk /dev/sdc - 2000 GB / 1863 GiB - CHS 243201 255 63
Partition Start End Size in sectors
D EFI System 40 409639 409600 [EFI System Partition] [EFI]
D MS Data 63 3907024127 3907024065 [FreeAgent GoFlex Drive]
>D Mac HFS 409640 3906766983 3906357344

but when I set it as P(rimary) the next screens says this:

Mac HFS 409640 3906766983 3906357344
Support for this filesystem hasn't been implemented.

Locked