Drivers and Boot Images

No Gravatar

I’m reposting two wiki’s I had written awhile ago.  I don’t really use my wiki anymore so I’m moving some content to my blog.

Finding drivers in a Boot Image

[cc lang=’sql’ line_numbers=’false’]
use CM_xxx
— All Drivers in a Boot Image
select D.CI_ID, D.DriverClass, D.DriverProvider, D.DisplayName, D.DriverType, D.DriverINFFile, D.DriverVersion, D.DriverDate, D.ContentSourcePath, D.CI_ID
from fn_ListDriverCIs(1033) as D
inner join v_BootImagePackage_References as R on D.CI_ID = R.CI_ID
inner join v_BootImagePackage as P on R.PkgID = P.PackageID
where P.Name = ‘MDT Boot Image (x86)’
–and D.DriverINFFile = ‘e1k6232.inf’
–and D.DisplayName = ‘Intel(R) PRO/1000 Gigabit Server Adapter’
— and R.CI_ID = 24948
Order By D.DriverClass, D.DriverProvider, D.DriverVersion

[cc lang=’sql’ line_numbers=’false’]
— All Drivers
select D.DriverClass, D.DriverProvider, D.DisplayName, D.DriverType, D.DriverINFFile, D.DriverVersion, D.DriverDate, D.ContentSourcePath, D.CI_ID
from fn_ListDriverCIs(1033) as D
D.DisplayName like ‘3Com 10/100/1000 PCI’
–and D.DriverINFFile like ‘b57x%’
–and D.DriverProvider like ‘%vmware%’
— and R.CI_ID = 24938
Order By D.DriverClass, D.DriverProvider, D.DriverVersion

Finding boot drivers for OSD

Michael Petersen has a good article on Finding and adding only the correct device driver to the Boot image on his CoreTech blog which is also in the TrueSec July 2011 newsletter.

The day before I saw Michael’s article I worked out a method of using the VEN & DEV ID to find the right driver. I *think* my method is more accurate and will help get the RIGHT driver that is in the SCCM database. I also don’t have to dig through .INF files.

DeviceManager_for_Boot_Devices DeviceManager_Details

[cc lang=’sql’ line_numbers=’false’]
select D.*, DHID.*, DM.*
from v_CI_DriversCIs AS D
inner join v_CI_DriverHardwareIDs AS DHID on DHID.CI_ID = D.CI_ID
inner join v_CI_DriverModels AS DM on DM.CI_ID = D.CI_ID
where DHID.HardwareID = ‘PCI\VEN_8086&DEV_10BD’
— D.CI_ID = 24992
— D.DriverINFFile in (‘b57nd60x.inf’,’couide2.inf’)
— DM.ModelName = ‘VMware Accelerated AMD PCNet Adapter’
— DriverBootCritical = 1 Order by HardwareID

After finding the CI_ID from the SQL Query, I search for that in the SCCM Console and add it to the boot disc.

This way I avoid using the name which can have many duplicates.

July 28, 2011

Posted In: ConfigMgr, ConfigMgr 2007, T-SQL

SCCM Supported Platforms (especially for OS Deployment)

No Gravatar

The first time I worked with OS Deployment in SCCM 2007 many years ago I was frightened by the ability to inadvertently deploy an OS to an existing SCCM client.  To allow Desktop Techs to reimage an existing computer the Task Sequence needs to be advertised to All Systems (or some other collection where the client eixsts).  This will cause the Task Sequence to show up in Run Advertised Programs which generally is not desirable because it enables the user to reimage their computer.

Niall C. Brady and others provided the community with trick for not shooting yourself in the foot which was to set the Supported Platform for the Task Sequence to an operating system that you knew was not in your environment such as x64 Windows Vista original release.  While this did work (as long as you remembered to set it) I never liked having to choose a real operating system which could potentially show up at a later time.

The below T-SQL code is a “hack” that is not supported or recommended by Microsoft.  I have used this in a lab and in one customer environment.  Use at your own risk.

[cc lang=’sql’ ]insert into SMS_LAB.dbo.SupportedPlatforms
select ‘IA64’, ‘Win NT’, ‘0.00.0000.0’, ‘0.00.0000.0001’, ‘*NONE*’, ‘baserc.dll’, ‘5000’,
‘<Operator OperatorType=”AND”> <Expression ExpressionType=”continuous” ExpressionLanguage=”WQL”> <![CDATA[SELECT * FROM Win32_OperatingSystem WHERE BuildNumber = ”0000” AND OSType=18 AND ProductType>1 AND OtherTypeDescription = NULL AND ServicePackMajorVersion=1]]></Expression><Expression ExpressionType=”continuous” ExpressionLanguage=”WQL”><![CDATA[SELECT * FROM Win32_Processor WHERE Architecture=6 AND DataWidth=64]]></Expression></Operator>’
, ‘100’[/cc]

After executing that we can review all of the supported platforms with this one-liner:
[cc lang=’sql’ ] select * from SMS_LAB.dbo.SupportedPlatforms order by StringId[/cc]

Now we get a “new” operating system in the Supported Platforms list for an operating system that really can never exist.



June 30, 2011

Posted In: ConfigMgr, ConfigMgr 2007, T-SQL