Archive for the ‘Windows’ Category
Update: 11/2/09 – Apple has released 10.6 at this point, and frequently updates the Windows drivers packaged with OS X. This guide should still be useful and applicable to newer versions of the OS, but keep in mind that you should use the latest version of your Mac OS X install disc so that you have all of the current Mac hardware drivers.
Creating images for Windows poses a challenge for system administrators because of the fact that drivers have to be incorporated into the system image in order for the target system’s hardware to function properly. Apple creates it’s own hardware and software, so all of it’s hardware drivers are incorporated into it’s installation discs making imaging an easier task in this sense.
I was tasked with building a Windows Image for a Mac lab and was curious: is there a way to create a Windows XP image for all Mac models that is hardware-independent? It turns out there is! Using some tools Microsoft and other 3rd parties provide you can build a Windows XP image that will run on any Intel-based Mac.
Before I begin, I want to mention that I wouldn’t have been able to figure this out without the help of some very talented, clever, and smart people. I will be referencing their websites in this guide.
What you need for this guide:
- Windows XP Home or Professional CD
- Mac OS X 10.5.x Leopard DVD (Preferably the latest release so that we have the most up to date drivers.)
- An Intel Mac
- SysPrep – Available here: http://www.microsoft.com/downloads/…
- SysPrep Driver Scanner – Available here: http://www.vernalex.com/tools/spdrvscn/…
- WinClone – Available here: http://www.macupdate.com/info.php/id/25932
- WinRar for Windows – Available here: http://www.rarlab.com/download.htm
- DevCon – Available here: http://support.microsoft.com/kb/311272
Run Boot Camp assistant and partition your Mac. Install Windows XP. Try to keep the partition as close as possible to the actually space requirements your image will need. More on why later.
Extract all of the Mac drivers from the Leopard Install DVD.
Insert the Leopard DVD into any Windows computer and browse to it. Inside the DVD browse to the ‘Boot Camp’ folder. Copy the ‘Drivers’ folder to your PC hard drive.
Now browse to the ‘Drivers’ folder on your PC. At this point you will need to install WinRar on your PC if you haven’t already. For convenience create a folder called ‘Drivers Extracted’ in the same folder your ‘Drivers’ folder is. Inside your ‘Drivers Extracted’ folder create a directory structure like so:
This is the easiest way to organize the drivers. Now go back to your ‘Drivers’ folder.
Browse to every directory inside the drivers folder, inside each one you will find mostly .exe files. These are what you want to extract. Like so:
Keep in mind these instructions are for installing 32-Bit Windows XP, so in the \Drivers\Apple folder we want to extract all of the .exe file to folders, then move these folders and the ‘AppleKeyboardInstaller’ folder to the ‘Drivers Extracted’ folder we created before. Skip the ‘x64’ folder in here.
All of the extracted driver folders that were in the ‘Apple’ folder that we extracted go to the ‘Apple’ folder in our ‘Drivers Extracted’ folder. The rest of the drivers go to their related folders. I will show you what goes where below and what Drivers are actually required for 32-Bit XP, because Apple includes 64-Bit drivers as well but there is no sense in using those for our 32-Bit install. Just make sure you have all of the folders below extracted. The organization by device type is really optional. I am just a bit anal :).
* The Intel Chipset drivers are located in this folder: \Drivers\Intel\Chipset\Vista. I just moved all these files into the ‘Intel’ folder above.
* There are more video drivers for NVidia GPU’s, but we are going to get the latest ones from their website. Just make sure you have the ones above for now.
Next download the latest NVidia Desktop and Mobile video drivers.
Currently the latest Desktop release:
Currently the latest Mobile release:
Once you download them extract the .exe’s the same way we did before and create two new folders inside the Drivers Extracted\Video folder called: NVidiaXPSetup and NVidiaMobileXPSetup.
Then move the extracted files from before to their corresponding folders.
Setup your XP machine.
I won’t get into the details of installing software on and configuring an XP machine, that is beyond the scope of this guide. For details and a good instructions on setting up a computer prior to running sysprep (which we will be doing later) see here: http://www.vernalex.com/guides/sysprep/general.shtml
Setup SysPrep answer file and move our drivers over to the source system from our image.
If you are unfamiliar with SysPrep I encourage you to watch/go through this excellent guide:
This guide gave me a great understanding of SysPrep and how to properly execute and utilize it’s features, many of which we will be using.
Download SysPrep from MS, see the link at the beginning of the guide. You only need 3 files from the .cab file. These:
Create a folder called: ‘sysprep’ on the computer you are going to image. Make sure it is located here: C:\sysprep
Move the 3 files you extracted from the .cab file to C:\sysprep
Download the SysPrep Driver Scanner – Available here: http://www.vernalex.com/tools/spdrvscn/… and place the .exe in C:\sysprep
Insert your XP installation CD and copy the ‘i386’ directory to C:\sysprep.
Create the folder C:\sysprep\drivers: Copy the contents of the ‘Extracted Drivers’ folder we made earlier to the C:\sysprep\drivers folder.
Use setupmgr.exe GUI to help you create a sysprep.inf answer file or better yet modify mine and place it in C:\sysprep.
This is what my sysprep.inf answer file looks like:
If you notice in my file there is a line that says: [GuiRunOnce]
This executes a .bat file on startup.
Under this a .bat file is referenced. Basically this .bat file does a couple things. Most importantly it fies an issue with the Apple Trackpad drivers. The problem is that if you install the Apple Trackpad driver before the MS USB drivers the device fails to work properly. I found this fix and the solution here: http://www.projectappletree.org/page17/page23/page23.html. This page also helped me develop this entire guide. I made a .bat file that uses the devcon tool from Microsoft. Essentially this tool allows you to change/update drivers from the command line. I pulled the various Apple Trackpad Device ID’s from the Apple drivers .inf file, and then placed those into the script. Then I took this input.inf file: http://www.mediafire.com/file/2iamlme2ztg/input.inf. You may actually have this input.inf file on your XP system, do a search. You need to move this file to C:\WINDOWS\System32. The .bat file should be placed in C:\Windows\System32. You can download it here: http://www.mediafire.com/file/5htzjzzdjnb/fixtrackpad.bat. The .bat file also deletes the C:\sysprep folder which ends up sticking around even though it should be deleted for some reason. You also need to download the DevCon utility from MS and place it in C:\Windows\System32. The download DevCon here: http://support.microsoft.com/kb/311272.
Run the SysPrep Driver Scanner.
The sysprep driver scanner scans the driver directory we populated before and puts the paths to all of the driver files into the registry. Then when the image is pushed out to computer and sysprep runs on first boot the system know where to look when it installs drivers. A detailed explanation on how to use the driver scanner is here and you should read it. http://www.vernalex.com/tools/spdrvscn/index.shtml#download
Take an initial image.
You should take an image of your system before you run syspre and image again. This is so if you mess something up or want to build another image off of this one you will save yourself from having to build the whole thing. To image the XP partition boot back into Mac OS X and use WinClone and take an image. WinClone is here: http://www.macupdate.com/info.php/id/25932.
Run SysPrep and take another image.
Run C:\sysprep\sysprep.exe. Make sure ‘Use mini-setup’ is checked and click ‘reseal’.
It should only take a few seconds to run and then the computer will shut down. Make sure not to boot back into Windows again until you take an image. Again boot into Mac OS X and take an image with WinClone.
Now you should have a working image .winclone image you can restore to other Macs. You can also take an image using another utility such as DeployStudio for network imaging.
So far I have tested this image on a Mac Pro and an older 2.16GHz Macbook and it has worked. I will update this guide with anymore issues or tips. Let me know if you encounter any! Good luck and happy imaging!