MBR recovery - Corrupted MBR after it changed to dynamic & testdisk gives up . No backup sector found

Solution 1:

Earlier I could see my data through Linux and now I can see nothing

It's not a good idea to write new stuff on a drive before extracting what you can extract. Stop writing stuff on the drive and clone it first. To clone a drive to an image file you can use several utilities like dd or those more advanced like dcfldd or ddrescue if the drive is physically damaged.

Here's an example, assuming the drive is /dev/sda and you mounted a large external USB drive to /media/usb/ (adapt it to your needs):

sudo ddrescue /dev/sda /media/usb/backup.img /media/usb/backup.log

You can see the progress shown by the program while it is copying. You can interrupt it by pressing Ctrl+C and you can resume it later because you are saving a log file called backup.log.

After that let's get back to recovery.

one of these two system partitions should be the original MBR

I don't understand what you are trying to say here. A MBR is a sector containing the partition table, it is not a partition nor a file system. What you want to do with TestDisk is to detect NTFS partitions and access them to copy the files.

Let me quote this answer of mine on Unix & Linux StackExchange:

The essential steps are:

  • scanning the drive
  • selecting the partition
  • pressing P to show the files
  • copying the files with C

In the last step you could just copy your account directory under Users so you can sort it out later.

If TestDisk cannot browse the partitions, maybe because there is no NTFS signature on the PBR or the MFT is broken then you have a way bigger problem than simply a corrupted MBR.

In that case you might want to use the open source RecuperaBit as suggested in this answer.

Disclaimer: I am the developer of RecuperaBit.

Solution 2:

Here's How: 1. Boot your computer to the Windows 7 DVD (or to a "Repair CD"). At this screen choose to install now. 2. Select your language and click next. 3. Click the button for "Use recovery tools". 4. Then select "Command Prompt". 5. Step five: Now sitting at the command prompt, enter the following command and then press enter:

     bootrec.exe /FixMbr

If successful, you should be greeted with the message The operation completed successfully. That's it! Your Master Boot Record has been repaired.

While the above command does fix the MBR, and sometimes that is enough, there still might be an error with the system partition's boot sector and Boot Configuration Data (BCD). This might occur if you have tried to install another operating system alongside Windows 7, such as Windows XP. To write a new boot sector, try the following command:

    bootrec.exe /FixBoot 

If you are still faced with your Windows 7 installation not being detected during start up, or if you wish to include more than one operating system choice to your system's boot list, you can try the following command to rebuild your BCD:

    bootrec.exe /RebuildBcd

The above command will scan all your disks for other operating systems compatible with Windows 7 and allow you to add them to your system's boot list. If this fails, you may need to backup the old BCD folder* and create a new one in its place with the following commands:

    bcdedit /export C:\BCD_Backup
    c:
    cd boot
    attrib bcd -s -h -r
    ren c:\boot\bcd bcd.old
    bootrec /RebuildBcd

*Some users also find simply deleting the boot folder and retrying the above steps effective at resolving boot issues, but it is not recommended