[SOLVED] Recover deleted partition table - Guys, i need help!
from t0mri@lemmy.ml to linux@lemmy.ml on 13 Jun 15:52
https://lemmy.ml/post/31633930

My disk was dos labelled (MBR). So I ‘fdisk’-ed my disk and entered ‘o’ to convert it to GPT and wrote it to the disk. Now all the partitions are gone. I want those back. I care about the data rather than the partitions

Edit 0:

Solution:

Thanks guys for the help

#linux

threaded - newest

just_another_person@lemmy.world on 13 Jun 15:59 next collapse

Get a LiveUSB booted, then try running testdisk.

digitalocean.com/…/how-to-install-testdisk-on-lin…

[deleted] on 13 Jun 16:26 collapse

.

just_another_person@lemmy.world on 13 Jun 16:48 collapse

Yes

INeedMana@lemmy.world on 13 Jun 16:01 next collapse

yeah, you need some help

🤡

On serious note, have you by any chance somehow saved the previous start and end values? Like in history of the shell, terminal or even a piece of paper?
I’ve found out in the past, that if you recreate the partition table as it was, the data will be read fine

Otherwise, you might need to use RescueCd to try and get the partition borers back. But if you haven’t rebooted since that fateful keypress, first focus on trying to get to what partition borders were printed in the terminal earlier. IMO it will be the fastest and easiest
Even if you will get those in cylinders and will have to calculate those back to MBs

orsetto@lemmy.dbzer0.com on 13 Jun 16:01 next collapse

Unfortunately changing from MBR to GPT also deletes existing partitions and partition table, because the two are not compatible.

Luckily, testdisk should be able to recover the old partition table without much fuss, if you didn’t write other data to the disk.

I don’t have a manual handy but the man page from what i remember is pretty clear, and there’s also an online documentation.

[deleted] on 13 Jun 16:27 next collapse

.

orsetto@lemmy.dbzer0.com on 14 Jun 15:26 collapse

sorry for the late reply. I honestly do not remember what the procedure is. The best thing you can do is look on the internet for a easy to follow guide, or wait for someone else’s response

ReversalHatchery@beehaw.org on 13 Jun 22:03 collapse

MBR can be converted to GPT. gdisk can do it, in fact if you run it for an MBR structured disk it will automatically do the conversion in memory, and you can check the results before writing it out. windows also has a tool for that.

orsetto@lemmy.dbzer0.com on 14 Jun 15:28 collapse

Oh yeah i figured there were some tools able to do that, i meant to say that you can’t substitute one with the other in place without doing some sort of conversion.

bushvin@lemmy.world on 13 Jun 16:02 next collapse

This is why it’s important to make backups. If, by any chance you printed your disk configuration before the gpt operation, you want to copy it into a notepad NOW. You can use that to try and recreate your original partition layout after converting the disk back to MBR. Chances are nothing is wiped, except for your disk configuration. No guarantees, though…

Whatever you do, don’t format anything, as that WILL overwrite your data.

ReversalHatchery@beehaw.org on 13 Jun 22:05 next collapse

fdisk cannot convert the partition structure, but gdisk can, though you better have a full backup bedore attempting to do it

cpo@beehaw.org on 15 Jun 11:16 collapse

Nightmare scenario. Glad to see youbfoubd a solution!