Registered member login:
Register Now
Altirigos » Deployment Solution » Imaging - Bootworks/Rdeploy » Dynamic Mass Storage Device Driver Injection during Mini Setup Failing

» Current Poll
Vista?
Staying on XP until Windows 7 - 72.14%
101 Votes
Already on Vista - 10.71%
15 Votes
Planning an upgrade to Vista soon - 10.00%
14 Votes
Other (please explain) - 7.14%
10 Votes
Total Votes: 140
You may not vote on this poll.
» Stats
Members: 6,831
Threads: 9,767
Posts: 47,805
Top Poster: Nick (4,800)
Welcome our newest member, jdh2000
» Online Users: 46
3 members and 43 guests
jharings, jross, ztruelove
Most users online at once 294, 06-30-2007 at 01:24 PM.
» January 2009
S M T W T F S
28293031 1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Reply
Old 11-03-2008, 02:27 PM   #1 (permalink)
 
James McGoodwin's Avatar
 
Status: Junior Altiris Admin
Join Date: 11-14-2006
Location: Toronto
Posts: 17


Dynamic Mass Storage Device Driver Injection during Mini Setup Failing

I've been using a hardware independent deployment strategy in my office for a little over a year now. For the entity of that year, it turns out the various computer models we’ve been deploying too have all had a south bridge chipset that could be driven by the “Intel Matrix Storage Manager Driver”. That is, all ICH6 through ICH8 compatible devices.

We recently purchased a batch of T500 laptops, who's harddrivers are now controlled by the ICH9 driver set. Specifically the “Intel(R) ICH9M-E/M SATA AHCI Controller”. And suddenly when I deploy to these laptops with my HII system, I get the accursed 0x7B stop BSOD.

This has made it apparent to me that my HII system is not deploying dynamic MSD drivers to target computers. Instead, the Version 7.0.0.1020 Intel(R) Matrix driver used in our original image reference machine has been secretly included and used by every computer we’ve deployed to ever since the image was generated. Until now that’s been functional since this driver is capable of driving all ICH6 through ICH8 devices, but with these new T500’s it’s not sufficient.

Here’s my issue: I don’t know why mini setup is not picking up the Version 8.2.4.1005 Matrix drivers being injected into the target after image deployment.
Here’s some quick and rough background on our HII system.

It comes in two phases:
Phase 1) Scripted OS install to a reference machine
Phase 2) Deployment of sealed image from referenced machine.

For simplicities sake, I’m focusing this topic on my Phase 2 steps.

Here are some quick details on my environment:
Code:
DS Version: Deployment Solution 6.8
Operating System being Deployed: Windows XP SP2
Target Devices: IBM/Lenovo family laptops and desktops. Single/dual core, IDE/SATA drives.
Here are some assumptions I’ve built my strategy around:

A) You can script any thing…*any thing*, and I have thus intentionally avoided using HIITools and the built in Altiris Deployment Job tasks designed to help deploy HII images. The history for this reason is a little long and convoluted, but suffice to say, I manage driver injections and every thing else related to both Phase 1 and 2 via hand written batch scripts and careful control of my HII system.

B) All drivers required by a target computer are injected to that machine just after image deployment but before reboot to production. Mini Setup, IE the moment the shrink wrapped OS unpacks itself and commences initializing the operating system, is expected to find these drivers and install them on demand.

C) It is assumed that Mass Storage Device drivers can be installed by mini-setup at execution time, just the same as any other driver.

D) On the deployment server, all device drivers are stored in <server>\express\sysprep\models\<targetmodel>\driv ers\

E) On the Deployment Server, Mass Storage Device drivers are stored in <server>\express\sysprep\models\MSD\. This folder contains subdirectories holding specific drivers for each type of controller: IE drivers for Intel Matrix ICH7 and ICH8 devices are stored in the “ICH7SATA” and “ICH8SATA” folders.

It also holds a TEXTMODE folder that contains the initial 7.0.0.1020 Version of the Intel Matrix driver. This folder is used for scripted OS install during Phase 1, which isn’t being discussed yet.


F) On the target computer, all drivers, both model specific and MSD drivers, are stored in C:\drivers\.

G) Model Specific drivers are organized into “buckets” with in the “drivers” directory. Thus, a directory structure like this is used:
Code:
C:\drivers\
  +---Audio
  +---NIC
  +---SYS1
  +---SYS2
  …
  +---SYS9
  \---Video
The NIC, Audio and Video buckets are self evident.

The Sys[1-9] buckets contain device drivers for chipset, card readers, finger print scanners, etc; In short, any other various and incidental device driver other than the core three. (Chipset drivers aren’t “incidental”, but what ever)


This is how we are currently doing our Phase 2 Deployments:
1) Deploy our HII image to a target computer

2) From Dos Managed Boot and execute a batch script that will inject device drivers into a computer. This script is one of the major work horses in this phase, so I will break it down here

2a) Detect a computers product name and read through a series of batch IF statements constructed like this:
Code:
if "%#!computer(at)prod_name%" =="818332U" goto 818332U

Posters Note: I had to replace the -at- symbol here with (at) because I was being told I couldn't post external links.
If a match is found, the 818332U subroutine is jumped into and drivers/HALs for that model are injected via FIRM. Drivers are stored in C:\Drivers\ and the Hals are dispersed into C:\windows\system32


2b) Once model specific drivers are injected, an install package for the aclient is injected via Firm. It is stored in C:\drivers\Aclient


2c) Next the Mass Storage Device Drivers are injected into the computer.


2d) Finally, the actual Sysprep program is injected into C:\sysprep. Note that this DOES NOT include the sysprep.inf file.


3) Still in Dos Managed Boot, a second script runs that does three things:

3a) Uses the “REM ReplaceTokens” command to cause Altiris to do a variable replacement on our customized sysprep.inf. This token replacement sets the computers name to it’s embedded Asset Tag. The updated .inf is then copied into the target computer.
NOTE that this sysprep.inf does NOT contain a [SysprepMassStorage] section.

3b) Next the separate file syspmsd.inf is copied from here: copy <server>\express\sysprep\Models\MSD\syspmsd.inf. That file contains ONLY the [SysprepMassStorage] section. It has been updated with the device ID’s for our various target computers, and points each device id explicitly to the appropiate MSD driver. So, for example:
Code:
PCI\VEN_8086&DEV_2825=%SystemDrive%\drivers\ICH8SATA\ICH8SATA.inf
Or

Code:
PCI\VEN_8086&DEV_2821&CC_0106=%SystemDrive%\drivers\82801HEM\iaahci.inf
3c) Finally, this script will concatenate the two files and produce one, complete sysprep.inf that is then stored in C:\sysprep\ for use at mini-setup.


4) The computer is then restarted into production mode to allow the deployed OS to unwrap and run through Mini Setup. It’s at this point that I get the 0x7B stop for unmountable boot volume.

Sysprep and other stuff:
Ok, so at this point I should explain quickly how I’m syspreping my reference system and designing the sysprep.inf file.

I shrink wrap the reference computer using the following command:
Code:
 C:\sysprep\sysprep.exe -quiet -mini -reseal  –reboot
And my sysprep.inf file is here:
Code:
  [Unattended]
      
              DriverSigningPolicy=Ignore
              InstallFilesPath=C:\Drivers
              OemPnpDriversPath="windows\inf;windows\system32;drivers\SYS1;drivers\SYS2;drivers\SYS3;drivers\SYS4;drivers\SYS5;drivers\SYS6;drivers\SYS7;drivers\SYS8;drivers\SYS9;drivers\SYS10;drivers\NIC;drivers\WNIC;drivers\Audio;drivers\Video;drivers\MODEM"
              OemSkipEula=Yes    
              UpdateInstalledDrivers=Yes
  
  [GuiUnattended]
              AutoLogonCount=1
              AutoLogon=Yes
              AdminPassword="<Local Admin Password>"
              EncryptedAdminPassword=NO
              OemSkipWelcome=1
              OEMSkipRegional=1
              TimeZone=35
              
  [UserData]
              ComputerName=%ASSETTAG%
              FullName="Fasken Martineau DuMoulin LLP"
              OrgName="Fasken Martineau DuMoulin LLP"
              ProductKey=<Serial For OS>
  
  [Display]
              BitsPerPel=32
              Vrefresh=60
              Xresolution=1024
              YResolution=768
  
  
  [Networking]
      InstallDefaultComponents=Yes
  
  
  [Identification]
              DomainAdmin=<Domain Administrator>
              DomainAdminPassword=<Domain Admin password>
              JoinDomain=<our domain>
  
  
  [Proxy]
              Proxy_Enable=0
              Use_Same_Proxy=0
  
  [GuiRunOnce]
              Command0="c:\drivers\aclient\Aclient.cmd"
              Command1="c:\drivers\aclient\Addgroup.cmd"
              Command2="ping -w 60000 -n 1 199.199.199.199 >NUL"
              Command3="sc start aclient"
  [SysPrep]
              BuildMassStorageSection=No
I’m really scratching my head. The mini-setup detects and pulls in every other driver if I set the computer’s ACHI system to “compatibility”. That’s the only way to make these T500’s boot until I can fix this dynamic injection problem. I refuse to work around a system I built though. It will work or I’ll burn it to the ground before I *compromise* with it.


It’s a lot of information to sort through, and just me writing this post has given me some ideas, but if any one out there catches something I’ve missed, or can debunk one of my underlying assumptions I’d really appreciate the feed back.

Many thanks in advance for the help and shared ire.
James McGoodwin is offline   Reply With Quote
Old 11-03-2008, 03:36 PM   #2 (permalink)
 
Status: Super Altiris Admin
Join Date: 10-28-2005
Location: Colorado
Posts: 1,116


I'd say it's your oempnpdriverspath.

OemPnpDriversPath="windows\inf;windows\system32;dr ivers\SYS1;drivers\SYS2;drivers\SYS3;drivers\SYS4; drivers\SYS5;drivers\SYS6;drivers\SYS7;drivers\SYS 8;drivers\SYS9;drivers\SYS10;drivers\NIC;drivers\W NIC;drivers\Audio;drivers\Video;drivers\MODEM"

Then in your syspmsd.inf file you have different paths?!?

%SystemDrive%\drivers\ICH8SATA\ICH8SATA.inf
%SystemDrive%\drivers\82801HEM\iaahci.inf

ICH8SATA isn't in your oempnpdriverspath. Neither is 82801HEM. So how will it know about the drivers?
Quote:
Originally Posted by James McGoddwin
the Version 7.0.0.1020 Intel(R) Matrix driver used in our original image reference machine has been secretly included and used by every computer we’ve deployed
.....secret's out

I suggest you slip them into one of the SYS folders that is unused then change the Mass storage entries to match that. If you use SYS make it static (i.e. SYS10 is alaways for SATA)

If it is still possible I would re-sysprep your reference machine with a drivers\sata entry in the oempnpdriverspath so you have a static driver folder for your SATA stuff. If not, fortunately you were smart and put in placeholder folders with SYS[1-10] that you can use to make this work.

I looked at the T500 driver page at Lenovo and couldn't find the SATA drivers. I was trying to check the syntax of the MSD entries you are adding. The first one looks like it may need a &CC tagged on, I can't tell.
__________________
Brandon

Last edited by Brandon; 11-03-2008 at 03:50 PM..
Brandon is offline   Reply With Quote
Old 11-04-2008, 06:50 PM   #3 (permalink)
 
James McGoodwin's Avatar
 
Status: Junior Altiris Admin
Join Date: 11-14-2006
Location: Toronto
Posts: 17


I slapped my forehead as soon as you suggested the OemPnpDriversPath. Never occurred to me the MSD drivers were subject to this path.

Sadly still no love.

So, here's what I've done with your suggestion. I do actually have the ability to recreate my hii image. I've got the hii prototype process entirely scripted, so I pushed an old IBM Think Center S50 through the process.

The S50 doesn’t have an SATA controllers, it’s back from the pure PATA/IDE days. So I know the reference image being generated from it is completely unpoisioned with any remnant Intel Matrix drivers.

This is what I changed from my previously described system to incorporate Brandon’s suggestion:

OemPnpDriversPath now equals this:

OemPnpDriversPath="windows\inf;windows\system32;dr ivers\SYS1;drivers\SYS2;drivers\SYS3;drivers\SYS4; drivers\SYS5;drivers\SYS6;drivers\SYS7;drivers\SYS 8;drivers\SYS9;drivers\SYS10;drivers\NIC;drivers\W NIC;drivers\Audio;drivers\Video;drivers\MODEM;driv ers\SATA"

This update was made both in my Unattended.txt file AND my sysprep.inf file. This ensures that the updated driver path is both frozen in place after the action of sysprep, and is used when the computer is redeployed in mini-setup mode.

During redeployment, Driver injection for the T500 looks like this:

Code:
  :: Lenovo T500 Model Laptops
  if "%#!computer(at)prod_name%" =="20823HU" goto 20823HU
  :20823HU
  firm -recurse copy .\Sysprep\models\20823HU\drivers prod:\drivers
  firm -recurse copy .\Sysprep\models\MSD\ICH9SATA prod:\drivers\SATA
  goto :end
The contents of my MSD folder looks like this (I did a little clean up):
Code:
  \\<ALTIRISSERVRE>\EXPRESS\SYSPREP\MODELS\MSD
  |   syspmsd.inf
  |
  +---ICH6SATA
  |       iaahci.cat
  |       iaahci.inf
  |       iastor.cat
  |       iastor.inf
  |       iastor.sys
  |       txtsetup.oem
  |
  +---ICH7SATA
  |       iaAHCI.cat
  |       iaAHCI.inf
  |       iaStor.sys
  |       ich7ide.inf
  |
  +---ICH8SATA
  |       ich8ide.cat
  |       ICH8SATA.inf
  |       Setup.DIY
  |
  +---ICH9SATA
  |       iaahci.cat
  |       iaahci.inf
  |       iastor.cat
  |       iastor.inf
  |       iastor.sys
  |       TXTSETUP.OEM
  |
  \---TEXTMODE
          iaahci.cat
          iaahci.inf
          iastor.cat
          iastor.inf
          iastor.sys
          txtsetup.oem
And the syspmsd.inf file now looks like this:

Code:
  [SysprepMassStorage]
   
              ;Generic Drivers
              *PNP0600=%systemroot%\inf\mshdc.inf
              PCI\CC_0101=%systemroot%\inf\mshdc.inf
              PCI\VEN_8086&DEV_7111=%systemroot%\inf\mshdc.inf
              
              ;Drivers for ICH6SATA controller support
              PCI\VEN_8086&DEV_2652&CC_0106=%SystemDrive%\drivers\SATA\iaahci.inf
              PCI\VEN_8086&DEV_2653&CC_0106=%SystemDrive%\drivers\SATA\iaahci.inf
              PCI\VEN_8086&DEV_2652&CC_0104=%SystemDrive%\drivers\SATA\iastor.inf
              
              ;Drivers for ICH7SATA controller support
              PCI\VEN_8086&DEV_27C0=%SystemDrive%\drivers\SATA\ich7ide.inf
              PCI\VEN_8086&DEV_27C4=%SystemDrive%\drivers\SATA\ich7ide.inf
              PCI\VEN_8086&DEV_27DF=%SystemDrive%\drivers\SATA\ich7ide.inf
              
              ;Drivers for ICH8SATA controller support
              PCI\VEN_8086&DEV_2820=%SystemDrive%\drivers\SATA\ICH8SATA.inf
              PCI\VEN_8086&DEV_2825=%SystemDrive%\drivers\SATA\ICH8SATA.inf
              PCI\VEN_8086&DEV_2828=%SystemDrive%\drivers\SATA\ICH8SATA.inf
              PCI\VEN_8086&DEV_2850=%SystemDrive%\drivers\SATA\ICH8SATA.inf
              
              ;Drivers for ICH9SATA controller support
              PCI\VEN_8086&DEV_2681&CC_0106=%SystemDrive%\drivers\SATA\iaahci.inf
              PCI\VEN_8086&DEV_27C1&CC_0106=%SystemDrive%\drivers\SATA\iaahci.inf
              PCI\VEN_8086&DEV_27C5&CC_0106=%SystemDrive%\drivers\SATA\iaahci.inf
              PCI\VEN_8086&DEV_2821&CC_0106=%SystemDrive%\drivers\SATA\iaahci.inf
              PCI\VEN_8086&DEV_2829&CC_0106=%SystemDrive%\drivers\SATA\iaahci.inf
              PCI\VEN_8086&DEV_2922&CC_0106=%SystemDrive%\drivers\SATA\iaahci.inf
              PCI\VEN_8086&DEV_2929&CC_0106=%SystemDrive%\drivers\SATA\iaahci.inf
              PCI\VEN_8086&DEV_3A22&CC_0106=%SystemDrive%\drivers\SATA\iaahci.inf
              PCI\VEN_8086&DEV_2682&CC_0104=%SystemDrive%\drivers\SATA\iastor.inf
              PCI\VEN_8086&DEV_27C3&CC_0104=%SystemDrive%\drivers\SATA\iastor.inf
              PCI\VEN_8086&DEV_27C6&CC_0104=%SystemDrive%\drivers\SATA\iastor.inf
              PCI\VEN_8086&DEV_2822&CC_0104=%SystemDrive%\drivers\SATA\iastor.inf
              PCI\VEN_8086&DEV_282A&CC_0104=%SystemDrive%\drivers\SATA\iastor.inf
              ;end SATA support driver specification
I know Brandon brought up that my ICH7 and 8 deffinitions in my syspmsd.inf file didn’t have “&CC_” chunks on them.

Granted. I should probably rebuild those.

However, the ICH9SATA definitions seem to be configured correctly. To be explicit, the mass storage device in the T500 I’m trying to make go matches this line:


Code:
PCI\VEN_8086&DEV_2929&CC_0106=%SystemDrive%\drivers\SATA\iaahci.inf
And is references in iaahci.inf as
Code:
PCI\VEN_8086&DEV_2929&CC_0106.DeviceDesc    = "Intel(R) ICH9M-E/M SATA AHCI Controller"
It feels like I have every thing in place, it’s just not being taken up by the operating system before it has to trip over into high level disk access mode and starts it’s mini setup process.
James McGoodwin is offline   Reply With Quote
Old 11-04-2008, 07:06 PM   #4 (permalink)
 
Status: Super Altiris Admin
Join Date: 10-28-2005
Location: Colorado
Posts: 1,116


What happens if you leave it all the same but turn off SATA Native mode in the bios. Allow it to image then try to update the drivers once the machine is booting into Windows. Basically from bullet #5 on .... My Tech Blog: Enabling SATA Native Mode after XP Install

This will tell you if the oempnpdriverspath is working and also if the correct driver is being used.

If that works then you have narrowed it down to the original or injected sysprep.inf file.
__________________
Brandon

Last edited by Brandon; 11-04-2008 at 07:09 PM..
Brandon is offline   Reply With Quote
Old 11-05-2008, 10:52 AM   #5 (permalink)
 
Network23's Avatar
 
Status: Junior Altiris Admin
Join Date: 02-20-2005
Location: Vienna, , Austria
Posts: 11


Smile

My expirience on this is:
BEFORE you run Sysprep -quiet -mini -reseal -reboot your MassStorage Device Drivers must resist on your the destination computer and the sysprep.inf file must have the correct entries in the [SysprepMassStorage] Section otherwise MassStorage injection will not. MassStorage Driver injection does not work like other non MASSStorage Device Drivers injection.
Hope this helps!
Attached Files
File Type: pdf hp sata native sysprep mode dokuments .pdf (100.1 KB, 393 views)
Network23 is offline   Reply With Quote
Old 11-05-2008, 11:43 AM   #6 (permalink)
 
Status: Super Altiris Admin
Join Date: 10-28-2005
Location: Colorado
Posts: 1,116


I was afraid of exactly that, but hadn't confirmed it yet. I guess it would be nice to have a comprehensive list of devices then. I don't know if this can be pulled from a VISTA sysprep file or if a good list exists anywhere on the web already?
__________________
Brandon
Brandon is offline   Reply With Quote
Old 11-05-2008, 01:54 PM   #7 (permalink)
 
Status: Super Altiris Admin
Join Date: 10-28-2005
Location: Colorado
Posts: 1,116


After thinking about this more I wonder if you have the BMSD list run again in your template? Make sure it says BuildMassStorageSection = No or better yet don't have it at all.

I also read about having to move the iastor.sys file into the i386 folder and rename it to iastor.sy_ . Not sure why this would be required though.

EDIT: check this out, http://www.myitforum.com/forums/m.as...17&mpage=1&key=


The -PNP switch might be the trick!

I also saw this link about the critical DB prep (install.cmd) XP blue screening in AHCI mode before sysprep mini setup runs when imaging machine - Windows XP and Vista discussion - lenovo community

Hopefully -PNP can work around this.
__________________
Brandon

Last edited by Brandon; 11-05-2008 at 03:09 PM.. Reason: updated links
Brandon is offline   Reply With Quote
Old 11-05-2008, 02:04 PM   #8 (permalink)
 
James McGoodwin's Avatar
 
Status: Junior Altiris Admin
Join Date: 11-14-2006
Location: Toronto
Posts: 17


Thanks guys for taking the time here. I appreciate your help.

First, I'll talk to Brandon's response to me last post:

Quote:
What happens if you leave it all the same but turn off SATA Native mode in the bios. Allow it to image then try to update the drivers once the machine is booting into Windows. Basically from bullet #5 on .... My Tech Blog: Enabling SATA Native Mode after XP Install
This will tell you if the OemPnpDriversPath is working and also if the correct driver is being used.
If that works then you have narrowed it down to the original or injected sysprep.inf file.


Ok, so I set the laptop to compatibility mode. Got into the desktop after sysprep ran and changed the "Standard Dual Chanel PCI IDE Controller"s driver to use the driver set hosted in C:\drivers\sata.

I set it to use the specific model that's found in the T500's ("Intel(R) ICH9M-E/M SATA AHCI Controller") and restarted it. At POST I entered the bios, reconfigured the controller for ACHI mode and then allowed the computer to boot up into windows.

It's happy and humms along. So that confirms that I have the right SATA driver being injected into the image prior to sysprep time.

This lends more credence to the statement that sysprep isn't pulling these drivers in as it does other PNP drivers.


Ok, so now to Network32

Quote:
My expirience on this is:
BEFORE you run Sysprep -quiet -mini -reseal -reboot your MassStorage Device Drivers must resist on your the destination computer and the sysprep.inf file must have the correct entries in the [SysprepMassStorage] Section otherwise MassStorage injection will not. MassStorage Driver injection does not work like other non MASSStorage Device Drivers injection.
Hope this helps!


Sigh...I have to reach the same conclusion here. The Mass Storage Device Drivers for a target have to be included in the HII prototype image at shrink-wrap time in order for the captured image to be deployed to the supported target. Wow...that's a complete absolute drag.

Ok, consider this. Let's pretend I have a shop with a multitude of product families: Lenovo, HP, Toshiba, what not. Praise the deity of your choice that I don’t, but if that scenario really was my personal hell, how could I create a HII image to support all those targets?

Let's assume each target utilized a different MSD driver for it's SATA controller. For example:

Lenovo's got the Intel Matrix Drivers.
HP's EliteBook 2530P uses the Intel Matrix drivers...ok, bad example...
Toshiba's Tecra M10-ST9110 uses the Intel Matri..what? So..hang on...what DOESN't use the Intel Matrix drivers now??

Let's start over. Pretend the Lenovo, HP and Toshiba products DIDN't all share the same controller.
Would the following work to support the diverse targets with a single HII image:
From Unattended.txt
Code:
[MassStorageDrivers]
 ;Lenovo Driver Definitions for the ICH9 Intel Matrix Drivers (V 8.2.4.1005)
 "Intel(R) ESB2 SATA AHCI Controller" = OEM
 "Intel(R) ICH9R/DO/DH SATA AHCI Controller" = OEM
 "Intel(R) ICH9M-E/M SATA AHCI Controller" = OEM


  ;Toshiba Driver Definitions for <pretend MSD Driver A> (V 1.2.3.4.500)
  "Pretend Co. (R) HappySata 12CX Controller" = OEM

  ;HP Driver Definitions for <pretend MSD Driver B> (V 6.7.8.9.000)
  "Fake Systems Inc. (R) SATAMaster 5567B Controller" = OEM

[OEMBootFiles]
 ;Driver Definitions for the ICH9 Intel Matrix Drivers (V 8.2.4.1005)
 iaStor.inf
 iaahci.inf
 iaStor.cat
 iaahci.cat
 iaStor.sys
 Txtsetup.oem

  ;Toshiba Driver Definitions for <pretend MSD Driver A> (V 1.2.3.4.500)
  hapsta.inf
  hapsta.cab
  hapsta.sys  
  Txtsetp1.oem

 ;HP Driver Definitions for <pretend MSD Driver B> (V 6.7.8.9.000)
 fkestamr.inf
 fkestamr.cab
 fkestamr.sys
 Txtsetp2.oem


and every referenced file in the OEMBootFiles list is stored in the %systemdrive%\I386\$OEM$\TEXTMODE folder on the computer at Windows setup time.

Given that setup, do you think this HII image would be deployable to all it's intended targets?

To be honest, *I* don’t, but I'm grasping here. It seems ludicrous to me to provide a mechanism (aka sysprep) that will allow for a driver agnostic image to be deployed any where...with the exception of the #1 most important driver.

It's seems sort of like a house of cards. You get one image as long as every thing uses the same hardware. You're forced to use two or more images as soon as the MSD controllers diverge. That doesn't feel right to me.

It's inconsistent, and annoying as the folks at Microsoft are, automated deployment is an area I have a feeling a lot of time, effort and thought has been focused on being consistent.

Last edited by James McGoodwin; 11-05-2008 at 02:12 PM.. Reason: Spelling Corrections
James McGoodwin is offline   Reply With Quote
Old 11-05-2008, 06:42 PM   #9 (permalink)
 
James McGoodwin's Avatar
 
Status: Junior Altiris Admin
Join Date: 11-14-2006
Location: Toronto
Posts: 17


Quote:
Originally Posted by Brandon View Post
After thinking about this more I wonder if you have the BMSD list run again in your template? Make sure it says BuildMassStorageSection = No or better yet don't have it at all.

I also read about having to move the iastor.sys file into the i386 folder and rename it to iastor.sy_ . Not sure why this would be required though

EDIT: check this out,
<snipped>
The -PNP switch might be the trick!

I also saw this link about the critical DB prep (install.cmd) XP blue screening in AHCI mode before sysprep mini setup runs when imaging machine - Windows XP and Vista discussion - Lenovo community

Hopefully -PNP can work around this.
Yeah, I had come across both the MyITForum and the Lenovo forum posts. I rejected the recommendations in the Lenovo post because that’s anathema to the whole concept of HII. It’s supposed to automatically load the SATA drivers in. The ACHI mode => Compatibility mode => ACHI mode skipping game works, but isn’t a reasonable solution for deploying to computers on the floor.

As for the My IT Post, I threw the –pnp switch into my process with no change. The deployed image still blue screens on initial boot. :/

I keep posting these huge huge posts, but if folks don’t mind, I’m going to try a full disclosure of how my HII system is configured. If nothing else, it took me three months to get all this working. Hopefully someone stuck with the same task can find some of these config files and make use of them.

The following configuration is my current config, incorporating all the modifications discussed through out this thread. It still fails to take up the injected HCI9 drivers for my T500, but it’s a lot cleaner than when I started all this.

Once again, I have had to replace all the –at- characters with (at) because I don’t have a high enough post count to allow “url” posting. It’s a filtration bug that will plague me until I’ve posted over 15 times. If you see (at) just replace it with the character you get when you hold down the Shift key and press the number 2




Phase 1 – Reference Computer Automated build

Step 1 – Format drive as Fat32 and reboot


Step 2 – Inject drivers for model computer being used as reference computer:
---Script run from Dos automation, writing to a Fat32 File system
Code:
  (at)echo on
  echo This section is used to locate and use specific drivers based on 
  echo the model of computer running the job.
   
  echo Hardware Model number is %#!computer(at)model_num%
  echo Hardware Model number is %#!computer(at)prod_name%
   
  :: First we're going to purge our OEM folder to clear out any drivers that might have been left from a previous scripted install. 
  rmdir /S /Q \\<altirisserver>\eXpress\deploy\WinXPSP2\I386\$OEM$\
  mkdir \\<altirisserver>\eXpress\deploy\WinXPSP2\I386\$OEM$\$1\
   
  :: this will switch our execution to the specific model we're building for. 
  if "%#!computer(at)prod_name%" =="8215D1U" goto 8215D1U
  if "%#!computer(at)prod_name%" =="818332U" goto 818332U
  if "%#!computer(at)prod_name%" =="880894U" goto 880894U
  if "%#!computer(at)prod_name%" =="200746U" goto 200746U
  if "%#!computer(at)prod_name%" =="646557U" goto 646557U
  if "%#!computer(at)prod_name%" =="767374U" goto 767374U
  if "%#!computer(at)prod_name%" =="6072BNU" goto 6072BNU
  if "%#!computer(at)prod_name%" =="64659UU" goto 64659UU
  if "%#!computer(at)prod_name%" =="20823HU" goto 20823HU
   
  ::next is an example of how to poll for the model number of a computer using a sql query.
  ::if "%#*"SELECT REPLACE(model_num, ' ', '_') FROM computer WHERE computer_id=%ID%"%" == "440BX_Desktop_Reference_Platform" goto 440BX
   
  REM If no match is found, exit the script.
  goto :end
   
  :8215D1U
  xcopy /E /I /Q /H /R /Y .\Sysprep\models\8215D1U\drivers\NIC  .\deploy\WinXPSP2\I386\$OEM$\$1\drivers\NIC
  goto :end
   
  :818332U
  xcopy /E /I /Q /H /R /Y .\Sysprep\models\818332U\drivers\NIC  .\deploy\WinXPSP2\I386\$OEM$\$1\drivers\NIC
  goto :end
   
  :880894U
  xcopy /E /I /Q /H /R /Y .\Sysprep\models\880894U\drivers\NIC  .\deploy\WinXPSP2\I386\$OEM$\$1\drivers\NIC
  goto :end
   
  :200746U
  xcopy /E /I /Q /H /R /Y .\Sysprep\models\200746U\drivers\NIC  .\deploy\WinXPSP2\I386\$OEM$\$1\drivers\NIC
  goto :end
   
  :646557U
  xcopy /E /I /Q /H /R /Y .\Sysprep\models\646557U\drivers\NIC .\deploy\WinXPSP2\I386\$OEM$\$1\drivers\nic
  goto :end
   
  :767374U
  xcopy /E /I /Q /H /R /Y .\Sysprep\models\767374U\drivers\NIC .\deploy\WinXPSP2\I386\$OEM$\$1\drivers\nic
  goto :end
   
  :6072BNU
  xcopy /E /I /Q /H /R /Y .\Sysprep\models\6072BNU\drivers\NIC .\deploy\WinXPSP2\I386\$OEM$\$1\drivers\nic
  goto :end
   
  :64659UU
  xcopy /E /I /Q /H /R /Y .\Sysprep\models\64659UU\drivers\NIC .\deploy\WinXPSP2\I386\$OEM$\$1\drivers\nic
  goto :end
   
  :20823HU
  xcopy /E /I /Q /H /R /Y .\Sysprep\models\20823HU\drivers\NIC .\deploy\WinXPSP2\I386\$OEM$\$1\drivers\nic
  goto :end
   
   
   
  :end
   
  ::Here is where we bring in the Mass Storage Drivers for all the available MSD's in the office.
  ::These drivers are referenced in the already pre-loaded sysprep.inf file that was inserted into
  ::the production drive at image capture time. 
  xcopy /E /I /Q /H /R /Y .\sysprep\Models\MSD .\deploy\WinXPSP2\I386\$OEM$\$1\drivers
  xcopy /E /I /Q /H /R /Y .\sysprep\Models\MSD\TEXTMODE .\deploy\WinXPSP2\I386\$OEM$\TEXTMODE
   
  :: Ok, so while working on the T61's, and using them as a source target for the HII image, I discovered that certain
  :: driver types, like the Audio Driver set, remain resident in the image, even after Syspreping it. Now, sysprep is 
  :: SUPPOSED to remove all vestiges of the previous system's drivers, but in the case of the T61 audio set, it does not. 
  :: So below is going to be a place where we'll keep a list of purges to prune out Non Scripted OS Required drivers. 
  :: This is for things like the AUDIO or VIDEO driver folders. Definitely NOT for the SYS or NIC folders though. 
  REM if exist ".\deploy\WinXPSP2\I386\$OEM$\$1\drivers\audio" rmdir /Q /S ".\deploy\WinXPSP2\I386\$OEM$\$1\drivers\audio"
   
  :: i don’t remember what this does, so REMed out...
  REM if exist ".\deploy\WinXPSP2\I386\$OEM$\$1\windows\" rmdir /Q /S ".\deploy\WinXPSP2\I386\$OEM$\$1\windows\"
   
  exit
Step 3 – Inject unattended script and execute Windows Setup
---Script run from Dos automation, writing to a Fat32 file system
Code:
  echo on
  rem Inject Unattended Script and execute Windows Setup
  REM bootwork unload
  c:
  md altiris
  cd altiris
  md aclient
  md aagent
  md files
  cd files
  md sp
  F:
  F:\bootwiz\platfo~1\dos\MsDos\OS\smartdrv.exe
  copy F:\deploy\FMDHIISP.txt c:\altiris\files\unattend.txt
  copy F:\agents\aclient\altiri~3.exe c:\altiris\aclient\aclient.exe
  copy F:\agents\aclient\aclient.inp c:\altiris\aclient\aclient.inp
  F:\deploy\WinXPSP2\i386\WINNT.EXE /s:F:\deploy\WinXPSP2\i386 /t:c: /u:c:\altiris\files\unattend.txt
Unattend.txt contents:
Code:
  [Unattended]
              CrashDumpSetting=0
              DUDisable=Yes
              DriverSigningPolicy=Ignore
              EMSSkipUnattendProcessing=Yes
              FileSystem=ConvertNTFS
              InstallFilesPath=C:\Drivers
              NoWaitAfterTextMode=1
              NoWaitAfterGUIMode=1
              OemPnpDriversPath="windows\inf;windows\system32;drivers\SYS1;drivers\SYS2;drivers\SYS3;drivers\SYS4;drivers\SYS5;drivers\SYS6;drivers\SYS7;drivers\SYS8;drivers\SYS9;drivers\SYS10;drivers\NIC;drivers\WNIC;drivers\Audio;drivers\Video;drivers\MODEM;drivers\SATA"    
              OemPreinstall=Yes
              OemSkipEula=Yes
              UnattendMode=FullUnattended
              UnattendSwitch=Yes
              UpdateInstalledDrivers=Yes
   
   
  [GuiUnattended]
              AutoLogon=Yes
              AutoLogonCount=1
              AdminPassword="<removed>"
              EncryptedAdminPassword=NO
              OemSkipWelcome=1
              OEMSkipRegional=1
              TimeZone=35
   
  [UserData]
              ComputerName=HIIPROTOTYPE
              FullName="<removed>"
              OrgName="<removed>"
              ProductID=<removed>
              ProductKey=<removed>
   
  [Display]
              BitsPerPel=32
              Vrefresh=60
              Xresolution=1024
              YResolution=768
   
  [SetupMgr]
              DistShare=windist
              DistFolder=C:\windows\source\i386
   
  [Identification]
              DomainAdmin=<removed>
              DomainAdminPassword=<removed>
              JoinDomain=<removed>
   
  [IEPopupBlocker]
              BlockPopups=No        
   
  [PCHealth]
              ER_Enable_Reporting=0
              RA_AllowUnsolicited=0
              RA_AllowToGetHelp=0
   
  [Networking]
      InstallDefaultComponents=Yes
   
  [WindowsFirewall]
              Profiles = WindowsFirewall.TurnOffFirewall
   
  [WindowsFirewall.TurnOffFirewall]
              Mode = 0
   
  [Proxy]
      Proxy_Enable=0
      Use_Same_Proxy=0
      
  [GuiRunOnce]
              Command0="c:\altiris\aclient\aclient.exe c:\altiris\aclient\aclient.inp -silent -install -scriptedinstall"
   
  [RegionalSettings]
              Language=00001009
              LanguageGroup=1
   
  [Shell]
              ; Use classic start menu
              DefaultStartPanelOff=Yes
              ; Use classic visual style
              DefaultThemesOff=Yes
   
  [SysPrep]
              BuildMassStorageSection=No
   
  [MassStorageDrivers]
   
              ;Driver Definitions for the ICH9 Intel Matrix Drivers (V 8.2.4.1005)
              "Intel(R) ESB2 SATA AHCI Controller" = OEM
              "Intel(R) ICH7R/DH SATA AHCI Controller" = OEM
              "Intel(R) ICH7M/MDH SATA AHCI Controller" = OEM
              "Intel(R) ICH8R/DH/DO SATA AHCI Controller" = OEM
              "Intel(R) ICH8M-E/M SATA AHCI Controller" = OEM
              "Intel(R) ICH9R/DO/DH SATA AHCI Controller" = OEM
              "Intel(R) ICH9M-E/M SATA AHCI Controller" = OEM
              "Intel(R) ICH10R SATA AHCI Controller" = OEM
              "Intel(R) ESB2 SATA RAID Controller" = OEM
              "Intel(R) ICH7R/DH SATA RAID Controller" = OEM
              "Intel(R) ICH7MDH SATA RAID Controller" = OEM
              "Intel(R) ICH8R/ICH9R/ICH10R SATA RAID Controller" = OEM
              "Intel(R) ICH8M-E/ICH9M-E SATA RAID Controller" = OEM
              "IDE CD-ROM (ATAPI 1.2)/PCI IDE Controller" = "Retail"
   
   
  [OEMBootFiles]
   
              ;Driver Definitions for the ICH9 Intel Matrix Drivers (V 8.2.4.1005)
              iaStor.inf
              iaahci.inf
              iaStor.cat
              iaahci.cat
              iaStor.sys
              Txtsetup.oem
   
  [Components]
  AccessOpt = On
  Appsrv_console = Off
  Aspnet = Off
  BitsServerExtensionsISAPI = On
  BitsServerExtensionsManager = On
  Calc = On
  Certsrv = Off
  Certsrv_client = Off
  Certsrv_server = Off
  Charmap = On
  Chat = Off
  Clipbook = On
  Cluster = Off
  Complusnetwork = Off
  Deskpaper = On
  Dialer = On
  Dtcnetwork = Off
  Fax = Off
  Fp_extensions = Off
  Fp_vdir_deploy = Off
  Freecell = Off
  Hearts = Off
  Hypertrm = On
  IEAccess = On
  IEHardenAdmin = On
  IEHardenUser = On
  Iis_asp = Off
  Iis_common = Off
  Iis_ftp = Off
  Iis_inetmgr = Off
  Iis_internetdataconnector = Off
  Iis_nntp = Off
  Iis_serversideincludes = Off
  Iis_smtp = Off
  Iis_webdav = Off
  Iis_www = Off
  Indexsrv_system = Off
  Inetprint = On
  Licenseserver = Off
  Media_clips = On
  Media_utopia = Off
  Minesweeper = Off
  Mousepoint = Off
  Msmq_ADIntegrated = Off
  Msmq_Core = Off
  Msmq_HTTPSupport = Off
  Msmq_LocalStorage = Off
  Msmq_MQDSService = Off
  Msmq_RoutingSupport = Off
  Msmq_TriggersService = Off
  Msnexplr = Off
  Mswordpad = On
  Netcis = Off
  Netoc = On
  Objectpkg = Off
  OEAccess = Off
  Paint = On
  Pinball = Off
  Pop3Admin = Off
  Pop3Service = Off
  Pop3Srv = Off
  Rec = On
  Reminst = Off
  Rootautoupdate = On
  Rstorage = Off
  Sakit_web = Off
  Solitaire = Off
  Spider = Off
  Templates = On
  TerminalServer = Off
  TSWebClient = Off
  UDDIAdmin = Off
  UDDIDatabase = Off
  UDDIWeb = Off
  Vol = On
  WbemMSI = On
  WMAccess = Off
  WMPOCM = On
  Wms = Off
  Wms_admin_asp = Off
  Wms_admin_mmc = Off
  Wms_isapi = Off
  Wms_server = Off
  Zonegames = Off
Step 4 – Let windows do it’s initial unattended setup.


Step 5 – User environment customization and OS configuration
This is done via a huge set of registry files and a Security Database that’s applied to the Default User profile. Dotnet 1.1, 2.0 and 3.0 are installed, as is the Microsoft Hive Cleanup tool. The entire i386 folder is replicated down to C:\i386 from the installation source referenced previously.

Confirmed that this process works 100% of the time on both reference computers using the HCI9SATA drivers, and on simple PATA/IDE reference computers.




Phase 2 – Reference Computer Sysprep and Image Capture
Step 1 – Restart computer into Production Windows OS and auto login as administrator


Step 2 – Copy deploy.cab contents to C:\sysprep


Step 3 – Copy contents of \\<AltirisServer>\express\sysprep\models\msd to C:\drivers
Code:
  H:\>tree /a /f \\<altirisserver>\express\sysprep\models\msd
  Folder PATH listing for volume Altiris
  Volume serial number is 00500058 C078:6953
  \\<altirisserver>\EXPRESS\SYSPREP\MODELS\MSD
  |   Copy of syspmsd.inf
  |   syspmsd.inf
  |   syspmsd.inf~bak
  |
  +---aaaDocs
  |       An error occurred while trying to update your registry message.URL
  |       Backup of syspmsd.inf (15-10-07)
  |       Blog - A Geeks guide to storage drivers (Windows XP and Windows PE 2005).URL
  |
  +---ICH6SATA
  |       iaahci.cat
  |       iaahci.inf
  |       iastor.cat
  |       iastor.inf
  |       iastor.sys
  |       txtsetup.oem
  |
  +---ICH7SATA
  |       iaAHCI.cat
  |       iaAHCI.inf
  |       iaStor.sys
  |       ich7ide.inf
  |
  +---ICH8SATA
  |       ich8ide.cat
  |       ICH8SATA.inf
  |       Setup.DIY
  |
  +---ICH9SATA
  |       iaahci.cat
  |       iaahci.inf
  |       iastor.cat
  |       iastor.inf
  |       iastor.sys
  |       TXTSETUP.OEM
  |
  \---TEXTMODE
          iaahci.cat
          iaahci.inf
          iastor.cat
          iastor.inf
          iastor.sys
          ICH9SATA.txt
          TXTSETUP.OEM
Step 4 – Copy customized Sysprep.inf from \\<altirisserver>\express\Sysprep\FaskenHIISysprep .inf to C:\sysprep
Sysprep.inf contents:
Code:
  [Unattended]
      
              DriverSigningPolicy=Ignore
              InstallFilesPath=C:\Drivers
              OemPnpDriversPath="windows\inf;windows\system32;drivers\SYS1;drivers\SYS2;drivers\SYS3;drivers\SYS4;drivers\SYS5;drivers\SYS6;drivers\SYS7;drivers\SYS8;drivers\SYS9;drivers\SYS10;drivers\NIC;drivers\WNIC;drivers\Audio;drivers\Video;drivers\MODEM;drivers\SATA"
              OemSkipEula=Yes    
              UpdateInstalledDrivers=Yes
   
  [GuiUnattended]
              AutoLogonCount=1
              AutoLogon=Yes
              AdminPassword="<removed>"
              EncryptedAdminPassword=NO
              OemSkipWelcome=1
              OEMSkipRegional=1
              TimeZone=35
              
  [UserData]
              ComputerName=%ASSETTAG%
              FullName="<removed>"
              OrgName="<removed>
              ProductKey=<removed>
   
  [Display]
              BitsPerPel=32
              Vrefresh=60
              Xresolution=1024
              YResolution=768
   
   
  [Networking]
      InstallDefaultComponents=Yes
   
   
  [Identification]
              DomainAdmin=<removed>
              DomainAdminPassword=<removed>
              JoinDomain=<removed>
   
  [Proxy]
              Proxy_Enable=0
              Use_Same_Proxy=0
   
  [GuiRunOnce]
              Command0="c:\drivers\aclient\Aclient.cmd"
              Command1="c:\drivers\aclient\Addgroup.cmd"
              Command2="ping -w 60000 -n 1 199.199.199.199 >NUL"
              Command3="sc start aclient"
  [SysPrep]
              BuildMassStorageSection=No
Step 5 – Copy the sysprep execution script to C:\sysprep
---Script run from Production Windows OS
AutomatedSysprep.bat contents:
Code:
  ::Now we are safe to stop the Altiris client and agent, and go into a fully unassisted mode. From
  ::this point on we're essentially flying with out ground control, All altiris software will be 
  ::uninstalled and then reinstalled upon deployment time. 
  sc stop aclient
   
  "C:\program files\altiris\AClient\ACLIENT.EXE" -remove -silent
  rd /S /Q "C:\Program Files\Altiris\"
   
  :: I have added the -pnp switch here to cause Mini-setup to run a full Plug and Play device 
  :: enumeration and installation during Mini-Setup
  :: This it is my hope that this full enumeration will cause Mini-setup to uptake SATA drivers
  :: at unwrap time. Up until 31-10-08, HII has apparently never done this. 
  C:\sysprep\sysprep.exe -quiet -mini -reseal -pnp -reboot
  echo >C:\sysprep\success.txt
Step 6 – Have Altiris execute the AutomatedSysprep batch script from the local computer:
---Script run from Production Windows OS
Code:
  REM Sysprep System for imaging
  start C:\sysprep\AutomatedSysprep.bat
Since I’m unloading the aclient prior to resealing, this automated script needs to be splintered off and run by the system, rather than being executed from the aclient.


Step 7 – Create HIIPROTO.IMG from computer.
Again, this process works 100% of the time. A refreshed HII image is produced for deployment.




Phase 3 – HII Image Deployment
Step 1 – Distribute HII Image to target computer. The deployment task does no sysprep work, just writes the image to the harddrive. The image is formatted in NTFS. Hence why long file names will now be seen in dos 8.3 format.


Step 2 – Inject model specific drivers to target computer:
---Script run fun Dos Automation, writing to NTFS file system
Code:
  REM Copy Drivers to production partition before starting Windows
  (at)echo on
   
  :: Delete AClient.cfg file if it exists. 
  firm delete prod:aclient.cfg
   
  :: Now we'll delete any residual drivers found on the image belonging to the
  :: original source target
  firm -recurse delete prod:\drivers
  firm -recurse delete prod:\i386\$OEM$
  firm -recurse delete prod:\windows\OEMdir
   
   
   
  :: Ok, so now we test to see just what service pack level we're deploying to. 
  :: It's XP of some kind...but is it SP1 or SP2? First lets setup our system to 
  :: test. So...we need the find program...
  copy F:\tools\dostools\find.exe A:\find.exe
   
  :: There. And now, we use Firm to get us a peak into the computers driver cache folder
  firm dir prod:\windows\driver~1\i386 > A:\firmdir.txt
   
  :: Done. Now that will make a file that will have SP2's tell tale sp2.cab recorded
  :: in it if it's an SP2 machine. If it's not, then that file will be missing from the dir
  :: listing. Ok, so let's clear our error level and...
  echo.|find " "
   
  :: search for that file's name in side the contents of our saved directory list. If 
  :: find discovers the test sp2.cab inside the firmdir.txt file, then the target computer
  :: is getting an SP2 OS. Otherwise, it's just SP1. 
  find /n /c "sp2.cab" A:\firmdir.txt
   
  ::But now, here's the tricky part. How does DOS know what find found? Error levels! And
  :: how do we read error levels? Why, with this nifty difty batch script!! Call it!
  call F:\tools\errorl~1\errorlev.bat
  if %errorlev%==1 echo "COMPUTER IS NOT SERVICE PACK 2!!!!"
   
   
  :: This section is used to locate and use specific drivers based on 
  :: the model of computer running the job.
  echo Hardware Model number is %#!computer(at)model_num%
  echo Hardware Product Name is %#!computer(at)prod_name%
   
  ::------Model Listings---------
   
  ::====Desktops====
  :: Lenovo ThinkCentre S50 Model Desktops
  if "%#!computer(at)prod_name%" =="818332U" goto 818332U
  if "%#!computer(at)prod_name%" =="8183D7U" goto 8183D7U
  if "%#!computer(at)prod_name%" =="817121U" goto 817121U
   
  :: Lenovo ThinkCentre M52 Model Desktops
  if "%#!computer(at)prod_name%" =="8215D1U" goto 8215D1U
   
  :: Lenovo ThinkCentre M55 Model Desktops
  if "%#!computer(at)prod_name%" =="880894U" goto 880894U
   
  :: Lenovo ThinkCentre M57 Model Desktops
  if "%#!computer(at)prod_name%" =="6072BNU" goto 6072BNU
  if "%#!computer(at)prod_name%" =="6072A5U" goto 6072A5U
  ::====Desktops====
   
  ::====Laptops====
  ::Lenovo T30 Model Laptops
  if "%#!computer(at)prod_name%" =="236681U" goto 236681U
   
  :: Lenovo T42 Model Laptops
  if "%#!computer(at)prod_name%" =="2373K1U" goto 2373K1U
   
  :: Lenovo T60 Model Laptops
  if "%#!computer(at)prod_name%" =="200746U" goto 200746U
   
  :: Lenovo X61 Model Laptops
  if "%#!computer(at)prod_name%" =="767374U" goto 767374U
  if "%#!computer(at)prod_name%" =="76734NU" goto 76734NU
   
  :: Lenovo T61 Model Laptops
  if "%#!computer(at)prod_name%" =="64659UU" goto 64659UU
  if "%#!computer(at)prod_name%" =="64608XU" goto 64659UU
  if "%#!computer(at)prod_name%" =="646557U" goto 646557U
  if "%#!computer(at)prod_name%" =="64574XU" goto 64574XU
   
  :: Lenovo T500 Model Laptops
  if "%#!computer(at)prod_name%" =="20823HU" goto 20823HU
   
  ::====Laptops====
   
  ::next is an example of how to poll for the model number of a computer using a sql query.
  ::if "%#*"SELECT REPLACE(model_num, ' ', '_') FROM computer WHERE computer_id=%ID%"%" == "440BX_Desktop_Reference_Platform" goto 440BX
  ::------END Model Listings---------
   
   
  REM If no match is found, exit the script.
  echo.
  echo ERROR ERROR ERROR ERROR ERROR
  echo ERROR ERROR ERROR ERROR ERROR
  echo.
  echo No driver match found for current model!
  echo.
  echo Hardware Model number is %#!computer(at)model_num%
  echo Hardware Product Name is %#!computer(at)prod_name%
  echo.
  echo.
  echo Press any key to exit this script without conducing
  echo driver injection!
  pause > nul
  exit -1
   
   
  ::------Driver Injectors--------
  :8215D1U
  firm -recurse copy .\Sysprep\models\8215D1U\drivers prod:\drivers
  goto :end
   
  :818332U
  firm -recurse copy .\Sysprep\models\818332U\drivers prod:\drivers
  goto :end
   
  :8183D7U
  firm -recurse copy .\Sysprep\models\8183D7U\drivers prod:\drivers
  goto :end
   
  :817121U
  firm -recurse copy .\Sysprep\models\817121U\drivers prod:\drivers
  goto :end
   
  :880894U
  firm -recurse copy .\Sysprep\models\880894U\drivers prod:\drivers
  if %errorlev%==0 firm -recurse copy .\Sysprep\models\880894U\winxpsp2 prod:\windows
  if %errorlev%==1 firm -recurse copy .\Sysprep\models\880894U\winxpsp1 prod:\windows
  goto :end
   
  :200746U
  firm -recurse copy .\Sysprep\models\200746U\Drivers prod:\Drivers
  firm -recurse copy .\Sysprep\models\200746U\windows prod:\windows
  goto :end
   
  :2373K1U
  firm -recurse copy .\Sysprep\models\8183D7U\drivers prod:\drivers
  goto :end
   
  :646557U
  firm -recurse copy .\Sysprep\models\646557U\drivers prod:\drivers
  if %errorlev%==0 firm -recurse copy .\Sysprep\models\646557U\winxpsp2 prod:\windows
  if %errorlev%==1 firm -recurse copy .\Sysprep\models\646557U\winxpsp1 prod:\windows
  goto :end
   
  :236681U
  firm -recurse copy .\Sysprep\models\236681U\drivers prod:\drivers
  if %errorlev%==0 firm -recurse copy .\Sysprep\models\236681U\winxpsp2 prod:\windows
  if %errorlev%==1 firm -recurse copy .\Sysprep\models\236681U\winxpsp1 prod:\windows
  goto :end
   
  :767374U
  firm -recurse copy .\Sysprep\models\767374U\drivers prod:\drivers
  if %errorlev%==0 firm -recurse copy .\Sysprep\models\767374U\winxpsp2 prod:\windows
  if %errorlev%==1 firm -recurse copy .\Sysprep\models\767374U\winxpsp1 prod:\windows
  goto :end
   
  :76734NU
  firm -recurse copy .\Sysprep\models\76734NU\drivers prod:\drivers
  if %errorlev%==0 firm -recurse copy .\Sysprep\models\76734NU\winxpsp2 prod:\windows
  if %errorlev%==1 firm -recurse copy .\Sysprep\models\76734NU\winxpsp1 prod:\windows
  goto :end
   
  :6072BNU
  firm -recurse copy .\Sysprep\models\6072BNU\drivers prod:\drivers
  if %errorlev%==0 firm -recurse copy .\Sysprep\models\6072BNU\winxpsp2 prod:\windows
  if %errorlev%==1 firm -recurse copy .\Sysprep\models\6072BNU\winxpsp1 prod:\windows
  goto :end
   
  :6072A5U
  firm -recurse copy .\Sysprep\models\6072A5U\drivers prod:\drivers
  if %errorlev%==0 firm -recurse copy .\Sysprep\models\6072A5U\winxpsp2 prod:\windows
  if %errorlev%==1 firm -recurse copy .\Sysprep\models\6072A5U\winxpsp1 prod:\windows
  goto :end
   
  :64659UU
  firm -recurse copy .\Sysprep\models\64659UU\drivers prod:\drivers
  firm -recurse copy .\Sysprep\models\MSD\ICH9SATA prod:\drivers\SATA
  goto :end
   
  :64574XU
  firm -recurse copy .\Sysprep\models\64574XU\drivers prod:\drivers
  if %errorlev%==0 firm -recurse copy .\Sysprep\models\64574XU\winxpsp2 prod:\windows
  if %errorlev%==1 firm -recurse copy .\Sysprep\models\64574XU\winxpsp1 prod:\windows
  goto :end
   
  :20823HU
  firm -recurse copy .\Sysprep\models\20823HU\drivers prod:\drivers
  firm -recurse copy .\Sysprep\models\MSD\ICH9SATA prod:\drivers\SATA
  goto :end
   
  ::------ End Driver Injectors--------
   
  :end
  ::now that we've loaded our drivers and HAL files, it's time to load up the most recent
  ::Altiris client and agent apps. This includes the aclient.cmd script that is executed
  ::as part of the sysprep process. Please see \\<altirisserver>\eXpress\Sysprep\FaskenHIISysprep.inf
  ::for details.
  firm -recurse copy .\Sysprep\models\Aclient prod:\drivers\aclient
   
  ::Here is where we bring in the Mass Storage Drivers for all the available MSD's in the office.
  ::These drivers are referenced in the already pre-loaded sysprep.inf file that was inserted into
  ::the production drive at image capture time. 
  firm -recurse copy .\sysprep\Models\MSD prod:\drivers
   
  exit
You’ll notice that some computers get a “Windows” directory copied into them. The whole SP1/SP2 test occurring at the top of the script determines which previously stored HAL needs to be injected into the target computer. We’ve unified on SP2 since the implementation of this script, so any HAL capture taken after that doesn’t utilize the SP level test results. It just injects.

You’ll also notice, some deployments don’t have HALs captured for them. I found that for some reason most of the time the HALs included in the image play just fine with my various IBM/Lenovo targets. So I got lazy and stopped building them. If I found a target that complained, I built a HAL capture for it and went on with life.

The sections of this script that executes for the T500’s is the following:
Code:
    firm delete prod:aclient.cfg
    firm -recurse delete prod:\drivers
    firm -recurse delete prod:\i386\$OEM$
    firm -recurse delete prod:\windows\OEMdir
   :: Lenovo T500 Model Laptops
    if "%#!computer(at)prod_name%" =="20823HU" goto 20823HU
    :20823HU
    firm -recurse copy .\Sysprep\models\20823HU\drivers prod:\drivers
    firm -recurse copy .\Sysprep\models\MSD\ICH9SATA prod:\drivers\SATA
    goto :end
  :end
    firm -recurse copy .\Sysprep\models\Aclient prod:\drivers\aclient
    firm -recurse copy .\sysprep\Models\MSD prod:\drivers
    exit
Step 3 – Inject sysprep.inf
---Script run fun Dos Automation, writing to NTFS file system
Code:
  REM Prepare Fasken Standard HII Sysprep for injection
  ::Replace the variable tokens in the Sysprep.inf file with comp specific info.
  REM ReplaceTokens .\sysprep\Fasken~4.inf .\sysprep\logs\%ID%.inf
   
  ::Concatenate the processed sysprep.inf with the Mass Storage Device defs.
  copy .\sysprep\logs\%ID%.inf A:\fmdsysp.inf
  copy .\sysprep\Models\MSD\syspmsd.inf A:\syspmsd.inf
  copy A:\fmdsysp.inf+A:\syspmsd.inf A:\sysprep.inf
   
  ::Inject the final sysprep.inf and other post mini-setup files. 
  firm copy  A:\sysprep.inf prod:sysprep\sysprep.inf
  ::backup the sysprep folder so it can be dissected later in case of a problem.
  firm -recurse copy prod:\sysprep prod:\documents\logs\altirislogs\hii\sysprepsnapshot
Fasken~4.inf (or the full Win32 file name: FaskenHIISysprep.inf) Contents are referenced in Phase 2 Step 4

Syspmsd.inf Contents:
Code:
  [SysprepMassStorage]
   
              ;Generic Drivers
              *PNP0600=%systemroot%\inf\mshdc.inf
              PCI\CC_0101=%systemroot%\inf\mshdc.inf
              PCI\VEN_8086&DEV_7111=%systemroot%\inf\mshdc.inf
              
              ;Drivers for ICH6SATA controller support
              PCI\VEN_8086&DEV_2652&CC_0106=%SystemDrive%\drivers\SATA\iaahci.inf
              PCI\VEN_8086&DEV_2653&CC_0106=%SystemDrive%\drivers\SATA\iaahci.inf
              PCI\VEN_8086&DEV_2652&CC_0104=%SystemDrive%\drivers\SATA\iastor.inf
              
              ;Drivers for ICH7SATA controller support
              PCI\VEN_8086&DEV_27C0=%SystemDrive%\drivers\SATA\ich7ide.inf
              PCI\VEN_8086&DEV_27C4=%SystemDrive%\drivers\SATA\ich7ide.inf
              PCI\VEN_8086&DEV_27DF=%SystemDrive%\drivers\SATA\ich7ide.inf
              
              ;Drivers for ICH8SATA controller support
              PCI\VEN_8086&DEV_2820=%SystemDrive%\drivers\SATA\ICH8SATA.inf
              PCI\VEN_8086&DEV_2825=%SystemDrive%\drivers\SATA\ICH8SATA.inf
              PCI\VEN_8086&DEV_2828=%SystemDrive%\drivers\SATA\ICH8SATA.inf
              PCI\VEN_8086&DEV_2850=%SystemDrive%\drivers\SATA\ICH8SATA.inf
              
              ;Drivers for ICH9SATA controller support
              PCI\VEN_8086&DEV_2681&CC_0106=%SystemDrive%\drivers\SATA\iaahci.inf
              PCI\VEN_8086&DEV_27C1&CC_0106=%SystemDrive%\drivers\SATA\iaahci.inf
              PCI\VEN_8086&DEV_27C5&CC_0106=%SystemDrive%\drivers\SATA\iaahci.inf
              PCI\VEN_8086&DEV_2821&CC_0106=%SystemDrive%\drivers\SATA\iaahci.inf
              PCI\VEN_8086&DEV_2829&CC_0106=%SystemDrive%\drivers\SATA\iaahci.inf
              PCI\VEN_8086&DEV_2922&CC_0106=%SystemDrive%\drivers\SATA\iaahci.inf
              PCI\VEN_8086&DEV_2929&CC_0106=%SystemDrive%\drivers\SATA\iaahci.inf
              PCI\VEN_8086&DEV_3A22&CC_0106=%SystemDrive%\drivers\SATA\iaahci.inf
              PCI\VEN_8086&DEV_2682&CC_0104=%SystemDrive%\drivers\SATA\iastor.inf
              PCI\VEN_8086&DEV_27C3&CC_0104=%SystemDrive%\drivers\SATA\iastor.inf
              PCI\VEN_8086&DEV_27C6&CC_0104=%SystemDrive%\drivers\SATA\iastor.inf
              PCI\VEN_8086&DEV_2822&CC_0104=%SystemDrive%\drivers\SATA\iastor.inf
              PCI\VEN_8086&DEV_282A&CC_0104=%SystemDrive%\drivers\SATA\iastor.inf
              ;end SATA support driver specification
Step 4 – Reboot the computer and allow deployed image to unwrap / execute mini-setup.
This is where every thing falls apart with the 0x7B Stop. There’s more to this phase, but it’s not relevant to this discussion.




Yikes! Again, I’m really sorry for flooding the thread with such a huge data dump. But