RSYNCIMAGER README Written by Joshua Hutchins, March 2010 (jdhutchin@ugcs.caltech.edu) Released under the GPLv2 license. OVERVIEW rsyncimager is a set of scripts to automate system imaging and updates. On boot, it runs scripts in the initramfs to sync the local filesystem to the one on the server. REQUIREMENTS rsyncimager was written for UGCS (www.ugcs.caltech.edu), but should be easily adoptable to other setups. You will require: - An rsync server with enough disk space for the entire filesystem of the client. - A pxe boot setup (although I suppose you could boot using grub if you wanted) - A DHCP server - Some way of configuring machine-specific options after rsyncimager has booted. In UGCS, we do this with a cfengine and an init script that runs in /etc/rcS.d - A "golden client" that is booted into the client image and is used to make changes. Once you get it set up, any machine could be a golden client, but you may want to restrict write access to the rsync server for security reasons. OPERATION Before booting the first client machine, a "golden client" should be set up with the inital image. The rsyncimager package should be installed, and the appropriate configuration options set (see CONFIGURATION). After the machine is set up, the md5 lists can be generated by /usr/sbin/update-md5lists. This may take a while depending on your setup. After the md5 lists are made, you should update the image server. A script, update-imageserver, takes care of this, but it may need to be modified depending on your installation. The kernel initramfs image should be rebuilt after the configuration options have changed so the new file will be included in the initramfs. It does not have to be rebulit every time the md5 lists change, because they are copied over via rsync on system boot. This image should be copied to your pxe boot server. You can now boot a client machine into this image. It will automatically partition itself and start copying files. On subsequent boots, it will check the md5sum of every file and rsync over any changed files. CONFIGURATION There are some options in /etc/rsyncimager/rsync_server that need to be set prior to booting. You may also want to edit /usr/share/initramfs/scripts/local-top/make_partitions to make the partitions you want. This may be moved into a real configuration file in the future.