Page 1 of 1

DiskPart clean clarification

Posted: 02 Jul 2019, 04:07
by lividjellyfish
Hey folks,

So I run Windows 10 on my SSD and use two HDDs for storage. One of the HDDs recently failed. However, in the process of trying to clean it, I accidentally cleaned my larger main HDD. The disk now appears as uninitialized and empty in the Disk Management setting. If my Googling isn't mistaken, re-initializing the disk with MBR will erase the partition that's currently on it. The partition still appears, both in TestDisk and Active@ Partition Recovery. So, what I'm wondering is this: can TestDisk in-place re-initialize the disk with MBR *and* maintain the partition as it currently (for now) appears? Or do I need to get another drive to offload the partition and then initialize the disk.

Hoping for any advice. Cheers!

Re: DiskPart clean clarification

Posted: 02 Jul 2019, 05:55
by cgrenier
If TestDisk find the partition, you can use TestDisk to rewrite the partition table.

Re: DiskPart clean clarification

Posted: 02 Jul 2019, 06:08
by lividjellyfish
cgrenier wrote: 02 Jul 2019, 05:55 If TestDisk find the partition, you can use TestDisk to rewrite the partition table.
Great! So just to clarify if I use TestDisk to rewrite the partition, that will both preserve the data and re-initialize the disk, even if the disk was cleaned with DiskPart? Just want to make sure I'm covering my bases here - being overly confident in my technical abilities is how I got into this mess.

Re: DiskPart clean clarification

Posted: 02 Jul 2019, 19:04
by recuperation
lividjellyfish wrote: 02 Jul 2019, 06:08
cgrenier wrote: 02 Jul 2019, 05:55 If TestDisk find the partition, you can use TestDisk to rewrite the partition table.
Great! So just to clarify if I use TestDisk to rewrite the partition, that will both preserve the data and re-initialize the disk, even if the disk was cleaned with DiskPart? Just want to make sure I'm covering my bases here - being overly confident in my technical abilities is how I got into this mess.
Testdisk does not rewrite partitions when recovering partitions. It recovers the partition table wich contains pointers to the areas where the partitions reside. Depending on the partitioning scheme used (GPT versus MBR-style) and number of partitions used there is a residual risk of writing partition table information right into a partition - the place where the content of a partition resides.

If in doubt, duplicate your drive - which is always a good idea.

There is no need to think about "re-initalization".
There is no guarantee that Testdisk heels the disk after using DiskPart, because the "clean" command can be run with the parameter "all". Afterwards there will be no data left anymore to be rescued and no reason to run Testdisk.