Chris Stauffer at myITForum.com

You want me to do What?

April 2009 - Posts

Problem:

I ran across this problem on all of our machines that were images with MDT/BDD. For some reason the c:\bootmgr file was left behind after the machine was imaged. We are now moving forward and hope to have a fully functioning ConfigMgr with OSD/MDT, so any machine that was previously imaged with MDT needs fixed before the new image will install.

 

FYI: It is my understanding that this problem can also occur if there is a boot folder in the root of C:\ but i did not have that issue so i did not make this solution for it but if you have that problem just alter this script to delete that directory as well. It would be c:\boot

 

Solution:

With the help of several guys on the Myitforum scripting list I create a script that will look for the c:\bootmgr file and delete it as a task in the TS. (To the guys that assisted me if you want credit just let me know and I will add your name)

Create a file in your MDT 2008 package called ZTI_Detect_BootMgr.vbs and copy the script text at the bottom of this post and past it in the file.

Save the file and update your DP’s

 

Next we setup the tasks. They should be place here:

image

 

Then add a new group and call it “Remove BootMgr File”

Click options and add this

 

image

This will make the group only apply to systems that are being imaged via an advertisement.

If you are running the TS from a disk or thumb drive you should not have the issue because the first thing that your TS should do to the drive is format it.

 

Add a task called “run command line”

Enter this command line in the command line field:

 

cscript.exe "%deployroot%\scripts\ZTI_Detect_bootmgr.wsf"

Finish building your TS.

 

Script:

 

Here is the script

<job id="ZeroTouchInstallation">
   <script language="VBScript" src="ZTIUtility.vbs"/>
   <script language="VBScript">
 
'//////////////////////////////////////////////////
'//
'// Script File:
'//
'//   ZTI_Detect_BootMgr.vbs
'//
'//   This script checks for the BootMgr file on the root of c and deletes if present
'//
'//   Author: Christopher Stauffer
'//   
'//   URL: http://myitforum.com/cs2/blogs/cstauffer/default.aspx
'//   
'//   Disclaimer
'//   This script is provided "AS IS" without express 
'//   or implied warranty of any kind.
'//
'//  Version 1.0 Created Script
'//  Version 1.1 Removed stuff that wasn't needed
'//  Version 1.2 Added start and stop checks and error checks
'//
'//////////////////////////////////////////////////
 
 
 
 ' Find File BootMgr
 On error resume next
 Err.clear
 
 ' Log Start of script
 oLogging.CreateEntry "BootMGR Check started", LogTypeInfo
 
 If oFSO.FileExists(oEnvironment.Item("DeploySystemDrive") & "\BootMgr") then
 
  sBMG = oEnvironment.Item("DeploySystemDrive") & "\BootMgr"
  oLogging.CreateEntry "Found BootMgr in " & sBMG, LogTypeInfo
  oFSO.DeleteFile sBMG, True
  
    if err.number <> 0 Then
                oLogging.CreateEntry "Error deleting file: " & sBMG & " - Error:" & err.Description, LogTypeInfo
    else
        oLogging.CreateEntry "Deleted file in " & sBMG, LogTypeInfo
    End if
 
 Else
 
  oLogging.CreateEntry "Could not locate BootMgr", LogTypeInfo
    
    ' Log end of script
    oLogging.CreateEntry "BootMGR Check ended", LogTypeInfo
 
  WScript.Quit
 
 End If
 
 'reset error checking
  On error goto 0
 
 
 ' Log end of script
 oLogging.CreateEntry "BootMGR Check ended", LogTypeInfo
 
WScript.Quit
 
</script>
</job>
 

I’ve been working on getting OSD with MDT working here and I’ve run across several errors.

Here are the error that I’ve run across and what the cause was:

 

  • 0x80004005 – this error has several possible causes.
    • The first issue can be caused by a nic driver not recognizing during the WinPE section.
    • The second can be caused by a file called bootmgr. It can be found on the root of C:\
      • This error occurs before the system boots into WinPE is running the TS from an advertisement
      • I will address the solution i put in place in another blog.

 

  • 0x80070002 – This issue is usually cause by a nic card not getting recognized
    • Check the nic drivers for the machine and make sure they are added to the boot image.
    • This error can also occur if your DHCP server refresh limit is set to low. It should be atleast 60 min if not longer.

 

  • 0x0000032 – boot to wrong image INACCESSABLE_BOOT_DEVICE or UNMOUNTABLE_BOOT_VOLUME
    • rebuild your boot image and try again.

 

These error are all the same problem just manifested in different ways and different location of the TS

  • -2146889721 – Bad Hash
  • 0x80002004 – Bad Hash
  • 0x00000004 – Bad Hash
  • 0x80091007 – Bad Hash

Basically these error are cause because the package you are trying to deploy is not advertised so when the hash check runs there is no number to compare to.

Most of these error can be avoided by checking off  the box in the picture

 image

If after checking off this box you still get the error try refreshing your DP’s.

 

  • 259 or 0x00000103  - Bad package
    • This error is usually caused because you don't have the package you are trying to install build completely silent and it is waiting for user interaction. If this happens it will sit there till it times out. Then you will get this error in you TS report.

 

  • Black screen after image is applied – this happens when you apply an image to the wrong Hal type.
    • Try using a different image :-)

Hope this helps someone. It took me several days to figure out some of these errors.

Ok so i have spent the last 2 weeks trying to figure out how to get all of the drivers that i need imported into ConfigMgr. What a headache. If you follow the MS docs you end up having issues with duplicated driver, but you already know that.

I have read lots of different ways to setup the drivers.

My personal preference is this one:

http://www.deployvista.com/Home/tabid/36/EntryID/82/language/en-US/Default.aspx

 

This one is also helpful

http://blogs.technet.com/deploymentguys/archive/2008/02/15/driver-management-part-1-configuration-manager.aspx

 

But neither answered the #1 question of “how do i know what to include in my drivers folder?”

 

I took all of the Dell driver cd’s that we had and imported them into Configmgr thinking that was the best way. Boy was i wrong.

Then i followed Johan’s directions but i still didn't have the number one question answered.

I asked others for advice but didn’t get much in responses, i think this is because others like me are not sure what to include from the original drivers folders. At one point i had 17 different driver sets to cover 17 models and i had 4.7 gig worth or files. this was unacceptable.

 

I did some more searching on the internet and came across this cool FREE little tool.

Driver Magician Lite

This tool allows you to backup all existing drivers of a running machine. Simply run this tool and copy all of the drivers it displays in red to a folder.

I chose c:\Dell\Drivers\{model}

 

Once i had all of the drivers for a model i copied them to a drivers folder on my Configmgr server

 

e:\MDT_OSD\Source$\Drivers\{desktop\laptop}\{model}

 

Then i simply follow Johan’s directions.

 

By doing this i was able to reduce the drivers from the Dell 360 from 550meg to 54meg

 

Once i have everything reduced i expect to be under 1 gig for all 55 models i need to cover.

 

I know my headaches are not over with MDT and drivers but this is a good start.