The Actual Step-by-Step HOWTO

  1. Install the SystemImager server package on the machine you have chosen as your image server.

    You can find the SystemImager packages and links to some of the dependent packages that may not be a part of your Linux distribution at http://systemimager.org/.

    The SystemImager server software is available in tar ball format and may be available in other distribution specific packaged formats. The example below is for installing from a tar ball. The software is the same regardless of the packaging format.

    Example 3. Installing the SystemImager server software

    [root@imageserver]# bzcat va-systemimager-server-x.x.x.tar.bz2 | tar -x
    [root@imageserver]# cd va-systemimager-server-x.x.x
    [root@imageserver]# ./install
    Welcome to SystemImager.
    
    This install script may modify the following files and/or directories:
    
     /tftpboot/systemimager/ -- create if necessary and add appropriate files/links
     /tftpboot/pxelinux.cfg/ -- create if necessary and add appropriate files/links
     /etc/services           -- add /sync and/or tftp entries if necessary
     /etc/inetd.conf         -- remove rsync entry if necessary and
                                add or modify tftp entry if necessary
     /etc/rsyncd.conf        -- it is assumed that SystemImager will manage this
                                file and that it will not be used for anything else
    
     All modified files will be backed up with the .beforesystemimager extension.
    
     See "install -help" for command line options.
    
    Install SystemImager? (y/[n]) y
    Ok. Installing SystemImager...
    
    Installing files in /usr/sbin/
    Installing files in /etc/init.d/
    Installing files in /tftpboot/
    Installing files in /tftpboot/pxelinux.cfg/
    Installing files in /tftpboot/systemimager/
    Installing files in /var/spool/systemimager/images/
    rsync entries already enabled in /etc/services...
    tftp entry already enabled in /etc/inetd.conf...
    SystemImager brand /etc/rsyncd.conf file already exists...
    creating soft links to rsync init script...
    running rsync init script...
    Stopping rsync daemon: rsync.
    Starting rsync daemon: rsync.
    Installing files in /usr/share/doc/va-systemimager-x.x.x/
    
    All done!  Please read the manual before using SystemImager.
    See /usr/share/doc/va-systemimager-x.x.x/ for all documentation.
    	  
  2. Install Linux on your "golden client", and customize as you desire.

    Select a machine which will be the "golden client". This machine's image is the image you will replicate to other machines.

    Configure this "golden client" as you normally would any machine. Install Linux on this node with the understanding that the software installed will eventually constitute the image for all other nodes installed with SystemImager. Don't worry too much about getting it exactly right the first time, since you can easily use SystemImager to make incremental changes to your image and distribute those changes without doing a complete re-install.

  3. Install the SystemImager client software on your "golden client" and run the prepareclient command.

    The SystemImager client software is available in tar ball format and may be available in other distribution specific packaged formats. The example below is for installing from a tar ball. The software is the same regardless of the packaging format.

  4. Run getimage on the image server to pull the image from the "golden client" to the image server.

    The basic syntax is: "getimage -golden-client [client_hostname] -image [image_name]"

    Where [client_hostname] is the hostname or IP address of the "golden client" and [image_name] is the name that you want to give to this image. There are many other options that can be seen with "getimage -help".

    Example 8. Running getimage

    [root@imageserver]# getimage -g my-golden-client -image web_server_image_v1
    
    This program will get the "web_server_image_v1" system image from "my-golden-client"
    making the assumption that all filesystems considered part
    of the system image are using ext2, ext3, or reiserfs.
    
    This program will not get /proc, NFS, or other filesystems
    not mentioned above.
    
    See "getimage -help" for command line options.
    
    Continue? ([y]/n): y
    
    Retrieving /etc/systemimager/mounted_filesystems from my-golden-client to check for mounted filesystems...
    ------------- my-golden-client mounted_filesystems RETRIEVAL PROGRESS -------------
    receiving file list ... done
    /var/spool/systemimager/images/web_server_image_v1/etc/systemimager/mounted_filesystems
    wrote 132 bytes  read 294 bytes  852.00 bytes/sec
    total size is 180  speedup is 0.42
    ------------- my-golden-client mounted_filesystems RETRIEVAL FINISHED -------------
    
    
    Retrieving image web_server_image_v1 from my-golden-client
    ------------- web_server_image_v1 IMAGE RETRIEVAL PROGRESS -------------
    receiving file list ... done
    ./
    bin/
    bin/mt -> /etc/alternatives/mt
    bin/pidof -> ../sbin/killall5
    bin/rbash -> bash
    bin/sh -> bash
    boot/
    boot/lost+found/
    cdrom/
    dev/
    dev/MAKEDEV -> /sbin/MAKEDEV
    dev/agpgart
    dev/atibm
    dev/audio
    dev/audio1
    dev/audio2
    dev/audio3
    dev/audioctl
    dev/aztcd0
    dev/bpcd
    
    [ ... etc, etc, etc ... ]
    
    var/log/
    var/log/exim/
    var/log/ksymoops/
    var/log/news/
    var/run/
    var/spool/
    var/spool/cron/
    var/spool/cron/atjobs/
    var/state/
    var/state/apt/
    var/state/apt/lists/
    var/state/logrotate/
    var/tmp/
    wrote 117490 bytes  read 134577117 bytes  413808.32 bytes/sec
    total size is 134072667  speedup is 1.00
    ------------- web_server_image_v1 IMAGE RETRIEVAL FINISHED -------------
    
    Press <Enter> to continue...
    
    IP Address Assignment
    ---------------------
    
    There are four ways to assign IP addresses to the client systems on an
    ongoing basis:
    
    1) static_dhcp -- A DHCP server will assign the
         same static address each time to clients 
         installed with this image.  Also see the
         "mkdhcpstatic" command.
    
    2) dynamic_dhcp -- A DHCP server will assign IP
         addresses dynamically to clients installed
         with this image.  They may be assigned a
         different address each time.
    
    3) static -- The IP address the client uses
         during autoinstall will be permanently
         assigned to that client.
    
    4) replicant -- Don't mess with the network
         settings in this image.  I'm using it as a
         backup and quick restore mechanism for a 
         single machine.
    
    Which method do you prefer? [1]: 3
    You have chosen method 3 for assigning IP addresses.
    
    Are you satisfied? ([y]/n): y
    Would you like to run the "addclients" utility now? (y/[n]): n
    	  
  5. Run addclients on the image server to tell it which clients will receive which image, and to populate the image server's /etc/hosts and /tftpboot/systemimager/hosts files.

    Example 9. Running addclients

    [root@imageserver]# addclients
    
    Welcome to the SystemImager "addclients" utility  
    ---------------------------------------------------
    
    This utility has 3 sections.  
    
    
    "Section 1" will ask you for your hostname information.
    
    
    "Section 2" will allow you to create softlinks from each
    client hostname to your "master" script in the
    "/tftpboot/systemimager/" directory.  
    
    Example: www297.sh -> web_server_image_v1.master
    
    
    "Section 3" will ask you for IP address information that will
    be combined with the hostname information provided in Section 1
    to create entries in "/etc/hosts" for each of these same clients.
    New entries will be appended to the end of "/etc/hosts".  If you 
    specify new hostnames for existing IP addresses, those entries 
    will be re-written in place to reflect the new host names.
    
    
    Continue? ([y]/n): 
    
    
    addclients -- Section 1 (hostname information)
    ----------------------------------------------
    
    The next series of questions will be used to create a range
    of hostnames.  You will be asked for your domain name, the 
    base host name, a beginning number, and an ending number.
    
    For example, if you answer:
      domain name     = systemimager.org
      base host name  = www
      starting number = 7
      ending number   = 11
    
    Then the result will be a series of hostnames that looks like this:
      www7.systemimager.org
      www8.systemimager.org
      www9.systemimager.org
      www10.systemimager.org
      www11.systemimager.org
    
    
    What is your domain name? []: mydomain.com
    What is the base host name that you want me to use? []: server
    What number should I begin with? []: 1
    What number should I end with? []: 99
    
    
    I will work with hostnames:  server1 through server99
                 in the domain:  mydomain.com
    
    Are you satisfied? (y/[n]): y
    
    
    addclients -- Section 2 (soft links to master script)
    -----------------------------------------------------
    
    Would you like me to create soft links to a "master" script so
    that hosts:
    
      server1 through server99
    
    can be autoinstalled with that image? ([y]/n): 
    
    Here is a list of available images:
    
    debian_ide_2.2 
    debian_hwraid_ext2 
    web_server_image_v1 
    
    Which image would you like these hosts to receive? [web_server_image_v1]: 
    
    Your soft links have been created.
    
    Press <Enter> to continue...
    
    
    addclients -- Section 3 (adding or modifying /etc/hosts entries)
    ----------------------------------------------------------------
    
    It is necessary to have an entry for each client in "/etc/hosts".
    
    I will ask you for your clients' IP addresses one subnet at a time.
    
    
    Would you like me to make these entries for you? ([y]/n): 
    
    
    addclients -- Section 3 (adding or modifying /etc/hosts entries -- continued...)
    --------------------------------------------------------------------------------
    subnet 1
    
    The first host in subnet 1 will be: server1
    What is the starting IP address for subnet 1? []: 192.168.1.1
    What is the ending IP address? []: 192.168.1.99
    I will work with IP addresses:  192.168.1.1 through 192.168.1.99
    
    Are you satisfied? (y/[n]): y
    
    These entries have been added to /etc/hosts.
    
    Press <Enter> to continue...
          
  6. Choose and configure the method for assigning IP addresses to your autoinstall clients.

    The most common way to assign IP addresses to autoinstall clients is DHCP. To easify the configuration of the DHCP configuration file (/etc/dhcpd.conf), SystemImager includes a utility called mkdhcpserver. This utility asks you for all the information it needs to create a DHCP configuration file that is appropriate for your installation of SystemImager. It is also possible to use DHCP to assign static IP addresses to your clients on an ongoing basis after installation. If you choose to do so, simply run the mkdhcpstatic command after all of your clients have had a chance to boot and be assigned an IP address. It will modify your /etc/dhcpd.conf file on the imageserver to include static entries for each of your hosts.

    Alternately, hostname, imageserver, and networking information can be put in a configuration file on a floppy diskette. Or if you are using a running system's hard drive as the boot media, you can run "updateclient -autoinstall -server <imageserver> -config eth0" which will create a local.cfg file at the root of the client's hard drive containing the existing live network settings.

    When the autoinstall client boots, it will look for this file and use the provided values instead of getting them from DHCP and the /tftpboot/systemimager/hosts file on the image server. A local.cfg file on a floppy will work with any of the autoinstall media. The configuration file can even be put on the autoinstall floppy itself! If you use a local.cfg file on a hard drive and on a floppy, the settings on the floppy will override the settings on the hard drive.

    Example 11. Running mkdhcpserver

    [root@imageserver]# mkdhcpserver
    
    Welcome to the SystemImager "mkdhcpserver" command.  This command
    will prepare this computer to be a DHCP server by creating the 
    following file:
    
     /etc/dhcpd.conf
    
    If there is an existing file, it will be backed up as:
    
     /etc/dhcpd.conf.beforesystemimager
    
    Continue? (y/[n]): y
    
    
    Type your response or hit <Enter> to accept [defaults].  If you don't
    have a response, such as no first or second DNS server, just hit 
    <Enter> and none will be used.
    
    
    What is your domain name? [localdomain.domain]: mydomain.com
    What is your network number? [192.168.1.0]: 
    What is your netmask? [255.255.255.0]: 
    What is the starting IP address for your dhcp range? [192.168.1.1]: 
    What is the ending IP address for your dhcp range? [192.168.1.100]: 192.168.1.99
    What is the IP address of your first DNS server? []: 192.168.1.200
    What is the IP address of your second DNS server? []: 192.168.1.201
    What is the IP address of your third DNS server? []: 
    What is the IP address of your default gateway? [192.168.1.254]: 
    What is the IP address of imageserver? [192.168.1.254]: 192.168.1.203
    What is the air speed velocity of the common swallow? []: 
    
    
    Ahh, but seriously folks...
    Here are the values you have chosen:
    
    ################################################################
    DNS Domain Name:                          mydomain.com
    network number:                           192.168.1.0
    netmask:                                  255.255.255.0
    starting IP address for your dhcp range:  192.168.1.1
    ending IP address for your dhcp range:    192.168.1.99
    first DNS server:                         192.168.1.200
    second DNS server:                        192.168.1.201
    third DNS server:                         
    default gateway:                          192.168.1.254
    imageserver:                              192.168.1.203
    ################################################################
    
    Are you satisfied? (y/[n]): y
    
    
    The dhcp server configuration file (/etc/dhcpd.conf) file has been 
    created for you.  Please verify it for accuracy.
    
    If this file does not look satisfactory, you can run this command again
    to re-create it: "mkdhcpserver"
    
    WARNING!:  If you have multiple physical network interfaces, be sure to 
    edit the init script that starts dhcpd to specify the interface that 
    is connected to your DHCP clients.  Here's an example:
    
     Change "/usr/sbin/dhcpd" to "/usr/sbin/dhcpd eth1".
    
    Also, be sure to start or restart your dhcpd daemon.  This can usually
    be done with a command like "/etc/init.d/dhcpd restart" or similar.
    	  
  7. Autoinstall the "golden" image on other machines.

    There are four methods for autoinstalling the clients: