Boot Camp: One image,
multiple models
Intro
One of great things we Mac admins can
sometimes take for granted is how we can create one Mac OS
X image that works across multiple Macintosh models. It
saves us huge amounts of time in development and testing,
not to mention the priceless value of simplicity! But
unfortunately for Windows, its not as easy because there is
such a large range or hardware out there. This article
explains how to make one Boot Camp image that works across
multiple Macintosh models. How many you ask, well the sky
is the limit really. This techique discussed has only been
tested for Windows XP system. If you are trying to do this
for a Vista machine, please let me know about your experience!
For the purpose of this article, I will pretend I want
to create an image that works with the latest 2.6GHz
Macbook Pro, and an easier version that is 2.33 GHz.
Part One: Update installed drivers
Much like we do creating a Mac image, we want to use the
latest hardware to create out image. So in our case, we
will be creating the image with the 2.6GHz Macbook Pro.
After we’ve done the process of setting up our image and
everythingThe first part to make this work is setting up
your sysprep file to redetect what hardware the computer
has and which drivers to use. To do that we need to edit
your sysprep.inf file. As described in another article,
there are a few lines of text you need to enter for
sysprep to reload the drivers, but the first thing you
want to do is have a drivers repository. This is a
folder on your hard drive that will contain all of the
drivers for all of the hardware you want this image to
support. It is recommended that you do not you use your
default c:\windows\system32\drivers folder. Instead
create a folder in your root folder called
“appledrivers” or anything you’d like to call it. Copy
all of the files in your c:\windows\system32\drivers
folder to this new folder you created.
Once you’ve done that now you can edit your sysprep.inf
file. Under the [unattended] section, add the following
lines
UpdateInstalledDrivers=yes
OemPnPDriversPath = "appledrivers"
DriverSigningPolicy=ignore
As you can see, i called my folder “appledrivers”, but you
can use what you wish.
Part Two: Find whats missing
Update installed drivers works pretty well, but it doesn’t
work 100% of the time. The next step is to find what it
misses, and what driver issues we have. With the newest
model (in my case MBP 2.6GHz) using sysprep, reseal windows
and shutdown. Create an image of the 2.6GHz MBP and image
the 2.33Ghz model. Boot it up and let it run through
sysprep. Once you’ve booted into windows, open “Device
Manager” and see which hardware drivers have issues. Write
down which hardware has issues and then reinstall the
windows bootcamp software. Doing so should resolve any
hardware driver issues you may have (although there are
exceptions, see part five). Goto to “Driver” tab, and click
the “Driver Details” button of each hardware you had issues
with. This should list all the files each hardware device
drivers uses. Copy all of these files to your
“appledrivers” folder for each problem hardware device.
Next you have to find the inf file for each problem
hardware device. You’ll find these in c:\windows\inf (the
inf folder is hidden by default). The apple inf files are
the ones that start with oem (ie oem1.inf, oem24.inf).
Search through these files for the ones that pertain to
you. To be sure you have the correct ones, these files to
contain the hardware IDs in them. You can find the hardware
ID for your devices by going to “Device Manager” ->
properties of a device -> details -> “hardware IDs”
from the pop up menu. Once you find the inf files you need,
place them in your “appledrivers” folder.
Part Three: Scripting
Once you have all the drivers and inf files together, you
can begin the scripting process. Bat file scripting to be
more specific. But first, we must download a free Microsoft
command line utility called “Devcon.exe”
(http://support.microsoft.com/kb/311272). This utility
allows you to change and manage drivers for your Windows
OS. So after we place our devcon.exe file inside c:/windows
folder, we open up notepad to start to create our bat file.
In the first line of notepad type in
cd c:\windows
This will change our working directory to c:\windows
devcon update
"c:\appledrivers\oem35.inf"
"PCI\VEN_8086&DEV_27DA"
This is an example line to give “SM Bus Controller” a
driver. The first word, calls on the application
“devcon.exe”, then the word “update” tells devcon that we
are updating the driver for a specific device. The third
part, c:\appledrivers\oem35.inf, tells devcon where the
driver it is to update with, and the last part is the
hardware ID of the device is we are updating. We are going
to want to have a line like this for each troublesome
hardware device.
At the end, for development purposes, I recommend put
pause
This will pause the script until any key is pressed so you
can read the output of the commands you entered.
To actually create the file, save it to your Desktop as
something like updateDrivers.bat. You need to have the .bat
as your file extension. Execute the script in the command
line by dragging and dropping the bat file into the DOS
prompt. Run the bat file to make sure all of the command
execute correctly. Once, everthing executes correctly, we
are ready to go back to our original 2.6 GHz machine.
Part Four: Testing
Once we got our bat file working, bring the bat file, the
updated “appledrivers” folder, and devcon.exe to the
original 2.6 GHz machine. Place the “appledrivers” folder
in the root directory, with devcon.exe and the bat file
inside of c:/windows. Next open up your sysprep.inf file
and add the following
[GuiRunOnce]
c:\windows\updateDrivers.bat
This will cause the bat file to run upon first login only.
Seal you machine, create an image of it, and image the
older 2.33 GHz model. Boot it up, run through syprep and
log into an account, and check device manager to make sure
all hardware devices are functioning correctly.
Part Five: The exceptions
There are some devices that seem to not work as smoothly as
the other, so you need to find a work around. I have a few
listed here that I’ve found in my experience, but if you
find another, please let me know so I can add it to this
article.
Macbook Pro Trackpad
For some reason to fix a disabled trackpad, you need to
load using the Micrsoft generic human interface drivers
first, then the Apple drivers. Here is what that would look
like using the command line
devcon update
"c:\appledrivers\input.inf"
"USB\Vid_05ac&Pid_021a&MI_01"
devcon update "c:\appledrivers\oem18.inf"
"USB\Vid_05ac&Pid_021a&MI_01"
SigmaTel Audio
I find for some reason, the SigmaTel drivers need to be in
the C:\Windows\Program Files\SigmaTel folder instead of the
“appledrivers” folder. Its a simple and obvious fix, place
the drivers in the SigmaTel folder.
Part Six: Extra Help
If you have any questions, please ask them or use the forum! Chances are other people
are having or will have the same questions, and by
asking me not only can I help you, I can edit the
article to help others.
History
8/4/08 - initial posting