Subject: [support] Creating a 'generic' Ghost image for Windows 2000 Date: Tue, 26 Jun 2001 15:48:49 -0400 From: "Bill Geschwind" I mentioned the other day to a computer support person in another department that I managed to create a generic Windows 2000 ghost image that works with multiple types of machines, and he asked me to write up what I did and forward it to him. I decided to post that information on this list, in case anybody out there is attempting something similar, so they can avoid the weeks of frustration, dead-ends and gotchas that I ran into before coming up with something that actually works. In the departments that we support we have a very heterogeneous mix of computers (about 2 or 3 dozen different types - I lost count about the exact number), so when I wanted to create a ghost image to upgrade our systems to win2k I wanted to create one "generic" image that I could use with all machines rather than create a separate image for each and every type of machine we have, since managing such a large number of images could easily become rather unwieldy. In the Windows 2000 classes that I took, I was told that this could be done, and all I had to do was first create a reference machine with the OS and apps all configured the way I wanted, run a utility called sysprep (which strips out the SID) and then create my ghost image. Unfortunately it's not quite that easy. First, there are two different versions of Sysprep.exe out there, namely v1.0 and v1.1. I downloaded v1.1 from Microsoft's site, extracted it onto my reference machine, and followed the instructions that came with it (essentially put it and everything related to it in a directory called c:\sysprep). When I first tried to run sysprep, it did not work. For it to work, you need to first extract the contents of a file called deploy.cab, which is in the directory ..\win2000\pro\support\tools of your Windows 2000 CD into the c:\winnt\system32 directory. Without that dll file in the system32 directory, sysprep wouldn't run for me. With those files extracted into c:\winnt\system32 I could finally get sysprep to work (make sure to use the version 1.1 from Microsoft's site, and not the version 1.0 from the win2k CD). During those classes I took there was some discussion about an answer file that can be created for sysprep in order to automate the process. The file can be created either automatically with the setupmgr utility in the deploy.cab file mentioned above, or manually using a text editor, and the sysprep v1.1 that you can download from Microsoft even contains a handy sample file that you can use as a template. I left class with the impression that this answer file was optional, however I created several images without using this answer file, and those ended up not working, even when using them on the exact same type of machine that was used to create the image (in fact, on the very same machine in one case!!). The image loaded just fine, but the first reboot led to an unrecoverable blue screen of death. To make a long story not quite so long, it seems like the answer file is necessary for sysprep to run properly, and the answer file needs to contain a section called [SysprepMassStorage] and it needs to have an entry for the mass storage controller of the machine you are using. The sample answer file that comes with sysprep 1.1 has this section in it, however it did not work for me as is. This section has a very cryptic syntax, and the documentation on how to edit it was not immediately clear either. I ended up searching the web for any working samples of this file (which needs to be called sysprep.inf and be located in the c:\sysprep directory). I eventually found one that has entries for every mass storage controller I'm likely to use, and I adapted it for my own sysprep.inf answer file. Here is my sysprep.inf file (with comments), which you can cut out of this message and paste into a 'text only' document and adapt for your own use: ---cut here--- [unattended] OemSkipEula=Yes InstallFilesPath=C:\sysprep\i386 TargetPath=\WINNT [guiunattended] ; this next entry will set the time zone to Eastern Time timezone=35 ; I did not use "password" as my admin password (duh!). ; Substitute a secure password of your choice in here adminpassword=password OEMSkipRegional=1 OemSkipWelcome=1 [userdata] ; This will be the registered user name of the machine. Substitute the name of your choice. fullname="Division of Student Affairs" ; This is the 'company name.' Use whatever you like. Orgname="UNC Chapel Hill" ; this will cause the machine to have a randomly generated name. You can edit it on each machine ; after the ghosting process is done computername=* ; in this line enter the product key from your distribution CD. productid=xxxxx-xxxxx-xxxxx-xxxxx-xxxxx [networking] InstallDefaultComponents=Yes [identification] ; enter here the name of the workgroup you want your ghosted machines to join. ; If you support multiple workgroups you can always change this on each machine ; after you have ghosted them joinworkgroup=housing [SysprepMassStorage] PCMCIA\*PNP0600=%systemroot%\inf\mshdc.inf *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 PCI\VEN_8086&DEV_1960&SUBSYS_11111028=%systemroot%\inf\scsi.inf PCI\VEN_8086&DEV_1960&SUBSYS_11121111=%systemroot%\inf\scsi.inf PCI\VEN_8086&DEV_1960&SUBSYS_11111111=%systemroot%\inf\scsi.inf PCI\VEN_8086&DEV_1960&SUBSYS_04671028=%systemroot%\inf\scsi.inf *ADP1540=%systemroot%\inf\scsi.inf *ADP1542=%systemroot%\inf\scsi.inf *ADP4215=%systemroot%\inf\scsi.inf DETECTEDIsa\aha154x=%systemroot%\inf\scsi.inf SPARROW_SCSI=%systemroot%\inf\scsi.inf DETECTED\sparrow=%systemroot%\inf\scsi.inf *ADP1502=%systemroot%\inf\scsi.inf *ADP1505=%systemroot%\inf\scsi.inf *ADP1510=%systemroot%\inf\scsi.inf *ADP1512=%systemroot%\inf\scsi.inf *ADP1515=%systemroot%\inf\scsi.inf *ADP1520=%systemroot%\inf\scsi.inf *ADP1522=%systemroot%\inf\scsi.inf *ADP3015=%systemroot%\inf\scsi.inf *ADP3215=%systemroot%\inf\scsi.inf *ADP6360=%systemroot%\inf\scsi.inf *ADP6370=%systemroot%\inf\scsi.inf PCMCIA\Adaptec__Inc.-APA-1460_SCSI_Host_Adapter-BE89=%systemroot%\inf\scsi.i nf PCMCIA\Adaptec__Inc.-APA-1460_SCSI_Host_Adapter-B67E=%systemroot%\inf\scsi.i nf PCMCIA\Adaptec__Inc.-APA-1460_SCSI_Host_Adapter-6F71=%systemroot%\inf\scsi.i nf PCI\VEN_9004&DEV_5075=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_5175=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_5275=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_5375=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_5475=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_5575=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_5675=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_5775=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_5078=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_5178=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_5278=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_5378=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_5478=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_5578=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_5678=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_5778=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_7860=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_6078=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_6178=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_6278=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_6378=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_6478=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_6578=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_6778=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_7078=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_7178=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_7278=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_7478=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_7578=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_7678=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_7778=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_8078=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_8178=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_8278=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_8478=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_8578=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_8678=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_8778=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_8878=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_7891=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_7892=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_7896=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_7897=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_3B78=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_EC78=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_6075=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_6075&SUBSYS_75609004=%systemroot%\inf\scsi.inf PCI\VEN_9004&DEV_3860=%systemroot%\inf\scsi.inf PCI\VEN_9005&DEV_0010=%systemroot%\inf\scsi.inf PCI\VEN_9005&DEV_0020=%systemroot%\inf\scsi.inf PCI\VEN_9005&DEV_0030=%systemroot%\inf\scsi.inf PCI\VEN_9005&DEV_001F=%systemroot%\inf\scsi.inf PCI\VEN_9005&DEV_002F=%systemroot%\inf\scsi.inf PCI\VEN_9005&DEV_003F=%systemroot%\inf\scsi.inf PCI\VEN_9005&DEV_0050=%systemroot%\inf\scsi.inf PCI\VEN_9005&DEV_0051=%systemroot%\inf\scsi.inf PCI\VEN_9005&DEV_005F=%systemroot%\inf\scsi.inf *FDC0000=%systemroot%\inf\scsi.inf DETECTEDPci\Fd16_700=%systemroot%\inf\scsi.inf FD16_700_SCSI=%systemroot%\inf\scsi.inf PCI\VEN_1036&DEV_0000=%systemroot%\inf\scsi.inf DETECTED\fd16_700=%systemroot%\inf\scsi.inf GEN_SCSIADAPTER=%systemroot%\inf\scsi.inf PCI\VEN_1014&DEV_002E=%systemroot%\inf\scsi.inf PCMCIA\IBM-PCMCIA_Portable_CD-ROM_Drive-84E3=%systemroot%\inf\scsi.inf PCMCIA\IBM-PCMCIA_CD-ROM_DRIVE_CD-400-5AFA=%systemroot%\inf\scsi.inf PCMCIA\IBM-PCMCIA_Portable_CD-ROM_Drive-84E2=%systemroot%\inf\scsi.inf PCI\VEN_1077&DEV_1020=%systemroot%\inf\scsi.inf PCI\VEN_1077&DEV_2100&SUBSYS_00011077=%systemroot%\inf\scsi.inf PCI\VEN_1077&DEV_1240=%systemroot%\inf\scsi.inf PCI\VEN_1077&DEV_1080=%systemroot%\inf\scsi.inf PCI\VEN_1000&DEV_0001=%systemroot%\inf\scsi.inf PCI\VEN_1000&DEV_0002=%systemroot%\inf\scsi.inf PCI\VEN_1000&DEV_0003=%systemroot%\inf\scsi.inf PCI\VEN_1000&DEV_0004=%systemroot%\inf\scsi.inf PCI\VEN_1000&DEV_0005=%systemroot%\inf\scsi.inf PCI\VEN_1000&DEV_0006=%systemroot%\inf\scsi.inf PCI\VEN_1000&DEV_000B=%systemroot%\inf\scsi.inf PCI\VEN_1000&DEV_000C=%systemroot%\inf\scsi.inf PCI\VEN_1000&DEV_000D=%systemroot%\inf\scsi.inf PCI\VEN_1000&DEV_000F=%systemroot%\inf\scsi.inf PCI\VEN_105A&DEV_4D38=%systemroot%\inf\scsi.inf [TapiLocation] CountryCode=1 AreaCode=919 [Branding] BrandIEUsingUnattended=Yes [Proxy] Proxy_Enable=0 Use_Same_Proxy=0 ---cut here--- Using this answer file will load all of the listed mass storage devices in the ghost image. Device Manager in a machine ghosted with this image will only list the IDE controllers actually in the machine, however it will also list all of the SCSI controllers in the ghost image, regardless of whether those devices are actually in the machine or not. What I have been doing is manually delete the SCSI drivers from Device Manager on non-SCSI machines, which only takes a minute or so and to me is no big deal. If you don't have any machines with a SCSI subsystem you can try to delete the SCSI drivers from the [SysprepMassStorage] section and see if it still works. I have not tried this myself. Using a ghost image with the above sysprep.inf answer file I have already successfully ghosted a Dell Optiplex GXi, a Dell Optiplex GXa, several different one and two year old IBM CCI desktops and a ThinkPad 390E laptop. In the coming days/weeks/months I will ghost additional types of machines, and I suspect they will work as well, although I must include the standard disclaimer that your mileage may vary. Here are the steps that I used to successfully create and use a "generic" ghost image to clone machines of varying types with Windows 2000: 1. Create a reference machine. Of all the machines you have available, use the one with the least amount of RAM and disk space that still meets the minimum requirements for win2000. Install the Operating System and install and configure all of your applications that you want on your image. Make sure to run Windows Update to get all of the latest patches and fixes. 2. On the reference machine, make sure to extract deploy.cab and copy the contents to c:\winnt\system32. Go to Microsoft's web site and download sysprep v1.1 at http://www.microsoft.com/windows2000/downloads/tools/sysprep/default.asp. Extract the file and copy the contents of c:\sysprep_update\tools to c:\sysprep and then delete c:\sysprep_update. Place your sysprep.inf answer file in c:\sysprep 3. Test your reference machine and make sure everything works on it. When you're done, make sure to delete any accounts and files on the machine you don't want on your ghost image. Run chkdsk to make sure that there are no errors on your disk and run Disk Cleanup to get rid of any unneeded temp files and other junk that will only bloat your image. 4. When you are sure that everything is good, go to Start -> Run and run c:\sysprep\sysprep.exe -pnp . The -pnp parameter will cause your newly ghosted machines to search for and install any non plug-and-play devices. 5. At the end of sysprep, your machine should shut down. Turn it off, and use your imaging software to create an image. I used Symantec Ghost v. 5.1c SP1. It ain't the latest version of Ghost, but it works just fine for me. I' m sure other versions of Ghost and other products will work too, but you're on your own with them. 6. Using Ghost or your imaging software, load the image on a target machine. Restart the computer after the image is loaded. Using my setup, the computer will first run chkdsk. Note: On machines with more RAM than the machine with which I created my image I will get a blue screen of death at this point. If you get a blue screen of death here, turn off the machine and turn it back on. Even though this is pretty ugly, all of the machines I have tried this with would continue from here with no problem, and the installation has been as stable as any other machine. The machine will then process the information in the answer file, and do things like search for the hardware in the system and configure user information, the time zone and network settings. Just let it run its course and don't do anything until the logon screen appears. 7. Eventually the logon screen will appear. After logging on to the machine, the machine will still need to be tweaked under certain circumstances: - On machines with a different amount of RAM than the machine on which I created the image I get an error message stating that the registry is larger than the amount of space available for the registry. To correct this, go to Start -> Settings -> Control Panel -> System. Select the 'Advanced' tab, click on 'Performance Options' and 'Change' and change the Maximum Registry Size to something more appropriate. - Delete all of the SCSI devices in Device Manager, if the machine does not contain any SCSI devices. If it does, delete the entries for the SCSI devices that aren't actually in the machine. - On machines which contain devices for which drivers are not included on the Windows 2000 CD, the missing drivers will need to be installed. A good place to look is Windows Update (www.windowsupdate.microsoft.com), which may list updated or missing drivers that were developed after the Windows 2000 CD came out. Otherwise you may need to obtain drivers from the manufacturer of the device in question. - Change the machine name and network settings as needed and don't forget to send updated information to hostreg. This 'tweaking' typically takes me about 5-10 minutes per machine, and several of these steps would not be necessary with a machine-specific ghost image. However for me this is a small price to pay and worth paying to have one generic 'one size fits all' ghost image rather than having to manage a large number of different images, and this process sure beats the heck out of the 4-8 hours it takes per machine to load the software manually. If you decide to give this a try and have questions or run into problems, please feel free to give me a call. ********************************************************************* Bill Geschwind Technical Assistance Manager Department of Technology and Systems Support Division of Student Affairs, University of N. Carolina at Chapel Hill 03 Teague Hall, CB# 5510 (919) 962-5629 Chapel Hill, NC 27599 geschwin@email.unc.edu *********************************************************************