[syslinux] [RFC, PATCH] core/pxe: Add architecture-specific discovery request for PXE config file

H. Peter Anvin
Tue, 25 Feb 2014 02:00:52 -0000

Ok, that makes sense.  PXELINUX had become a de facto standard and has in fact
been extended with ipv6 support by agreement between me and Peter Jones, used in
at least some versions of Grub.

Here is the problem I see: arch discovery is orthogonal with address-based
discovery.  It creates a complex problem because we don't want to try all
possible combinations.  One option is to have an extended filename string with
lots of info first and assume that people who need that have a TFTP server which
supports rewriting; another would be to do the arch-based ones right before
default, under the assumption that if you know your client you know what matters
already.

The final option is to introduce macros that can be used in an include
statement, so the file fetched would be a generic config file which can include
others based on all kind of parameters, making most of the discovery junk
unnecessary.  It also lets the sysadmin keep the common bits common.  Personally
this is the option I like the best.  iPXE has been doing this for years.


On February 24, 2014 5:41:35 PM PST, Jeremy Kerr <jk at ozlabs.org>
wrote:
>Hi all,
>
>>> In other words, the dhcp server has to start the client on the
>>> correct binary for it's arch and by virtue of running different
>bins,
>>> we can determine the most appropriate config file for the client?
>>
>> That is definitely one way to deal with it.
>>
>> There is no way around the fact that you have to have different
>binaries
>> for different architectures; there is nothing that Syslinux can do
>about
>> that, and it has to be dealt with before Syslinux is even running.
>
>Yep, definitely.
>
>As Gene has mentioned, we could indeed do this in pxelinux through
>serving different binary images, but this means we need a different
>method for different pxe loader implementations, and this won't work
>when the loader binary is already present on the machine.
>
>What I'm looking to do here is establish a bit of a convention for
>allowing machines of multiple architectures to be perform PXE
>configuration in a uniform way (in this case, without requiring the
>DHCP
>server to send out different lease parameters in response to the
>client's DHCP architecture ID).
>
>For this to be useful, my aim is that different pxe loader
>implementations to follow the arch-xxxx convention too; I'm proposing a
>similar change in petitboot:
>
> http://git.ozlabs.org/?p=petitboot;a=commitdiff;h=3bc86f99
>
>I have a patch in development for u-boot too.
>
>In the petitboot & u-boot cases, the pxe loader code is already present
>on the machine, so we don't have the "which loader binary to
serve"
>issue, only the "which config to use" one.
>
>> Now, with lpxelinux.0 you can also enable HTTP cookies which contain
>a
>> *lot* of system information that you can use dynamically on your HTTP
>> server via PHP or whatever you want.
>
>That sounds great. I'd like to do the same in petitboot, and it'd be
>good to use the same format there. However, I do still need to support
>TFTP discovery too.
>
>Cheers,
>
>
>Jeremy

--
Sent from my mobile phone.  Please pardon brevity and lack of formatting.