Link to home
Start Free TrialLog in
Avatar of dillonconsulting
dillonconsultingFlag for Canada

asked on

"Windows failed to start" error message after applying a Windows 7 image from a WIM file

I have captured an image of Windows 7 using imagex from the new WAIK for Windows 7.  From a WinPE boot environment  I typed the following at the command prompt:

imagex /compress fast /capture c: e:\image.wim "test new imagex version for Windows 7" /verify

After the capture successfully completed I then disconnected the e: drive.  I then used the following DISKPART commands to format the c: drive:

select disk 0
clean
create partition primary
active
assign letter = c
format fs=ntfs quick
exit


I then connected the e: drive and applied the captured image back to the c: drive using this command:

imagex /apply e:\image.wim 1 c:

Once the image applied successfully I restarted the computer. That's when I got a Windows Boot Manager screen that informed me:

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."

If you do not have this disc, contact your system administrator or computer manufacturer for assistance.

File:  \Windows\system32\winload.exe

Status:  0xc000000e

Info:  The selected entry could not be loaded because the application is missing or corrupt.


When I follow these instructions Windows is quickly repaired and loads fine.  The questions are, why does this keep happening and how do I resolve this problem?  (I'm glad I decided to test the new version of imagex with Windows 7 prior to using SYSPREP to reseal Windows for deployment to other computers.)  This should simply apply the captured Windows 7 image back onto the hard drive.  It's very frustrating because I have a great deal of experience creating, deploying, and managing a Windows XP image using the Windows Vista WAIK (imagex, and WinPE 2.0 environment) and have NEVER had issues like this before.

HELP!
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

the problem is because when you formatted the new disk you created a new guid for the drive.  bootmanager uses the guid not the drive letter to determine what to load and it couldn't find it. from diskpart try removing the 'clean'
Avatar of dillonconsulting

ASKER

Thank you ve3ofa, I figured out that part several hours after submitting this request but forgot to update the post with my findings.

I use clean in the diskpart section to remove the factory partitions from our new computer purchases.  We have our vendors apply our corporate image (currently XP) to our new systems prior to shipping the new systems directly to our offices coast to coast.  This streamlined deployment strategy saves us time and money having to build the new systems ourselves and ship them out from a central location.  The end user is greeted by the mini setup Welcome wizard and joins the system to our domain with the NetBIOS name we provide them with before hand.  I don’t see how skipping this diskpart step will resolve this issue as each new system we purchase will have a different GUID with every new drive.

I did find a roundabout solution, eventually, from Microsoft called BCDBOOT (http://technet.microsoft.com/en-us/library/dd744347(WS.10).aspx) that showed me how to add a new BCD entry for the new GUID and that lead me to BCDEDIT (http://technet.microsoft.com/en-us/library/cc709667(WS.10).aspx) which allowed me to edit the BCD to remove the broken entry.  Now all I need to figure out is how to reliably script deleting the broken GUID without knowing what that GUID will be after applying the image from within a WinPE environment.

Any help would be greatly appreciated.

ASKER CERTIFIED SOLUTION
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ok.  I think I've figured it out.

The problem was that I'm applying an image that hasn't been through SYSPREP and therefore Windows was expecting to find a specific hard drive GUID.  So for the purposes of creating my base image the above commands, entered manually, will fix the problem because once you run SYSPREP Windows will automatically accept the GUID from the "new" drive.

Thanks for the help ve3ofa!
Although strictly speaking ve3ofa's solution worked as is, it did not deal with the issue of the "unknown" entries that still existed in the BCD.  That's why I included my reply as part of the solution so that others will see the two commands together.  If you do not remove the "unknown" BCD entries when the PC boots up you will be asked to select between two operating systems:  Windows 7 or Windows 7, which some will find very confusing since this isn't a dual boot situation.  Only one of the two Windows 7's will actually boot Windows, the other will display the Windows Boot Manager screen.