Nightmare scenario. Glad to see you found a solution!
Linux
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
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.
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.
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.
Get a LiveUSB booted, then try running testdisk.
fdisk cannot convert the partition structure, but gdisk can, though you better have a full backup bedore attempting to do it
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.
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