Jump to content











Photo
- - - - -

Booting Winpe 7 over pxe using a linux server


  • Please log in to reply
29 replies to this topic

#1 clivebuckwheat

clivebuckwheat

    Newbie

  • Members
  • 20 posts
  •  
    Canada

Posted 24 March 2010 - 05:25 AM

Hi I have been trying to accomplish this feat for about a week now, and I alway seem to get a boot up error

Attached Files



#2 dera

dera

    Gold Member

  • .script developer
  • 1335 posts
  •  
    Hungary

Posted 24 March 2010 - 06:35 AM

remap file is mandatory
do you use remapfile?

what about the filecase?
for me the file 'BCD' is in uppercase (/boot/BCD)
(all other folder or file name is in lowercase)

#3 clivebuckwheat

clivebuckwheat

    Newbie

  • Members
  • 20 posts
  •  
    Canada

Posted 24 March 2010 - 01:58 PM

BCD is uppercase in a Boot folder.

I have tried many remapping techniques. Which one are you using?. My server is ubuntu if that makes a difference.

remap file is mandatory
do you use remapfile?

what about the filecase?
for me the file 'BCD' is in uppercase (/boot/BCD)
(all other folder or file name is in lowercase)



#4 dera

dera

    Gold Member

  • .script developer
  • 1335 posts
  •  
    Hungary

Posted 24 March 2010 - 02:16 PM

i use tftpd-hpa

my tftpd-hpa server configuration file (/etc/default/tftpd-hpa) contains this:
RUN_DAEMON="yes"
OPTIONS="-l -s /var/lib/tftpboot -m /var/lib/tftpboot/tftpd.remap -vvv"

my remap file (/var/lib/tftpboot/tftpd.remap) contains:
re ^bootmgr\.exe boot/bootmgr.exe
r ^\\Boot\\ boot/
r ^\\boot\\ boot/
rg \\ /

also my bootmgr.exe located in the folder /boot

also my boot.wim located in the folder /boot
i modded my 'BCD' using:
bcdedit.exe /set {default} osdevice ramdisk=[boot]\boot\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
bcdedit.exe /set {default} device ramdisk=[boot]\boot\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}

Edited by dera, 24 March 2010 - 10:43 PM.


#5 clivebuckwheat

clivebuckwheat

    Newbie

  • Members
  • 20 posts
  •  
    Canada

Posted 25 March 2010 - 05:20 AM

Thank you for your post but I seem to be struggling. I always get a boot\BCD error on boot. My tftpd/pxe server is running on Ubuntu 9.10. Any help would greatly be appreciated.

here is what is in my /etc/default/tftpd-hpa

#Defaults for tftpd-hpa
RUN_DAEMON="yes"
OPTIONS="-l -s /var/lib/tftpboot -m /var/lib/tftpboot/tftpd.remap -vvv"

here is my /var/lib/tftpboot/tftpd.remap

re ^bootmgr\.exe boot/bootmgr.exe
r ^\\Boot\\ boot/
r ^\\boot\\ boot/
rg \\ /

here is what is in my /etc/inetd.conf

tftp dgram udp wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /tftpboot

Here is what is in my dhcpd.conf file
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.2 192.168.1.255;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
filename "pxelinux.0";
next-server 192.168.1.105;

here is how I call winpe from my default file

label WinPE
menu label ^WinPE
menu default
kernel Boot/startrom.0
append Boot/bootmgr.exe

here is the content of my /tftpboot
pxelinux.0
boot.img.gz
mini.iso
pxelinux.cfg
vesamenu.c32
bootmgr.exe
netboot.tar.gz
tftpd.remap~


/Boot
abortpxe.com
boot.sdi
hdlscom2.com
startrom.0
wgl4_boot.ttf
BCD
hdlscom1.com
hdlscom2.n12
WdsConfig.inf
WinPE.wim
BCD.LOG
hdlscom1.n12
pxeboot.com
wdsnbp.com

#6 dera

dera

    Gold Member

  • .script developer
  • 1335 posts
  •  
    Hungary

Posted 25 March 2010 - 06:13 AM

if tftpd-hpa runs as a daemon
what is in the log file '/var/log/daemon.log' ?
i mean here you can see what files were requested by the tftp client

in my menu (in pxelinux.cfg/default) i have:
# Windows PE2 Loader
LABEL PE 2.x
MENU LABEL ^2 Windows PE 2.x Preinstalled Environment
KERNEL boot/pxeboot.0

my pxeboot.0 is the renamed pxeboot.n12
what is your startrom.0?
is it a renamed pxeboot.n12 from the original winpe.wim from the folder '\Windows\Boot\PXE'?

the path and the name of the .wim (in your case Boot/WinPE.wim) is hardcoded in the file 'BCD',
in the original 'BCD' the default is '\sources\boot.wim'
did you recreated or modified your 'BCD' according to your setup
using the 'bcdedit.exe /set' command?
if you didn't modded the original 'BCD' use /var/lib/tftpboot/sources/boot.wim


also i can see in your directory tree /Boot/wgl4_boot.ttf
in the original PE in the 'boot' folder there is a folder called 'fonts'
this 'boot/fonts' contains the .ttf files
should to follow this original folder structure '/boot/fonts/wgl4_boot.ttf'

if you leave the bootmgr.exe in its original location (/var/lib/tftpboot/bootmgr.exe)
then there is no need to indicate this in the remap file,
so in this case the line re ^bootmgr\.exe boot/bootmgr.exe not needed in the remap file

in my remap file using the lines
r ^\\Boot\\ boot/
r ^\\boot\\ boot/
i tried to indicate that i use folder name 'boot' in lowercase

#7 clivebuckwheat

clivebuckwheat

    Newbie

  • Members
  • 20 posts
  •  
    Canada

Posted 26 March 2010 - 01:03 AM

could you post your BCD Store creation script? I must be creating this wrong.

That is the only thing I can think of. I have everything right as far as I can tell.

Also I am trying to boot Winpe 3.0 not 2.0 If that makes any difference.

#8 dera

dera

    Gold Member

  • .script developer
  • 1335 posts
  •  
    Hungary

Posted 26 March 2010 - 06:08 AM

Winpe 3.0 and 2.0 works the same way, no difference regarding the PXE boot

i have no special BCD store creation script
if i follow the Microsoft guide
after the first step:
copype.cmd x86 c:\winpe_x86
i get a working bcd file in the 'C:\winpe_x86\ISO\boot\' folder
this default 'bcd' points to '\sources\boot.wim'

so this default bcd works for me if i rename it from 'bcd' to 'BCD'
and place it in '/var/lib/tftpboot/boot/BCD'
and place my 'boot.wim' in '/var/lib/tftpboot/sources/boot.wim'

if i want to place the boot.wim in the '/boot' folder
on windows host i modify this existing 'C:\winpe_x86\ISO\boot\bcd' using this commands
bcdedit.exe /store C:\winpe_x86\ISO\boot\bcd /set {default} osdevice ramdisk=[boot]\boot\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}bcdedit.exe /store C:\winpe_x86\ISO\boot\bcd /set {default} device ramdisk=[boot]\boot\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}bcdedit.exe /store C:\winpe_x86\ISO\boot\bcd /enum all

if you leave the bootmgr.exe in its original location (/var/lib/tftpboot/bootmgr.exe)
then there is no need to indicate this in the remap file,
so in this case the line re ^bootmgr\.exe boot/bootmgr.exe not needed in the remap file

I have to correct this
if my bootmgr.exe is in '/var/lib/tftpboot/bootmgr.exe' then this line still needed in my remap file (in '/var/lib/tftpboot/tftpd.remap'):
re ^bootmgr\.exe bootmgr.exe

#9 clivebuckwheat

clivebuckwheat

    Newbie

  • Members
  • 20 posts
  •  
    Canada

Posted 27 March 2010 - 06:33 AM

Thank you for all your responses by the way I do appreciate your help. With all the things I have tried. I am now getting..

The remap seems to be working at least here are the logs.

It cannot find /boot/boot.sdi

My boot folder is upper case could that be the issue?

RRQ from 192.168.1.4 filename \Boot\Fonts\wgl4_boot.ttf remapped to /Boot/Fonts/wgl4_boot.ttf
Mar 27 17:29:19 pxe-server in.tftpd[13841]: tftp: client does not accept options
Mar 27 17:29:19 pxe-server in.tftpd[13842]: remap: input: \Boot\Fonts\wgl4_boot.ttf
Mar 27 17:29:19 pxe-server in.tftpd[13842]: remap: rule 0: rewrite: /Boot\Fonts\wgl4_boot.ttf
Mar 27 17:29:19 pxe-server in.tftpd[13842]: remap: rule 0: rewrite: /Boot/Fonts\wgl4_boot.ttf
Mar 27 17:29:19 pxe-server in.tftpd[13842]: remap: rule 0: rewrite: /Boot/Fonts/wgl4_boot.ttf
Mar 27 17:29:19 pxe-server in.tftpd[13842]: remap: done
Mar 27 17:29:19 pxe-server in.tftpd[13842]: RRQ from 192.168.1.4 filename \Boot\Fonts\wgl4_boot.ttf remapped to /Boot/Fonts/wgl4_boot.ttf
Mar 27 17:29:20 pxe-server in.tftpd[13843]: remap: input: \hiberfil.sys
Mar 27 17:29:20 pxe-server in.tftpd[13843]: remap: rule 0: rewrite: /hiberfil.sys
Mar 27 17:29:20 pxe-server in.tftpd[13843]: remap: done
Mar 27 17:29:20 pxe-server in.tftpd[13843]: RRQ from 192.168.1.4 filename \hiberfil.sys remapped to /hiberfil.sys
Mar 27 17:29:20 pxe-server in.tftpd[13843]: sending NAK (1, File not found) to 192.168.1.4
Mar 27 17:29:20 pxe-server in.tftpd[13844]: remap: input: \Boot\winpe_x86.wim
Mar 27 17:29:20 pxe-server in.tftpd[13844]: remap: rule 0: rewrite: /Boot\winpe_x86.wim
Mar 27 17:29:20 pxe-server in.tftpd[13844]: remap: rule 0: rewrite: /Boot/winpe_x86.wim
Mar 27 17:29:20 pxe-server in.tftpd[13844]: remap: done
Mar 27 17:29:20 pxe-server in.tftpd[13844]: RRQ from 192.168.1.4 filename \Boot\winpe_x86.wim remapped to /Boot/winpe_x86.wim
Mar 27 17:29:20 pxe-server in.tftpd[13844]: tftp: client does not accept options
Mar 27 17:29:20 pxe-server in.tftpd[13845]: remap: input: \boot\boot.sdi
Mar 27 17:29:20 pxe-server in.tftpd[13845]: remap: rule 0: rewrite: /boot\boot.sdi
Mar 27 17:29:20 pxe-server in.tftpd[13845]: remap: rule 0: rewrite: /boot/boot.sdi
Mar 27 17:29:20 pxe-server in.tftpd[13845]: remap: done
Mar 27 17:29:20 pxe-server in.tftpd[13845]: RRQ from 192.168.1.4 filename \boot\boot.sdi remapped to /boot/boot.sdi
Mar 27 17:29:20 pxe-server in.tftpd[13845]: sending NAK (1, File not found) to 192.168.1.4

#10 dera

dera

    Gold Member

  • .script developer
  • 1335 posts
  •  
    Hungary

Posted 28 March 2010 - 07:40 AM

My boot folder is upper case could that be the issue?

yes
then try:
re ^bootmgr\.exe Boot/bootmgr.exe
r ^\\Boot\\ Boot/
r ^\\boot\\ Boot/
rg \\ /

#11 clivebuckwheat

clivebuckwheat

    Newbie

  • Members
  • 20 posts
  •  
    Canada

Posted 28 March 2010 - 01:25 PM

Well

At least that fixed the problem with it stopping at the boot.sdi. Now I get it stopping at \hiberfil.sys remapped to /hiberfil.sys.



28 09:20:45 pxe-server in.tftpd[19595]: remap: done
Mar 28 09:20:45 pxe-server in.tftpd[19595]: RRQ from 192.168.1.5 filename \Boot\Fonts\wgl4_boot.ttf remapped to /Boot/Fonts/wgl4_boot.ttf
Mar 28 09:20:45 pxe-server in.tftpd[19595]: tftp: client does not accept options
Mar 28 09:20:45 pxe-server in.tftpd[19596]: remap: input: \Boot\Fonts\wgl4_boot.ttf
Mar 28 09:20:45 pxe-server in.tftpd[19596]: remap: rule 0: rewrite: /Boot\Fonts\wgl4_boot.ttf
Mar 28 09:20:45 pxe-server in.tftpd[19596]: remap: rule 0: rewrite: /Boot/Fonts\wgl4_boot.ttf
Mar 28 09:20:45 pxe-server in.tftpd[19596]: remap: rule 0: rewrite: /Boot/Fonts/wgl4_boot.ttf
Mar 28 09:20:45 pxe-server in.tftpd[19596]: remap: done
Mar 28 09:20:45 pxe-server in.tftpd[19596]: RRQ from 192.168.1.5 filename \Boot\Fonts\wgl4_boot.ttf remapped to /Boot/Fonts/wgl4_boot.ttf
Mar 28 09:20:45 pxe-server in.tftpd[19597]: remap: input: \hiberfil.sys
Mar 28 09:20:45 pxe-server in.tftpd[19597]: remap: rule 0: rewrite: /hiberfil.sys
Mar 28 09:20:45 pxe-server in.tftpd[19597]: remap: done
Mar 28 09:20:45 pxe-server in.tftpd[19597]: RRQ from 192.168.1.5 filename \hiberfil.sys remapped to /hiberfil.sys
Mar 28 09:20:45 pxe-server in.tftpd[19597]: sending NAK (1, File not found) to 192.168.1.5

#12 dera

dera

    Gold Member

  • .script developer
  • 1335 posts
  •  
    Hungary

Posted 28 March 2010 - 01:55 PM

in my log also i have:

remap: input: \Boot\Fonts\wgl4_boot.ttf
remap: rule 1: rewrite: Boot/Fonts\wgl4_boot.ttf
remap: rule 3: rewrite: Boot/Fonts/wgl4_boot.ttf
remap: done
RRQ from 192.168.1.72 filename \Boot\Fonts\wgl4_boot.ttf remapped to Boot/Fonts/wgl4_boot.ttf
tftp: client does not accept options

and

remap: input: \hiberfil.sys
remap: rule 3: rewrite: /hiberfil.sys
remap: done
RRQ from 192.168.1.72 filename \hiberfil.sys remapped to /hiberfil.sys
sending NAK (1, File not found) to 192.168.1.72

but seems for me it is not problem, winpe3 boots fine

#13 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 28 March 2010 - 03:46 PM

Cross-linking:
http://www.911cd.net...showtopic=23759
http://www.911cd.net...o...=23759&st=2

Wonko

#14 dera

dera

    Gold Member

  • .script developer
  • 1335 posts
  •  
    Hungary

Posted 28 March 2010 - 07:07 PM

did you try the original 'bcd'?
which comes from e.g. 'C:\Program Files\Windows AIK\Tools\PETools\x86\boot\bcd'

i am almost sure that you try to create it yourself from scratch using the commands:
bcdedit /createstore
bcdedit /create {bootmgr}
bcdedit /create {ramdiskoptions}
etc.
and here is the mistake

#15 clivebuckwheat

clivebuckwheat

    Newbie

  • Members
  • 20 posts
  •  
    Canada

Posted 28 March 2010 - 10:17 PM

No I haven't tried the original bcd that comes with the AIK.

here are the commands I used to create my bcd entries

bcdedit /createstore \pxe\BCD
bcdedit /store \pxe\bcd /create {ramdiskoptions} /d "Ramdisk options"
bcdedit /store \pxe\bcd /set {ramdiskoptions} ramdisksdidevice boot
bcdedit /store \pxe\BCD /set {ramdiskoptions} ramdisksdipath \Boot\boot.sdi
bcdedit /store \pxe\BCD /create /d "WinPE Boot Image" /application osloader

bcdedit /store \pxe\BCD /set {My Guid} systemroot \Windows
bcdedit /store \pxe\BCD /set {My Guid}detecthal Yes
bcdedit /store \pxe\BCD /set {My Guid} winpe Yes
bcdedit /store \pxe\BCD /set {My Guid} osdevice ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}
bcdedit /store \pxe\BCD /set {My Guid} device ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}
bcdedit /store \pxe\BCD /create {bootmgr} /d "WinPE BootManager"
bcdedit /store \pxe\BCD /set {bootmgr} timeout 1
bcdedit /store \pxe\BCD /displayorder {My Guid}

#16 dera

dera

    Gold Member

  • .script developer
  • 1335 posts
  •  
    Hungary

Posted 29 March 2010 - 06:03 AM

i have

/var/lib/tftpboot/Boot/BCD
/var/lib/tftpboot/Boot/boot.sdi
/var/lib/tftpboot/Boot/bootmgr.exe
/var/lib/tftpboot/Boot/Fonts/wgl4_boot.ttf
/var/lib/tftpboot/Boot/pxeboot.0
/var/lib/tftpboot/Boot/WinPE.wim

in '/var/lib/tftpboot/pxelinux.cfg/menu'
KERNEL Boot/pxeboot.0

in '/etc/default/tftpd-hpa'
RUN_DAEMON="yes"
OPTIONS="-l -s /var/lib/tftpboot -m /var/lib/tftpboot/tftpd.remap -vvv"

in '/var/lib/tftpboot/tftpd.remap'
re ^bootmgr\.exe Boot/bootmgr.exe
r ^\\Boot\\ Boot/
r ^\\boot\\ Boot/
rg \\ /

create a folder 'C:\new'
my BCD creation command:
[codebox]set path=C:\new\BCD del %path% bcdedit.exe /createstore %path% bcdedit.exe /store %path% /create {ramdiskoptions} /d "Ramdisk options" bcdedit.exe /store %path% /set {ramdiskoptions} ramdisksdidevice boot bcdedit.exe /store %path% /set {ramdiskoptions} ramdisksdipath \Boot\boot.sdi bcdedit.exe /store %path% /create {bootmgr} /d "WinPE BootManager" bcdedit.exe /store %path% /set {bootmgr} timeout 10 for /f "tokens=3" %%a in ('bcdedit.exe /store %path% /create /d "WinPE Boot Image" /application osloader') do set guid=%%a bcdedit.exe /store %path% /set %guid% osdevice ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}
bcdedit.exe /store %path% /set %guid% device ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}
bcdedit.exe /store %path% /set %guid% path \windows\system32\boot\winload.exe
bcdedit.exe /store %path% /set %guid% systemroot \Windows
bcdedit.exe /store %path% /set %guid% detecthal Yes
bcdedit.exe /store %path% /set %guid% winpe Yes
bcdedit.exe /store %path% /displayorder %guid% /addlast
bcdedit.exe /store %path% /enum all
pause[/codebox]
for me this above .cmd creates a working 'BCD' if i try to create on Windos XP host (i place bcdedit.exe came from Windows 7 in the folder C:\new)
strangely if i try to create on Windows 7 host this .cmd creates a non working 'BCD'

#17 dera

dera

    Gold Member

  • .script developer
  • 1335 posts
  •  
    Hungary

Posted 29 March 2010 - 11:03 AM

i don't understand this BCD
i have made a newer try on windows 7 host
and now i can successfully create a working BCD with this .cmd

#18 clivebuckwheat

clivebuckwheat

    Newbie

  • Members
  • 20 posts
  •  
    Canada

Posted 29 March 2010 - 03:45 PM

On this line

for /f "tokens=3" %%a in ('bcdedit.exe /store %path% /create /d "WinPE Boot Image" /application osloader') do set guid=%%a

I get

C:\new>for /f "tokens=3" %%a in ('bcdedit.exe /store %path% /create /d "
ot Image" /application osloader') do set guid=%%a
%%a was unexpected at this time.

#19 dera

dera

    Gold Member

  • .script developer
  • 1335 posts
  •  
    Hungary

Posted 29 March 2010 - 04:06 PM

run it as a batch

#20 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 29 March 2010 - 05:19 PM

run it as a batch

or remove any double percentage sign:

...
for /f "tokens=3" %%a in ('bcdedit.exe /store %path% /create /d "WinPE Boot Image" /application osloader') do set guid=%%a
...


:)
Wonko

#21 clivebuckwheat

clivebuckwheat

    Newbie

  • Members
  • 20 posts
  •  
    Canada

Posted 29 March 2010 - 11:31 PM

ok the creation of the BCD worked.

But know I get a different boot error,

File: \Boot\BCD
Status 0xc000000f

Instead of all the remapping commands I get.

In my daemon/log

ftp: client does not accept options
Cannot bind to local IPv4 socket: Address already in use

what is your chmod level for your /tftpboot folder and all the folders that reside under it?

#22 dera

dera

    Gold Member

  • .script developer
  • 1335 posts
  •  
    Hungary

Posted 30 March 2010 - 05:25 AM

folders 755
files 644

#23 dera

dera

    Gold Member

  • .script developer
  • 1335 posts
  •  
    Hungary

Posted 30 March 2010 - 08:13 AM

for me in '/etc/inetd.conf'
the line starting with: tftp dgram udp wait root etc..
is commented

#24 clivebuckwheat

clivebuckwheat

    Newbie

  • Members
  • 20 posts
  •  
    Canada

Posted 31 March 2010 - 12:41 AM

It BOOTS :)

Now for the bad news I no longer have networking support in my wim file for ghost multicasting.?

What exactly did we turn off?

#25 dera

dera

    Gold Member

  • .script developer
  • 1335 posts
  •  
    Hungary

Posted 31 March 2010 - 08:54 AM

then in '/etc/inetd.conf' uncomment the line and try:
tftp dgram udp wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /var/lib/tftpboot -m /var/lib/tftpboot/tftpd.remap

my tftp root is '/var/lib/tftpboot'
my remap file is '/var/lib/tftpboot/tftpd.remap'

maybe in '/etc/default/tftpd-hpa' can use
RUN_DAEMON="no"




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users