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:
- install testdisk
- run testdisk
- choose “Create” log
- choose target disk. Eg: /dev/sda
- Choose appropriate partition type. Mine was MBR and I chose “Intel” and select “analyze”
- Now you’ll see deleted partitions. Giveem appropriate flags like “*” for boot (efi partition) and “P” any other using space or arrow keys and press enter
- choose “write” and press y on the prompt to write those found partitions to the disk.
Thanks guys for the help
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.