Carlos Rodrigues
carlos.rodrigues@dq.fct.unl.pt
20 August 2003
Imagine yourself having to install Windows and some assorted other software (Office suites, etc.) on dozens of machines. It would be helpful if you could just install everything on one machine, configure it to your liking and then clone it to the other machines. A direct cloning is almost never possible, there's always something that needs to be different between machines (eg. it's name), but you can make an image of the original installation, dump it on a ``clean'' machine and be presented with a mini-setup wizard which asks for those machine-specific things like the hostname, workgroup/domain, administrator password, etc.
Cloning Windows is straightforward only when the hardware where the original image is configured is identical to the target hardware. As this is not always the case, additional care must be taken to ensure that the image is at least compatible with the target machines.
There are a few cases where an image may be incompatible with the target machine's hardware and so another one has to be produced. These cases are mainly related to differences in mass storage controllers and the Windows HAL1 that supports the target machine. Different soundcards, graphics cards and stuff like that are usually irrelevant and present no problems, the mini-setup wizard configures them automatically if Windows already includes the necessary drivers, if it doesn't you are asked for drivers when you log in as administrator for the first time just like if you just installed a new card on your computer.
Preventing problems with mass storage controllers is not so difficult, it is possible to include additional drivers in the image and then instruct sysprep to search for the appropriate one during the mini-setup. We will come back to this later in this document.
The HAL is a different matter. For starters what is this HAL thing? The Hardware Abstraction Layer is a low level component of Windows systems derived from Windows NT which drives stuff like ACPI2 and APM3. There are a few of them (you can check, and change, which one is in use in the ``Device Manager'', under the ``Computer'' branch):
You must be wondering ``How many images do I need then?''. From my experience you only need two different images, one using a Non-ACPI PIC HAL and another one using a ACPI PIC HAL. In practice the first one is enough but then you wouldn't be able to take advantage of features like automatic poweroff and soft-off that are only available in ACPI capable machines.
The information of whether a machine is PIC or APIC is normally available in the machine's BIOS setup program. Finding out if a machine is ACPI or not is more difficult. Anyway, as a rule of thumb, any machine built after 1999 is probably ACPI capable (although some rare ones are not standards compliant and will not work with an image containing an ACPI HAL).
For the image preparation we use a small command-line utility from Microsoft called Sysprep. This utility relies on the information declared in a text file called sysprep.inf to automate some of mini-setup's steps (eg. skip the EULA and/or the product serial number screens). You can obtain sysprep by downloading it from Microsoft's website6.
To skip the EULA screen during mini-setup, just add OemSkipEula=Yes to the [Unattended] section of sysprep.inf.
To prevent mini-setup from asking for the Product Serial Number just add productid=XXXX to the [UserData] section of sysprep.inf, where XXXX is the serial number for your copy of Windows. Do not forget to add fullname=Your Name and Orgname=Your Organization to that same section.
There are another two options you may want to add to the [GuiUnattended] section, OemSkipWelcome=1 to skip the welcome screen and OemSkipRegional=1 to skip regional options configuration7.
A quick way to configure networking is to add InstallDefaultComponents=Yes to the [Networking] section of sysprep.inf. This will configure the machine to use DHCP to obtain an IP address, DNS servers, default gateway and WINS server (if there is one). You will just be prompted for the machine's name and workgroup/domain.
Previously it was stated that there may be some problems related to mass storage controllers, in fact there is a way to tell mini-setup to install the correct drivers. This requires you to add to the [SysprepMassStorage] section of sysprep.inf the information about the drivers included in the image. Please check the example sysprep.inf at the end of this document for a way to include information about all the drivers that come bundled with Windows 2000.
The partition where the image will be installed in the target machine may have a different size than the partition from where the image was created. If the target is smaller you can't install the image but if the target is larger, you can. In this second case, the target filesystem will be the size defined in the image and not the size of the target partition. You can make the mini-setup extend the target filesystem to the size of the target partition by adding ExtendOemPartition=1 to the [Unattended] section of sysprep.inf.
To reduce the image size you may want to add KeepPageFile=0 to the [Unattended] section of sysprep.inf to prevent the swap file to end up included in the image.
There are many more options that can be added to sysprep.inf. A complete list is available from http://www.microsoft.com/technet/treeview/default.asp?url=/TechNet/prodtechnol/windows2000pro/deploy/unattend/sp1ch03.asp.
After having configured everything, all that is needed is to copy the directory containing the sysprep executable to the root directory (c:
) and call it sysprep. Then open a command shell, go to that directory (c:
sysprep) and simply run sysprep8. After the system shuts down9, it is ready to be cloned.
As stated before, the destination partition on the target machines cannot be smaller than the partition from where the image was created (although it can be bigger). This can be a problem if you are creating the image on, say, a 40Gb partition and want to install it on 3Gb sized partitions on the destination machines. The solution for this is a simple one: grab some partition resizing utility (such as PowerQuest's Partition Magic), put it on a floppy (these sort of tools normally have an option to create a bootable floppy) and when everything is prepared to create the actual image (after running sysprep), boot the machine from the floppy and reduce the size of the partition to a size equal to the occuppied space on that partition plus some more (eg. 150Mb).
First of all we need two bootable floppies with Ghost, one of them with CD-R support which we will use to create the image itself (and record it on CD) and another one which will be used to dump the image to the target machines (and will also be used to make the CD bootable). To create them use the ``Ghost Boot Wizard'' and create a ``Boot Disk with CD-R/RW support'' and a ``CD-ROM Boot Disk''.
Boot the system with the ``Boot Disk with CD-R/RW support'', choose the ``Local/Partition/To Image'' option from the menu, choose the correct partition and say ``yes'' when Ghost asks if you want to make the CD bootable (use the ``CD-ROM Boot Disk'' for this). After these steps Ghost will prompt you to choose one of two compression methods and begin recording the CD. Ghost will normally say that two CDs will be necessary but, in my experience, I never needed more than one 10.
The image created by following the steps stated in the previous section is a ``partition image'' and as so, the target system's hard disk must be partitioned before dumping the image onto it. You can use PowerQuest's Partition Magic or any other such tool like the barebones fdisk but make sure that you mark the partition into which the image will be dumped as ``bootable'' (or ``active'').
Boot the target machine with the ``CD-ROM Boot Disk'' or directly from the CD containing the image. Choose the ``Local/Partition/From Image'' option from the menu and then choose the destination partition for the image.
Symantec Ghost (in it's Corporate Edition) allows for network based installations. You can boot the system with a floppy and dump the image to a remote server instead of a CD) but you also can perform simultaneous network installations by booting the target machines with a floppy and connecting to a server (where the image resides) running GhostCast Server. To learn how to do this please check the Ghost documentation as it is out of the scope of this document (at least for now). Anyway, in the next paragraphs I will mention some things to watch out for.
This is not as easy as it seems because the bootable floppies have to include drivers for the target machines' NICs11 and you may reach the point where you need a different floppy for every different type of card, Ghost includes some drivers but some others are up to you to download and feed to it12. This becomes increasingly difficult as some manufacturers do not provide drivers for DOS anymore (and there are some drivers which are not trivial to feed into Ghost).
There is also something to watch out for when performing network installations using multicast: Ghost apparently does not send IGMP packets and this prevents it from working on networks where the ethernet switches have ``IP Multicast Snooping'' (or ``IGMP Snooping'') capabilities. As a workaround you can disable that capability directly on the switches themselves (or ask the person in charge of the network to do it), alternatively you can use broadcast mode or unicast instead of multicast.
[Unattended] OemSkipEula=Yes KeepPageFile=0 ExtendOemPartition=1 [GuiUnattended] OemSkipWelcome=1 OemSkipRegional=1 [UserData] fullname="A Name" Orgname="An Organization" productid=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX [Networking] InstallDefaultComponents=Yes [SysprepMassStorage] PCMCIA\*PNP0600=%systemroot%\inf\mshdc.inf PCMCIA\KME-KXLC005-A99E=%systemroot%\inf\mshdc.inf PCMCIA\_-NinjaATA--3768=%systemroot%\inf\mshdc.inf PCMCIA\FUJITSU-IDE-PC_CARD-DDF2=%systemroot%\inf\mshdc.inf *AZT0502=%systemroot%\inf\mshdc.inf PCI\CC_0101=%systemroot%\inf\mshdc.inf PCI\VEN_10B9&DEV_5215=%systemroot%\inf\mshdc.inf PCI\VEN_10B9&DEV_5219=%systemroot%\inf\mshdc.inf PCI\VEN_10B9&DEV_5229=%systemroot%\inf\mshdc.inf PCI\VEN_1097&DEV_0038=%systemroot%\inf\mshdc.inf PCI\VEN_1095&DEV_0640=%systemroot%\inf\mshdc.inf PCI\VEN_1095&DEV_0646=%systemroot%\inf\mshdc.inf PCI\VEN_0E11&DEV_AE33=%systemroot%\inf\mshdc.inf PCI\VEN_8086&DEV_1222=%systemroot%\inf\mshdc.inf PCI\VEN_8086&DEV_1230=%systemroot%\inf\mshdc.inf PCI\VEN_8086&DEV_7010=%systemroot%\inf\mshdc.inf PCI\VEN_8086&DEV_7111=%systemroot%\inf\mshdc.inf PCI\VEN_8086&DEV_2411=%systemroot%\inf\mshdc.inf PCI\VEN_8086&DEV_2421=%systemroot%\inf\mshdc.inf PCI\VEN_8086&DEV_7199=%systemroot%\inf\mshdc.inf PCI\VEN_1042&DEV_1000=%systemroot%\inf\mshdc.inf PCI\VEN_1039&DEV_0601=%systemroot%\inf\mshdc.inf PCI\VEN_1039&DEV_5513=%systemroot%\inf\mshdc.inf PCI\VEN_10AD&DEV_0001=%systemroot%\inf\mshdc.inf PCI\VEN_10AD&DEV_0150=%systemroot%\inf\mshdc.inf PCI\VEN_105A&DEV_4D33=%systemroot%\inf\mshdc.inf PCI\VEN_1106&DEV_0571=%systemroot%\inf\mshdc.inf
This document was generated using the LaTeX2HTML translator Version 2002 (1.62)
Copyright © 1993, 1994, 1995, 1996,
Nikos Drakos,
Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999,
Ross Moore,
Mathematics Department, Macquarie University, Sydney.
The command line arguments were:
latex2html -split 0 -no_navigation -show_section_numbers -white -no_footnode -local_icons -html_version 4.0 cloning.tex
The translation was initiated by Carlos Rodrigues on 2003-08-20