Jump to content











Photo
- - - - -

PXE Booting WinPE 2


  • Please log in to reply
35 replies to this topic

#1 RobinG

RobinG
  • Members
  • 7 posts
  • Location:Cambridge, UK

Posted 01 March 2007 - 12:06 PM

Managed to get this working after some struggling.

Here's the page I found most helpful:
http://flimflan.com/...AndTheWAIK.aspx

Thought other might be interested

#2 TheHive

TheHive

    Platinum Member

  • .script developer
  • 3,813 posts

Posted 01 March 2007 - 06:17 PM

Thanks for posting RobinG, and welcome to the forum.

I just noticed that he talks about this BCDEDIT.

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.


Im getting a message about this when using the VIstaPE Project. This might help in solving what is causing this. I will post this link at that post.
http://www.boot-land...?...ost&p=10364

#3 RobinG

RobinG
  • Members
  • 7 posts
  • Location:Cambridge, UK

Posted 05 March 2007 - 12:29 PM

Right so you've got WinPE 2 to boot via PXE... :P

Now you want to be able to boot different images. You could put extra entries in the BCD file using BCDEDIT but perhaps like me you don't want to display bootmgr's menu and want to use your existing PXELINUX initial PXE stage to choose the image. So want bootmgr to use different BCD files.

So you currently have an entry in pxelinux.cfg\default (or a specific config for your test PC) that says:
label winpe2

	kernel boot/pxeboot.0
which startes the process:
pxelinux.0

	|

	v

boot/pxeboot.0

	|

	v

bootmgr.exe  <-- /Boot/BCD

	|

	v

boot/boot.sdi  <-- /Boot/WinPE.wim

	|

	v

winload.exe
But...the file "\Boot\BCD" is hardcoded into bootmgr.exe! :P

Ok, no problem...

Copy bootmgr.exe to testmgr.exe and hex edit it:
Change the "\Boot\BCD" unicode text at 0x4F98C to "\Test\BCD".

Also, copy boot\pxeboot.0 to test\pxetest.0 and hex edit this too:
Change the "bootmgr.exe" at 0x5961 to "testmgr.exe"

Copy boot\BCD to test\BCD and use BCDEDIT to change the osdevice and device entries to use "[boot]\Test\TestPE.wim,{ramdiskoptions}". No need to change the boot/boot.sdi entry.

Add an entry in pxelinux.cfg\default:
label testpe2

	kernel test/pxetest.0
Ok, we hope this will now follow this process:
pxelinux.0

	|

	v

test/pxetest.0

	|

	v

testmgr.exe  <-- /Test/BCD

	|

	v

boot/boot.sdi  <-- /Test/WinPE.wim

	|

	v

winload.exe
We, try it and get a checksum error with testmgr.exe. :P
Ok, it has a PE checksum at 0x130 so we use a tool (such as PE Explorer) to calculate our testmgr.exe's checksum and update the file.

Try again...bootmgr reports:

Windows cannot verify the digital signature for this file.

Looks like testmgr.exe has a digital signature that is getting checked and fails! :P

Now we're stuck...but there's this stuff about -set nointegritychecks Yes on various google pages...

Using "bcdedit -store x:\BCD -set nointegritychecks Yes"
or "bcdedit -store x:\BCD {guid} -set nointegritychecks Yes"
puts the setting in for the WinPE image (disabling driver signing - I believe) but doesn't stop the problem with our testmgr.exe (which stops before TestPE.wim is even retrieved).

But, what about "bcdedit -store x:\BCD {bootmgr} -set nointegritychecks Yes" ?

Yeah, it works! :P :P :P

Replicating this principle:

1. new entry in pxelinux.cfg\default with kernel set to...
2. new pxeboot.0 to point to...
3. new bootmgr.exe to use...
4. new BCD file that specifies...
5. another WinPE.wim

you should be able to have multiple PE2 images selectable from PXELINUX.

Phew! :P

#4 Nuno Brito

Nuno Brito

    Platinum Member

  • Team Reboot
  • 10,202 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 05 March 2007 - 12:59 PM

Thanks for sharing your experience, this will prove to be very usefull over the next months.. :P

Also worth mentioning some references to get a TFTP server working on windows:

Posted Image

http://tftpd32.jounin.net/


And PXE linux website:
http://syslinux.zytor.com/pxe.php

With informations on how to get it started using the TFTP server.

:P

#5 RobinG

RobinG
  • Members
  • 7 posts
  • Location:Cambridge, UK

Posted 05 March 2007 - 01:12 PM

Remember when using tftpd32 to make sure that the option that allows the a slash to indicate the virtual tftp root directory is checked (as bootmgr.exe references \Boot\BCD)

#6 RobinG

RobinG
  • Members
  • 7 posts
  • Location:Cambridge, UK

Posted 05 March 2007 - 01:19 PM

Also, I'm currently using MSTFTPD without problems. Don't know if this is part of Win2003 or came when looking at WDS.

#7 thunn

thunn

    Silver Member

  • .script developer
  • 531 posts
  • Location:Brooklyn, New York
  • Interests:computers<br />mechanics<br />distortion<br /><br />
  •  
    United States

Posted 09 March 2007 - 10:54 AM

Sparked my interest so I did some searching, although it may not include Vista, this looks helpfull...
http://pxes.sourcefo...ly_environment/

#8 chrislynch

chrislynch
  • Members
  • 2 posts

Posted 22 March 2007 - 12:55 AM

BTW, you have
bcdedit -store x&#58;\BCD {bootmgr} -set nointegritychecks Yes
wrong. Reverse {bootmgr} and -set and it will work.

Correct:
bcdedit -store x&#58;\BCD -set {bootmgr} nointegritychecks Yes


#9 BayWatch

BayWatch
  • Members
  • 1 posts
  •  
    Switzerland

Posted 04 August 2009 - 01:04 PM

very interesting script for multi bootmgr (german)
http://www.rrze.uni-...boot.shtml#k2_5

#10 Tense

Tense

    Newbie

  • Members
  • 24 posts
  •  
    United States

Posted 01 April 2010 - 01:57 PM

I have to resurrect this post.. I am sorry.

Is this possible using the bootmgr from Windows® Automated Installation Kit (AIK) for Windows® 7? I have opened it in a hex editor... but, it is not the same.

Is it still possible to modify the bootmgr? Or more so... is it possible to have multiple PE selections (using Grub4Dos) in the menu.1st?

#11 Rui Paz

Rui Paz

    Frequent Member

  • Advanced user
  • 188 posts
  •  
    Portugal

Posted 26 July 2010 - 07:55 PM

I have to resurrect this post.. I am sorry.

Is this possible using the bootmgr from Windows® Automated Installation Kit (AIK) for Windows® 7? I have opened it in a hex editor... but, it is not the same.

Is it still possible to modify the bootmgr? Or more so... is it possible to have multiple PE selections (using Grub4Dos) in the menu.1st?


Hi,

This is a old post but maybe someone needs help on this like i did today.

The files from WAIK for Windows 7 can also be modified following the directions posted by RobinG above (Thanks!)
the locations to change are different but isn't difficult to find the right place using the search function included for example on HxD http://mh-nexus.de/en/hxd/

After changing the file bootmgr.exe the new testmgr.exe needs to be "fixed" using editbin like this:
editbin  testmgr.exe /release

The editbin util can be found on Microsoft Visual C++ 2005 Express Edition available for free
http://www.softpedia...C-Toolkit.shtml

___
Rui Paz

#12 AlexBlum

AlexBlum

    Newbie

  • Members
  • 13 posts
  •  
    Germany

Posted 29 July 2010 - 02:40 AM

I tried to rebuild this scenario a few days ago.

I got stuck on the "Windows cannot verify the digital signature for this file." problem. (0xc0000428)

If I "bcdedit /enum" my BCD-file, the "noinetegritychecks"-switch is set to "Yes".

I rebuilt this scenario on a Win2008 R2 Server with WDS and PXELinux, PXELinux booting first.

I hope that someone could help me on this. I lost already two days on this problem.

#13 Rui Paz

Rui Paz

    Frequent Member

  • Advanced user
  • 188 posts
  •  
    Portugal

Posted 29 July 2010 - 12:22 PM

I tried to rebuild this scenario a few days ago.

I got stuck on the "Windows cannot verify the digital signature for this file." problem. (0xc0000428)

If I "bcdedit /enum" my BCD-file, the "noinetegritychecks"-switch is set to "Yes".

I rebuilt this scenario on a Win2008 R2 Server with WDS and PXELinux, PXELinux booting first.

I hope that someone could help me on this. I lost already two days on this problem.


Hi,

Did you use the editbin tool to fix your bootmgr.exe file?

___
Rui Paz

#14 AlexBlum

AlexBlum

    Newbie

  • Members
  • 13 posts
  •  
    Germany

Posted 29 July 2010 - 01:13 PM

Hi,

yes, the checksum is fine. (editbin release...)

But the digital signature is gone and at the moment it looks like the nointegritychecks-switch doesn't make any difference.
The only thing, I can go on with, to change the bootmgr.exe.
Actually I am using the bootmgr.exe from Server2008R2 which is nearly 100kb bigger then the one from VistaSP2, which was working neither.
So I can only try to get a bootmgr.exe from Vista SP0 and see if this works.

Still any help would be appreciated.

#15 AlexBlum

AlexBlum

    Newbie

  • Members
  • 13 posts
  •  
    Germany

Posted 29 July 2010 - 04:41 PM

Ok, I found some new results.

The bootmgr.exe just seems to ignore the BCD-file and uses the default.bcd-file instead.
(boot\x86\default.bcd)
The only matching entry in the bootmgr.exe is default at pos. 0x6538C.
I will give it a try, if renaming the default to for example defaulx will make any difference.

#16 AlexBlum

AlexBlum

    Newbie

  • Members
  • 13 posts
  •  
    Germany

Posted 29 July 2010 - 07:21 PM

Now I was able to solve the nointegritycheck problem, seeing the real problem.

The bootmgr doesn't care for the BCD-file. Instead every bootmgr (no effect on the "Boot\BCD"-edit) uses one of the four bcd-files laying in the "\remoteinstall\tmp\"-folder.
In my test-situation it was using the x86x64{GUID}.bcd file. So I set the nointegrity-switch on this file and the modified bootmgrs load up. But they all use this bcd file like the original bootmgr.
So I always end up with the same bootmenu.

Making another tmp-folder one step deeper wouldn't help, as it seems to be hard linked. It doesn't matter at all where the bootmgr.exe is executed from. It'll alway use the bcd file from the tmp-folder. If there are the same bcd-files just with different GUIDs, it'll use the bcd with the latest time stamp.

So any ideas or suggestions how to realize a multi-wim-configuration?

#17 Rui Paz

Rui Paz

    Frequent Member

  • Advanced user
  • 188 posts
  •  
    Portugal

Posted 29 July 2010 - 08:29 PM

Hi,

I'm using the files from Windows 7 WAIK and it works for me after fixing the exe with editbin and check the nointegritycheck to yes on BCD.

You can extract pxeboot.n12 and the bootmgr.exe from winpe_x86.wim\1\Windows\boot\pxe

___
Rui Paz

#18 AlexBlum

AlexBlum

    Newbie

  • Members
  • 13 posts
  •  
    Germany

Posted 29 July 2010 - 09:58 PM

Many thanks for the hint. I'll give it a try.

#19 AlexBlum

AlexBlum

    Newbie

  • Members
  • 13 posts
  •  
    Germany

Posted 30 July 2010 - 02:30 PM

I really had hope, It'll work now. But I had to realize, that the files inside the winpe.wim are the same files as on my remoteinstall-folder.
What's going wrong? Or does it just not work on Server 2008 R2/PXELinux?

#20 Rui Paz

Rui Paz

    Frequent Member

  • Advanced user
  • 188 posts
  •  
    Portugal

Posted 31 July 2010 - 02:40 PM

I really had hope, It'll work now. But I had to realize, that the files inside the winpe.wim are the same files as on my remoteinstall-folder.
What's going wrong? Or does it just not work on Server 2008 R2/PXELinux?


Hi,

With the files from the Windows 7 WAIK wich error you got?

Try using my files http://www32.zippysh...27533/file.html.
Copy the lines from pxelinux.cfg\default to your PXE server config, also copy the folder Win7 and the file bootwi7.exe to your ftproot. Finally put your wim file on the Win7 folder renamed to Win7RescuePE.WIM

By the way my PXE server is TFTPD32 and my DHCP server is redirecting to pxelinux.
___
Rui Paz

#21 AlexBlum

AlexBlum

    Newbie

  • Members
  • 13 posts
  •  
    Germany

Posted 31 July 2010 - 06:25 PM

Hi,

thank you very much for your input. I just tried it with your files but it still bypasses the BCD. It still uses the bcd-files in the tmp-folder.
Files are loaded from the tftp in this order:
boot\x86\wdsnbp.com (you could point the server directly to the pxelinux.com, but that doesn't make any difference, I tried)
boot\x86\pxelinux.com
boot\x86\pxelinux.cfg\default
boot\x86\vesamenu.c32
boot\x86\win7\startwin7.0
boot\x86\bootwi7.exe
\Boot\Fonts\wgl4_boot.ttf (no mistyping, it really changes here from boot to \Boot ...looks to me like there's still something hardcoded)
\Tmp\x86{GUID}.bcd (If I directly boot to pxelinux.com, the x86x64{GUID}.bcd will be used insted ***)
\Boot\Fonts\wgl4_boot.ttf

Then I got the wds-bootmenu, I would get without using pxelinux. So actually there's no error message, as long as I set the nointegrity switch to the bcd-file in the tmp-folder.

*** I'll give it a try to reassign a new pxe server (chain...), pointing directly to the pxelinux.com on the same server. Although that would need some testing and wont be the best solution, more some kind of workaround.

#22 Rui Paz

Rui Paz

    Frequent Member

  • Advanced user
  • 188 posts
  •  
    Portugal

Posted 01 August 2010 - 11:27 AM

Hi,

thank you very much for your input. I just tried it with your files but it still bypasses the BCD. It still uses the bcd-files in the tmp-folder.
Files are loaded from the tftp in this order:
boot\x86\wdsnbp.com (you could point the server directly to the pxelinux.com, but that doesn't make any difference, I tried)
boot\x86\pxelinux.com
boot\x86\pxelinux.cfg\default
boot\x86\vesamenu.c32
boot\x86\win7\startwin7.0
boot\x86\bootwi7.exe
\Boot\Fonts\wgl4_boot.ttf (no mistyping, it really changes here from boot to \Boot ...looks to me like there's still something hardcoded)
\Tmp\x86{GUID}.bcd (If I directly boot to pxelinux.com, the x86x64{GUID}.bcd will be used insted ***)
\Boot\Fonts\wgl4_boot.ttf

Then I got the wds-bootmenu, I would get without using pxelinux. So actually there's no error message, as long as I set the nointegrity switch to the bcd-file in the tmp-folder.

*** I'll give it a try to reassign a new pxe server (chain...), pointing directly to the pxelinux.com on the same server. Although that would need some testing and wont be the best solution, more some kind of workaround.


Hi,

Its probably something related to your PXE server configuration i use TFTPD32 and don't have those files wdsnbp.com or pxelinux.com. I only forget to include on my files the \boot folder with the file boot.sdi and fonts.

___
Rui Paz

#23 AlexBlum

AlexBlum

    Newbie

  • Members
  • 13 posts
  •  
    Germany

Posted 01 August 2010 - 12:43 PM

Hi,

wdsnbp.com is part of the WDS, which I can bypass with pxelinux. Bypassing will bring me the tftp to use the x86x64 instead of the x86-bcd file as I mentioned in my last post.
pxelinux.com is just the renamed pxelinux.0 from the syslinux package.

So again thank you for your input.

Regards
Alex

#24 The Dude

The Dude
  • Members
  • 1 posts
  •  
    Netherlands

Posted 13 January 2011 - 09:03 PM

Hi,

When using Linux as your tftp server you can load pxelinux.0 and then wdsnbp.com.

This will make the PXE client ask the dhcp/tftp server for the location of the BCD file (on tcp port 4022)
The binl for linux service that can be had here:
http://oss.netfarm.i...s/ris-linux.php
is able to answer that question.

Edit the binlsvr.py python script to change the location it returns.

I Used this to create windows 7 support for the ultimate deployment appliance
Check out my tutorial at: http://www.ultimated...7pxelinux1.html

#25 RescueTech

RescueTech

    Newbie

  • Members
  • 19 posts
  •  
    United States

Posted 20 January 2011 - 04:12 PM

...
Check out my tutorial at: http://www.ultimated...7pxelinux1.html

Thank you for this!