\documentclass{article}
\usepackage[latin1]{inputenc}
\usepackage{geometry}
\title{Replicator 2.0.1 for Debian/GNU Linux 2.2 \newline Manual}
\author{Sébastien Chaumat}

\newcommand{\computer}[1]{\mbox{\textbf{#1}}}
\newcommand{\command}[1]{\mbox{\texttt{#1}}}
\newcommand{\svar}[1]{\texttt{\$#1}}
\newcommand{\lvar}[1]{\texttt{@#1}}
\newcommand{\file}[1]{\mbox{\textit{#1}}}

\begin{document}

\maketitle

\newpage

\tableofcontents

\newpage

\section{Conventions}
\begin{itemize}
\item This is a \computer{computer}
\item This is a \command{command}
\item This is a \svar{perl\_scalar\_variable}
\item This is a \lvar{perl\_list\_variable}
\item This is a \file{file}
\end{itemize}


\section{Disclaimer}
\subsection{Authors}

 Replicator is an original work by Loïc Prylli
 (lprylli@lhpca.univ-lyon1.fr). It originated as some custom scripts to
 help quickly installing computer classrooms and or clusters of computers.
 As I (S\'ebastien Chaumat (schaumat@ens-lyon.fr)) needed to do the
 same kind of work (having the same Debian/GNU Linux system on
 a lot of different computers), we started to transform the initial
 scripts to make a general-purpose system allowing to quickly and
 non-interactively install computers in any networked environment.
 It allows you to choose for each station whether it will be a full
 install, a ``/usr nfs-mounted'' install or a diskless install.
 It can handle automatically the main steps of hardware detection (hard
 disk, Xfree86), and partitioning (either a completely automatic
 partitioning with the option of preserving your DOS/Windows
 partition, or a manual partitioning preserving some of the hard disk
 filesystems).

\subsection{Your work}

 If you use Replicator please post  your comments to the public
 open discussion forum at SourceForge:

\begin{verbatim}
http://sourceforge.net/forum/forum.php?forum\_id=36345
\end{verbatim}

\subsection{License}

 Copyright (C) 1999-2001 by Sébastien Chaumat (schaumat@ens-lyon.fr).
                      and  Loïc Prylli (lprylli@lhpca.univ-lyon1.fr)

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    A copy of the GNU General Public License is available as
    \textit{/usr/share/common-licences/GPL} in the Debian GNU/Linux distribution
     or on the World Wide Web at http://www.gnu.org/copyleft/gpl.html.  You
     can also obtain it by writing to the Free Software Foundation, Inc.,
     59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


\subsection{Greetings}

Pascal Degiovani (degio@ens-lyon.fr) convinced me to look for an
auto-install tool for Linux. He introduced Loïc Prylli to me. I'm very
grateful to him. 

I thanks the École Normale Supérieure de Lyon for its support.

Bertrand Louis-Lucas proof-read this documentation.

Dominique Ponsard and Herv\'e Brunet made beta-testing.

Thanks to all users who reported bugs and made suggestion.


\subsection{Support}

Limited support is available in the public area at:

\begin{verbatim}
http://sourceforge.net/projects/replicator/
\end{verbatim}

We would be really pleased to help you. 
\newpage

\section{Introduction}

\subsection{Where to find it}

You can find the latest version of Replicator at~:

\begin{verbatim}
     http://replicator.sourceforge.net 
\end{verbatim}

\subsection{Purpose}

If you are the system administrator of a networked site, how can you
(re)install quickly a computer in generally less than fives minutes
(even less if you install a set of similar machines)?

You want to customize the configuration of a computer only once
(on the \computer{model} computer) for your site. Moreover you want any
new \computer{target} computer to have almost the same  configuration as
the \computer{model}. The \computer{target} will be mostly identical to the
\computer{model} except:
\begin{itemize}
\item some specific configuration files (network, fstab, X configuration, hostname), 
\item the way it is partitioned,
\item the possibility of being diskless, having /usr NFS-mounted instead
of local, or having specific filesystems (local homes for instance),
\item \ldots \\
\end{itemize}

The present software, called ``Replicator'', will automates the
installation of \computer{target}. More precisely it consists of a
set of easy-to-use scripts to prepare the installation, the result
of the preparation being a floppy that when booted on the target, will
almost automatically install it (by default, it asks confirmation
first!).

\subsection{Overview of the replication}

The copying process is composed of the following steps: 

 \begin{enumerate}
 \item Installation and configuration of Replicator on the computer \computer{miniroot-server} which usualy is also the \computer{model} you want to replicate,,
 \item Creation and setup of a tiny NFS root filesystem onto \computer{miniroot-server},   
 \item Creation of bootfloppy onto \computer{miniroot-server},
 \item Configuration of remote acces to the \computer{model},  
 \item Quick install of the computer \computer{target} with the floppy.
 \end{enumerate}

\subsection{Warnings}

\begin{enumerate}
\item The whole directory tree of your \computer{model} machine will be
  duplicated according to the ``update rules'' mention in \ref{rules}. If you created
 non-standard directories (e.g. mountpoints) which you don't want to duplicate, then edit 
 the update rules accordingly.
\item This software is experimental (but tested and used in production environment), be sure that for every machine
  where you execute one of the scripts or for every machine
  that you include in one the configurations files, all the
  volumes accessible from the machine (either local or
  NFS-mounted) are properly backup'ed,
\item At this point, it is recommended that you understand a bit of 
  perl and sh scripts, to be able to diagnose potential problems.
\end{enumerate}

\subsection{What's new since 2.0}
\begin{itemize}
\item All networks are defined in \file{replicator.conf}: no more need for a bootdisk per network (see \ref{sec:bootdisk}).
\end{itemize}
\subsection{What's new since 1.X}
\begin{itemize}
\item general :
  \begin{itemize}
  \item support for replication of dhcp client (using dhcpcd). You don't need to make a new bootdisk if the network configuration changes. 
  \item use rsyncd instead of rsync via rsh or ssh.
  \item added many sanity checks and very explicit error messages.
  \item ligth classes mechanism : very convenient way to deal with classes of different targets.
  \item added update\_rules configuration file.
  \item partitioning/formating choices are displayed before replication.
  \item better documentation (new strategy guide (see \ref{strategy})).
  \item the \computer{model}'s keyboard is now alwais available as a choice for \computer{target}'s keyboard. 
  \end{itemize}
\item repli-miniroot :
  \begin{itemize}
  \item only one variable to configure.
  \item it is now an interactive dialog script.
  \item it creates a potato miniroot instead of a slink one.
  \item added a root password to acces the miniroot.
  \end{itemize}
\item repli-bootdisk :
  \begin{itemize}
  \item uses grub by default.
  \item explicit output messages.
  \end{itemize}
\end{itemize}


\subsection{TODO}

 What I'm working on:
 
\begin{itemize}
\item add rsyncd password.
\item support dhcp-client.
\item switch to full class mechanism.
\item make congelator: put the model on a CD.
\end{itemize}
\newpage

\section{Using Replicator}

 The computer you want to replicate is called your \computer{model}.
  All along  this documentation we refer to a computer called \computer{miniroot-server}.
 For basic use of replicator,
 \computer{miniroot-server} \emph{IS THE SAME} than \computer{model}. 
 This computer is the one where you want to install replicator. 

\subsection{Installing Replicator (warning)}

It's a standard Debian package :-). Just use dpkg or apt.

\emph{Warning:} The kernel running on the computer where you will create the bootdisk (see \ref{repli-bootdisk})  must support loop device. Standard kernels shipped with Debian are ok.

\subsection{Upgrading from 1.X}

 If you are upgrading from version 1.X, I strongly suggest that you create a new miniroot using \command{repli-miniroot}.
You should also check carefully the new \file{/usr/share/doc/replicator/replicator.conf.example}.

\subsection{Configuration of \file{replicator.conf}}

Edit the file \file{/etc/replicator/replicator.conf} (it is heavily commented).
Change the value of the perl variables to fit your needs.

 The following sections are presented here in the order they are used
during the replication. 

\subsubsection{the general section}
 
\begin{itemize}
\item \svar{verbose}: set this to 1 and replicator will be more verbose than usual.
\end{itemize}

\subsubsection{the miniroot section}

\begin{itemize}
\item \svar{nfsroot}: where, on miniroot-server, will you create the miniroot.
\end{itemize}

\subsubsection{the bootdisk section}
\label{sec:bootdisk}
\begin{itemize}
\item \svar{bootkernel}: full path to the \file{bzImage} you prepared as explained in  \ref{kernel}.
\item if you need to boot one target on a serial console:
  \begin{itemize}
  \item \svar{grub}: set to 0 to use lilo instead of grub on the bootdisk. This is compulsory if you want to boot on a serial console since grub doesn't support serial boot yet.
  \item \svar{serial}: definition of serial port for lilo, only if you want to boot on serial console,
  \item \svar{serialcons}: definition or serial port for the kernel, only if you want to boot on serial console.
  \end{itemize}
\item \lvar{networks}: define one network per line. For each network, choose a name for the target list then create the
corresponding perl variable. Look at the following example:
%\geometry{scale=0.85}
\begin{verbatim}
#List of networks/targets the bootdisk will handle.
#you don't need to fill this variable if you only
#plan to install dhcp clients.

@networks =
#   network         domain             netmask          gateway         broadcast  targets list 
(["192.168.32.0","prof.my.domain","255.255.255.0","192.168.32.1","192.168.32.255","teachers"],
 ["192.168.33.0","my.domain",    "255.255.255.0","192.168.33.1","192.168.33.255","sysadm_net"],
 ["192.168.34.0","maths.my.domain","255.255.255.0","192.168.34.1","192.168.34.255","maths"],
  );

#for each network create the corresponding targets list
@teachers=qw(teach1 teatch2);
@sysadm_net=qw(adm1 adm2 adm3);
@maths=qw(maths1 maths2 maths3 maths4);
\end{verbatim}
\end{itemize}
\subsubsection{the target network section}

\begin{itemize}
\item The following variables are only used for non dhcp targets:
  \begin{itemize}
  \item \svar{gateway}: name or IP address of the gateway of \computer{target} (can be empty). 
  \item \svar{netmask}: e.g. \texttt{'255.255.255.0'}.
  \item \svar{network}: e.g. \texttt{'192.168.32.0'}.
  \item \svar{broadcast}: e.g. \texttt{'192.168.32.255'}.
  \item \svar{domainname}: e.g. \texttt{'my.fake.domain'}.
  \end{itemize}
\item \svar{hosts\_supp}: lines to add to the \file{/etc/hosts} of \texttt{target}
  machine.  
\item \svar{nfsopts}: for diskless stations or NFS-monted \file{/usr} partition only. See \ref{diskless}.
\end{itemize}

\subsubsection{the target partitioning section}
\begin{itemize}
\item \svar{target\_disk}: disk of \computer{target} on which you want to install. By default replicator use the first detected disk (hda or sda).
\item \svar{custom\_part}: set to 1 if you want to manually
  partition the hard disk of \computer{target},
\item \lvar{autopart\_specs}: specification of the partitioning
  scheme of \svar{target\_disk} (min and max size for each partition). See \file{replicator.conf.example}.
\item \lvar{manualpart\_specs}: describe the  existing
  partitions and filesystems to reuse. Only used if \svar{custom\_part}=1. See \file{replicator.conf.example}.
\item \svar{fstab\_supp}: lines to add to the \file{/etc/fstab} of \computer{target}.
\end{itemize}

\subsubsection{the update rules section}
\label{rules}
Nothing but a reminder. To fine tune the list of files/directories which are
replicated, edit \file{/etc/replicator/update\_rules}. 
If you delete this file, the default rules are in \file{/usr/lib/replicator/update\_rules.default}.
In this files are defined 3 variables:
\begin{itemize}
\item \lvar{slash\_exclude}
\item \lvar{usr\_exclude}
\item \lvar{var\_include}
\end{itemize}

This is how replicator proceeds:
\begin{itemize}
\item It replicates the root (\file{/}) filesystem except for what is mentioned in \lvar{slash\_exclude}. If you use cfengine (a very useful program for network administration), replicator parses \file{/etc/cfengine/cfengine.conf} and does not copy files handled by cfengine copying facility.
\item It replicates the \file{/usr} directory (not the filesystem) except for what is mentioned in \lvar{usr\_exclude}.
Be aware that it may cross filesytems to acheive this. 
\item It replicates the directories structure of \file{/var} (only directories, no files).
\item It replicates the contents of the \file{/var} subdirectories mentioned in \lvar{var\_include}.
\end{itemize}

\emph{To define an empty update rule use the syntax:}
\lvar{usr\_exclude}=qw("");

\subsubsection{the miscellaneous section}
\begin{itemize}
\item \svar{usr\_is\_nfs}: set this variable to 1 if \file{/usr} must be a NFS-mounted
  filesystem on \computer{model} instead of being on a local partition (see \ref{diskless}).
\end{itemize}


\subsection{Site preparation for the replication}

\subsubsection{Compiling a boot kernel for the installation floppy}
\label{kernel}

 Compile a kernel with all the necessary driver for the computer
\computer{target}. Do not use modules for the drivers required at boot
time (typically network and SCSI).

Add the following option during configuration of the kernel:

\begin{itemize}
\item Networking options / IP: kernel level autoconfiguration
\item Networking options / IP: kernel level autoconfiguration / DHCP support
\item Filesystems / Network File Systems / NFS filesystem support
\item Filesystems / Network File Systems / NFS filesystem support / Root file system on NFS

You \emph{must} create such a kernel because the standard Debian 
kernels do not have nfsroot nor dhcp support enabled. This kernel will only be used 
for the installation floppy and will not be installed on \computer{target}.

\end{itemize}

Compile this kernel with classical \command{make dep ; make bzImage} (don't use make-kpkg).
This kernel will be use to boot the computer \computer{target}. 
Put this new kernel in a safe place.

\subsubsection{Preparing the miniroot}
As root execute \command{repli-miniroot}.
You need acces to a Debian potato mirror. It can be a CD set, a remote mirror somewhere on the network or a local mirror.

This will create a special filesystem (e.g. \file{/export/install/miniroot}) whith a basical Debian/GNU Linux on it.


\emph{VERY IMPORTANT:}
Each time you modify the configuration in \file{/etc/replicator/} you must run the command:
\begin{description}
\item \command{repli-miniroot --update-config}
\end{description}
or 
\begin{description}
\item \command{repli-miniroot -u}
\end{description}

Don't forget to export \file{miniroot-dir} for \computer{target} \emph{with the no\_root\_squash} option. To do that, edit \file{/etc/export} and add a line like:
\begin{description}
\item \texttt{/export/install/miniroot target.my.domain(rw,no\_root\_squash)}
\end{description}

Then tell the nfs-server to reload it's configuration:
\begin{description}
\item \command{/etc/init.d/nfs-server reload}
\end{description}

\emph{Warning}: Every line of \file{/etc/export} file must end with a newline
character otherwise you will get silly error messages at boot time.

\subsubsection{Authorizing targets to access model with rsyncd}
Replicator comes with a \file{/etc/replicator/rsyncd.conf} file:

\begin{verbatim}
#
#this is rsyncd.conf for replicator
#
[replicator]
path=/
use chroot=no
read only=yes
uid=0
#max connections = 20
#
#in case you don't use tcpwrapper (bad:)
hosts allow=192.168.0.0/255.255.0.0
hosts deny=*
\end{verbatim}

You are responsible for launching rsyncd on the \computer{model} with this config files. 
That means either moving this file to \file{/etc/rscynd.conf} or editing your existing \file{/etc/rscynd.conf}
to add the rsync module [replicator] as defined into \file{/etc/replicator/rsyncd.conf}.

You can either :
\begin{itemize}
\item configure inetd to allow rsyncd.
\item make a script to launch rsyncd as a standalone server at boot time.
\item launch rsyncd by hand with the command \command{rsync --daemon}.
\end{itemize}

Don't forget to change the \verb#hosts allow# and \verb#hosts deny# settings.

\subsubsection{Preparing the custom post-replication script}

You can create a shell script \command{/etc/replicator/repli-postint}. It will be executed at the very end of the
copying process. It is \emph{your} postint script. Again run \command{repli-miniroot --update-config} to copy this file to the miniroot.

\emph{Note:} This script is run chrooted in the root filesystem of \computer{target} (exactly as it would run after rebooting).

Here are some suggestions of what can you put in this script:
\begin{itemize}
\item \command{dpkg-reconfigure ssh}: will create a new public/private keys pair.
%\item \command{XF86Setup} or repli-xconfig 
\end{itemize}
\subsection{Installing the target}

\subsubsection{Creation of the boot floppy}
\label{repli-bootdisk}
Use the script \command{repli-bootdisk}.

You can put a floppy right now in your floppy drive. If you interrupt \command{repli-bootdisk}
with \mbox{\command{ctrl-C}} you can copy by hand the file \file{/tmp/name-of-the-target.img} on a floppy
with the command \command{cp}.

\subsubsection{Using the boot floppy}

\begin{enumerate}
\item sit down on front of the \computer{target} computer,
\item insert the floppy,
\item turn the power on,
\item login as root with the password you set at the creation of the miniroot,
\item answer the 4 questions,
\item If you choose the manual installation, launch the following scripts yourself. You must add the \command{--real} option
to make the scripts actually do something.
  \begin{enumerate}
  \item \command{repli-install hdsetup  (--real)}
  \item \command{repli-install hostconf (--real)}
  \item \command{repli-install netcopy  (--real)}
  \item \command{repli-install configure(--real)}
  \item \command{repli-postint}
  \end{enumerate}
\item remove the floppy,
\item reboot.
\end{enumerate}

\subsection{The light classes mechanism (aka the strategy guide)}
\label{strategy}
This is very important and usefull.
One easy way to define replication classes is to create specific configuration files. 

To summarize:
\begin{itemize}
\item \command{repli-bootdisk --config /etc/replicator/my\_specific\_file} first loads 
\file{/etc/replicator/replicator.conf} and then loads
the file \file{my\_specific\_file}. Wathever you put into \file{my\_specific\_file} overides the content of  \file{/etc/replicator/replicator.conf}.
\item \emph{after booting the target} the file \file{/etc/replicator/replicator.conf} is read first and,\\ 
if it exist, the file \file{/etc/replicator/replicator.conf\_targetname} is read.
\item \file{/etc/replicator/replicator.conf\_targetname} can be a symbolic link to\\
\file{/etc/replicator/replicator.conf\_myclass}. 
\end{itemize}

The following examples should help you understand how replicator deals with its configurations files. 


\subsubsection{Installing computers in more than one network}

 Starting with version 2.0.1 of replicator, you only need to fill the variable \lvar{networks} and the corresponding
lists of targets in \file{replicator.conf}. See \ref{sec:bootdisk}.

\subsubsection{Installing a special computer among a set of identical others}
Lets suppose you are installing a classrom: all  computers are identical (call them
\computer{student1}, \computer{student2}, ...) except the teacher's one (just call it \computer{teacher}).

 For example, students'computers, have a 1GB harddisk with /home nfs-mounted and boot vith dhcp, whereas \computer{teacher} has hardcoded network configuration, one 4GB disk for the OS and a second ide disk with local /home in /dev/hdb1.
 
 In such a case we use \file{/etc/replicator/replicator.conf} to put defaults for the 
identical computers and we make a file \file{/etc/replicator/replicator.conf\_teacher} for the unique computer \computer{teacher}.

 In \file{/etc/replicator/replicator.conf} :

\begin{verbatim}
@autopart_specs =
#mount point            min_size        max_size 
  ([ "/" ,              "100Mo",        "1000Mo"],
   [ "swap",            "64Mo",         "128Mo"],
  );

$fstab_supp = "/dev/fd0 /floppy auto defaults,user,noauto 0 0
homeserver:/exports/home /home nfs rw,defaults,rsize=8192,wsize=8192 0 0
/dev/cdrom /cdrom auto ro,defaults,user,noauto 0 0\n";
\end{verbatim}

In file \file{/etc/replicator/replicator.conf\_teacher}:

\begin{verbatim}
@targets=qw(teacher);

$domainname = 'classroom.here';
$gateway = '192.168.32.23'; 
$netmask='255.255.255.0';
$network='192.168.32.0';
$broadcast='192.168.32.255';

#mount point            min_size        max_size 
  ([ "/" ,              "100Mo",        "400Mo"],
   [ "swap",            "64Mo",         "128Mo"],
   [ "/usr" ,           "800Mo",      "3000Mo" ],
   [ "/var" ,           "200Mo",      "1000Mo" ],
  );

$fstab_supp = "/dev/fd0 /floppy auto defaults,user,noauto 0 0
/dev/hdb1 /home auto defaults 0 0
/dev/cdrom /cdrom auto ro,defaults,user,noauto 0 0\n";

\end{verbatim}

Now create the bootisk with :


\command{repli-bootdisk --config /etc/replicator/replicator.conf\_teacher}


To install a student computer, boot it with the bootdusk and chosse `` Boot with DHCP and Install a DHCP target'' in grub's menu. To install \computer{teacher}, use the same bootdisk and choose ``Boot Teacher ...'' in grub's menu.


\newpage

\section{Doing more with Replicator}
\label{sec:more}

\subsection{Modifying the behavior of replicator with the command line}

You can also give the arguments on the command line of the different scripts repli-command:

instead of \texttt{"\$var = val"} in \mbox{\file{replicator.conf}} you can use the 
option \mbox{\texttt{--var val}}. Example:
\begin{description}
\item \command{repli-bootdisk --bootkernel \file{/path/to/the/boot/kernel}}
\end{description}

Command-line arguments take precedence over the configuration file \mbox{\file{replicator.conf}}.

\subsection{Keeping 2 computers synchronized}

Suppose you change something (e.g. you add a package) onto the computer \computer{model}.
To keep \computer{target} a real copy of \computer{model} you can either make the same operation by hand onto the computer 
\computer{target} or use the script \command{repli-sync}.

Before using \command{repli-sync}, you have to check that the file
\file{/etc/replicator/reply-sync.conf} exists on the
\texttt{target}.

It should contains something similar to:
\begin{verbatim}
$model="mymodel";
@usr_exclude=qw(/var /local /src);
$noboot=1; #option : do not update /boot
$norcd=1;  #option : do not update /etc/rc?.d
$nousr=0;  #option : do not update /usr

#do not remove the following line..
$the_end=1;
\end{verbatim}

\subsection{Installing a diskless client}
 \label{diskless}
 If you want to easily install a diskless client, \computer{target}, with its filesystem on the computer
\computer{miniroot-server}, follow these instruction:

\begin{itemize}
\item export with NFS, read-only, the directory \file{/usr} of \computer{miniroot-server} for itself and for \computer{target},
\item edit the variable \svar{targetbase} into \command{repli-diskless} or create a directory \file{/export/diskless},
\item create the NFS root filesystem of \computer{target} by en executing the command: \mbox{\command{sh repli-diskless}},
\item export with NFS \file{/export/diskless/\computer{target}} for \computer{target},
\item edit \file{repli-postint.diskless} if necessary,
\item create the bootdisk of \computer{target} by  executing the command:
  \begin{description}
  \item  \command{ repli-bootdisk --nfsroot /export/diskless/target --host target.}
  \end{description}
\end{itemize}

Boot \computer{target} with this floppy. That's all!

\subsection{Installing a client with \file{/usr}  mounted by NFS}

Add the option \svar{usr\_is\_nfs=1} into \file{replicator.conf} and export the directory \file{/usr}
of  \computer{model} for \computer{target}.


\subsection{model being different of miniroot-server}
        
You may want to have a dedicated \computer{miniroot-server}, for security reason
or because you just don't want to install replicator onto your
\computer{model}.

To do so, first install replicator on \computer{miniroot-server}. Then
in \file{/etc/replicator/replicator.conf} customize the variable
\svar{model}.

Then read again this documentation without considering
\computer{miniroot-server}=\computer{model}.


\newpage
\appendix
\section{Default update rules}
\label{app:rules}
You can find them in \file{/usr/lib/replicator/update\_rules.default}.

\begin{verbatim}
#
#update_rules
#
#In this file you can tune the behaviour of replicator
#
#WARNING: to define an empty rule use the syntax: @usr_exclude=qw("");
#####################
#                   #
# "/" exclude rules #
#                   #
#####################
#The following files/directoriess are NOT copied from $server to $target

@slash_exclude=qw(
/etc/my
/etc/network/interfaces
/etc/.rootkey
/etc/adjtime
/etc/isapnp.conf
/etc/minirc*
/etc/gpm.conf
/etc/replicator*
/etc/fstab
/etc/hostname
/etc/hosts
/etc/aboot.conf
/etc/lilo.conf
/etc/exports
/etc/dhcpd.conf
/etc/fmirror
/etc/apache/*
/etc/squid.conf
/etc/chatscripts/*
/etc/init.d/network
/etc/ppp/*
/etc/named.conf
/etc/named.boot
/etc/ssh/ssh_host_key*
/etc/ssh/ssh_random_seed
/etc/rmtab
/etc/mtab
/etc/kbd/
/etc/console-tools/
/etc/X11/XF86Config
/etc/X11/Xserver
/etc/ioctl.save
/etc/mon/
/etc/ssh2/hostkey
*.cfsaved
*.dpkg-old
/tmp/*
/var
/usr
/bigpart
/boot
/*old*
/cdrom/*
/local
/localhd
/fatboot
/home*
/proc/*
/tchich
/ramdisk/
/linuxppc/
/oldexports/
/amd/
/tftpboot/
/*mnt*/*
/floppy/*
/export*/
/exports/*
/opt*
/net*
/vol*
/lost+found/
);
\end{verbatim}
\newpage
\begin{verbatim}
#####################
#                   #
#/usr exclude rules #
#                   #
#####################
#The following files/subdirectories of /usr are NOT copied from $server to $target

@usr_exclude=qw();

#####################
#                   #
#/var include rules #
#                   #
#####################
#ONLY the content of the following subdirectories of /var will be copied from $server to $target
#NOTE: the complete directories structure will be replicated (not the content of those directories)
@var_include = qw(lib);

\end{verbatim}
\newpage
\section{replicator.conf.example}
You can find this file in \file{/usr/share/doc/replicator/}.

\begin{verbatim}
#/etc/replicator/replicator.conf
#
#This is the place to configure replicator

#Warning this file is an example. Customize it and check it twice 
#before using replicator.

###########################################################
#                                                         #
# Section: general configuration                          #
#                                                         #
###########################################################

#Be very verbose
#$verbose=1;

###########################################################
#                                                         #
# Section: miniroot configuration                         #
#                                                         #
###########################################################

#Where will you create the miniroot
$nfsroot= "/export/install/miniroot";

##########################################################
#                                                        #
# Section: bootdisk configuration                        #
#                                                        #
##########################################################

#Where is your kernel for the target computer
$bootkernel = '/export/install/kernels/vmlinuz-for-replicator';

#to boot on a console on a serial port customize this:
#$grub=0;  #we need to use lilo instead
#$serial='0,9600n8';
#$serialcons='console=ttyS0,9600 CONSOLE=/dev/ttyS0';

#List of networks/targets the bootdisk will handle.
#you don't need to fill this variable if you only
#plan to install dhcp clients.

@networks =
  #   network         domain             netmask          gateway         broadcast         name of targets list 
  ([ "192.168.32.0" , "prof.my.domain",  "255.255.255.0", "192.168.32.1", "192.168.32.255", "teachers"],
   [ "192.168.33.0" , "my.domain",       "255.255.255.0", "192.168.33.1", "192.168.33.255", "sysadm_net"],
   [ "192.168.34.0" , "maths.my.domain", "255.255.255.0", "192.168.34.1", "192.168.34.255", "maths"],
  );

#for each network create the corresponding targets list
@teachers=qw(teach1 teatch2);
@sysadm_net=qw(adm1 adm2 adm3);
@maths=qw(maths1 maths2 maths3 maths4);


##########################################################
#                                                        #
# Section: network configuration of the target           #
#                                                        #
##########################################################

#Network configuration of the target (ignored if you use dhcp)
$domainname = 'myfake.domain';

#Lines to add to the /etc/hosts of the target computer
#$hosts_supp = "192.168.32.1  host1.myfake.domain host1 \n
#192.168.32.45 mynfsserver.myfake.domain mynfsserver \n";

# NFS options for diskless stations or NFS-monted /usr partition
#$nfsopts = "nolock,rsize=8192,wsize=8192";

##########################################################
#                                                        #
# Section: partitioning of the target                    #
#                                                        #
##########################################################

# To install on a specific disk rather than the first detected disk,
# modify and uncomment next line
#$target_disk = "/dev/hdb" ;

# For MANUAL partionning set $custom_part to 1 
$custom_part = 0;

#For AUTOMATIC PARTITIONING (not used if $custom_part = 1)
@autopart_specs =
#mount point            min_size        max_size 
  ([ "/" ,              "100Mo",        "100Mo"],
   [ "swap",            "64Mo",         "128Mo"],
   [ "/usr" ,           "800Mo",      "3000Mo" ],
   [ "/var" ,           "200Mo",      "500Mo" ],
   [ "/export/home",    "remaining"  ]
  );

#For MANUAL partionning (not used if $custom_part = 0)
# for instance if you want to keep an existing partition
# or to define the partition sizes manually before starting the install
# process, please gives the affectation of filesystems to partition numbers
# and which ones need to be allocated

@manualpart_specs = 
#mount_point            partition_number        mkfs needed?(0|1)
  ([ "/" ,              1,                      1],
   [ "swap" ,           2,                      1],
   [ "/usr" ,           3,                      1],
   [ "/var" ,           5,                      1],
   [ "/export/home",    6,                      0]
  );


#Lines to add to the /etc/fstab of the target machine
$fstab_supp = "/dev/fd0 /floppy auto defaults,user,noauto 0 0
#mynfsserver:/usr/local /usr/local nfs ro,defaults,rsize=8192,wsize=8192 0 0
/dev/cdrom /cdrom auto ro,defaults,user,noauto 0 0\n";

##########################################################
#                                                        #
# Section: update rules                                  #
#                                                        #
##########################################################

#To fine tune the list of files/directories which are
#replicated, edit /etc/replicator/update_rules. 
#If you delete this file, the default rules are in
#/usr/lib/replicator/update_rules.default

##########################################################
#                                                        #
# Section: miscellaneous                                 #
#                                                        #
##########################################################

# To have an NFS /usr-mounted partition on the target
# $usr_is_nfs=1;

##########################################################
#                                                        #
# Section: Experts Only                                  #
#                                                        #
##########################################################
#Name of the model machine. Change this only if
#the model machine is not the miniroot server
#$modele= "mymodel";



#Do NOT modify the following line AND leave it at the end of this file
$the_end=1;
\end{verbatim}



\end{document}

