[ipxe-devel] Passing parameters from PXELinux to iPXE

Geert Stappers stappers at stappers.nl
Sat Aug 8 04:09:51 UTC 2020


On Fri, Aug 07, 2020 at 11:13:06PM +0200, Robert Socha wrote:
> W dniu 07.08.2020 o 22:44, Robert Socha pisze:
> > W dniu 07.08.2020 o 22:20, Geert Stappers pisze:
> > > On Fri, Aug 07, 2020 at 09:43:11PM +0200, Robert Socha wrote:
> > > > Hi,
> > > > 
> > > > This is more user-level question. But for last few days I'm
> > > > unable to post
> > > > question via forum.ipxe.org.
> > > > 
> > > > I wonder if this supported option (passing parameters from
> > > > PXELinux to iPXE)
> > > > 
> > > > 
> > > > I have PXELinux boot:
> > > > 
> > > > LABEL startipxe
> > > >    KERNEL ipxe.lkrn
> > > >    APPEND set MYVAR some-data
> > > > 
> > > > And from chain loaded ipxe with embed script:
> > > > 
> > > > #!ipxe
> > > > echo MYVAR: ${MYVAR}
> > > > ... other stuff
> > > > 
> > > 
> > > Why?
> > > 
> > 
> > Thanks for asking. My use case is:
> > 
> > I bootstrap hosts via PXELinux (I'm unable to change this -  this
> > internal DHCP's related issue).

Ah, that explains


> > PXELinux templates are auto-generated via foreman (I know than I can try
> > to replace (l)pxelinux.0 by ipxe binary - but this will require a lot of
> > testing of other stuff).

FWIW  I'm glad I switched from pxelinux to iPXE ...


> > So host is booted via PXElinux, and I chain load IPXE via:
> > 
> > DEFAULT boot
> > LABEL boot
> >    KERNEL ipxe-foreman.lkrn
> >    APPEND ipxe:set PXEMAC MAC_FROM_TEMPLATE
> > 
> Another idea I have for this is:
> 
> DEFAULT boot
> LABEL boot
>     KERNEL /PXEMAC MAC_FROM_TEMPLATE/ipxe-foreman.lkrn
> 
> And use pre-generated ipxe with embed MAC in script.
> 
> Best regards
> Robert Socha

Groeten
Geert Stappers
-- 
Silence is hard to parse



More information about the ipxe-devel mailing list