My ramblings on the stuff that holds it all together
Build a Windows Vista Master PC Image
I haven’t had to do this sort of thing for a while and it’s the first time I’ve done it with Vista so here is a list of things I found; mainly for my own memory but hopefully it helps you too.. I only had 24 hours to do this, 50+ new PC’s to deploy to and a lot of other work to do, so I didn’t take the 100% best-practice approach.. but it works.
I wanted to take advantage of the new WIM image format – this is a file based snapshot format that is the default for a new Vista install and allows you to keep several different instances of a Vista installation in the same media. but requires less overall space as it “single-instances” files – for example a traditional Ghost based approach would keep a whole copy of explorer.exe once for every clone; this method just keeps the file once and uses pointers.
My goal is to have the following stored within a single .WIM file; this gives a bit of flexibility as we will be using a variety of these builds – yes it might be a bit more sensible to use a server based software deployment tool like SMS for the apps but we need the ability to support a variety of configurations and off-line/remote use and build for this implementation.
|Build001||Base Vista OS and hardware drivers for the HP PCs we will be deploying to with latest windows updates|
|Build002||As above + Office 2007 Standard VL Version & latest updates|
|Build003||As above + Misc Apps (Acrobat, Flash, AV Etc.)|
|Build004||As Above but with an automated, domain joining Sysprep|
- Windows Automated Installation Kit (AIK) 1Gb! http://www.microsoft.com/downloads/details.aspx?familyid=C7D4BC6D-15F3-4284-9123-679830D629F2&displaylang=en
- Sidenote: I couldn’t get the AIK to install on my Vista laptop, the installer eventually timed out and didn’t install anything; instead i installed it on a Windows2003sp2 VM as that’s all I had handy at the time.
- Windows Vista DVD Physical media or .ISO download from your Microsoft licencing agreement site.
- A lot of Patience
- The following links
Tip: I found it much easier to try all this out using a virtual machine; rather than having to burn DVD’s just to get the config right – you can do this by mounting the .iso file within a disposable virtual machine and boot from the “virtual” CDROM/DVD.
This implementation is going to rely on the OEM licence’s supplied on PCs – but we need to use our own build rather than the rather stodgy one supplied by HP so we can’t script the product key/activation and the user will need to enter it within the 30-days grace period.
I spent a while hacking away with autounattend.xml files using System Image Manager without much luck – this site and this site were handy in figuring out how it worked and I managed a working file once I’d changed the disk partitioning bit from this script
Image Based Installation
Word of warning if you get an installation GUI when the machine boots then it’s ignored the autounattend.xml file but it doesn’t tell you why; there is a bug if you store it on a flash drive – fix here and I couldn’t make it work by storing the file in the root of the DVD and had to resort to a virtual floppy in my test build VM – more information here.
In the end I had to abandon the unattended setup because of time constraints, and it didn’t meet all of my needs anyway so I did a manual Vista install (without entering a product key) and then proceeded with the imaging process as I was hoping to get an application-inclusive “build”; with an unattended install I would have had to script all the application installations which would have probably taken too long.
Firstly you need to create a Windows PE bootable CD – info here and here quick version in step 4). just a word of warning, if you cut & paste the OSCDIMG.EXE command line from the site it won’t work and you’ll get an “Error 5 Access is denied.”
Weirdly this is because the “-” in the command line shown on the web page is the wrong ASCII symbol (assume thats an HTML/browser weirdness) but it will work fine if you type it in manually and you should see the following;
Now, once you’re happy with the reference image and have all the windows updates etc. installed you need to sysprep it to generate a new SID and make it “general”.
Run SYSPREP.EXE and choose OOBE and generalize, then shutdown the reference PC – if you have a sysprep.xml file now is the time to use it.
Now you can boot the Vista “reference” PC from the PE CD and capture the image.
you can keep the image on the same disk as the Vista installation, something you can’t do with Ghost etc.
this is done with the following command;
Imagex.exe /compress fast /capture C: C:\image-name.wim “build001” /verify
When its finished you can copy the resultant .wim file to a removable USB drive or network share (note: PE2.0 seems to support hot-swapping USB flash drives, which is handy – all my previous PEBuilder based CDs would only detect such devices at boot-time.
And you’re done, well you have a master image anyway.. next step would be to apply it to a machine.
Plenty of scope to automate the .WIM image deployment, I want to add it to a PE CD/DVD that the user can boot the machine from, then walk away and have it fully build a machine.