What is Sysprep ?
Sysprep is a utility from Microsoft that allows computer Manufacturers and Corporate IT staff to 'roll out' a 'pre-configured' Windows to their customers / employees computers.
You start by installing Windows onto a 'reference' or master computer, adding any custom drivers etc. Then you install any 'standard' software needed (and remove any XP system components that the employees "don't need" or are 'not allowed').
You then use Sysprep to 'roll back' the master system to an 'un-configured' state, after which you can 'image' the system and simply 'clone' it onto as many 'destination' computers as you wish.
If you created an 'answer file', then XP will auto-configure itself when the destination computer is first booted
What are the limitations of Sysprep ?
A1. The size of the hard disk on the destination computer must be at least the same size as the hard disk on the reference computer. Extra space is unusable (the 'ExtendOemPartition' key in the Sysprep.inf file only works on NTFS partitions)
To install onto a DOM / CF card / USB device smaller than the original C: partition on the 'master', then, before using Sysprep, you MUST reduce the size of the master C: partition for example, by using GParted
A2. Sysprep 'rolls back' your system to the 'Welcome to Windows' point in a normal install = i.e. AFTER the Cab unpacking and 'Hardware detect' stage etc. has 'built' the system but BEFORE you entered the Licence Key and set the Time Zone & entered the Admin password etc.
This means it works with an 'unattended install answer file' i.e. exactly the same as the .sif answer file that you created using nLite ....
A3. When the mini-Setup runs on the new computer on first boot, it copies the Administrator user profile over the Default User profile
What sort of Hardware do I need ?
Your reference or 'master' must have essentially the same Hardware as your target 'slave' nodes. If you are aiming at IDE (DOM or CF card) then your 'master' motherboard must have at least one IDE interface. Having 2 makes things easy, since you can use a Clonezilla boot CD to clone directly from C: IDE hard drive to a 'master' DOM / CF card on the second IDE 'chain'
If you have only 1 IDE interface, chances are your other interface will be SATA and the motherboard will be modern enough to support booting from USB. In that case, create a bootable USB** Clonezilla so you can plug your DOM / CF card into the IDE 'slave' socket (make sure to set the CF / DOM to slave mode of course :-) ) and do a 'direct clone' from C: to the DOM / CF card (see step 5 below)
**Download the .zip version of Clonezilla & unpack in to the USB stick. Open a CMD window ('DOS box'), navigate to your USB drive (eg L:), CD to the L:\utils\win32\ directory and run 'makeboot.bat'. Once booted, Clonezilla will allow you to save an 'image' to the USB stick it booted from (which means you can move the USB stick to a 'node' with an IDE CF card and do a direct 'restore').
How do I prepare a 'master' system for Sysprep 'cloning' ?
1) You should start with a clean nLite XPsp2* system install onto an IDE drive formatted to capacity of less than 1023Mb** using FAT (not NTFS)***. After installing, delete the dllcache, turn off Virtual Memory, reboot and check that 'pagefile.sys' is gone (and your free disk space has increased).
*Since your nodes are never going to be used for 'normal' Internet browsing (let alone email etc) you don't need all the (bloated) security updates. However, to avoid any possibility of a node providing a path for a virus to reach the rest of your home system, all your nodes should be on a totally isolated subnet wired to a separate network card in your (Firewall protected) 'proxy' server which in turn connects to the Internet via your Router.
**On a C: drive, NEVER try to set a partition of '1024' (or '512' etc) .. ALWAYS set 1023 (or 511) etc. Disk partitioning software will always make allowance for the Boot blocks, so when you ask for a '1024 Mb' partition what you will ACTUALLY get is 1024.3 Mb (and a cluster size of 32kb instead of 16kb)
***Your final 'target' (DOM / CF card / USB / RAMdrive) will be FAT formatted so if you want to check it's going to fit, there is no point in using NTFS on the 'master'. You can't compress the whole drive when using FAT (but you can install SETI to a network share or a compressed folder)
****To 'map' a network share you must be logged onto your computer with an actual password (leaving it 'blank' does not work)
2) Next add any REQUIRED drivers, setup a network share (or, if you have more than 10 nodes, a local compressed folder) & install the SETI app. onto it. Don't forget to add a shortcut to SETI in the Startup folder. Reboot to confirm the PC logs-on, maps the shares and SETI runs OK.
SETI identifies the computer that fetches the work-unit. So after making sure you can run SETI on the 'master', save** (clone) the system and then remove SETI before proceeding to cloning for the Slaves. SETI must be installed on each 'slave' node individually, AFTER it has gained it's own unique 'ID'
**The 'clone' can be reloaded after you have finished configuring for the Slave nodes, so your can run the 'master' as an other SETI node without loosing the wu's used during testing.
2) If your goal is to fit on a "256Mb" (= 244 real Mb's) DOM / CF card or USB stick, it's going to be a tight fit since, in addition to SETI, you will also need to add MS EWF (see my CF and USB booting page 'Next>>')
A 256Mb 'target' is achievable, although it takes a bit of effort. 128Mb is not (at least, not without a whole lot of effort)
If you are aiming at a 256Mb partition, you further reduce the 'installed' XP by manually removing .tmp, .log, cache etc. files and reduce the C: partition to 255Mb (using GParted) = see my previous Beyond nLite page
Do I actually need to use sysprep ?
You only need to use sysprep if your 'target' C: partition is 256Mb or less. nLite is quite capable of preparing a cut-down XP System CD with a '256Mb' system that is small enough to install from that CD onto a 512Mb FAT partition.
Remember - during install the system files are copied onto C: and then 'installed' from the copy on C: to C:. This means a 256Mb system CD can never install onto a 256 Mb partition (although a 128 Mb one will)
So, in practice, you only need to 'Sysprep' if you need to load your system into 256Mb (or 128Mb).
The rest of this page assumes you do, in fact, need to load (clone) a system image into a 256Mb (or 128Mb) DOM / CF Card / USB stick / RAM disk
So how do I use Sysprep ?
1) Reduce the C: partition. You will have installed to an IDE hard disk with a 512Mb or 1Gb primary partition. So the next step is to reduce the C: partition to 255Mb (so it fits onto the target DOM / CF card)
To reduce the partition size, I recommend GParted Live. This is a Linux based 'Live CD' (downloaded as an .iso file**), however, after booting you cam simply select GParted from the 'desktop' and follow the menu, so you won't have to learn anything about Linux at all :-)
** The downloaded GParted Live .iso can be 'burned' to CD using the Open Source ImgBurn application
2) Get the Microsoft 'Sysprep' tools from the Deploy.cab in \Support\Tools folder of your original XP System disk or download Sysprep for XPsp2 or Sysprep for XPsp3 from the MS website. Note the Sysprep tools for sp2 will not work on a system that has been updated to sp3.
Create a new folder c:\sysprep. Place Sysprep.exe & Setupcl.exe in the new folder. Rename & add the 'answer file' (winnt.sif) from your nLite System CD as 'sysprep.inf' (or add setupmgr.exe from the Sysprep tool set instead)
3) Prepare the auto-install 'answer file'. If you don't have a winnt.sif answer file from your nLite CD, use setupmgr.exe to create one (default name is 'unattend.txt', make sure you rename it 'sysprep.inf' & put it in the C:\sysprep\ folder. Note "unattend.doc" (also found in Deploy.cab) lists all the extra unattended commands
Edit the sysprep.inf as necessary to ensure the Product Licence key has been correctly preserved
NOTE If your Sysprep 'template' system was installed using an OEM XP System Disk, then in the 'answer file' (sysprep.inf), you should use a 'dummy' Microsoft OEM License key to mean 'use the OEM Key from the template install'.
4) Make a 'check point'. At this point it's a good idea to make a 'clone' image of your 'known good' 256Mb C: System hard disk.
5) Run Sysprep GUI, or from a 'command prompt' => Start, Run, cmd, cd to the c:\sysprep folder and type :-
sysprep /generalize -mini
After running Sysprep your 'master' system will be set to 'auto-configure on next boot'. If you re-boot, it will configure itself back to where you started ! So, immediately after running Sysprep, you must shut down and CLONE the C: partition (then you can re-boot to check that the auto-configure runs as expected)
6) Plug in your IDE 'slave' DOM / CF card and use Clonezilla to clone your just Sysprep'd disk to your DOM / CF card.
7) Switch the DOM / CF card to IDE 'master' mode, plug it into one of your destination 'nodes' and boot !
If you are aiming at a DOM / CF card or USB stick, continue to my CF & USB booting page, 'Next>>' (navigation menu, bottom left)
What are the command options for sysprep ?
Used to avoid resetting the 30 day 'activation limit' for 'images' that have already been activated ! Intended for manufacturers who activate the customer 'Full Retail' Windows installation in the factory.
Restarts the computer in 'Factory mode' again without generating new security IDs (SIDs) or processing items in the [OEMRunOnce] section of the Winbom.ini file. Use this command-line parameter only if the computer is already in Factory mode (see below)
Populates all the available mass storage devices in the [SysprepMassStorage] section. You might think this lets you Sysprep on an IDE and clone to a SATA but it's only for supporting D: E: etc drives
Clears the critical devices database that is used by the [SysprepMassStorage] section in the Sysprep.inf file.
Restarts in a network-enabled state without displaying Windows Welcome or mini-Setup. This parameter is useful for updating drivers, running Plug and Play enumeration, installing programs, testing, configuring the computer with customer data, or making other configuration changes in your factory environment. For companies that use disk imaging (or cloning) software, Factory mode can reduce the number of images that are required.
When all the tasks in Factory mode are complete, run the Sysprep.exe file by using the -reseal parameter to prepare the computer for end-user delivery.
Shuts down the computer after Sysprep finishes. Used with computers that have an ACPI BIOS that do not shut down correctly after running Sysprep.exe
Configures Microsoft Windows XP Professional to use Mini-Setup instead of Windows Welcome. This parameter does not affect Microsoft Windows XP Home Edition, where the first-run experience is always Windows Welcome.
Note that if you plan to use the Sysprep.inf file to automate Mini-Setup, you must either run the Sysprep tool by using the -mini switch, or click to select the MiniSetup check box in the GUI interface. By default, if you do not choose to run Mini-Setup, Windows XP Professional runs the Windows Welcome.
Sysprep modifies registry entries (SID, OemDuplicatorString, and other registry entries) without the computer restarting or preparing for duplication. This parameter is mainly used for testing, specifically to see if the registry is modified correctly. Microsoft does not recommend this option because making changes to a computer after the Sysprep.exe file has run may invalidate the preparation that was completed by the Sysprep.exe file. Do not use this parameter in a production environment
Runs Sysprep without generating new SIDs. You must use this parameter if you are not duplicating the computer where you are running the Sysprep.exe file or if you are pre-installing domain controllers.
Instructs the Windows installation to run 'Out Of Box Experience' aka Windows Welcome the next time the computer boots. Since we delete the OOBE folder to save space, plainly this command is never going to work
Used to force attempted detection of ancient non-Plug and Play devices thereby adding 20 - 30 mins to the first boot time.
Note - if using unsigned drivers, use the UpdateInstalledDrivers=yes parameter in conjunction with OemPnPDriversPath= and DriverSigningPolicy=ignore instead of the -pnp
Runs Sysprep without displaying on screen confirmation messages. This is useful if you are automating the 'master' install and Sysprep sequence. For example, adding sysprep -quiet command to the [GuiRunOnce] section of the Unattend.sif of a System Install CD lets you install onto the master and run sysprep without further interaction
Forces the 'master' computer to automatically restart after sysprep. The master will then start Windows Welcome, Mini-Setup, or Factory mode, as specified allowing you to verify that the first-run experience is operating correctly.
Clears the Event Viewer logs and prepares the computer for delivery to the customer. Windows Welcome or Mini-Setup is set to start the next time that the computer restarts. If you run the sysprep -factory command, you must seal the installation as the last step in your pre-installation process. To do this, run the sysprep -reseal command or click the Reseal button in the Sysprep dialog box.
What about RIS (MS Remote Installation System) ?
Unlike Sysprep (which allows you to burn a CD for local install), RIS is an older Windows 2000 'roll out' method that supports network install only. Essentially it lets you use a 'remote' CD drive (or a shared folder) containing the Operating System CD (or a share with 'slip streamed' applications added).
RIS itself has no 'pre-configuration' options (so can't remove any unwanted garbage), HOWEVER it will allow you to remotely install a 'cut-down' System 'CD' created using Winbuilder or nLite (see above). So, if you have 'slipstreamed' the SETI app. onto the 'new system CD' you can set-up a RIS to automatically install & run seti on any new node, whilst Sysprep only supports nodes with Hardware 'similar' to the 'master'
The big advantage of RIS is that it's old = simple ! So all you really need to do is place the 'source' CD on your 'Server' and then set your nodes to use 'Network booting' (BOOTP) or a RIS Netboot floppy disk. The Pre-Boot Execution Environment (PXE) then automatically starts the install process (using the 'answer' file)
To install from a remote ('mapped') CD drive, you use the Remote Installation Services Setup (Risetup.exe) tool, which installs an operating system on a destination computer by using an answer file and the installation files that are on the product CD.
To perform a shared folder ('image-based') installation you use the Remote Installation Preparation Wizard (Riprep.exe) tool, which is similar to the Sysprep tool and prepares a master installation for disk imaging.
The disadvantage of RIS is that it's aimed at installing Windows onto computers with hard disks = so you can forget about using it to load RAMdisk 'image' or 256Mb DOM / CF cards (but it should install just fine into 512Mb or above).
NOTE As of early 2012 I am running from 512Mb CF cards (& a couple of 1Gb DOM's), so I have not pursued the RIS approach further. No doubt MS have a few 'traps' waiting to be sprung on those who actually try to make it work :-)
If you are aiming at a RAM Disk, go direct to Setting up BOOTP nodes .
Otherwise click 'Next >>' in the Navigation bar left for Booting from DOM / CF card / USB sticks
Next page :- CF and USB booting