iPXE discussion forum
Passing parameters to WinPE - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: Passing parameters to WinPE (/showthread.php?tid=6895)



Passing parameters to WinPE - Kirioss - 2013-05-02 08:45

Hi,

I'm booting a winPE with this script (which is working perfectly fine) but I would like to pass a parameter that I can retreive from the PE when it is booted.

Is there a way to do that ?

Code:
#!gpxe
kernel http://srv1/winpe/wimboot
initrd http://srv1/winpe/media/bootmgr bootmgr
initrd http://srv1/winpe/media/Boot/BCD BCD
initrd http://srv1/winpe/media/Boot/Fonts/segmono_boot.ttf segmono_boot.ttf
initrd http://srv1/winpe/media/Boot/Fonts/segoe_slboot.ttf segoe_slboot.ttf
initrd http://srv1/winpe/media/Boot/Fonts/wgl4_boot.ttf wgl4_boot.ttf
initrd http://srv1/winpe/media/Boot/boot.sdi boot.sdi
initrd http://srv1/winpe/media/sources/boot.wim boot.wim
boot

Thank you


RE: Passing parameters to WinPE - mcb30 - 2013-05-02 10:51

(2013-05-02 08:45)Kirioss Wrote:  
Code:
#!gpxe

Should be "#!ipxe". I assume you're using iPXE rather than gPXE; if not, then the first thing you should do is upgrade to iPXE.

Quote:I'm booting a winPE with this script (which is working perfectly fine) but I would like to pass a parameter that I can retreive from the PE when it is booted.
Is there a way to do that ?

No way that immediately springs to mind. You could potentially use imagex or wimlib on the server side to modify the .wim image at the point of serving it up.

It might be simpler to include code within your .wim to retrieve the dynamic parameters over the network after WinPE starts up, rather than trying to pass a parameter via the WinPE boot mechanism.

Michael


RE: Passing parameters to WinPE - Kirioss - 2013-05-02 11:19

Of course I use ipxe, this is a mistake in my script (but the script is working...)

The parameter I want to pass is "srv1" if the wim file is booted from srv1. srv1 is dynamically calculated before the ipxe script is generated, and can be any other server that is better for the client. I would like to avoid having to recalculate it in the wim.

Thank you for your anwser


RE: Passing parameters to WinPE - mcb30 - 2013-05-02 12:21

(2013-05-02 11:19)Kirioss Wrote:  The parameter I want to pass is "srv1" if the wim file is booted from srv1. srv1 is dynamically calculated before the ipxe script is generated, and can be any other server that is better for the client. I would like to avoid having to recalculate it in the wim.

I don't think the WinPE boot process allows any sensible way to pass in parameters. You would have to modify either BCD, boot.sdi, or boot.wim.

As I said before, it might be simpler to implement the relevant parameter discovery process entirely within WinPE rather than attempting to pass parameters directly via the boot process.

Michael


RE: Passing parameters to WinPE - skyman - 2013-05-02 22:09

If you were using PHP or ASP to create the iPXE boot script you could have it create a file with the information that winpe would then be able to get to.