Page 1 of 1

Copying files by TestDisk to pendrive

Posted: 04 Sep 2020, 14:02
by stefanek
Hi everybody,

I'm using TestDisk 7.1 together with gparted live distribution on USB stick. I'm trying to recover accidentially deleted windows partition (by win 10 disk management tool), but testdisk reports typical "disk seems too small" warning, so I cannot recover it. I tried to change partition type to GPT and after hour long scanning among ~20 of strange "partitions" the partition very similar to lost one appeared (to be precise two such partitions appeared, not identical). Thankfully, this partition is recoverable and I can browse folders and copy files from it (unfortunately only to the pendrive - I can't do antyhing with it). Copy operations report no errors and I can see copied folders on the pendrive (by dir command), but after closing gparted, there is no these new files on the pendrive at all (and there is no change in free space reported, so it's not a problem with file's ownership). I know nothing about Linux, so I have no idea, what I'm doing wrong. Is there any command to "really" copy the files to the pendrive or "acknowledge" these (maybe pending??) write operations?
Thank you.
stefanek

Re: Copying files by TestDisk to pendrive

Posted: 05 Sep 2020, 07:23
by cgrenier
If TestDisk has been able to list the files from your deleted partition, after using TestDisk, Analyse, Quick Search and maybe Deeper Search, set this partition as *(bootable).
On next screen, choose Write, confirm, if asked, choose BackupBS, confirm, Quit and restart your computer.
If it doesn't work as expected, please copy and paste in your message the testdisk.log file content.

Re: Copying files by TestDisk to pendrive

Posted: 07 Sep 2020, 12:23
by stefanek
I set one of these "looking good" partitions "primary" (option "bootable" wasn't available, only D or P), chose "write", then warning about bad boot sector appeared (because size of the partition didn't match), but there was an option to restore boot sector from backup. Chose to restore boot sector, result OK. Now the HDD is normally detected by windows, all files appear to be OK.
Thank you for your help!
stefanek