[syslinux] Nested PXELINUX configurations

Gene Cumm gene.cumm at gmail.com
Thu Mar 24 12:27:05 PDT 2011


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.

-- 
-Gene




More information about the Syslinux mailing list