oops
In future you might want to backup the first few MB of your hard drive with dd
before doing something drastic. That would at least have given you a way back.
Now that you are here, its not great news. To be able to get back you need to know the exact size and position of every partition. Without this you are in real trouble.
What can you do to recover?
If you just lost sizes
You might not need them. You can assume every partition filled up all space up to the next partition. You should be able to calculate a size from that.
Fortunately most file systems don't mind being given extra space. So for example: if you accidentally forgot your swap partition, the ext4 partition before it wouldn't mind being finding itself on a larger partition (absorbing space from the swap partition).
If you lost everything
Your last chance is to try to detect your partitions using their magic number or other similar feature. Each / every file system should have a "magic number" at a predictable position in it's first sector. If you find the details of each file system you use (NTFS, EXT3, etc...) you might be able to scan every sector on your HD looking for one containing the correct magic number. There's no guarantee this won't find other sectors that happen to contain the same sequence in the right place, so it might come to a matter of trial and error.
- This might mean you have to write your own program to do this.
- There might be data recovery software you can purchase that would do this for you.
- Data recovery specialists might be able to take the drive of your hands and do it for you.
Which option you chose will be based on how confident you are doing the work yourself, how valuable the data is and how much you are willing to spend to get it back.
Also double check
You mentioned MBR. Just double check that your actions to renumber your partitions didn't result in a GPT partition table replacing your MBR table. That could have thrown something off when you recreated your partitions.
6
inmount /dev/sda6 /mnt
to the new partition number after renumbering. If you change all partition numbers back to their original value everything should work as before. – Bodo Feb 18 '19 at 12:51fdisk
can delete the partition and recreate it, MBR seems simple, why don't work? – maggicmuojet Feb 19 '19 at 05:57