-1

As my external hd did not show up in disk manager I accidentally clicked gpt when asked. Now the disk results "not allocated". In fedora results "windows reserved". Now I am recovering the files with Photorec in windows, but it's a mess as filenames and structure are gone. Is there a (free) way simply recover the lost partition?

  • 2
    John, GPT is just a different table layout and does not affect the content of a partition except for the case where a disk is lacking any partition table and starts directly with a boot sector. In this case writing the GPT partition table will overwrite content of the partition. The part written at the end of the disk may overwrite stuff there but this is typically less important for recovery. – r2d3 Jan 25 '24 at 22:31
  • the hdd content is in excellent state after recovery only that has lost structure, so it would be a lot of work to reorganize it. That's while first I finish to recover everything then I'd like to try to restore to MBR. As I'm surely not expert I am very cautious, especially after this incident. I am tempted by aomei partition assistant convert to mbr or rebuild mbr but I do not know if there is data loss. – Agnes Jan 26 '24 at 08:02

1 Answers1

1

You should have tried TestDisk first to search the partition and rewrite the partition table.

The GPT partition table information is written a the beginning of the disk at a location where it nowadays does not cause any harm as it is typically located in front of the first partition without touching it. However, as some information is written at the end of the disk, roughly 34 sectors my be overwritten there.

As my external hd did not show up in disk manager I accidentally clicked gpt when asked.

This sentence is a contradiction. If your external HDD does not show up in disk manager you can neither or read something. The question which partition table to write can only arise when a disk had been found.

As there is no need to write the partition table during normal disk use the key question is why this partition table information disappeared. This behaviour suggests a health check.

r2d3
  • 3,554
  • 1
    An alternative to TestDisk is DMDE. Partition editing and undelete can be done using the free version. – Joep van Steen Jan 25 '24 at 23:05
  • 1
    Note that while in this case it may well be safe to fix the partition table in-place, any data recovery operation is more safely performed by restoring to different media, or even better working from an image of the damaged device instead of the original. as long as you preserve the original as is, you have infinite retries, but a badly botched in-place attempt is catastrophic. – Frank Thomas Jan 26 '24 at 01:03
  • Thank you for the answers. I correct myself: the hdd shows up in disk manager but not in pc resources. – Agnes Jan 26 '24 at 07:50
  • I reconverted in MBR with disk manager but it results yet "not allocated". The health check did not show particular problems, hdd seems OK. What can I do know to recover files and structure? – Agnes Jan 27 '24 at 12:39
  • Check Superuser.com. There is a standard article for that. – r2d3 Jan 27 '24 at 14:38
  • I have done the search but not found anything useful for my case. – Agnes Jan 27 '24 at 21:35
  • 1
    @Agnes, if you write a new MBR partition table, of course it will be empty. you use tools like TestDisk/DMDE to recover your OLD partition table and write it to the disk. then if everything works properly, you will have your old partitions and their filesystems. once again this is best done to alternate media. hopefully you haven't destroyed the old data in writing the new MBR. you may have to resort to data scavanging tools like photorec or recova or easus. – Frank Thomas Jan 28 '24 at 01:23
  • @Frank Thomas thank you. In the meantime I searched for the boot sectors, they are both in bad state :(. Now testdisk is searching for the mft but I think already I lost the battle. – Agnes Jan 28 '24 at 20:30