Article Index

Deploy a WinPE 2.0 image using PXE and the WAIK

This post is a follow-up to my previous post on Installing Vista on your Toshiba M200. It does not stand on its own, so please go read that post first to get some background. I've received more hits and questions about that post than any other. Unfortunately, I am neither a Vista, WinPE, PXE, WAIK, nor BCDEDIT expert. I copied the commands from the Microsoft documentation, then did a bunch of trial-and-error troubleshooting because of the errors in that documentation, and was lucky enough to get it to work. I documented the corrections I made in my article so that others could overcome the problems, and skip the trial-and-error step. But apparently, my instructions weren't much better, people didn't follow them close enough, or some other environmental issue is interfering. Since I cannot possibly give one-on-one support for everyone struggling through this process, I figured a second stab at documenting my steps might be helpful. This time, instead of documenting where to alter the Microsoft instructions, I just document each step exactly as I performed them - mostly copied verbatim from the WAIK User's Guide. The most commonly reported error people are seeing is:
File: \boot\BCD
Status: 0xc0000022
Info: An error occured while attempting to read the boot configuration data

That means people had trouble with the BCDEDIT steps, which is not surprising, since that is the part of the documentation with the most mistakes.

So here are the command-line commands as I entered them, to create a working PXE boot with a valid BCD file. My instructions involve a technician computer running WinXP, which also serves as my TFTP server using tftpd32.exe. I also use VirtualPC on the technician computer to run WinPE 2.0 (see the previous article on how to create this VirtualPC). Step 1 and Step 2 correspond the the steps in the WAIK User's Guide article mentioned in the previous post.

Step 1 - Run these commands from the XP technician computer. My TFTP server is installed at c:\apps\tftpboot. Make sure you substitute the appropriate path for your environment.

Click Start, point to Programs, point to Windows AIK, and then click Windows PE Tools Command Prompt

Enter the following commands at the command prompt. Each bulleted item is a single command and should be typed on one line (even if it wraps to a new line in your web browser).


Your command prompt should now have been changed to c:\winpe_x86


Step 2 - Run these commands from your Vista / WinPE 2.0 VirtualPC computer. After booting WinPE 2.0, you will automatically be presented with a command prompt. If runnning on Vista, open a command prompt.


This last command will respond with a message like:
"The entry {02836f40-9ea0-11db-af23-0003ffc3f7f5} was successfully created."

The GUID WILL BE DIFFERENT FOR YOU. The GUID is the long series of numbers, letters, and dashes enclosed in braces {}. Do not copy the GUID used in my commands below. You must substitute the GUID returned by the previous command.
The following commands use MY GUID. Make sure you change it to yours.


In the previous command, the setting is DETECTHAL in all lowercase. It is not DETECTHA1 - numeral one at the end.


Step 3 - Now I will copy the  files created on my WinPE 2.0 VirtualPC to my TFTP server (my technician computer). These steps may be different, depending on your setup.
Run the following commands from the Vista/WinPE 2.0 computer. Substitute the values in ALL CAPS with values for your environment.
TFTPCOMPUTER is the name of your computer running the tftp server.
SHARE is the name of a shared folder on your tftp server.
VALIDUSER is the name of a user on the TFTPCOMPUTER that has write access to SHARE.

net use y: \\TFTPCOMPUTER\SHARE
when prompted for a username, I enter: TFTPCOMPUTER\VALIDUSER
When prompted for a password, I enter the password for VALIDUSER

When the command completes, I now have the Y: drive mapped to my server (technician computer). I run the following command from the WinPE 2.0 VirtualPC:
copy c:\BCD y:\tftpboot\boot

(My share maps to the parent folder - c:\apps - of my tftp server software, which is installed at c:\apps\tftpboot)

I then started tftpd32.exe from c:\apps\tftpboot on my technician/tftp server. I went to the "DHCP server" tab and changed the "Boot file" to: boot\pxeboot.com

I then started the tablet, hit F12, selected network boot, then pressed F12 again to confirm boot from the network. Windows PE booted on the tablet.

Hope this helps.

Comments

finally I've mapped the network...
but...
File: \boot\BCD
Status: 0xc0000022
Info: An error occured while attempting to read the boot configuration data

p.s. sorry for my bad English
davide - January 08, 2007 05:47am
Nope, still the same error.

When I look in the log of the tftpd32 server, there seems to be a problem with a sort of
EACCESS on file \Boot\Fonts\wgl4_boot.ttf The folder name is invalid.
Same problem for the file \boot\boot.ini and \Boot\BCD

Placing the fonts there does not solve the problem.
A file like boot.ini I don't find on the PE CD.

Anyone that can solve the problem?
Wouter Leeuwerck - January 09, 2007 11:59am
This is the complete directory listing of my working tftpboot\boot folder (there are no subfolders):
abortpxe.com
BCD
boot.sdi
bootmgr.exe
hdlscom1.com
hdlscom1.n12
hdlscom2.com
hdlscom2.n12
pxeboot.com
pxeboot.n12
WdsConfig.inf
wdsnbp.com
winpe.wim
Joshua Flanagan - January 09, 2007 01:32pm
Wouter - I believe some of those error messages are "normal". I've pasted the entire contents of my tfptd32.exe log window during a successful load. The errors in the log DID NOT prevent me from booting WinPE 2.0 on my tablet.

Rcvd DHCP Discover Msg for IP 0.0.0.0, Mac XX:XX:XX:XX:XX:XX [09/01 18:32:18.006]
DHCP: proposed address 192.168.1.200 [09/01 18:32:18.006]
Rcvd DHCP Rqst Msg for IP 0.0.0.0, Mac XX:XX:XX:XX:XX:XX [09/01 18:32:20.006]
Previously allocated address acked [09/01 18:32:20.006]
Connection received from 192.168.1.200 on port 2070 [09/01 18:32:20.006]
Read request for file <boot\pxeboot.com>. Mode octet [09/01 18:32:20.022]
OACK: <blksize=1456,> [09/01 18:32:20.022]
<boot\pxeboot.com>: sent 18 blks, 25068 bytes in 0 s. 0 blk resent [09/01 18:32:20.069]
Connection received from 192.168.1.200 on port 2071 [09/01 18:32:22.975]
Read request for file <boot\bootmgr.exe>. Mode octet [09/01 18:32:23.006]
OACK: <blksize=1456,> [09/01 18:32:23.006]
<boot\bootmgr.exe>: sent 288 blks, 417896 bytes in 1 s. 0 blk resent [09/01 18:32:23.162]
Connection received from 192.168.1.200 on port 5329 [09/01 18:32:23.725]
Read request for file <\Boot\Fonts\wgl4_boot.ttf>. Mode octet [09/01 18:32:23.725]
File <Boot\Fonts\wgl4_boot.ttf> : error 3 in system call CreateFile The system cannot find the path specified. [09/01 18:32:23.725]
Connection received from 192.168.1.200 on port 5330 [09/01 18:32:24.037]
Read request for file <\boot\boot.ini>. Mode octet [09/01 18:32:24.037]
File <boot\boot.ini> : error 2 in system call CreateFile The system cannot find the file specified. [09/01 18:32:24.037]
Connection received from 192.168.1.200 on port 5331 [09/01 18:32:39.241]
Read request for file <\Boot\BCD>. Mode octet [09/01 18:32:39.241]
OACK: <tsize=12288,> [09/01 18:32:39.241]
Peer returns ERROR <TFTP Aborted> -> aborting transfer [09/01 18:32:40.241]
Read request for file <\Boot\BCD>. Mode octet [09/01 18:32:40.241]
OACK: <tsize=12288,blksize=1420,> [09/01 18:32:40.257]
<Boot\BCD>: sent 9 blks, 12288 bytes in 1 s. 0 blk resent [09/01 18:32:40.272]
Read request for file <\Boot\Fonts\wgl4_boot.ttf>. Mode octet [09/01 18:32:41.288]
File <Boot\Fonts\wgl4_boot.ttf> : error 3 in system call CreateFile The system cannot find the path specified. [09/01 18:32:41.288]
Connection received from 192.168.1.200 on port 5334 [09/01 18:32:41.303]
Read request for file <\hiberfil.sys>. Mode octet [09/01 18:32:41.303]
File <hiberfil.sys> : error 2 in system call CreateFile The system cannot find the file specified. [09/01 18:32:41.303]
Connection received from 192.168.1.200 on port 5335 [09/01 18:32:41.303]
Read request for file <\Boot\WinPE.wim>. Mode octet [09/01 18:32:41.303]
OACK: <tsize=164002999,> [09/01 18:32:41.335]
Peer returns ERROR <TFTP Aborted> -> aborting transfer [09/01 18:32:42.335]
Read request for file <\boot\boot.sdi>. Mode octet [09/01 18:32:42.335]
OACK: <tsize=3170304,> [09/01 18:32:42.350]
Peer returns ERROR <TFTP Aborted> -> aborting transfer [09/01 18:32:43.350]
Read request for file <\boot\boot.sdi>. Mode octet [09/01 18:32:43.350]
OACK: <tsize=3170304,blksize=1420,> [09/01 18:32:43.350]
<boot\boot.sdi>: sent 2233 blks, 3170304 bytes in 2 s. 0 blk resent [09/01 18:32:44.272]
Connection received from 192.168.1.200 on port 5338 [09/01 18:32:44.272]
Read request for file <\Boot\WinPE.wim>. Mode octet [09/01 18:32:44.272]
OACK: <tsize=164002999,blksize=1420,> [09/01 18:32:44.288]
<Boot\WinPE.wim>: sent 115496 blks, 164002999 bytes in 46 s. 0 blk resent [09/01 18:33:30.679]
Connection received from 192.168.1.200 on port 5396 [09/01 18:33:32.648]
Read request for file <\Boot\Fonts\wgl4_boot.ttf>. Mode octet [09/01 18:33:32.648]
File <Boot\Fonts\wgl4_boot.ttf> : error 3 in system call CreateFile The system cannot find the path specified. [09/01 18:33:32.648]
Rcvd DHCP Discover Msg for IP 0.0.0.0, Mac XX:XX:XX:XX:XX:XX [09/01 18:34:13.711]
DHCP: proposed address 192.168.1.200 [09/01 18:34:13.711]
Rcvd DHCP Rqst Msg for IP 0.0.0.0, Mac XX:XX:XX:XX:XX:XX [09/01 18:34:13.727]
Previously allocated address acked [09/01 18:34:13.727]
Rcvd DHCP Rqst Msg for IP 192.168.1.200, Mac XX:XX:XX:XX:XX:XX [09/01 18:34:16.883]
Previously allocated address acked [09/01 18:34:16.883]
Joshua Flanagan - January 09, 2007 04:46pm
Hi:

Well i solve my problem, ir you change some settings in your tftpd32 you will boot in the windows installer, you only need to click in the settings button and then check the option PXE Compatibility, and save your settings and its done!!!!


Jejeje, sorry for my english!!!!
Jonathan Payan - January 10, 2007 11:30pm
Thanks for the suggestion Jonathan - hopefully that will help others.
I did NOT need to check PXE Compatibility, but it may depend on the system you are trying to boot.
My TFTPD settings were the same as those suggested by the original article I linked to: http://home.allegiance.tv/~joem298/
Joshua Flanagan - January 11, 2007 09:11am
Thanks Jonathan, I changed the same option, and now my virtual machine also boots from windows pe. VM Workstation runs stuck after a while, but I think that is because VM ware is not yet compatible with vista. I try tomorrow in the computer shop and let you know if it works in the real world.

Thank you very much.
Wouter Leeuwerck - January 11, 2007 12:00pm
Ok, I've tested the option for pxe compatibility and now it works really great!
tested on 5 different kind of mainboards and 3 portabeles. Thanks a lot!
wouter leeuwerck - January 15, 2007 02:59am
Thanks for the confirmation Wouter. I have updated the original article to suggest using that option if you have trouble.
Joshua Flanagan - January 16, 2007 08:28am
Joshua,

I just want to say you can look in the mirror and be proud of yourself.
Thank you so much on helping me out installing Vista this way.
It is a one of a kind procedure compared to other on the net, trust me.

Thnx,
Jori
Jori Huisman - January 18, 2007 03:38am
The page was really helpful to created PXE image. Many Thanks....

But when boot my workstation with F12...it gives me an following error. I appreciate your assistance.

FYI: i can boot that workstation with CD winpe 2 boot image (I've created image using the command: oscdimg -n -bc:\winpe_x86\etfsboot.com c:\winpe_x86\ISO c:\winpe_x86\winpe_x86.iso)

No Doubt: I've exactly the same steps you've give( Tried 3 times creting the BCD files, all have the same error)

ERROR
Status: 0xc000000f
Info: Boot selection failed because a required device is inaccessible
Paul - February 06, 2007 02:57am
After a week for struggling to get this to work (and succeeded) he's my suggests:

1. TFTPD
Don't use Netware's (obvious I know - but it's use here is out of my control)
Microsofts works (but lacks logging). TFTPD32 works if you check the allow '\' for virtual root option (which is why Netware's doesn't work).

2. bootmgr.exe
Despite the docs, this file has to be in the TFTP root.

3. BCD file
Double check this. One typo in here (easily done with all these steps) can waste hours of your time.
Use [b]bcdedit -store x:\BCD -enum all[/b]
it should produce something like (GUIDs different):
[code]
Windows Boot Manager
--------------------
identifier {bootmgr}
description Windows VISTA BootManager
displayorder {bef323ac-c6c0-11db-beab-0007e95c8f63}
timeout 30

Windows Boot Loader
-------------------
identifier {bef323ac-c6c0-11db-beab-0007e95c8f63}
device ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}
description WinPE Boot Image
osdevice ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}
systemroot \Windows
detecthal Yes
winpe Yes

Setup Ramdisk Options
---------------------
identifier {ramdiskoptions}
description Ramdisk options
ramdisksdidevice boot
ramdisksdipath \boot\boot.sdi
[/code]

4. Boot Image File
Use pxeboot.com or pxeboot.n12 (to remove F12 message)
If redirecting from PXELINUX then rename pxeboot.n12 to pxeboot.0

Hope this helps
Robin
Robin - March 01, 2007 04:12am
Thanks for the feedback, hopefully it will help others.
I'm not sure what you mean by #2 - when you say "TFTP root", do you mean the application folder (c:\apps\tftpboot in my example), or the boot folder that is created (c:\apps\tftpboot\boot) and contains all of the WinPE files?
In my experience, I had no problems with bootmgr.exe only existing in the boot subfolder.
And you are absolutely right that the BCD creation is the most sensitive step. This follow-up post was an attempt to make it very explicit which exact commands to type, but there is always room for error.
Glad to hear you finally got it to work.
Joshua Flanagan - March 01, 2007 07:14am
Yep, I was getting "TFTP Download failed" from pxeboot.0 if I didn't put bootmgr.exe in the TFTP root directory (c:\apps\tftpboot in your example).

This may be because I'm going from PXELINUX to "boot/pxeboot.0". pxeboot.0 only has the text "bootmgr.exe" in it (not "boot/pxeboot.0") so must be relying on some sort of 'current directory' assumption that I didn't think existed in TFTP.

Another usual site: www.boot-land.net
Robin - March 05, 2007 03:50am
hey i tried to do the (bcdedit –store c:\BCD –create {ramdiskoptions} /d "Ramdisk options") and it wont work in vista cmd promt i donno if anyone els incountered this but i hope theirs a solution for this thanx alot
cucu - March 07, 2007 09:30pm
I followed the instructions precisely with the exception that i ran virtual pc from the same pc i was hosting from. I got the guid, and was able to deploy winpe 2.0 to another computer that was on my switch.

the real problem is that when i try to copy my tftp folder to another computer and use a new computer as a host, i get errors trying to load the image. 0xc0000022 or 0xc000000f

is the guid exclusive to the pc that generated it?
d-v-8 - March 09, 2007 05:36pm
There is discussion/comments about whether or not bootmgr.exe must be in the root.

I have observed that the behavior changes depending upon whether you use '/' or '\' in the DHCP Option 67 Bootfile Name

This data was collected on the tftp server running:
win2k3r2
some other tftp server
MSFT DHCP service
wireshark network protocol analyzer http://wireshark.org/

If DHCP option 67 is configured with a backslash to say:
boot\pxeboot.n12

then it will proceed to load 'boot\bootmgr.exe'

If DHCP option 67 is configured with a forward slash to say:
boot/pxeboot.n12

then it will proceed to load 'bootmgr.exe' out of the root of the tftp server

Further investigation leads to the following observations:

\pxeboot.n12 -> \bootmgr.exe
/pxeboot.n12 -> bootmgr.exe
\ foo/pxeboot.n12 -> bootmgr.exe
foo\pxeboot.n12 -> foo\bootmgr.exe
\ foo/bar/pxeboot.n12 -> bootmgr.exe
foo\bar\pxeboot.n12 -> foo\bar\bootmgr.exe
\ /foo/bar/pxeboot.n12 -> bootmgr.exe
\foo\bar\pxeboot.n12 -> \foo\bar\bootmgr.exe


This seems to imply that the implementation is grabbing everything up to the last '\' character as the path. If there are no '\' chars, as in 'boot/pxeboot.n12' then the code does not find a prefix and bootmgr.exe is fetched from the root of the tftp server.


Miguel
Miguel - March 12, 2007 04:03pm
Unfortunately, I'm loading pxeboot.0 from PXELINUX so no option 67 set which is where it must be looking for the directory to prefix.
I tested all versions of \ and / in the pwflinux.cfg\default file and it made no difference.
Robin - March 13, 2007 08:21am
In this posting I am going to deal with getting WinPE booted from a Linux tftp server. We'll also address the issue of loading WinPE 2.0 from under pxelinux.

When I posted my previous findings related to '\' and '/' behavior I had not yet made it through the entire boot process ... I had to go to bed :-)

While pxe bootstrap loader code uses the path prefix for fetching bootmgr.exe, it is not consistent.

I used Option 67 to specify "foo\pxeboot.n12"

The wireshark dump showed the following TFTP Read Requests:
foo\pxeboot.n12
foo\pxeboot.n12
foo\bootmgr.exe
\Boot\Fonts\wgl4_boot.ttf
\foo\boot.ini
\Boot\BCD
\Boot\BCD
\Boot\Fonts\wgl4_boot.ttf
\hiberfil.sys
\boot\testpe.wim
\boot\boot.sdi
\boot\boot.sdi
\boot\testpe.wim
\Boot\Fonts\wgl4_boot.ttf

We can see that it is not consistent and that several things are wired to \Boot. The capitalized versions of \Boot came from MSFT's loader code. The lower case \boot came from the entries that I put in my BCD file.

So, we have some more issues when trying to use a Linux TFTP server.

* \backslash\ vs /slash/ in the pathnames
* some things are hard-wired to \Boot
* case insensitivity on Windows could be an issue
* Robin's issue of wanting to launch from pxelinux,
\ where it is too late to set Option 67

The solution on linux platforms is to use the 'filename remapping' feature that is available in HPA's tftpd. I am running tftp-server-0.42-3.1 on Fedora Core 6. I feel like I saw some reference to a bug in this remapping feature at some point, so if you are using an older version then you should investigate this.

The 'filename remapping' feature allows you to use regular expressions to remap the filename string that is requested by the tftp client. See 'man tftpd' for more details.

We are going to need to pass the name of the remapping file to tftpd so that it will apply the remapping rules. I created my remapping file as /etc/tftpdremap

My /etc/tftpdremap looks like this:
# remap WinPE 2.0 filenames
#
# Map these isolated file names and go
re ^pxeboot\.n12 winpe20/pxeboot.n12
re ^pxeboot\.com winpe20/pxeboot.com
re ^pxeboot\.0 winpe20/pxeboot.n12
re ^bootmgr\.exe winpe20/bootmgr.exe
# map these path prefixes
r ^\\Boot\\ winpe20/
r ^\\boot\\ winpe20/
r ^\\ winpe20/
# change all remaining \ to /
rg \\ /
# THE END

On my linux tftp server I put the winpe20 stuff in a subdir called 'winpe20' instead of 'boot'. Some might want to call it 'Boot' so that it would be consistent with a Windows tftp server configuration. Call it whatever you want, the remapping rules will take care of it.

I encourage you to see 'man tftpd' to understand this remapping syntax.

pxeboot.0 is in there so that you can boot this thing from underneath pxelinux. For those of you who don't have a lot of experience with pxelinux, recall that the filename extension is very important to the pxelinux loader. If you try to load a .com file then pxelinux will think it is a MS-DOS .com file. If you try to load a .n12 file then pxelinux will think it is a linux kernel ... since it doesn't recognize the extension. If either of these things happens then you are hosed.

You need to use the .0 extension so that pxelinux will load it as a PXE network bootstrap program. The mappings that I showed above just mapped pxeboot.0 to winpe20/pxeboot.n12. You can call it whatever you want, just change the mapping file.

Note that I did not put the font files up there. If you play with them you may run into some case-sensitivity issue. If so, then you can use the remapping rules to turn everything into lower case.

Since you have to use the remapping file anyway, I recommend that you make symbolic name changes there, rather than renaming or copying the files. That way the files on your linux box are simply a copy of the c:\tftpboot\Boot subdirectory on your Windows tftp server.

While playing with this filename remapping you are going to want to make tftpd logging a little more verbose ... another argument to tftpd.

tftpd is spawned by xinetd, so the configuration is in /etc/xinetd.d/tftp

Mine now looks like this:

service tftp
{
socket_type = dgram
\ protocol = udp
wait = yes
\ user = root
server = /usr/sbin/in.tftpd
\ server_args = -s /tftpboot -m /etc/tftpdremap -v
disable \ = no
per_source = 11
cps = 100 2
flags = IPv4
}

After making changes to this file you need to do the following as root:
#service xinetd reload
#pkill in.tftpd

You can then bring up a terminal that watches the log file for interesting tftpd stuff:
#tail -f /var/log/messages | grep tftpd

just leave this running.

It should now work for you.

In your /etc/dhcpd.conf you can specify the filename as 'pxeboot.n12' or pxeboot.com'

If you want to run under pxelinux then you can say:
kernel pxeboot.0

If it doesn't work for you then:

* watch the 'tail -f /var/log/messages | grep tftp' to see that
the mappings are OK

* if you make changes to /etc/xinetd.d/tftp you must:
service xinetd reload

* if you make changes to your /etc/tftpdremap mappings you must:
pkill in.tftpd

* use wireshark to pick up DHCP and TFTP request on your tftp
server with capture filter:
port 67 or port 68 or port 69


Good luck!
Miguel
Miguel - March 13, 2007 10:03pm
Joshua,

We use the network boot with tftpd and winpe now for quite a while and it works perfect! (on computers with minimum 512 MB RAM).
One thing I haven't been able to figure out, is how to change the inputlocale of winpe to belgian (point). I know it's 0813:00000813, but I can not change the input. Even the correct command "wpeutil SetKeyboardLayout 0813:00000813" that gives a succesful result, does not change the input for the prompt. But if you start another program in winpe, then the program has the correct keyboard layout. Can you help me?
wouter leeuwerck - March 21, 2007 12:54pm
I believe the SetKeyboardLayout command only effects new processes, so you need to start a new command shell to see any result.
Robin - April 04, 2007 07:15am
I managed to get PE 2.0 to PXE boot under Linux using the following:

# bcdedit –store c:\BCD –set {ramdiskoptions} ramdisksdidevice Boot
# bcdedit –store c:\BCD –set {ramdiskoptions} ramdisksdipath \Boot\boot.sdi

I changed "boot" to "Boot" as bootmgr.exe has this hard coded for some reason.

My TFTP setup for Windows PE is placed in winpe/boot/, so I use the following TFTP mapping rules:

r ^\\Boot\\ \\winpe\\Boot\\
rg \\ /

See Miguel's post for further details, but these two rules are enough to make everything work for me.

DHCP config as follows:

filename "\\winpe\\Boot\\pxeboot.n12";

The Microsoft documentation says to load wdsnbp.com, which I cannot get to work. I assume that this loader requires WDS to work properly, but the documentation does not say that.
Joshua Weage - April 30, 2007 07:12am
I have been fighting the dreaded "\boot\BCD Status: 0xc0000022" error for 2 days now.

I must have retyped the bcdedit commands a dozen times thinking I'm just impossibly dumb.

What kept striking me as odd is that looking at the TFTP logs it looked like everything was perfectly fine until it got here:
Read request for file <\Boot\BCD>. Mode octet [15/05 17:08:34.937]
Error EACCESS on file \Boot\BCD. Ext error The directory name is invalid

"Directory name invalid"??? That didn't make sense because everything else up to that point (pxeboot.n12, bootmgr.exe) was loading fine from that same subdirectory.

Then I tried copying the BCD file all over the place - I had a copy in every subfolder of my tftp root. I even made a subfolder "Boot" of my folder "Boot" ("\tftproot\Boot\Boot") and put a copy of BCD there!

Nothing worked.

Then I realized that the earlier file loads in the log looked like this:
Read request for file <Boot\pxeboot.n12>. Mode octet [15/05 17:08:17.578]
Read request for file <Boot\bootmgr.exe>. Mode octet [15/05 17:08:17.672]
<Boot\pxeboot.n12>: sent 49 blks, 25068 bytes in 0 s. 0 blk resent [15/05 17:08:17.687]
<Boot\bootmgr.exe>: sent 817 blks, 417896 bytes in 1 s. 0 blk resent [15/05 17:08:18.453]

Those files loaded fine, but BCD wouldn't load. FINALLY I noticed the difference... the earlier entries were "<Boot\blah>" but the BCD entry was "<\Boot\BCD>" (notice the additional "backslash" at the beginning!!)

OK... so clearly the initial files loaded, based on the data they read from the DHCP server option 067 (bootfile name) which was "boot\pxeboot.n12" but then something changed to look at "\Boot" instead of "Boot".

Something made me look at my TFTPD32 settings. I've been using TFTPD32 for a while (other projects) and never had to enable the value... but right there at the bottom of the advanced tftp server options list is "Allow '\' As virtual root".

Holy crap.

"ENABLED"

Boot...

<Boot\BCD>: sent 25 blks, 12288 bytes in 0 s. 0 blk resent [15/05 17:20:15.880]

"Windows is loading files"...

:)

Fact is, Robin nailed it above in the post on 01 March... I just missed that one comment - and wasted 2 days.

So if you're still fighting this, and you haven't switched to Miguel's linux TFTP server, enable that feature!

(learning experience, right?)
Bryan - May 15, 2007 02:34pm
I finally got it to work!

BCD, boot.sdi, Wdsconfig.inf and winpe.wim need to be moved into a subdirectory called boot. So the finished tree looks like;

C:\apps\tftpboot\Boot
|-abort.pxe
|-bootmgr.exe
|-hdlscom1.com
|-hdlscom1.n12
|-hdlscom2.com
|-hdlscom2.n12
|-pxeboot.n12
|-wdsnbp.com
|[dir] Boot
|-BCD
|-boot.sdi
|-WdsConfig.inf
|-winpe.win

tftpd32 was set to allow / as virtual root and pxe compatable
Graham - May 26, 2007 10:03pm
I follow all of your steps but when it comes to the part where I copy the BCD files with net use from the virtual pc to the technician computer, It gives me an error saying that the workstation service is not running. Then I try to type net start workstation to start that service and it says that it could not be started, files not found. Any suggestions?
Dan - August 02, 2007 06:38am
Josh, you rock!
saved me a bunch of trial and error on my own part, though i did pull an all-nighter, even with your wonderful guide.. (i made a custom WinPE image and a batch file that auto generates the WinPE file. I still don't understand the NEED for the lengthy BCDedit and GUID crap, but i'm sure i will understand soon.. (vista yadda yadda), this is a cool little tool i'm looking at, incase it may help in generating those BCD's...

http://neosmart.net/dl.php?id=1

i wonder if we could get THAT running on WinPE.. that would be spectacular..

anyway, thanks again for the writeup!.. now i'm off to learn how to image with the new Vista ImageX..

batch files here i come!
Hunter DG - August 17, 2007 07:50am
Just as a FYI I was having problems too, After checking the BCD file 4 or 5 times and redoing it. I looked at the tftp32 logs and for some reason the path to the WinPE.wim file was getting mangled. It was trying to load \Boot\WinPE\win which I find very weird. . But this was resulting in the infamous

ERROR
Status: 0xc000000f
Info: Boot selection failed because a required device is inaccessible

Error.

So the work around I did was to copy \Boot\WinPE.wim to file called \Boot\WinPE\win and viola worked like a champ.

I am curious to know though what was mangling the path to the WinPE.wim file, If anyone has any ideas.
PXE_Rules - October 18, 2007 08:45am
Thanks for the information. I have used this (and several other sources) to get WinPE up and running using gPXE. I have also documented the full procedure at

http://www.etherboot.org/wiki/winpe

Michael Brown
Etherboot Project
Michael Brown - March 03, 2008 09:18am
After half a day of aggravation I feel compelled to add my solution for others. My configuration is much like Miguel's, mentioned above. I am using Linux as my pxe, tftp, and dhcp servers. So the tftp remapping is a must. However, after all of that, I still had no luck. I kept getting "TFTP Download failed". \ I did a wireshark (Etheral) capture, and found that pxeboot.n12 (renamed to pxeboot.0) was loading correctly, but then bootmgr.exe was not being found. Here is the details of that:

12080 432.947088 192.168.79.103 0.0.0.0 TFTP Read Request, File: bootmgr.exe, Transfer type: octet, blksize=1456

The above looks suspicious. 192.168.79.103 (the machine I am trying to PXE boot winpe on) is the source of the read request, but look at the destination... It's all 0's. It's saying tftp the file bootmgr.exe from host 0.0.0.0. Six attempts are made, and then the message "TFTP Download failed" is given.

My pxe server and tftp server are at IP address 192.168.79.101

This turned out to be a problem with my dhcpd. I did not have:

next-server 192.168.79.101;

in my dhcpd.conf file. After adding that line to the correct place, I was able to boot winpe with pxelinux. My pxelinux.cfg file looks like:

LABEL WinPE
MENU LABEL ^WinPE
kernel pxeboot.0


Scott Lightsey
Scott Lightsey - April 11, 2008 02:07pm
Found this post via Google, I really appreciate the detailed walkthrough and the feedback in the comments.

I had my own host of problems with the bcdedit lines, namely they would throw syntax errors when I copy&pasted them into Vista. Not very helpful ones, either.

You're blog encodes the hyphen in "bcdedit -store" as a dash (slightly longer, used for "breaks") and that completly threw bcdedit off the tracks. Only the first -createstore is encoded correctly. Even the official walkthrough has that problem, which is even more puzzeling.

I actually studied bcdedit manual pages for half an hour until I figured out the problem. The solution is rather simple, of course: Replace the dashes with the normal hyphen (the minus key).
Philipp Dörner - April 21, 2008 12:36pm
Philipp - Nice catch! I bet that was tripping up a lot of readers. I've fixed the instructions above, so hopefully they are safe to copy and paste now.
Joshua Flanagan - April 21, 2008 06:30pm
I m typing "for net use y:\\TFTPCOMPUTER\SHARE"

net use y:\\DESIGN\TFTPBOOT\Boot


But I have have the following error message:

System error 67 has occured. The network name cannot be found.

Why cant windows PE find my network? The name ist Design and the folder is as described.

What is y:

I know that I might need later y: drive to install Windows Vista trough windows PE, by command NET USE y: \\servername\sharename

But how can I specify y:, what is y: or might y: be my HDD C: ?

Questions over question, I mstucked

Iva asked nearly 10 forums on that subject.

Please help me. or the world would have one more human less.

Haha joke :D, but please, I m a little frustrated.
Beedee - September 27, 2008 03:27am
Make sure you have a space between y: and the \\server\share
The NET USE command maps a UNC path (\\server\share) to a driver letter (y:)

You should specify a driver letter that is NOT in use. Most people are already using C: for their hard drive, and maybe D: for their CD-ROM. Y: is usually a safe bet as an unused letter.
Joshua Flanagan - September 30, 2008 07:36pm
this appears to be the only blog on the web where information regarding TFTP booting is relavent, well done guys!!

my problem is that i am trying to boot diskless clients using wds. i have tried wtware and tftpd32 but all my problems revert back to RIS (WDS is the replacement for RIS in server 2k3 R2). i then uninstalled wtware (they have not tested their software with WDS yet) and used WDS and then created the files as per the instructions near the top of this blog. the files are created in a directory called remoteinstall in the root of C:\. all the files i created form using the WAIK command prompt are the same as the ones in the remoteinstall directory.

my erros are that when using wdsnbp.com it says the file is not a valid image and if i use pxeboot. com it says the file is not found, both files are in the same directory. by defualt wds puts all the files in a sub dir called x86. i moved the files to the boot dir (as above) and i still get the same error.

any ideas of what i am doing wrong? i have configured all the scope options 60, 66 and 67 correctly and even pointed the default boot image for x86 architecter to the boot folder and not the boot\x86 folder, still with the same results.

any help will be appreciated.

andy
Andy - November 10, 2008 07:03am
Hi,
What does "MyWinPE Boot Image" means in bcdedit -store c:\BCD -create /d "MyWinPE Boot Image" /application osloader

Thanks
Aleksandar - December 29, 2008 03:40pm
Hi
Thanks for the great post sorted out almost all of the problems I've been having execpt for one query....

It Loads Windows Files twice when booting? Why
(i.e it finds the TFTP server Displays Loads Windows Files the bar gets to the end and it does it agin). Winpe then loads.

Is this normal?