2

I had a Windows 7 installation on my 1TB SSD laptop with 4 primary partitions. I wanted to install Lubuntu Linux but the process failed with an error which kind of said:

cannot write MBR

It gave me an option to put an MBR somewhere else or to boot without MBR. None of these options worked and it became a useless install. After this failed dual boot attempt, Windows would give a BSOD wit Code 007 ending - translated to inaccessible boot device. That is a huge NTFS partition and I don't think I have any other media to back it up before formatting it.

My only option is somehow rebuilding the old MBR. Hence I started creating a whole bunch of live USB boot environments including Super GRUB Disk and MiniTool Partition Editor Live CD, but none of this could ever help me recover my lost MBR.

Win PE 4.0 reported the partition as bad disc and the latest version did not even have an option for MBR. I managed to create a live USB with Testdisk Running on Ubuntu. Whatever partition was seen as HPFS on quick search was written in the MBR and after this the disc is totally unreadable. Earlier I could see my data through Linux and now I can see nothing.

Here are my questions:

  • When some data could be read (but Windows would not boot) the MBR was shown as dynamic MBR. As far as I know dynamic MBR is a Windows concept and my Linux attempt would not have converted it. While installing Linux I tried to delete 2 primary partitions which I found to be not really useful (I backed up their data first). So I am not sure what created the dynamic MBR.

    Did my dual install convert those basic MBR to dynamic MBR? How did that happen?

  • Here is a screenshot of my deep search attempt with TestDisk which is still in progress. I can see 4 NTFS partitions and one of these two system partitions should be the original MBR. When I tried to write both these system partitions (after stopping the deep search momentarily) I got an error like "partition not found". The file system utility showed me that there is no backup sector and that may be the reason why it cannot be read.

    What other Resorts do I have, other than doing a plain format and then using some recovery tool to recover all my lost data? I am not even sure I will recover the folder names.

    What other options should I be trying to restore my old MBR so Windows can boot?

    Testdisk screenshot


Update
as of last I managed to create a live USB w/ W7
I used AOMEI Partition assistant 6.0 and on deeper search I can see the 909 gb partition - it wont let me select it for recovery. I am sorry if my earlier Q was not clear. I referred to restoring an MBR from a partition . What happened earlier - superficial search revealed all old partitions but NOT this one and the later partitions showed up on Deep search & I can select Other partitions for recovery but for this one. It wont let me select the partition I want
Here are some more screen shots
testdisk deep search windows live usb @ dos prompt So in summary all that happened is

  • 4 primary windows 7 partition -->
    wanted to install Linux so I deleted 2 non bootable partitions after backing them up
  • ended up with BSOD ( inaccessible boot device ) and noticed that some windows partitions showed up as Dynamic MBR (using Live USB Linux,gparted )
  • Use standard testdisk procedure to write MBR from the superficial NTFS-HDFS partition. this is where I screwed up . Hindsight I should have really done a deep search and caught the 901gb partition to write MBR. I am not sure if I can undo this action
  • after this - life gets worse. I am on a ventilator ! Now C is unreadable by windows and linux both and testdisk cannot list file ( see screenshots ) and I have been using a series of live USB's with some recovery s/w but no luck. ALL I want is to recreate that 901gb partition and the boot partition and put the MBR on the latter so I can get my windows 7 back again

enter image description here enter image description here enter image description here

3 Answers 3

4

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.

3
  • added more info pl check it out. TY for your help Jan 11, 2017 at 1:25
  • 1
    I like this answer. My favorite part is the first (non-quoted) paragraph. It seems like recovery attempts have made changes, likely leading to further problems/data loss.
    – TOOGAM
    Jan 11, 2017 at 6:09
  • @user1874594 you kinda wrote a poem just to say that the filesystem on the partition is damaged (as written on the TestDisk message). Your problem is not to recover a MBR, it won't be any good. I don't understand why you insist in using Windows but I have already addressed your problem in the last part of the answer. Use RecuperaBit to extract the data. Jan 11, 2017 at 12:35
1

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

2
  • that does not work. This applies ONLY if windows can see your C Drive. In my case , as far as windows is concerned it is "unallocated" space. I created a live USB WIndows 7 disc that boots of X drive which is the ramdisk it creates and there is no point in doing this to ramdisk. Jan 11, 2017 at 0:07
  • added more info pl check it out Jan 11, 2017 at 1:25
0

I dont know if this qualifies as an answer to this Q per se for situations in general similar to this. If it does not you may del it

  • I had to make sure that my partitions which were hosed could be repaired & if not as a last choice - recovered.
  • I should be able to boot off my system partition as I did before .
    It was a frustrating ordeal with testdisk throwing all kind of errors. But I kept on scanning and aborting the scan, once the partition of interest showed up & eventually could list the files & tried sample recovery . Encouraged by this and knowing that there was just one hosed Linux installation that followed my working OS env ( c.f. repeated writes to the disk)... I wanted to now see if I can get my entire partitions straight.
    AOMEI PA wasnt as useful as it was impressive with so many ops none of which were available for disk that shows as unallocated . This is where I wasted time trying to tinker. It showed the partition of interest Last and on deep search & it showed some 1000+ system NTFS partitions of 3.01mb each ( strange ! ) .
    Encouraged by testdisk , I did a slipstream of Easus Part. recovery and Easy BCD to windows PE iso.I used Easus , that Undeleted both partitions & EasyBCD ( after not succeeding from command line advise given above by Chris, prolly because I booted off flash drive ).
    that got me my lost partitions after so much hair pulling & I was able to boot. Thank You so much everyone.
    @ Andrea : thanks for making me aware of Recupera . Yes I want to def. try it out I have another HDD that I shared with my ex and that was written to umpteen times after I lost data and other datarecovery software failed. I will treat it with Recupera.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .