[syslinux] Nested PXELINUX configurations

Gene Cumm gene.cumm at gmail.com
Sun Mar 27 10:45:39 PDT 2011


On Fri, Mar 25, 2011 at 05:10, Giannis Roussos
<morpheus at csl.mech.ntua.gr> wrote:
> Can you please show again how the preffix is defined?

Unless forced by DHCP option 210, PXELINUX sets the prefix to the
string before and including the last "/" in the applicable filename in
the last DHCP response.  This is either the file field or DHCP option
67 (if DHCP option 52 bit 0 is asserted; 1 or 3).

It appears that this may not be entirely clear in doc/pxelinux.txt.

-- 
-Gene

> On 25/3/2011 2:05 πμ, Gene Cumm wrote:
>>
>> On Thu, Mar 24, 2011 at 18:38, Giannis Roussos
>> <morpheus at csl.mech.ntua.gr>  wrote:
>>>
>>> I discovered di-netboot-assistant , which worked as advertised. The .cfg
>>> files it produced all have absolute paths without ::.
>>
>> In PXELINUX, the only paths that are absolute contain a "::" (either
>> as the first two character or as a separator between an IPv4 address
>> at the beginning and the path) or are a URL.
>>
>> The only caveat with my solution is that you may end up with a path
>> that contains "//" (one from the prefix, one from the path specified
>> in the config).
>>
>>> On 24/3/2011 9:27 μμ, Gene Cumm wrote:
>>>>
>>>> On Thu, Mar 24, 2011 at 12:59, Giannis Roussos
>>>> <morpheus at csl.mech.ntua.gr>    wrote:
>>>>>
>>>>> Hello all,
>>>>
>>>> Comments inline; solution near the bottom.
>>>>
>>>>> I have a boot server (running Debian Lenny x64) with a number of
>>>>> bootable
>>>>> options already configured (freedos, memtest, sysresccd etc).
>>>>>
>>>>> What I am struggling to do now is add Ubuntu and Debian netinst images
>>>>> so
>>>>> that I can boot from the network and have all the boot options
>>>>> available
>>>>> as
>>>>> if I was using a CD-ROM.
>>>>>
>>>>> The problem is that (as far as I can tell) the Ubuntu and Debian
>>>>> PXELINUX
>>>>> assume that they are located in the tftp root folder. Since however
>>>>> Debian
>>>>> and Ubuntu use a similar file structure, I cant have both distros a the
>>>>> same
>>>>> time in the tftp root. (Not to mention the mess this would create in
>>>>> the
>>>>> tftp root).
>>>>
>>>> The structure of the configs is an issue for everything but PXELINUX.
>>>> PXELINUX actually uses "::" as the character to indicate a root
>>>> directory.
>>>>
>>>>> Idealy I would like to place each distro in a separate folder inside
>>>>> tftp
>>>>> root (see below) and "chainload" each pxelinux configuration from the
>>>>> default config file.
>>>>>
>>>>> TFTP_root---pxelinux.cfg--->default
>>>>>    |
>>>>>    |-------debian------pxelinux.cfg----->default
>>>>>    |
>>>>>    |-------ubuntu------pxelinux.cfg----->default
>>>>>
>>>>> Since PXELINUX uses (AFAIK) absolute paths, there are two ways to
>>>>> achieve
>>>>
>>>> It never uses absolute paths as I mentioned in the post you linked
>>>> below.
>>>>
>>>>> something like this:
>>>>> 1) Edit all configuration files and add the correct path in all include
>>>>> arguments. I have done it for Ubuntu and it works but is not practical
>>>>> at
>>>>> all, requiring a lot of work for each new release.
>>>>> 2) Find the correct kernel, initrd etc settings for the Ubuntu/Debian
>>>>> options and add them to the main PXELinux config or a submenu. Again,
>>>>> this
>>>>> requires a lot of work to add all the options and the graphics/help of
>>>>> each
>>>>> distro wouldn't be available.
>>>>>
>>>>> None of the above options is nice and practical, nor allows me to
>>>>> easily
>>>>> update to newer releases without a lot of work.
>>>>> Thus, I was wondering if there is some way to chainload the COMPLETE
>>>>> PXELINUX config of each distro from separate folders. Maybe some option
>>>>> to
>>>>> "chroot" pxelinux so that all files are automaticaly loaded from the
>>>>> nested
>>>>> folder?
>>>>>
>>>>> I have tried copying pxelinux.0 in each of the distros' folders and
>>>>> load
>>>>> this as a new kernel, but the pxelinux cfg in the tftp root is loaded
>>>>> still.
>>>>> Directly loading the main cfg file does not work either since all the
>>>>> included files are not in the tftp root.
>>>>
>>>> Don't use it as a kernel.  Try the following:
>>>>
>>>> LABEL debian
>>>>   COMBOOT pxechain.com
>>>>   APPEND ::debian/pxelinux.0
>>>>
>>>> Please note that if the first PXELINUX is version 4.xx, it must be at
>>>> least version 4.04-pre1 as there is a bug that was resolved in
>>>> 4.04-pre1.  I believe 4.04-pre14 is OK but I can't be certain at this
>>>> time.  For a production environment, I'd advise waiting for 4.04.
>>>> Otherwise, try 3.86 for now.
>>>>
>>>>> The same question has been asked here
>>>>> http://web.archiveorange.com/archive/v/mwjwmJ0CIqkvn1V88yus but no
>>>>> complete
>>>>> answer has been given.
>>>>>
>>>>> Thanks for all the help,
>>>>> Giannis
>>>>
>>>> I thought that it was.  I also think that the above post is a little
>>>> different.




More information about the Syslinux mailing list