2 Replies Latest reply on Sep 30, 2009 9:41 AM by brandonhyde

    Hardware Independent Imaging - MADE EASY!!!  NO MORE MESSING WITH HAL FILES!!!


      Ok...so here's the deal.  About 3 years ago I was tasked with creating a hardware independent image.  If successful, we would be able to cut our total number of images from 18 to 3.  So I spent a solid week reading every forum and article you can think of in regards to this very topic.  When it was all said and done...it only took 3 SIMPLE STEPS to CONVERT all of our existing images to hardware independent images!!!  I underline the word CONVERT because you don't have to build brand new images to get this to work.  In addition to that, you don't have to do all this crazy stuff of collecting hal files and all that to get it to work.  It's sooo much easier this way.  So without further babbling....here you go!  Enjoy and please leave feedback!



      PREPERATION - Before completing the steps below, you'll want a pc with your current image loaded on it.  This is the pc you will capture your new hardware independent image from.  Rule of thumb is to use your oldest production model for your image building machine.  For us, it's a Dell GX270.  You'll also want your Sysprep files on the C drive along with your sysprep.inf file.  We will make some changes to your sysprep.inf in steps 2 and 3.  That being said, let's go!



      Step 1 - Set Your IDE Controllers to the Default Windows Drivers



      a) Open Device Manager and navigate to the IDE Controllers section.

      b) 2 Controllers will be listed.  For most people, they will start with "Intel....".  Right-click on the first one and choose Update Driver.

      c) Choose "No, not at this time" and click Next.

      d) Choose "Install from a specific location" and click Next.

      e) Chose "Don't search.  I will choose the drive to install." and click Next.

      f) Choose "Standard Dual Channel PCI IDE Controller" and click Next.

      g) Choose Finish and then repeat steps A through F for the other IDE Controller.



      Step 2 - Add 2 Mass Storage Device Commands to Your Sysprep.inf File



      a) This part is EASY!!!  Just copy the text in red and add it to the very end of your sysprep.inf file.




      Step 3 - Build Your Driver Database


      a) First, you should note that after completing steps one and two, you can pull your image and it WILL WORK ON ANY MANUFACTURER AND MODEL OF PC!!!  The purpose of this 3rd step is simply to build your driver database so you don't have to install drivers post-image.  If you've got a lot of different makes and models, this step will be the most time consuming but well worth it.


      b) First, note that you DO NOT want to keep the original driver files from the OEM.  They are way too large and most of the files are unnecessary.  So what you'll want to do is find a driver extraction tool out there to pull out all of the .inf's and dll's necessary to install the drivers.  My favorite is a free program called "Drive Magician".  Google it. :-) 


      c) So once you have your tool, simply start going to each of your models and running it to extract the driver files.  Once you have them, start building a driver data base.  Keep it simple.  Sysprep only allows so much text for the drivers path section so make it something easy like "c:\d\1", "c:\d\2", etc.  D being the main folder and 1 & 2 being different models.  Just create a text document to keep as a "key".


      d) Finally, once you've built up your driver database, add the paths to your sysprep.inf file.  Below in red is a good example...




      e) That's it!!! Now capture your image and give it a shot!  NOTE: It's not uncommon for Sysprep to hang up during the driver installation phase of mini-setup.  A lot of newer drivers have hard-coded driver paths.  Here is an example of what I mean...


      You have a Dell 755 that you've just extracted drivers from.  You've added the drivers to "c:\d\23" on your image.  You capture the image and then push it out to a 755.  During the driver installation phase, it hangs up stating that it can't find a certain file because it can't be found.  It will show you what file it needs and what subdirectory it needs to be in.  For instance, it's looking for it in a folder called "B_74543.  So what you'll want to do is create a subdirectory in your "23" folder called "B_74543" and put the missing file in there.  Pull your image again and give it a shot now.  Should work like a champ!


      Again, feedback is appreciated.  Thanks and enjoy!!!


      - Brandon

        • 1. Re: Hardware Independent Imaging - MADE EASY!!!  NO MORE MESSING WITH HAL FILES!!!

          Brandon --


          Hardware Independent Imaging is like an answer to prayer if you have environments with dozens of different models.  I do have a few things to put forward that are on the forums and may help you if you use this process:


          • Jan Buelens and my good friend Mike Ybarra put together a document on hardware independent imaging using LANDesk and included a tool called LDPREP which revolutionizes the issue with maintaining driver paths in the sysprep.inf (which writes to an area in the registry during the reseal process.  The key oempnpdriverspath has a character limit, I might add).  The concepts discussed are independent to LANDesk and are much in line with what you have put forward.  I believe the latest version of the document still maintains a lot of what was present in the beginning (I've not read it recently).  Have a look  here.


          • HAL issues are discussed in the document noted above, however Jan also put together a utility that automatically detects the HAL used in Windows PE and sets it appropriately on the target system.  This link is to the original post, though there is a later version of HalConfig.exe available.


          • Ideally, unless you are loading laptop/desktop specific software onto a machine (which you can accomplish using other crafty methods in LANDesk Provisioning), you can achieve building a single image.


          • I have found that obtaining drivers for hard disk controllers, as well as parsing the vendor and family IDs to put into the sysprep was more manageable by getting the mass storage controller drivers from DriverPacks.net and using a (modified) script called hwids.cmd, which you can find via a quick google search.  It eliminates keystroke errors in developing the sysprep.inf file you use for building your image, which avoids painful restarts when your sysprep hangs while installing drivers because you added an extra whitespace somewhere.


          • Using VMWare rather than physical hardware has proven to be a tremendous help when building base images.  There is less emphasis on hardware drivers, you have the ability to rapidly return to the previous state, and it can take a lot less time to modify your Standard Operating Environment when you have it as a VM.


          • Lastly -- LANDesk version 9 (currently in beta) aims to incorporate hardware independent imaging into the solution in such a way that you do not have to do anything but set it and forget it.  I would post screen shots to show you how it currently looks, but I don't know if that's against the beta agreement.  It does look pretty promising though!  I had seen this functionality in Altiris Deployment Solution and thought it was quite impressive, so I'm hoping to play with this a bit more.


          I hope the feedback was helpful~



          EDIT:  Also -- step 2 with the two lines to add to the SysprepMassStorage Section:  I think this will only work on systems with SATA controllers if compatability mode is on in the BIOS, else you will get the nefarious STOP 7B bluescreen indicating the boot device isn't accessible.

          • 2. Re: Hardware Independent Imaging - MADE EASY!!!  NO MORE MESSING WITH HAL FILES!!!

            Great feedback!  I'll definitely have to take a look at some of your ideas.


            In regards to your last comment, very true.  This method will only work on IDE and SATA configurations which works for us because we switch everything to SATA in the bios anyways.  More than anything, I wanted to get this information out there because it is a quick and easy way to get started with hardware independent imaging.  Not a lot of front end work required to get you going.


            Thanks again!