Lost partition on flash drive while copying in OS X

How to use TestDisk to recover lost partition
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
Locked
Message
Author
Ronson
Posts: 17
Joined: 14 Jun 2016, 20:44

Lost partition on flash drive while copying in OS X

#1 Post by Ronson »

I didn't eject the drive properly before unplugging it. I tried to copy a couple files from my flash drive to a MacBook Pro but the copy was going unusually slow. I stopped the copy then tried ejecting the drive by clicking the eject button in Finder but nothing happened so I just pulled out the drive. The filesystem became RAW. Chkdsk in Windows won't check the disk. OS X Disk Utility won't check the disk. I cloned the flash drive. TestDisk finds a lost partition on the clone flash drive after a deeper scan. TestDesk mentioned I might need to change the heads from 255 to 128. I can see the files and directory structure. That is good but something isn't right. Attempts to copy files from the lost file system fail with either head setting. I thought my flash drive was formatted as exFAT for cross-OS compatibility and for large files but TestDisk identifies the lost partition as FAT32. I wanted to try changing that to exFAT but couldn't find exFAT in the list of partition types. How do I repair the partition or get my data from the flash drive?

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

Re: Lost partition on flash drive while copying in OS X

#2 Post by cgrenier »

Don't bother with the number of heads.
If you see your files using TestDisk, set the partition as P(rimary), on next screen, choose Write, confirm, BackupBS, confirm, Quit.
Restart the computer and try again a "chkdsk /f d:" (replace d: by the correct drive letter)

Ronson
Posts: 17
Joined: 14 Jun 2016, 20:44

Re: Lost partition on flash drive while copying in OS X

#3 Post by Ronson »

Thank you for replying. I followed your instructions and restarted my computer. Chkdsk still thinks the disk is RAW and won't check it. I restarted my computer a couple times. TestDisk no longer needs to run a deeper search to find the partition and the name I gave to the drive is visible again in TestDisk- KINGSTON16. I can still view the list of files and directories in TestDisk. Attempts to copy files found in the list still fail. In Resource Monitor I can see TestDisk is reading data but not writing anything for some reason.

Ronson
Posts: 17
Joined: 14 Jun 2016, 20:44

Re: Lost partition on flash drive while copying in OS X

#4 Post by Ronson »

I did something wrong during my earlier attempt to fix the partition. I selected the drive letter that Windows assigned to the drive. Just now I tried again and selected the device, instead. I'm not sure why that made a difference but it did. I followed your instructions again and this time, after rebooting, Windows shows my files in Explorer. Thank you.

Locked