[ipxe-devel] Passing parameters from PXELinux to iPXE
Robert Socha
socha at socha.it
Fri Aug 7 21:13:06 UTC 2020
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).
>
> 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).
>
> 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
More information about the ipxe-devel
mailing list