How to add drivers to RIS images without RIPrep 3
Monday, March 23, 2009 16:06If you install this image onto one of your workstations, you will notice that the text mode RIS setup doesn’t complain anymore and dutifully copies the images onto the workstations hard disk. But when the machine reboots into graphics mode, it will not install the driver, leading to all sorts of trouble.
For example, if the driver was for a network card, the system wouldn’t join the domain. What happened?
In the above mentioned KB article, MS says NOTE: If the RIS image was created with RIPREP, you must perform these steps on both the RIPREP image and the RISETUP image that corresponds to the RIPREP image.” Hmmh, these steps? Which steps? All of them? And how else can you create a RIS image, other than with RIPPrep? No matter how I interpreted this ambiguous sentence and whatever I tried, the driver would not be installed on the computer. There is a similar KB article on the same subject which explains things a bit differently to some extent, but that article didn’t help either. In some way that actually makes sense, because if I want a driver to be installed on a workstation, it should be included in the RIS image and not just the text mode setup.
Putting a driver into a RIS image
Through dumb luck I happened to stumble upon a third KB article [3] in which MS describes how to fix a bug in SYSPREP. The bug causes multiple identical entries to be added to DevicePath. What is DevicePath? It’s a registry value that contains a list of paths in which Windows searches for drivers when it detects new PNP hardware. Windows automatically performs an unattended installation of any suitable driver it finds. The default value for DevicePath is “%SystemRoot%\inf” and to be precise, it’s a list of locations in which Windows looks for INF files. The INF files then tell Windows where to look for the real driver files (SYS and CAT and the like).
Why don’t we just copy the raw driver files into a directory that’s part of the image and then update the DevicePath accordingly? As the driver directory belongs to the image, it will be copied to the machine’s harddisk. When the machine reboots after the image was installed, Windows should (re-)detect PNP hardware it doesn’t have a driver for and look up possible driver locations from DevicePath. This time Windows will find our driver and install it. Bingo! It’s kind of like pre-staging the driver by copying the driver files onto the target machine and telling it where to find the driver in case the hardware for it is detected. How do you do this?
- Create the directory \\SERVER\\REMINST\Setup\Language\Images\RIPrep\i386\Mirror1\UserData\Drivers\Broadcom. Remember that RIPrep stands for the name of your image and Broadcom signifies your hardware. These names are just examples and you will need to adjust them to your requirements.
- Copy the driver files into the newly created directory.
- On the server or your personal workstation, fire up regedt32 if it’s Windows 2000 or regedit if it’s an XP machine. (My personal workstation has Windows XP on it and so I use regedit.)
- Load the Software registry hive that’s part of the image by selecting HKEY_LOCAL_MACHINE and choosing Load Hive on the File menu. Navigate to \\SERVER\REMINST\Setup\Language\Images\RIPrep\i386
\Mirror1\UserData\WINNT\SYSTEM32\CONFIG and pick the Software file. - Type RIS Image as the temporary name of the hive.
- In the registry tree, navigate to HKEY_LOCAL_MACHINE\RIS Image\Microsoft\Windows\CurrentVersion and in the right pane double click the DevicePath value.
- Append ;%SystemDrive%\Drivers\Broadcom to the value.
- Unload the hive by navigating to HKEY_LOCAL_MACHINE\RIS Image and selecting Unload Hive on the File menu. Don’t forget this step because otherwise the hive will not be saved until you reboot your personal workstation.
- Install the RIS image on a test machine.
Pre-staging the driver is also much cleaner and safer solution. The old-school way of deploying drivers using RIS required downloading an image onto a computer, installing the driver by hand and uploading the image back to the server using RIPPrep. Installing the image on another machine that doesn’t have the hardware for this particular driver can cause all sorts of conflicts. The more drivers you are trying to deploy that way, the more likely you will run into trouble. Pre-staging the driver is different in that the driver files reside on the machine but the driver will only be installed and active if the right hardware is available.
As always in information technology, there will be a situation in which even this gentler, softer way of installing drivers doesn’t work. And this wouldn’t be a Diary Products article if I hadn’t run into such a situation myself. But don’t worry, my perfect dream world is not going to turn into a nightmare. More on that in another article, but to give you a sneak preview, I’ll tell you this: the new Optiplex system comes with drivers that require Windows 2000 SP4. All of my RIS images are SP2-based and I deploy SP4 using an SP4 using a Windows Installer Package (MSI) that is assigned to my workstations through a GPO. Right after the image is installed, it will boot into an SP2 Windows and then try to install the pre-staged SP4 drivers and crash. Stay tuned.




Convert Flv says:
September 26th, 2009 at 11:19 pm
No doubt FLV format has quickly established itself as the format of choice for embedded video on the web.
ipad case says:
June 5th, 2010 at 12:17 am
great article, I enjoy reading it. I hope one day I will have the same. thanx.
Tarra Rawles says:
July 5th, 2010 at 6:56 pm
hm, understand:)