MSFN Forum: BCD configuration - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

BCD configuration Booting WinPE from USB to install XP Rate Topic: -----

#1 User is offline   teryx510 

  • Group: Members
  • Posts: 5
  • Joined: 11-June 09

Posted 11 June 2009 - 12:07 PM

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


#2 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 7,349
  • Joined: 28-April 06
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 11 June 2009 - 12:57 PM

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/...showtopic=88270

#3 User is offline   teryx510 

  • Group: Members
  • Posts: 5
  • Joined: 11-June 09

Posted 12 June 2009 - 06:18 AM

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.

#4 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 7,349
  • Joined: 28-April 06
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 12 June 2009 - 08:18 AM

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?

#5 User is offline   teryx510 

  • Group: Members
  • Posts: 5
  • Joined: 11-June 09

Posted 12 June 2009 - 09:44 AM

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.

#6 User is offline   WreX 

  • Junior
  • Pip
  • Group: Members
  • Posts: 84
  • Joined: 26-October 07

Posted 15 June 2009 - 11:24 AM

Does your USB key have the file \ISO\boot\bootfix.bin? That's what's used on CDs for the "Press any key..." message.

#7 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 9,105
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 15 June 2009 - 06:33 PM

@teryx510
The problem can be easily solved by using grub4dos or a similar bootmanager, see here:
http://www.msfn.org/...showtopic=86373

More updated data here:
http://www.msfn.org/...howtopic=133418

and of course here:
http://www.boot-land...hp?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/...howtopic=133418

jaclaz

#8 User is offline   teryx510 

  • Group: Members
  • Posts: 5
  • Joined: 11-June 09

Posted 18 June 2009 - 03:25 PM

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.

#9 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 9,105
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 19 June 2009 - 12:52 PM

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

View Postteryx510, on Jun 18 2009, 11:25 PM, said:

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

This post has been edited by jaclaz: 19 June 2009 - 12:54 PM


#10 User is offline   teryx510 

  • Group: Members
  • Posts: 5
  • Joined: 11-June 09

Posted 22 June 2009 - 08:27 AM

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!

#11 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 9,105
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 22 June 2009 - 10:47 AM

View Postteryx510, on Jun 22 2009, 04:27 PM, said:

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

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy