Jump to content

XP Sysprep Clears My WinPE BCD Entry!


WreX
 Share

Recommended Posts

Here is my setup.

Partition 1 is 10GB with Win PE 2.0 configured to restore a Ghost image to partition 2. It is type 0x27 (hidden/OEM). This is the active partition. Basically it is a homemade restore partition.

I used bcdedit to configure a dual-boot configuration according to the M$ walkthroughs as follows:

bcdedit -createstore c:\temp\bcd

bcdedit -store c:\temp\bcd -create {bootmgr} device boot

bcdedit -store c:\temp\bcd -set {bootmgr} device boot

bcdedit -store c:\temp\bcd -create /d "WINPE" -application osloader

bcdedit -import c:\temp\bcd

bcdedit -set <GUID copied from above> osdevice boot

bcdedit -set <GUID copied from above> device boot

bcdedit -set <GUID copied from above> path \windows\system32\winload.exe

bcdedit -set <GUID copied from above> systemroot \windows

bcdedit -set <GUID copied from above> winpe yes

bcdedit -set <GUID copied from above> detecthal yes

bcdedit -displayorder <GUID copied from above> -addlast

bcdedit -create {ntldr} /d "Windows XP"

bcdedit -set {ntldr} device partition=x:

bcdedit -set {ntldr} path \ntldr

bcdedit -displayorder {ntldr} -addfirst

bcdedit -timeout 10

bcdedit -default {ntldr}

Partition 2 is about 76GB with a sysprepped version of Windows XP.

I copied ntldr, boot.ini, and ntdetect.com from the XP partition to the root of the WinPE partition.

Here's the problem. At first boot it works great. XP boots and mini setup runs as expected. However after mini setup finished and it automatically reboots, XP will not boot again. When you select the option to boot XP you get the following error:

Windows failed to start. A recent hardware or software change might be the cause.

File: \ntldr

Status: 0xC000000E

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

Booting into WinPE and running bcdedit reveals that the "device" entry for "Windows Legacy OS Loader" has changed from "partition=X:" to "unknown." Re-issuing the command "bcdedit -set {ntldr} device partition=x:" fixes the issue. However I cannot use a manual process for each system. I must either configure some sort of automated fix (e.g. a script that runs at first boot) or prevent the issue from occurring in the first place.

Thanks in advance for any help.

Edited by Tripredacus
Merged topics
Link to comment
Share on other sites


bcdedit -create {ntldr} /d "Windows XP"

bcdedit -set {ntldr} device partition=x:

bcdedit -set {ntldr} path \ntldr

bcdedit -displayorder {ntldr} -addfirst

bcdedit -timeout 10

bcdedit -default {ntldr}

You don't need to specify the partition for NTLDR, C:\BOOT.INI determines what partition XP will boot from. I use the command "bcdedit -set {ntldr} device boot".

Link to comment
Share on other sites

bcdedit -create {ntldr} /d "Windows XP"

bcdedit -set {ntldr} device partition=x:

bcdedit -set {ntldr} path \ntldr

bcdedit -displayorder {ntldr} -addfirst

bcdedit -timeout 10

bcdedit -default {ntldr}

You don't need to specify the partition for NTLDR, C:\BOOT.INI determines what partition XP will boot from. I use the command "bcdedit -set {ntldr} device boot".

That appears to have fixed my issue. Thanks very much.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.


×
×
  • Create New...