next up previous
Next: Partition Backups Up: CloneSys Documentation Previous: Initial Multi-Boot Installation

Installation and Configuration of CloneSys

Directory Structure

The CloneSys tools are installed on an image server which stores all the partition images. This server has to export these image directories to all the cluster machines via nfs (or samba). We equipped a designated machine (our cluster server) with an additional large disk, which can be mounted on demand.

On our cluster we use the following directory structure:

    /images/cloneimages/   <partition- and disk-images>
            scripts/       <tools and commands>
            logs/          <logfiles and configuration>
            logs/lastlogs/ <last log files of clone>
            config/        <cluster configuration machine files>

Clone Images

The cloneimages subdirectory contains the gzipped partition images. The file names are constructed as follows: device_imagename.gz, e.g. sda1_SysCom.gz.


The scripts subdirectory contains all the tools as well as the tool configuration file .cloneconfig which has to be placed in the same directory as the scripts. The .cloneconfig file contains path declarations as well as pointers to the log files. Our configuration looks like this:

# Configuration for Clone Sys Scripts 

# Installation directory of CloneSys

# Default path where to find images

# Path for config files

# Path where to find scripts

# Path for log files

# Log file for all clonesys commands

# Path for lastlog files

# Image Database File

# lastlog suffixes

# Alias for machine name

# Initial Image (Zeroed Partitions and SysCom, CloneSys in one image)
initimage=default      # image specified in config file

# Initial Configuration (must be the same as with initimage)

# Image Server

Hostname Aliases

For easier access to the machines we have defined DNS aliases for all of them. The aliases have all the same prefix, i.e. rifpc, followed by a host_id. With the mapname command these aliases or just the host_ids alone can easily be mapped to the full hostname.

Log Files

The logs subdirectory stores the clone.log file which contains log entries of all the clones, backups, locks and unlocks performed with CloneSys commands.

imagedesc.txt contains the descriptions of the images stored in cloneimages. An entry looks like this:

Image  : /images/new_images/sda5_WinNTEduD_SP4.gz
Origin : client1
User   : kurmann
Date   : Tue May 25 12:51:24 CEST 1999
Comment: WindowsNT Educ D with SP4, Xwindows, Netscape 4.6

clustermap.txt contains a map of the cluster as well as the ip names of the machine. This file is shown by the command clustermap just for information.

The lastlogs subdirectory contains the last logfiles for all the machines. There are different suffixes used for clone-, backup-, lock- and error-logs. These log files can be viewed or deleted with the lastlogs command.

The clone- and backup-logs additionally have a suffix _running or _finished indicating if a process is running or finished. This can be viewed with the state command.


The configuration of CloneSys is done in a separate file for all the cluster machines. The config files are located in the config subdirectory and have the following structure:


For each installed partition there is a partition (or device) identifier, the path, where the image is stored, the image name and the date when the partition was last cloned by the specified user. Additionally there can be entries for locked partitions. The user who has requested the lock and the reason are indicated in the appropriate fields.

We have partitioned our cluster machines as listed in the following table.

Device Name Size Partition
sda1 System Commander 16 MB Primary, Activ
sda2 Linux CloneSys 200 MB Primary
sda4 Extended
sda5 Windows NT Education 1.9 GB Logical in sda4
sda6 ETH Oberon Education 100 MB Logical in sda4
sda7 ETH Oberon Research 100 MB Logical in sda4
sda8 Linux Swap 100 MB Logical in sda4
sda9 Linux 900 MB Logical in sda4
sda10 Windows NT Research 1.9 GB Logical in sda4
The appropriate configuration file is given below:


Note the image for the device sda. This is the initial clone image which initialized the whole disk and the CloneSys Linux system as described in the next Chapter. This initial clone generates the configuration file for a new machine automatically.

Generation of an Initial Clone Image

As described in the previous Chapter, the setup of a master machine is the prerequisite for the cloning process.

In addition to all the partition backups, we use an InitClone image which is a backup of the whole disk. This allows us to just clone this image onto an emtpy harddisk to initialize the partitioning as well as the boot commander and the configurations in one step, independent of any operating system specific specialities.

To keep this image short we wipe all the partitions with zeros (e.g. with dd if=/dev/zero of=/dev/sdaX bs=4096) except the SysCom and the CloneSys partitions which contain the boot commander as well as the small Linux system needed for cloning the rest of the system. To generate such an image one can use the backup tool or just type something along the line (with paths adjusted):

dd if=/dev/sda bs=1024 |gzip -c |dd of=sda_InitClone.gz bs=1024

In addition to the generation of this image a configuration file called initclone must be written corresponding to the configuration of the machine and the initclone-image. This is stored in the config directory. In our cluster this initial configuration looks like this:


All the partitions are wiped with zeros except the sda1 and sda2 which contain the boot commander and the Service-Linux system.

This initial configuration is automatically installed when an initial install is done with initinstall. After that it is possible to just use the restore script to install all the remaining partitions.

Initial Clone

As mentioned in the last Chapter we use a minimalistic boot-floppy / boot-Zip-disk combination based on the Linux distribution muLinux to boot a new or broken machine. With such a boot disk the empty machine can be booted and brought to the network.

The next steps are just to mount the /images directory from the imageserver over the network and to start the initinstall script which installes the initial image and configuration file. With this the machine can be booted in the Service-Linux system an the remaining operating systems can be installed with the restore or rclone scripts.

Example of an initinstall

Boot the machine with the muLinux boot floppy or zipdisk and login as root. Then mount the /images directory from the server

 mount /images
or depending on your /etc/fstab
 mount -t nfs imageserver:/images /images
(where imageserver is the machine which stores the partition images)

Start the installation script:

/images/scripts/initinstall hostname yourname

This will install the sda_InitClone.gz image to the device sda on the local machine an generate an initial configuration file for the machine in the config-directory (by copying the initconfig file).

After that the machine has to be rebooted into the now newly installed CloneSys (Linux) where the rest of the partitions can be installed with rclone or restore.

Caution! Don't boot uninstalled systems as they could be automatically removed from the boot-menu.

Restoring the partitions means that the same images that are specified in the initconfig shall be initialized. To restore one or more partitions on a cluster the restore script can be used as follows:

 restore yourname -d sda5 sda6 sda7 sda8 sda9 sda10 -h hostname

This restores the images for all the partitions sda5 to sda10 on the machine with the given hostname. This command can be executed local or on a server.

It calls the rclone command for all the specified devices and machines with the default image which is the image specified in the config files.

If different images shall be installed the rclone script can be used as follows:

 rclone sda5 WinNTEducNew yourname hostname

which would install the image WinNTEducNew on sda5.

next up previous
Next: Partition Backups Up: CloneSys Documentation Previous: Initial Multi-Boot Installation

Christian Kurmann
Wed Dec 22 11:02:02 CET 1999