Jump to content

BCD configuration


teryx510

Recommended Posts

Hello all, I'm trying to finish putting together an automated installation of XP using WinPE on a USB key. The only problem I have yet to solve (been banging my head on the desk all morning trying to figure it out) is how to get bootmgr to boot into my XP installation after WinPE has copied all the installation files to the hard drive and has rebooted. When it tries to boot into XP I get:

Windows failed to start...

File: \ntldr

Error: 0xC000000E

File is missing or corrupt...

I know that ntldr is on C: and that it is not corrupt as I can remove the key, reboot the machine, and it will then boot right into the XP install process.

Any help at all would be very much appreciated.

Here is my BCD config:

Windows Boot Manager

--------------------

identifier {bootmgr}

description Windows Boot Manager

locale en-US

inherit {globalsettings}

default {ntldr}

displayorder {ntldr}

{7619dcc9-fafe-11d9-b411-000476eba25f}

timeout 10

Windows Legacy OS Loader

------------------------

identifier {ntldr}

device partition=C:

path \ntldr

description Windows XP

Windows Boot Loader

-------------------

identifier {7619dcc9-fafe-11d9-b411-000476eba25f}

device ramdisk=[boot]\sources\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}

path \windows\system32\boot\winload.exe

description Windows Setup

locale en-US

inherit {bootloadersettings}

osdevice ramdisk=[boot]\sources\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}

systemroot \windows

detecthal Yes

winpe Yes

ems Yes

Link to comment
Share on other sites


Welcome to the MSFN!

:hello:

This method has been attempted many times and so far no one has been able to do it the way you are trying to. Capturing an XP install right after Textmode is run (during that reboot) will definately fail.

Your best option is to call an unattended XP install from PE.

Also you failed to state which version of PE you are using.

But check out this thread:

http://www.msfn.org/board/index.php?showtopic=88270

Link to comment
Share on other sites

Hi Tripredacus,

Sorry, I seem to have worded my problem very poorly. I'm not trying to capture the XP install after textmode. I boot off my USB key into WinPE (Version 2 I think...Vista) and have startnet.cmd call a script I wrote which in turn calls diskpart, winnt32 with appropriate switches, copies over some other files, and reboots the machine. Here is the problem. When the machine reboots, if the key is left in, the machine tries to boot off of it instead of the hard disk. This is expected behavior, however I have not been able to figure out a way to configure bootmgr on the key to correctly call ntldr on the hard drive. Which is where I get that error. Not sure whats wrong in my bcd configuration, but it tries to find and boot ntldr and just fails. Now, once I remove the key after letting WinPE run, everything works just fine. The XP text mode setup runs and the OS gets installed, boots right up and runs just great. I just wanted to eliminate the need to stand around for 10 minutes waiting for WinPE to finish running just to yank the key so that the install continues. I hope my problem is a little bit clearer now and any advice is again very much appreciated.

Link to comment
Share on other sites

There are 2 ideas. 1, you can try using PXE or 2, see if you can add the "press a key to boot to" to the USB key, similar to what is done for CDs. I imagine you are present at each machine when you are installing them?

Link to comment
Share on other sites

1) PXE isn't really an option. This is a standard build for many different facilities where I do not have access to a local server.

2) The BCD configuration I have on the USB key now comes up with a boot menu. So it's kind of like the "press a key to boot to". The boot menu has 2 options: boot to ntldr on hdd or boot winload off of the key. It defaults to the hdd after a timeout. Unfortunately, that's the part that isn't working. It tries to boot ntldr on the hdd and just fails.

Link to comment
Share on other sites

@teryx510

The problem can be easily solved by using grub4dos or a similar bootmanager, see here:

http://www.msfn.org/board/index.php?showtopic=86373

More updated data here:

http://www.msfn.org/board/index.php?showtopic=133418

and of course here:

http://www.boot-land.net/forums/index.php?showforum=66

@Wrex

bootfix.bin is NOT called by ANYTHING if not by the no-emulation bootsector on CD/DVD.

You should read this:

http://www.msfn.org/board/index.php?showtopic=133418

jaclaz

Link to comment
Share on other sites

Okay guys, I finally got it working correctly. Jaclaz I took your advice and switched my boot manager to grub4dos as I don't think bootmgr supports booting from multiple disks. That still had a problem and I finally figured out today that I needed to use the grub4dos map function to make it work right. So my menu.lst ended up being:

title find and load NTLDR of Windows XP

fallback 1

map (hd1) (hd0)

root (hd1,0)

chainloader /ntldr

savedefault --wait=2

title find and load BOOTMGR of WinPE

fallback 2

find --set-root --ignore-floppies /bootmgrv

chainloader /bootmgrv

savedefault --wait=2

This allows me to install from the key using WinPE but not have to stick around as the default boot option is XP. Thanks for all the help in getting this to work. Those links were helpful.

Link to comment
Share on other sites

This entry is however "wrong" (though working :)):

title find and load NTLDR of Windows XP

fallback 1

map (hd1) (hd0)

root (hd1,0)

chainloader /ntldr

savedefault --wait=2

once you map a drive to something else, you need to map --hook in order for the re-mapping to be "fully" effective:

title load NTLDR of Windows XP on (hd1)
fallback 1
map (hd0) (hd1)
map (hd1) (hd0)
map --hook
root (hd0,0)
chainloader /ntldr
savedefault --wait=2

See this:

http://www.boot-land.net/forums/index.php?...c=2568&st=7

jaclaz

Edited by jaclaz
Link to comment
Share on other sites

ahhh okay. I tried it the way you specified this morning, works just as well. Think I'll go with the "correct" answer to hopefully mitigate a headache later :)

Thanks for all the help Jaclaz!

Link to comment
Share on other sites

ahhh okay. I tried it the way you specified this morning, works just as well. Think I'll go with the "correct" answer to hopefully mitigate a headache later :)

Thanks for all the help Jaclaz!

You are welcome. :)

As said in the referenced post, both ways work, second only seems more "logic".

jaclaz

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...