I accidentally over wrote my GPT using DD. My 1TB HD (/dev/sda) was showing signs of failure so I bought a 500G Samsung thinking I could clone the larger HD to the smaller SSD (/dev/sdb). Well, I mixed up the commands in an attempt to copy the HD GPT table over to the SSD. You can imagine the result. Basically a blank GPT on my HD.
I did an analysis using testdisk. Everything seems okay except for the Windows 10 reserve partition, sda2.
I didn't create a backup. Is there a way to get the GPT back?
Regards,
RDL
GPT Overwritten
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
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
- cgrenier
- Site Admin
- Posts: 5441
- Joined: 18 Feb 2012, 15:08
- Location: Le Perreux Sur Marne, France
- Contact:
Re: GPT Overwritten
If you run TestDisk, Analyze, Quick Search (and maybe Deeper Search) and get the correct partitions, choose Write, confirm, Quit.
But honestly I don't see how after overwriting half your disk, you will be able to recover your data.
You may be able to recover your data only if the cloning failed and few data have been overwritten.
If too much data have been overwritten for TestDisk to recover your partition, it still possible to use PhotoRec to recover data but
recovered files will not have their original filenames.
But honestly I don't see how after overwriting half your disk, you will be able to recover your data.
You may be able to recover your data only if the cloning failed and few data have been overwritten.
If too much data have been overwritten for TestDisk to recover your partition, it still possible to use PhotoRec to recover data but
recovered files will not have their original filenames.
-
- Posts: 4
- Joined: 17 Apr 2023, 20:47
Re: GPT Overwritten
Mr Grenier,
Thanks for responding! I used this command: sgdisk /dev/sdb -R /dev/sda
I intended to copy GPT of the failing disc, sda, to the new disc, sdb. Just the GPT. As you see above, I got them mixed up. This command copies just the GPT isn't that correct?
Regards,
RDL
Thanks for responding! I used this command: sgdisk /dev/sdb -R /dev/sda
I intended to copy GPT of the failing disc, sda, to the new disc, sdb. Just the GPT. As you see above, I got them mixed up. This command copies just the GPT isn't that correct?
Regards,
RDL
-
- Posts: 4
- Joined: 17 Apr 2023, 20:47
Re: GPT Overwritten
Would that copy command above also overwrite the secondary GPT at the end of the disc?
RDL
RDL
- cgrenier
- Site Admin
- Posts: 5441
- Joined: 18 Feb 2012, 15:08
- Location: Le Perreux Sur Marne, France
- Contact:
Re: GPT Overwritten
Yes, sgdisk has overwritten both the main GPT table and its backup.
As only the GPT tables has been overwritten, TestDisk 7.2-WIP should be able to rewrite a valid partition table.
As only the GPT tables has been overwritten, TestDisk 7.2-WIP should be able to rewrite a valid partition table.
-
- Posts: 4
- Joined: 17 Apr 2023, 20:47
Re: GPT Overwritten
Great! I'll give it a try then.
RDL
RDL