Hardware Independent Imaging (Another Angle)
I have seen so many articles related to Hardware Independent Imaging all over the internet, all of which are sometimes not so straight forward to understand and read.
I myself have read some articles and whitepapers about this solution and at first could not fully understand what they sometimes meant by certain procedures within those articles.
I decided to make my own step by step guide on how to use and implement the Hardware Independent Imaging Solution with your Altiris Deployment Solution.
Before I start with the step by step guide, there are some new features within Altiris Deployment Server 6.9 with regards to this Hardware Independent Imaging. Many of you might have seen the "Deploy Anywhere Hardware Independent Imaging" option when creating a deployment distribution job. That is a great option to have and nice utility that was build into Deployment Solution 6.9, containing most of the network card drivers and mass storage drivers used in most environments. You can also add additional drivers to this Driver Database, but only if they are mass storage drivers or network card drivers, which in a way doesn't help us much as you cannot add display, sound or modem drivers to this database. Maybe Symantec can put that on their development list going forward in new versions of Altiris Deployment Solution and make Hardware Independent Imaging much easier to do and manage.
Now let's get back to the step by step guide on how to make Hardware Independent Imaging easier to understand according to my knowledge and logic.
We have the following steps to complete:
- Prepare the source Computer
- Sysprep your image
- Capture the Sysprep Image
- Distribute the Sysprepped Image
NOTE: You can even create the jobs in Deployment Solution console in this order and number structure, much easier to view and use.
Prepare the Source Computer
The first stage is to create a clean source computer with the OS installed. The goal is to implement a consistent, easily repeatable process for future efforts. We can either prepare the source computer with a scripted install or the old fashioned way of using a cd and doing a clean install of the operating system.
- Under the deployment share we need to create a folder called Sysprep. (\\servername\express\sysprep)
- Extract the content of deploy.cab to this folder.
- Create the unattended.txt file (Only if using the scripted install method)
- Optimize the source computer for imaging and peak performance and according to company standards and policies.
Sysprep your Image
Creating the tokenized Sysprep.ini file
- From within the newly created Sysprep folder:
- Execute setupmgr.exe and select the Sysprep setup for Windows XP Professional.
- Choose a fully automated installation.
- Populate the final screen with the appropriate settings for the environment.
- Make the following changes to the sysprep.inf file:
- Add the following lines under the [Unattended] section to enable dynamic injection of driver files that will not be purged after the Sysprep process completes. The second line will avoid the prompt to approve installation of unsigned hardware drivers.
"OemPnPDriversPath=drivers\audio;drivers\net;drivers\video;drivers\chipset;drivers\modem;drivers\misc1;drivers\misc2 DriverSigningPolicy = Ignore"
- Add the following lines under the [Unattended] section to enable dynamic injection of driver files that will not be purged after the Sysprep process completes. The second line will avoid the prompt to approve installation of unsigned hardware drivers.
- Follow the instruction from the setupmgr.exe to complete the Sysprep.ini file
- Enable the Build Mass Storage option. This step is becoming increasingly necessary for newer hardware. For desktops, mass storage is primarily concerned with RAID devices and SATA hard drives, however certain motherboard chipsets without these functions enabled might still require this step.
[Sysprep] BuildMassStorageSection = Yes [SysprepMassStorage]
Now we need to create the Deployment Solution Sysprep job:
- From the DS console, create a new job titled Sysprep Prepare.
- Add two tasks to the job:
- Add a Copy File from .\sysprep to c:\sysprep. Select the Copy directory button.
- Add a Run Script - The script will contain a single line:
- C:\sysprep\sysprep.exe -mini -quiet -reseal -noreboot
- Select the Run this script in Windows radio button.
After we have created the Sysprep DS job, we need to assign it to the source computer by dragging the job onto the source computer in the Deployment Console, while the source computer is in the Windows Operating System. This process will take approximately 15 - 35 minutes, if the job completes before that (2 minutes) then the task has failed and you must reboot the source computer and try again.
Capture the Source Image
We now need to create another job within the Deployment Console that will capture Sysprep Image. But before this job can run, we need to delete the first job from within the Deployment console.
This will then capture the stripped down version of windows xp/vista, please make sure that the source computer does not boot back into windows as you will then need to rerun the Sysprep job.
- From the DS console, create a new job titled Sysprep Capture.
- Add the following two tasks to the job:
- Add a Create Image.\sysprepXP.
- Click the Advanced button.
- Select the Do not boot to Windows checkbox.
Distribute the Sysprepped Image
Gather drivers:
Before we can distribute the Sysprep image we need to make sure we have the correct drivers. Drivers can be collected from the source computer using WinDriverGhost or by downloading and extracting the drivers from the manufacturing website.
Store these drivers in the following location:
\\servername\expresshare\drivers\model\display
\\servername\expresshare\drivers\model\nic
\\servername\expresshare\drivers\model\modem
\\servername\expresshare\drivers\model\chipset
The directory structure should match the OemPnPDriversPath option in the sysprep.inf file.
OemPnPDriversPath=drivers\audio;drivers\net;drivers\video;drivers\chipset;drivers\modem;drivers\misc1;drivers\misc2
The drivers from these folders are dynamically copied using FIRM.
Create the Deployment Server Distribute image job and add the Sysprep image to the distribution job task.
Create another scripting job and add the following script to this job:
REM token replacement on the inf file REM the next line, ReplaceTokens, is a reserved keyword, the REM statement is so DOS will ignore the command REM ReplaceTokens .\sysprep\sysprep.inf .\temp\%ID%.inf Firm copy .\temp\%ID%.inf prod:sysprep\sysprep.inf REM get rid of the old aclient.cfg file firm delete prod:aclient.cfg REM This section would normally be devoted to injecting model specific drivers echo Hardware Model number is %#!computer@model_num% if "%#!computer@model_num%" =="0K5148" goto DIM2400 if "%#!computer@model_num%" =="0G5611" goto GX280 if "%#!computer@model_num%" =="0C7195" goto GX280 REM If we didn't find a match, just exit goto Exit :DIM2400 firm -recurse copy .\drivers\Dim2400 prod:\drivers goto Exit :GX280 firm -recurse copy .\drivers\GX280 prod:\drivers goto Exit :Exit Exit
Always remember to customize this script to reflect the models of computers that are used in your environment, failing to do so, will ultimately fail the injection job.
If the above script fails to inject the drivers into the Sysprepped image then you can try and use the following script that has been modified to inject the drivers into the Sysprep image. Have used the second script more often than the first and with success. Notice the bold sections in this script has changed to reflect the correct location of the FIRM utility, otherwise the job my fail.
REM token replacement on the inf file REM the next line, ReplaceTokens, is a reserved keyword, the REM statement is so DOS will ignore the command REM ReplaceTokens .\sysprep\sysprep.inf .\temp\%ID%.inf f:\RDeploy\Windows\Firm copy .\temp\%ID%.inf prod:sysprep\sysprep.inf pause REM get rid of the old aclient.cfg file f:\RDeploy\Windows\firm delete prod:aclient.cfg pause REM This section would normally be devoted to injecting model specific drivers echo Hardware Model number is %#!computer@prod_name% pause if "%#!computer@prod_name%" =="HP Compaq dc7600 Small Form Factor" goto DC7600 pause if "%#!computer@model_num%" =="0G5611" goto GX280 if "%#!computer@model_num%" =="0C7195" goto GX280 REM If we didn't find a match, just exit pause goto Exit :DC7600 f:\RDeploy\Windows\firm -recurse copy .\drivers\DC7600 prod:\drivers pause goto Exit :GX280 f:\RDeploy\Windows\firm -recurse copy .\drivers\GX280 prod:\drivers goto Exit :Exit exit
Hardware independent Imaging from DVD/Flash to follow.
A decent overview
but I am failing to see the different angle.
Gracias
Ooof, alot of tensity today.
Thanks for sharing Antonp. I know that it takes a lot of work to write up an article and I always enjoy seeing what another Altiris Admin is using at their place of work. Cheers!
"The happiness of your life, depends on the quality of your thoughts."
a small variation for scalability...
Hi Anton,
You can make this a little slicker by naming your driver folders on the server by the product name. In your script then just copy the driver folders down by the product name.
This means your script never needs to change. To support new hardware, just add the appropriately named folder on the server.
If you use DOS automation, you can use DIR /X to generate the DOS pathname. WinPE and Linux won't have a problem though in seeing the long names.
We did this a while back, and we now never have to touch the scripts to add driver support to our HII process.
Kind Regards,
Ian./
Ian Atkin
Senior Developer for the ICT Support Team,
Oxford University, UK
example job
Ian is right. I do the same thing.
In the effort of being more constructive with my comments, here is what I use for WinPE. To inject a hal just place the proper one in the root of the drivers folder for that model. If your model has spaces, replace them with underscores in the folder name where the drivers are copied from.
REM Deploy XP SP3 Image and Drivers
REM ReplaceTokens .\Images\Sysprep\XPACPI3.txt .\temp\%ID%-sp3.inf
%ALTIRIS_SHARE%\RDeploy\Windows\rdeployt.exe -noprompt -md -f%ALTIRIS_SHARE%\images\XPSP3.IMG -sz1:100p -nobw -nooem
%ALTIRIS_SHARE%\RDeploy\Windows\Firm.exe Copy %ALTIRIS_SHARE%\temp\%ID%-sp3.inf PROD:\Sysprep\Sysprep.inf
DEL %ALTIRIS_SHARE%\temp\%ID%-sp3.inf
REM get rid of the old aclient.cfg file
%ALTIRIS_SHARE%\RDeploy\Windows\firm.exe delete prod:aclient.cfg
REM inject the aclient source and inp
%ALTIRIS_SHARE%\RDeploy\Windows\firm.exe copy .\Aclient.exe PROD:\drivers\_post\aclient\Aclient.exe
%ALTIRIS_SHARE%\RDeploy\Windows\firm.exe copy .\Aclient.inp PROD:\sysprep\Aclient.inp
echo Hardware Model number is %#!computer@model_num%
set model=%#*"SELECT REPLACE(model_num,' ','_') FROM computer WHERE computer_id=%ID%"%
:SP3
%ALTIRIS_SHARE%\RDeploy\Windows\firm.exe -recurse copy .\Images\Drivers\XPPROSP3\%model% PROD:\drivers
if exist %ALTIRIS_SHARE%\Images\Drivers\XPPROSP3\%model%\hal.dll goto InjectHAL
goto Exit
:InjectHAL
%ALTIRIS_SHARE%\RDeploy\Windows\firm.exe Copy PROD:\drivers\hal.dll PROD:\windows\system32\hal.dll
goto Exit
:Exit
exit
First off let me say thank
First off let me say thank you for posting the script. I wanted to give it a go. But am a bit confused about what it dose.
Can you explain your script a bit to me. If you don't mind I assume any thing between %altiris_share% is replaced with the actual share correct? Is it possible to replace the typical place where drivers are stored and instead use my package server? My images are also on my package server.
Thank you for any help you can provide.
You're welcome
I guess you could get as creative as you want. %altiris_share% typically resolves to F: . You could change that with any variable you want. You could use %SITE% and specify the site property on each client. You could use DFS and hardcode the path. You could also get more advanced and use some logic to determine the clients networking info and map to a local server based on that. Skys the limit.
dose this look right
Ok I have replaced the share names with what I think is correct. The hardware independent image i wish to deploy is called sysprep.img and my images are on server c701-ws-pack-10 under the share mcmillan\images\windows\ all my drivers sysprep stuff and images are on that server. Dose the below look right? I was not sure about this line F:\RDeploy\Windows\Firm.exe Copy F:\temp\%ID%-sysprep.inf PROD:\Sysprep\Sysprep.inf
REM Deploy XP Sysprep image with SP3 and Drivers
REM ReplaceTokens .\Images\Sysprep\XPACPI3.txt .\temp\%ID%-sp3.inf
F:\RDeploy\Windows\rdeployt.exe -noprompt -md -f \\c701-ws-pack-10\mcmillan\images\\windows\sysprep.IMG -sz1:100p -nobw -nooem
F:\RDeploy\Windows\Firm.exe Copy F:\temp\%ID%-sysprep.inf PROD:\Sysprep\Sysprep.inf
DEL F:\temp\%ID%-sp3.inf
REM get rid of the old aclient.cfg file
F:\RDeploy\Windows\firm.exe delete prod:aclient.cfg
REM inject the aclient source and inp
F:\RDeploy\Windows\firm.exe copy .\Aclient.exe PROD:\drivers\_post\aclient\Aclient.exe
F:\RDeploy\Windows\firm.exe copy .\Aclient.inp PROD:\sysprep\Aclient.inp
echo Hardware Model number is %#!computer@model_num%
set model=%#*"SELECT REPLACE(model_num,' ','_') FROM computer WHERE computer_id=%ID%"%
:SP3
F:\RDeploy\Windows\firm.exe -recurse copy \\c701-ws-pack-10\mcmillan\Drivers\%model% PROD:\drivers
if exist \\c701-ws-pack-10\mcmillan\Drivers\%model%\hal.dll goto InjectHAL
goto Exit
:InjectHAL
F:\RDeploy\Windows\firm.exe Copy PROD:\drivers\hal.dll PROD:\windows\system32\hal.dll
goto Exit
:Exit
exit
REM Deploy XP Sysprep image
REM Deploy XP Sysprep image with SP3 and Drivers
REM ReplaceTokens .\Images\Sysprep\XPACPI3.txt .\temp\%ID%-sp3.inf
Make sure this is the path to your sysprep template and then the line you asked about will work.
F:\RDeploy\Windows\rdeployt.exe -noprompt -md -f \\c701-ws-pack-10\mcmillan\images\windows\sysprep.IMG -sz1:100p -nobw -nooem
This will only work on newer version of the DS where UNC imaging is supported. If you aren't using one of the last two revisions (?) then you need to map to \\c701-ws-pack-10\mcmillan in your PXE bootdisk I think. I believe you can use drive letters but I have only used linux for remote imaging, and the script above is for winPE. I pull everything from the DS share in the WinPE script. Just try it and see I guess (F:\RDeploy\Windows\rdeployt.exe -noprompt -md -fg:\images\windows\sysprep.IMG -sz1:100p -nobw -nooem) . You have a space between -f and your path, take that out. Also you had an extra '\' in front of the "\windows\" part of the path.
UNC paths can be used for the driver injection part regardless of your version of DS.
duplicate post
duplicate
Thanks
Thanks guys for your comments on this article, will certainly keep your constructive comments in mind for future use.
Technical Consultant
Http://www.alttech.co.za
What about the Universal Imaging Utility?
We use Universal Imaging Utility (http://www.binaryresearch.net/theuiu) from Binary Research, the guys who first developed Ghost. It eliminates the need to search for drivers and also deals with Sysprep.
Drivers.... Don't you hate em?
I'm really old fashioned when it comes to drivers. I want to know exactly what i'm getting, so I tend to avoid collection utilities and download them straight from the desktop vendor.
That way, you are sure to get the latest drivers into your builds and you have some idea of versioning. Otherwise you can easily find your new desktops have drivers which year old drivers installed.
But on this subject, I accept I'm a control freak!
I've always thought it would be great if Altiris would provide the driver library module where it would automatically keep a driver library for the major deskop vendors. That would be cool.....
Kind Regards
Ian./
Ian Atkin
Senior Developer for the ICT Support Team,
Oxford University, UK
DeployAnywhere
Ian: DeployAnywhere does HAL, NIC and Mass Storage (lifesaver!). Last year at ManageFusion, they hinted that it would do much more in the future.
DeployAnywhere DriversDB
It will be cool if they could further develop the DeployAnywhere drivers DB to include more than just those 2 driver groups, Network and Mass Storage, to include, display, etc. Would be a lifesaver or shall i say a time saver!
Technical Consultant
Http://www.alttech.co.za
I missed ManageFusion.... if only I had know it was the last!
So does that mean the HAL issue from DS6.9SP1 with DeployAnywhere is now solved in SP2?
The biggest problem with DeployAnywhere and Altiris is that its a late addition to the toolset, and still without the functionality/reliability that most of us have from our own HII process built up over the years.
And, being frank -Deploy Anwhere will likely only mature when XP is end-of-life. Not great timing. My hope is that the DeployAnywhere team will expand functionality rapidly to include Windows 7 when it's released. That way, when we're forced to move off XP, our favorite Desktop Management vendor will have done all the work for us!
Kind Regards,
Ian./
Ian Atkin
Senior Developer for the ICT Support Team,
Oxford University, UK
Would you like to reply?
Login or Register to post your comment.