The images are stored in /var/lib/systemimager/images
NOTE: If you are short on disk space in this location, move the directory in another location:
mv /var/lib/systemimager/images /home/systemimager_images
And create a soft link to the new directory.
ln -s /home/systemimager_images /var/lib/systemimager/images
Run the mkautoinstalldiskette command on the image server.
Run the mkautoinstallcd command on the image server.
Run the mkautoinstallpunchcard command on the image server - deprecated :)
Making SystemImager work with a serial console
Michael S. Fischer, <michael@auctionwatch.com>
Last modified: 01/04/26 19:20:27
The current version of SystemImager as of this writing (1.4.1)
does not support PXE booting of clients with serial console support.
This document describes how to rebuild the kernel and initrd such
that serial console support is possible.
Step 1: Download the sources
Fetch the source tarball from
http://prdownloads.sourceforge.net/systemimager/va-systemimager-source-1.4.1.tar.bz2
Save it and unpack it to /tmp on your boot server.
# bzcat va-systemimager-source-1.4.1.tar.bz2 | tar -C /tmp -xf -
Step 2: Prepare the kernel
# cd /tmp/va-systemimager-source-1.4.1
# bzcat other_source_and_patches_used_in_this_release.tar.bz2 | tar xf -
# cd other_source_and_patches_used_in_this_release
# cd linux-2.2.18+reiserfs+raid+aic7xxx+VM
Now, edit the .config file in this directory. Search for a line that
reads
# CONFIG_SERIAL is not set
and change it to read
CONFIG_SERIAL=y
CONFIG_SERIAL_CONSOLE=y
Then, build the kernel:
# make clean && make bzImage
Step 3: Install the kernel
Next, you'll need to place the kernel in /tftpboot and
/tftpboot/X86PC/UNDI/linux-install:
# cp arch/i386/boot/bzImage /tftpboot/kernel
# cp arch/i386/boot/bzImage /tftpboot/X86PC/UNDI/linux-install/kernel
Step 4: Fix the initrd
The initrd, or initial RAM disk containing the root filesystem, needs
to be unpacked, mounted, and its contents edited. Here's how:
# cp /tftpboot/initrd.gz /tmp
# cd /tmp && gunzip initrd.gz
# mkdir /mnt2
# mount /tmp/initrd /mnt2 -o loop
# cd /mnt2/dev
# rm -f console
# mknod -m 622 console c 5 1
# mknod -m 600 ttyS0 c 4 64
Once you've finished this, you should unmount the initrd, recompress
it, and return it to /tftpboot:
# cd /tmp
# umount /mnt2
# gzip -9 initrd
# cp initrd.gz /tftpboot
# cp initrd.gz /tftpboot/X86PC/UNDI/linux-install
Step 5: Edit syslinux.cfg
The final step is to configure pxelinux to pass the "console="
arguments to the kernel. Here is a suitable syslinux.cfg file:
DEFAULT kernel
APPEND console=tty0 console=ttyS0,9600n8 vga=extended load_ramdisk=1
prompt_ramdisk=0 initrd=initrd.gz root=/dev/ram rw
DISPLAY message.txt
PROMPT 1
TIMEOUT 50
Edit the contents of /tftpboot/pxelinux.cfg/syslinux.cfg to reflect
the changes above. Then, copy this file to
/tftpboot/X86PC/UNDI/linux-install/pxelinux.cfg/syslinux.cfg.
No. If you are using DHCP, you can use "option-100" and set it's value to the IP address of the image server. If you use "mkdhcpstatic" to configure your dhcpd.conf file, it will ask you for the IP address of your image server and add the appropriate entry for you.
Yes, we now know that option-100 has an official use. We are working on either getting an official number assigned or using a number from the private number range.
All you have to do is start with the linux kernel source and the .config file that you can find in the CVS repository on SourceForge:
The 1.5.0 autoinstall media is based on Linux 2.2.18 and has various patches applied. You can find this source on the SystemImager web site.
Put the .config file in your /usr/src/linux directory as .config and run make menuconfig or your favourite kernel config utility. Choose the driver for the card you need.
However! This will probably make the kernel too large for the floppy. So you will want to de-select drivers for many of the cards that will not be used. I would recommend de-selecting all of the Ethernet cards except for the ones you need.
Do the standard:
make dep make clean make bzImage |
Please refer to the Kernel-HOWTO for more information on recompiling a kernel.
Then copy the resultant kernel over the kernel ( /usr/share/systemimager/i386-boot/kernel) installed in /usr/share/systemimager/i386-boot by SystemImager.
You should now be able to do a mkautoinstalldiskette, mkautoinstallcd, or boot off the network.
As of 2.0.0 there is not support for this. Look for this feature soon.
Yes. Install the systemimager-client package. If this package is already installed, all you have to do is run the prepareclient command prior to running getimage from the image server.
You will also want to add any software, configure any files, and do any tweaking to make the system just how you like it!
Yes. The autoinstall media is generic, and can be on any machine that you want to autoinstall.
Starting with version 1.5, you can use the pushupdate command. It essentially logs into each client and executes the updateclient command.
If you ran mkdhcpserver to configure your dhcp information, and if you answered all the questions you were asked when you did your getimage, including the hostnames and IP addresses, then all you have to do is boot your client with any one of the three forms of autoinstall media.
They are:
autoinstalldiskette - takes longer to boot and floppies are often quite volatile
autoinstallcd - takes slightly less time to boot and is more durable, but you have to have a CD burner and clients that can read CD-R's)
network boot - dramatically faster boot time, but requires PXE capable network cards in the clients, and additional server-side configuration.
Search this document for mkautoinstallcd and mkautoinstalldiskette for more information.
In order to better understand the answer, let me lead up to it with the steps the autoinstall client goes through:
Boots off the autoinstallmedia
Gets an IP address from DHCP
Determines the IP address of the image server via DHCP
Requests a hosts file from the image server
Finds its hostname in the hosts file based on its IP address
Requests a script from the image server based on its hostname (for example: www237.sh)
Executes this script
The script in question is typically a soft link pointing at the $image.master script that was dynamically created when you ran getimage. This script explicitly states which image to pull from the image server. Open it up and take a look!
These scripts and the $image.master script can be found in /var/lib/systemimager/scripts.
If you installed SystemImager as of 1.0 or later, you can simply install the new version on top. Using a packaged version (.rpm, .deb) is recommended as this will prevent cruft build-up on your system.
If you last installed a pre-1.0 version then you can't simply install a new version on top of an old one. Depending on the version changes, this may work for you, but it is not guaranteed. If you want to try this method, please check with the CHANGE.LOG document to find out what has changed.
Currently the recommended method is to move your images directory out of the systemimager directory hierarchy, back up your /etc/rsyncd.conf file and any other configuration files you may have changed. Then install SystemImager as if you were installing it for the first time, after which you can move your images directory and /etc/rsyncd.conf file back.
You can! getimage will ask you if you want to assign static IPs.
SystemImager comes with the mkdhcpstatic utility. As you boot your client systems, the DHCP server will assign addresses sequentially. By initially booting your systems in the order you want them to receive their IP addresses, you can ensure that they get the IP address you want them to have.
After booting your systems, run mkdhcpstatic. It will re-write your /etc/dhcpd.conf file associating each clients MAC address with its host name. You should then restart your dhcpd daemon. Subsequently, each time your clients request an IP address via DHCP, the will always be assigned their appropriate static IP address.
Note: The client's hostname is used, instead of an explicit IP address, so that you simply have to change the hosts file on the DHCP server (or DNS, NIS, etc.) to change the IP address that that client recieves.
Note: Static IP addresses, assigned by DHCP, are the author's preferred method for administering IP on a large number of systems, if static IP addresses are actually required.
Here are some unofficial numbers that I came up with. Your experience may be quite different based on the speed of your network, the performance of your image server and clients, and the size of the image.
If you can send me statistics from your experience, I'll add them below.
Table 3. SystemImager Performance Statistics
Size of Image | Clients | Network Type | Switched | Elapsed Time |
---|---|---|---|---|
2.5 GB | 21 | 100BaseTx | yes | 1.5 Hours |
1.5 GB | 20 | 100BaseTx | yes | .5 Hours |
There are two ways to update an image on the image server:
Make the changes to one of your clients and run the getimage again.
- You can specify the same image name, in which case the current image will be updated (only changes are pulled across).
- Or you can specify a new image name and have a form of revision control. (This is by far the recommended method)
Note: Every time getimage is run, it will recreate the $image.master script. If you have customized your $image.master script, be sure to save it before running getimage again.
Modify the files directly. You can simply cd into the appropriate image directory and edit the files there, or (recommended) you can cd into the image directory and run 'chroot . sh'. This will change your working root directory to the root of the image you want to manipulate. You can then run rpm command and other commands on the image and not have to worry about getting confused and damaging the image server. When you are done, simply type exit and you will be returned to your normal shell.
Once you have updated an image on the image server, you can then update your clients to reflect this new or modified image. (It is not necessary to do a complete re-autoinstall.) You will find the command, updateclient, on your clients. This command takes as its parameters the name of the image server and the name of the image that you want to update the client to. Run updateclient -help to get more information about this command.
If you use the revision control method recommended in "How do I update an image on the image server?" FAQ, then you will be able to bring your production environment back to a known state (by doing an updateclient to the last working image) after having done an updateclient to a not quite so thoroughly tested image.
The file /etc/systemimager.exclude on your clients is used to exclude files and directories from being updated by the updateclient command. Please take a look at this file and modify it to suit your local environment.
It is used by the updateclient command. See the section, "How do I update a client to match an image?", for more information.
Another way of stating the question or a slight variation may be as follows. We are in the process of building a new "front-end" server for our Linux cluster. We'd like to try using SystemImager as our node cloning software if possible.
I've read through the SystemImager FAQ and found the following:
All of the clients for a particular image should have an identical
hardware configuration. They should at least have the same hard
drive(s) and the same ethernet card(s).
This is a problem since our front-end which the image will be captured from has a SCSI hard drive and a Gigabit ethernet card. Our 64 compute nodes on the other hand have IDE disk drives and fast ethernet cards.
Are we out of luck?
Nope. Just a little customization ahead of you...
Once you have done your getimage you will need to edit the conf.modules in the image on the image server to load the appropriate module for your ethernet card.
vi /var/spool/systemimager/images/$imagename/etc/conf.modules
I believe your entry will look like this:
alias eth0 tulip |
You will need to edit the fstab file in the image:
vi /var/spool/systemimager/images/$imagename/etc/fstab"
Be sure it says /dev/hdaN instead of /dev/sdaN.
You will need to specify the partition information in the $imagename.master script that was created when you did your getimage.
vi /var/spool/systemimager/installstuff/$imagename.master
You will find a section that looks like this:
# Here's an example of how to customize a disk: # start at the beginning 0, give 20M /dev/sda1 for /boot, assume partition type 83 # start where left off, 512M /dev/sda2 for swap, partition type 82 # start where left off, give the rest of the disk to /dev/sda3 for /, assume partition type 83 #sfdisk -uM /dev/sda <<EOF #0,20 #,512,82 #, #; #EOF Uncomment the lines from sfdisk down to EOF (EOF must be flush left) and change the values to specify your partitions according to the example. If you don't want to have to think so much, then you can simply do the following command on a client that is already partitioned correctly: "sfdisk -d /dev/hda" (Assuming you only have one disk and that disk is /dev/hda.) |
Then copy the output into the $install.master script and delete the existing entries for the SCSI disk.
Search the $imagename.master script for all entries of your old drive /dev/sda and be sure that they are changed to the appropriate drive /dev/hda. This will be for the mke2fs and mkswap sections.
Proceed as normal.
After you run prepareclient, look in the /etc/partitionschemes directory on that client. You will find a file that has the partition information for each of that clients disks. Simply delete all except for the primary disk.
Now you can do your getimage and everything else like normal.
The only other thing to verify is that the fstab file in the image has no entries for the other disks.
vi /var/spool/systemimager/images/$imagename/etc/fstab
This is accomplished with the updateclient command on the client.
Choose one of the following methods to update the image on the server:
apply the patch to the image directly
apply the patch to a client and then do another getimage specifying the same imagename (won't take long and will update the image).
apply the patch to a client and then do another getimage specifying a _different_ imagename. This is preferred as it allows for revision control.
Run updateclient on the clients that you want to update. Execute updateclient -help to get the syntax.
Yes. SystemImager logs can be found on the image server in the directory /var/log/systemimager
SystemImager is based on rsync(1) and also makes use of:
systemconfigurator(1)
busybox(1)
syslinux(2)
pxelinux(2)