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

Aleksandar Milivojevic alex at milivojevic.org
Tue Mar 14 15:37:20 UTC 2006

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...

See Ya' later, alligator!

More information about the CentOS mailing list