Note: [System Imager] is a better option

How to install / clone / "ghost" a installation of linux across many, thousands of new machines? How about using PXE/ethrboot/[pxe-boot] to do a network install, [partimage] and [system rescue cd] to handle the creation of the image and its distribution to the other machines?



This is only a brainstorm, not a HOWTO


You can do a nice "fully automatic install from scratch" if you are willing to spend a little time doing some tweaks in [pxe-boot] rescue image.

You will need a spare and fast machine to act as the install-broadcaster (server). Here's the idea:

  1. Setup a single machine (model-box) with all the software and configuration details you want installed in your boxes.
    1. It would be adviseable to install inside the root's home a ssh-key that will latter be used to to some finishing touches on all the machines....
    2. This machine should have a HD smaller or at least of the same size of the other machine's HD
  2. In the server machine, load partimaged
  3. Prepare a copy of (see partimage docs for the real commands, as these may be wrong)
    1. The MBR of your disk: {dd if=/dev/hda of=clients.mbr bs=512 count=1024}
      The backup is this large to avoid problems with Grub and other boot loaders
    2. The extended partitions of your dists: {sfdist -d /dev/hda > clients.sf}
  4. Copy those files to your server
  5. Use partimage to copy all the partitions of the model-box to the server using partimage networking features

Ok. Now the hard part:

  1. modify pxe-boot rescue initrd/image so that
    1. it will contain the minimun needed for this process (ie: mkswap and partimage client..)
      Smaler initrd/image means less time to load...
    2. the mbr and extended partition backups
  2. it will install the mbr and the extended partition in the disk
  3. automatically format the swap partition
  4. automatically use partimage to install the partitions's images from the partimaged server

It ought to work :-) Notice that the hardest part is altering pxe-boot rescue image/initrd to do for you all the "restorin patition table and partitions" work. NOtice that pxe-boot image as of today does not handle SATA discs properly: you have to, via BIOS, make your SATA discs behave as normal ATA discs. After the install you can revert this configuration - that's what i did here in a manual install...