Windows 7 - replaced and cloned hard drive, now getting "BOOTMGR is missing" error - FIXED

It seems hard drive makers have long struggled with fierce competition, leading them to manufacture disks that are not terribly reliable.  Hitachi/IBM had the infamous Deskstar 75GXP (aptly renamed the Deathstar by exasperated owners and amused bystanders).  I do believe Hitachi has long since recovered from that.  When my Samsung HD642JJ 640GB SATA drive started showing a S.M.A.R.T. B8 end-to-end error code, I sought to find a good replacement without having to set up RAID.  My initial research brought me to the Western Digital Caviar Black series, and then to their enterprise offering, the RE3 and RE4.  However, reviews on Newegg.com and Amazon.com showed no anecdotal improvement in reliability (around 10%+ DOA and quick failures, though poor packaging may have been to blame).  I ended up getting the well-reviewed Samsung HD103SJ 1 TB SATA 7200 RPM 3.5" HD.  Now here is how I ended up almost botching the data transfer:

1) I read that XXCLONE was much easier to install and use, compared to Clonezilla (which I found is not that hard to use, after the fact.  But I was lazy).  I installed XXCLONE on the failing HD.

2) I connected my new HD to to the second SATA cable (had to disconnect my DVD burner's SATA and power cable).  Used Windows 7 disk management to initialize and then partition the new disk -- make sure the new partition is larger than the one you are cloning from.

3) Used XXCLONE to transfer from old HD to new HD.  I opted to have a log created just out of curiosity.  When the cloning finished, I did see some errors in the logs, but they were mostly on Windows hidden log files -- no problem.

4) Then I used the "Cool Tools -> Make Bootable" option -- checked all three boxes.

5) Shutdown the PC, disconnected and removed the old HD, connected the new HD to the primary SATA cable.   Booted up and what do I see -- BOOTMGR is missing!


Windows failed to start. A Recent hardware or software change might be the cause. To fix the problem: 

1. Insert your windows installation disc and restart your computer.
2. Choose your language settings, and then click next
3. Click "repair your computer."

Status: 0xc000000e
Info: The boot selection failed because a required device is inaccessible.
 6) Ok, I think -- I'll just connect the old HD and try something else, like Clonezilla -- put the old HD back in and... it's DEAD.  No disk spin-up or any vibration of any kind when I power up the PC.  CRAP.

 7) Insert my manufacturer's recovery DVD (HP, btw).  I try every option including the advanced ones, but all it offers is to restore my computer to the original factory image.  No thanks.

8) Luckily there is a way to restore the boot sector!  Tons of Googling brings me to several blogs and articles, but there was not one in particular that contained everything I needed.  You CAN create a Windows 7 recovery CD/DVD/USB stick without having Windows 7.  This is called a Windows pre-installed (PE) environment.  From my old laptop, which had Windows XP, I performed the following steps:

 a) Download the free Windows Automated Installation Kit 3.0 from Microsoft.  It is free, does not require a product key because you are not actually running an OS from the kit.  Don't worry about the Service Pack 1 (SP1) supplemental download, it's not necessary for recovering the boot sector.
http://www.microsoft.com/download/en/details.aspx?id=5753

b) Burn the KB3AIK_EN.iso file to a DVD if your spare PC/laptop has it, or even better, just use MagicDisc to virtually mount the ISO.  Install the AIK to your PC.


c) From my spare machine, I open up Notepad and copy/paste the following -- taken from Mike Blane's blog -- this assumes your Program Files is in the default location on the C: drive.  Replace all instances of "winpe_x86" with "winpe_amd64" if the PC you're trying to fix has an AMD CPU.  If you don't have a CD/DVD burner available, check out this method which puts the PE environment on a bootable USB stick.


CD "C:\Program Files\Windows AIK\Tools\PETools"
CALL copype.cmd x86 c:\winpe_x86
copy c:\winpe_x86\winpe.wim c:\winpe_x86\ISO\sources\boot.wim
copy "C:\program files\Windows AIK\Tools\x86\imagex.exe" C:\winpe_x86\iso\
oscdimg -n -bC:\winpe_x86\etfsboot.com C:\winpe_x86\ISO C:\winpe_x86\winpe_x86.iso
rem To remove the "Press any key to boot from CD" prompt during boot,
rem remove the bootfix.bin file from the \boot folder within your mounted image.
pause


d) Save the file as something like "c:\build_pe.bat".  Insert a blank CD-R or DVD-R/DVD+R in your optical drive.  Open up a command prompt window and run c:\build_pe.bat.
 
e) Insert the disc into the broken PC and start up (you may need to change the boot order so the PC tries to boot from CD/DVD before the HD).  You should see the "Press any key to boot from CD..." message.  Press a key and you'll be booted into the Windows 7 Recovery tools!  You can try some of the GUI options but they did not work for me (and beware of ones which warn you that your files may be overwritten).

f) I ended up going into the command prompt (may be in Advanced Options).   This part is a little tricky.  Run DISKPART first to find out your drive letters.  They may be different than what you're expecting.  In DISKPART, type the following commands (in bold):

DISKPART> list disk

  Disk ###  Status      Size     Free     Dyn  Gpt
  --------  ----------  -------  -------  ---  ---
  Disk 0    Online       xxx GB      0 B
DISKPART> select disk 0

Disk 0 is now the selected disk.

DISKPART> list volume

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     D                       DVD-ROM         0 B
  Volume 1     C                NTFS   Partition    xxx GB  Healthy    System
g) Make a note of the drive letters.  Type exit to get out of DISKPART.  Now, go to the recovery disc in command prompt: 
D:
cd \windows\system32
bootsect /NT60 SYS /MBR  (note, if you have multiple HDs in the system, you may have to identify a different way or just have it try to set boot to all drives -- shouldn't be harmful, but do at your own risk -- bootsect /NT60 ALL /MBR
h) You should see a message looking like:

Successfully updated disk bootcode.
Bootcode was successfully updated on at least one volume.


i) Remove the recovery CD and then reboot.  If you are still seeing BOOTMGR is missing, like I was, it's time to try something different.  For some reason the bootsect command was copying the BOOTMGR correctly, but there is something else Windows 7 checks.  You will need to use the bcdedit command to tell Windows 7 where your OS partition resides.

j) Reinsert the recovery CD, boot into the tools, open command prompt and go to the recovery disc's drive again.  Run the following from the command line (replace x with your CD/DVD drive letter):

X:
cd \windows\system32

bcdedit /enum all 
 (verify that some items are set to unknown:

Windows Boot Loader
-------------------
identifier {9f8ea851-b5cf-11df-80ce-b27a0e06a12f}
device unknown
path \Windows\system32\winload.exe
description Windows 7
locale en-US
inherit {bootloadersettings}
recoverysequence {9f8ea852-b5cf-11df-80ce-b27a0e06a12f}
recoveryenabled Yes
osdevice unknown
systemroot \Windows
resumeobject {9f8ea850-b5cf-11df-80ce-b27a0e06a12f}
nx OptIn
quietboot Yes
usefirmwarepcisettings No)

Then run:

bcdedit /set {default} device partition=c:
bcdedit /set {default} osdevice partition=c:
bcdedit /set {bootmgr} device partition=c:
k) Finally!  Windows should boot up now.  It may take a while as it detects that the main HD has changed.  It may install some device drivers and then ask you to reboot.  If you're still stuck with the BOOTMGR missing error, you may need to go back into DISKPART and do some drive letter assigning, as well as setting a disk/volume as active.  Then go back and repeat the bcdedit commands.

Here is another forum link that may help:


http://www.sevenforums.com/tutorials/20864-mbr-restore-windows-7-master-boot-record.html

Comments

Popular posts from this blog

Domain registrar pricing comparison (2014)

How to block the Admiral anti ad-block detection message

usoclient.exe in Windows 10 wakes up my PC with Wake Source: Unknown