NTS: How to recover from BOOTMGR not found after cloning
December 6th, 2009 by wooly
My current boot drive has 3 partitions:
- Partition A – ‘vista-64′
- Partition B – ‘vista-32′
- Partition C – (mounted as H:) symlink from c:\users\ to act as the data drive
Due to bad luck, the 1TB boot drive is failing (my previous boot drive 320GB also failed and had to be RMA-ed), with bad blocks, and now I’ve to move all the data to a new drive.
I’ve made Ghost images of partitions A & B, and since Partition C is not a boot partition, I can simply back it up and copy over to a new partition using Synctoy 2.0. By the way, you can also make disk images using free tools here. Macrium seems to be pretty good. For Linux, Clonezilla rules.
Problem:
After restoring partition A to the new HDD, upon booting, vista64 will complain that “BOOTMGR is missing”.
Google above error message will show some sites to use the Vista DVD to repair. It finds the vista partition, and says it’ll repair it. But it still doesn’t work. Most sites will tell you to the next level of repair is using bootrec /fixboot but that too won’t work. Actually, bootrec /fixboot is the command that is called with the GUI interface, so of course it doesn’t work since you are doing nothing different from the 1st method.
The answer finally came from this very detailed site, which I will now bookmark.
The cause:
The problem of not being able to boot even after Vista attempted to repair the disk was because my system is a multiboot system. Specifically, I had 2 Vistas on the disk. The sequence which I installed the Vistas were:
- Vista 32-bit (Partition B)
- then, Vista 64-bit (Partition A)
The reason in the first place of why I went with Vista-64 was that I finally wanted to break the 3GB memory barrier of 32-bit systems. My system now has 4GB RAM, which I believe should be the standard now that memory is pretty affordable. 32-bit Windows systems can only address up to 3GB of memory.
Back to the cause. Because Vista-64 came after Vista-32, this meant that the boot manager now actually still resided in the old Vista-32. It is not simply of flagging the Vista-64 partition as the active boot partition (this is achieved with partition managers like Vista’s or Linux Gparted or Acronis Disk Director), as would have been the case with older OS’s.
Even if I set Vista-64 as the active partition, the boot sequence seemed to be:
- Boot up Vista-64.
- Vista-64 Master Boot Record is told the vista boot manager (bootmgr) is at d:
- D:\bootmgr is executed, presenting the OS selection menu.
- Selecting for example’Vista 64′ will tell the boot manager to look for the Windows Loader (winload.exe) back in c: (c:\windows\system32\winload.exe to be precise).
So without some reconfiguring, in order for me to move the data from the failing disk to the new one, I must move both Parition A (vista-64) and Partition B (Vista-32). This will not do, as I wanted to delete Vista-32 and re-install with some other OS like Linux (or maybe even OS-X86).
Solution:
To get around this problem, I had to basically:
- Copy/move the boot manager into Vista-64’s c: drive.
- Reconfigure the ‘configuration file’ that the boot manager reads, of partition layout from Vista-64′ point of view.
Some problems though:
- From Vista onwards, the boot manager config file is no longer a text file called c:\windows\boot.ini.
- Due to my sequence of install, the c:\bootmgr file is not available in Vista-64 as during the initial install, Vista has designated Vista-64’s partition as not being in the booting partition, but has pointed it to the old Vista-32’s partition.
- Vista-64 also hasn’t the boot manager’s configuration files.
- All these system files are hidden, and even locked.
- The needed utilities are not installed into the hard drive by default.
Steps:
(WARNING: The rest of the instructions below deals with system level tools and objects. Wrong moves can cause data loss. Use at own risk)
- Precautionary steps:
- Uniquely name all your partitions.
- Physically disconnect all HDD’s from the PC so that you don’t get confused with which disk is which.
- Boot up the Windows installation disk (or get the recovery disk here)
- Get to the repair section, but skip the auto repair, and instead get to the command prompt.
- At the command prompt, find out which drive letters belong to which partitions using diskpart:
x:\diskpartdiskpart> list volume
- It is likely you cannot see the files below in Vista-32’s root directory. Use attrib or dir/a to reveal the hidden files.
- From the DVD’s (likely x:\windows\system32) directory, copy the following files to the boot partition (Vista-64)’s equivalent directories and/or any partition that can boot:
- bootrec.exe
- bcdedit.exe
- The above step is just so that later if things when things are not working you still have access to the above tools as the boot up time for the Vista Install DVD is very long.
- Now to create the boot manager’s config file if it is not in Vista-64 already:
c:\> mkdir \bootc:\> bcdedit /createstore c:\boot\bcd- To check, use “
bcdedit /store c:\boot\bcd /v” and it should say it is (at this time) empty.
- Now to build the skeleton bcd:
c:\> bootrec /rebuildbcd- If all is well, the bootrec utility will find the all the windows partitions and ask you to add to the boot manager.
- At this point, you’ll probably just want the one that points to Vista-64 only.
- After the skeleton bcd is created, now you can manipulated it. First we need to make sure the boot manager will find the boot files (winload.exe) at the right place.
- Test with “
bcdedit /store c:\boot\bcd /v“, and you should now only see 1 or 2 OS entries.
- Test with “
- If the system so far recognise the Vista-64 partition as ‘C:\’ then no problem, it should boot.
- But if the system recognises the Vista-64 partition as say, ‘d:\’, then there’s a problem if the OS expects things are in ‘c:\’, and your system will never boot. To fix,
x:\bcdedit /source d:\boot /v, and note the long <identifier>. Select it (from the ‘{‘ to ‘}’) and copy to clipboard to paste in the <identifier> parts below.x:\bcdedit /source d:\boot\bcd /set <identifier> osdevice boot (or osdevice partition=d:)x:\bcdedit /source d:\boot\bcd /set <identifier> device boot(or device partition=d:)- (bcdedit /? for help, and check this article out for more details)
If you’ve managed to do the above, then the partition that was not booting should now boot. To add/enable more partitions to boot (Such as including the adjascent Partition B which holds Vista-32), then get back to the console of the DVD-booted Windows Install, and follow the steps above again, but this time add the Vista-32 OS to the list.
Enjoy.
Leave a Reply
You must be logged in to post a comment.