Preparing a new image for ALLiE

  1. Prepare a kickstart file for the new distro to be loaded (eg Fedora 18). The bootloader directive should specify --location=partition. The single partition / directive should specify an unused partition.
  2. Boot from a USB stick or CDROM containing the installation ISO for the distro. For Fedora, press Tab before the kernel is loaded, and on the kernel boot line, add the location of the kickstart file (eg ks=http://my.server/my/dir/kickstart.ks), and any keywords to influence the behaviour of %pre and %post scripts in the kickstart: we use a "vanilla" keyword to indicate that the image is to be used as a model distribution.
  3. Allow the installation to the single partition to proceed to completion; then the PC should reboot into its normal previous base system.
  4. Login on the PC on its original base system, and run the /root/util/rsync-newdistro-daemon script, specifying the device file for the newly installed partition as an argument. This sets up for a temporary rsync daemon catering for one module: the newly installed partition.
  5. On the server which is to run rsyncd and hold (or already holds) images, run the /root/bin/rsync-newdistro-client script, specifying the name of the PC and the internal name of the distro, eg f18. This uses the rsync protocol to fetch the created image for the distribution to add to the set of images the server holds.
  6. Use the blandify script to tweak a few files in the image to remove machine-specific settings. For example, if the /etc/fstab file contains UUIDs to identify partitions, then the script changes that to LABELs, as a generic method of identifying partitions which can be applied to any PC. The image is then ready to be fetched to other PCs.
  7. Create an overlay area for the new distro. The overlay area simply consists of files which are to add to or replace files on the prepared image, as a sparse tree. We have an overlay area separate to the prepared image for a number of reasons. It's usually very small compared with the whole distro image and so is small enough to rsync at very regular intervals without impacting on performance. For example, to provide a modified /etc/updatedb.conf for the system, create an etc directory in the base directory of the overlay area, and add the modified updatedb.conf file. An important set of files to include in the overlay are root/util/rsync-image and root/conf/run-conf and root/conf/00overlay.
  8. Modify the /etc/rsyncd.conf file of the rsyncd server to include modules for the new distro whole prepared area and for the the new overlay area, based on previous entries for older distros.
  9. In the overlay area of the older distro which already runs on the cluster PCs, create a /root/conf/NNprepXXX script which on each client PC will format a spare partition, fetch the new distro prepared image via rsync, and overlay it with the new overlay image. So we are using an active image on each PC to fetch the newly prepared image.
  10. By virtue of the cron script /etc/cron.hourly/*imageconf.cron, the /root/conf/00overlay file of each image including the new image will be run regularly and this will allow the client PCs to obtain regular maintenance from the central rsync server's overlay images.