[CentOS] PXE boot, Kickstart NFS install and %include...

Tue Mar 14 15:56:57 UTC 2006
Will McDonald <wmcdonald at gmail.com>

On 14/03/06, Aleksandar Milivojevic <alex at milivojevic.org> wrote:
> Quoting Will McDonald <wmcdonald at gmail.com>:
>
> > I was just wondering how (or indeed if) people use the %include
> > directive in Kickstart configuration files when building systems via
> > NFS. I've been trying to modularise our Kickstart files a little to
> > make things more readable, having generic defaults and role specific
> > stuff split out into separate configs.
>
> The %include directives are parsed two times by Anaconda.  First time
> before %pre scripts are executed, and then after %pre scripts are
> executed.  The missing files are ignored on the first parsing of
> kickstart file.  However, Anaconda will complain if they are missing
> when it parses the file for the second time (just after %pre scripts
> are executed).  This allows you to create those files dynamically from
> the %pre scripts (or make them accessible if already stored somewhere).
>  You must ensure that all files referenced by %include directives
> exist and are accessible by the time %pre scripts finish (for example,
> by creating the file in %pre script or by NFS mounting the directories
> where they live from %pre script).
>
> If else fails, you can always copy the files locally using %pre script...

Excellent, I hadn't thought of using %pre but from the sounds of it
that'll allow me to keep all the configs broken out into sections.

Cheers Aleksandar.

Will.