Dual FAI Configurations

Itamar Gal itamarggal at gmail.com
Wed Jan 3 22:12:11 CET 2018


Hey Thomas,

Thank you for the prompt reply. I think I may have done a less than
perfect job of asking my question, or asked too general a question, so
I'm going to try to rephrase it to be more specific.

One thing I would like to be able to do is to create a totally
independent instance of FAI on an active FAI install server. I want to
avoid overwriting any files used by the pre-existing FAI configuration
and I don't want to interfere with the functioning of the FAI server.
I only want this second configuration to apply to a specific set of
hosts/install-clients.

I looked through the list of environment variables on the FAI wiki:

-   http://wiki.fai-project.org/index.php/Variables

Based on that list it looks to me like I need to over-ride the
following variables:

-   FAI_CONFIG_SRC, NFSROOT, TFTPROOT, FAI_CONFIGDIR, LOGDIR, FAI_ETC_DIR

The existing FAI server configuration files on my install server are
(for the most part) installed in default locations. In particular,
none of the FAI configuration files are in my home directory, so I
figure that prepending ${HOME}/local as a prefix to the default values
for these variables should give me a file-hierarchy inside my ~/local
directory which is structurally identical to the file-hierarchy used
by the original FAI server configuration. I imagine that my fai.conf
file (~/local/etc/fai/fai.conf) would look something like this:

    # Set the prefix
    PREFIX="${HOME}/local"

    # Override default settings
    FAI_CONFIG_SRC="${PREFIX}/srv/fai/config"
    NFSROOT="${PREFIX}/srv/fai/nfsroot"
    TFTPROOT="${PREFIX}/srv/tftp/fai"
    FAI_CONFIGDIR="${PREFIX}/srv/fai/config"
    LOGDIR="${PREFIX}/var/log/fai"
    FAI_ETC_DIR="${PREFIX}/etc/fai"

I guess that I might also want to export FAI_ETC_DIR (although maybe
this is completely redundant with the -C option flags):

    export FAI_ETC_DIR="${HOME}/local/etc/fai"

Suppose I do this and then run FAI setup:

-   sudo fai-setup -C "${HOME}/local/etc/fai"

-   sudo fai-make-nfsroot -C "${HOME}/local/etc/fai"

-   sudo fai-chboot  -C "${HOME}/local/etc/fai"

I believe that this will overwrite PXE configuration files in
/srv/tftp/fai/pxelinux.cfg (I think I can live with that), but will
this overwrite any of the other pre-existing FAI files?

Cheers,
Itamar

On Wed, Jan 3, 2018 at 10:02 AM, Thomas Lange
<lange at informatik.uni-koeln.de> wrote:
>>>>>> On Wed, 3 Jan 2018 09:53:36 -0600, Itamar Gal <itamarggal at gmail.com> said:
>
>     > My thought was to replicate the FAI configuration files inside of my
>     > ~/local directory and set the relevant FAI environment variables to
>     > point to sub-directories of ~/local. Is there a way to do this safely?
> There are several places where you can use another dir instead of the
> default /etc/fai.
> fai-make-nfsroot, fai-mirror, fai-chboot and fai-cd support specifying
> a different directory. IIRC they all use -C, but please check the man
> pages.
>
>     > If so, which variables do I need to set in my ~/local/etc/fai/fai.conf
> Check fai.conf and nfsroot.conf in your ~/local/etc/fai and it's up to
> you which things you want to have different and which should be the
> same.
>
> --
> regards Thomas


More information about the linux-fai mailing list