Topic: PXE Booting an customized WinPE image  (Read 1053 times)

PXE Booting an customized WinPE image
« on: August 29, 2019, 09:17:32 PM »

plissje

  • Apprentice
  • *
  • Date Registered: Jul 2019
  • Posts: 3
Hi guys,
So I've made a custom ISO based on WinPE using the WinBuilder app and I can boot it successfully via the CD.
The problem is, I want to simplify the deployment to multiple computers and use the network with PXE booting.

Unfortunately, I can't get it to work. I get a blue screen trying to load the ISO on both tftpd and TinyPXE.

Any suggestions here?

Re: PXE Booting an customized WinPE image
« Reply #1 on: September 03, 2019, 06:56:17 PM »

Malok

  • Chef
  • ***
  • Location: Canada
  • Date Registered: Aug 2016
  • Posts: 202
Hi,

I managed to be able to boot with success my compilation by Packing all programs into Boot.wim and used iPXE and Wimboot. I was also able to add it to my existing PXE environment without to many problems. You can boot Wim images trough HTTP. Take a look at https://ipxe.org/ and https://ipxe.org/wimboot


Re: PXE Booting an customized WinPE image
« Reply #2 on: September 04, 2019, 01:56:56 AM »

bob.omb

  • Code Baker
  • Grand Chef
  • *****
  • Location: USA
  • Date Registered: Jul 2017
  • Posts: 1261
http is MUCH faster than tftp (block size can be changed to speed this up a bit) however don't you need to have a client on the other end in order to boot? pxe over tftp is good because there is no need for a client they are basically already built into bios...

It's a shame pxe boot's standard tftp protocol wasnt further developed for speed...

Also, nice work, PXE boot can be intimidating..

Aomei probably makes the best turn key tool for booting random ISO's via PXE. https://www.aomeitech.com/pxe/pxe-boot-software.html 

You will need to map the Y: back to the server if it exists in your PE. 

There are some standard tftp PXE notes using Aomei from earlier work in the following thread: http://theoven.org/index.php?topic=2704.0
« Last Edit: September 04, 2019, 02:20:34 AM by bob.omb »

Re: PXE Booting an customized WinPE image
« Reply #3 on: September 04, 2019, 06:54:23 PM »

Malok

  • Chef
  • ***
  • Location: Canada
  • Date Registered: Aug 2016
  • Posts: 202
Yes, the speed is not comparable, 9 minutes in tftp down to 48 seconds to a full boot over Http  :great:

It is also very easy to chain from PXE to iPXE on the fly at boot time. So the tftp server only pushes iPXE to clients and the rest of the work is done over http. I used PXELinux, iPXE and wimboot with great success.

But still, iPXE has difficulties with some older PXE roms. So we still have to use the usb version sometimes. But overall it was a great improvement for stability and speed.

Re: PXE Booting an customized WinPE image
« Reply #4 on: September 05, 2019, 09:37:09 PM »

Malok

  • Chef
  • ***
  • Location: Canada
  • Date Registered: Aug 2016
  • Posts: 202
I don't know if op is still following but.... Anyway.

PXE booting PE trough HTTP…

This is all the basics to be able to boot directly your PE compilation over PXE trough HTTP.

First of all you will need the following.

1 - A working TFTP Single Port server of your choice.
2 - Your favorite Web server software.
3 - SYSLinux.  https://mirrors.edge.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.03.zip
4 - iPXE.  https://ipxe.org/download
5 - Wimboot.  https://ipxe.org/wimboot

Second Step is to create the directory architecture and copy files to their respective folder.
I used a directory architecture exactly like the following…

Code: [Select]
Root
   |--RBS
       |--Boot
       |    |--Win10pe
       |
       |--PXELinux.cfg
       |

Third Step. Extract the following files from the SYSLinux package. The files needed are located in \Bios and copy them in \RBS
If you are using EFI you can find those files in the \EFI32 and \EFI64 folders.
pxelinux.0
libcom32.c32
libcom32.elf
ldlinux.c32
ldlinux.elf
libutil.c32
vesamenu.c32

Extract ipxe.krn from it's ISO and copy it to \RBS

Copy Wimboot to \RBS\Boot\

Copy the following files from your PE compilation to \RBS\Boot\Win10pe (The wim image must use LZX Compression and standard boot loader)
bcd
boot.sdi
boot.wim

Fourth step,
If not already done... Configure your DHCP server option 66 to "full.dns.name.of.the.tftp.server.local" and option 67 to "pxelinux.0" without quotes.

Install and/or Configure your TFTP server to have it's Root located at the \RBS folder.
Install and/or configure your web server to have a virtual directory named Boot pointing at \RBS\Boot. Ex: "http://yourwebserver.local/boot"
Verify if you are able to download pxelinux.0 over TFTP and download Wimboot over HTTP... Troubleshoot accordingly.

The goal: At PXE initialisation PXELinux.0 is served by TFTP then executes the content of the file \RBS\PXELinux.cfg\Default
from there chains to iPXE that downloads required files over http and start booting them with wimboot.

Fifth step, 2 configuration files are needed.

In the directory \RBS\PXELinux.cfg create/edit a text file named "Default" and use the following code in it.
If you already use PXELinux create a new menu entry and use the code from LABEL PE10.

Code: [Select]
DEFAULT vesamenu.c32
TIMEOUT 1
LABEL PE10
MENU DEFAULT
MENU LABEL Win10PE
KERNEL ipxe.krn
APPEND dhcp && chain http://yourwebserver.local/boot/win10pe/boot.ipxe

In the directory \RBS\Boot\Win10PE create a text file named  "boot.ipxe" and use the following code in it.

Code: [Select]
#!ipxe
  kernel http://yourwebserver.local/boot/wimboot
  initrd http://yourwebserver.local/boot/win10pe/bcd        BCD
  initrd http://yourwebserver.local/boot/win10pe/boot.sdi   boot.sdi
  initrd http://yourwebserver.local/boot/win10pe/boot.wim   boot.wim
boot

This chains directly to iPXE and automatically boots the PE image.

 :smile: Have Fun !!!
 
« Last Edit: September 09, 2019, 10:41:01 PM by Malok »

 

Powered by EzPortal