Offline image with a "fixed disk" RRS feed

  • Question

  • I have seen this problem off and on with a "network" image if I used a USB boot key that was "fixed" instead of "removable". What happens is the OS is copied over and after the first reboot we are met with an Operating System Not Found message. Turns out the MININT folder is written to the USB key and not the HD. Using a removable key gets rid of this problem (or removing the Fixed key after bootup).

    Now we are tasked with creating Offline images using Passport drives which will be seen as Fixed. Obviously I cannot remove it at any point so I have to revisit why this is happening.

    Any ideas of where I can start looking?



    Thursday, October 5, 2017 4:48 PM

All replies

  • Ah yes, I remember seeing this behavior a couple of years ago when we were using external HDDs to install Windows Server 2012 R2. It was not an issue for us but I can understand potential problems which can occur if the folder is not properly cleaned up from the external hard drive. 

    Just to be sure, if you are using offline images, right? So this would imply that you can't remove external hard drive anyway until you finish OSD?

    Anyhow, I went through MDT scripts in an effort to understand why this is happening. Here is what I have so far.

    I started by looking at Litetouch.wsf, as this script apparently takes care of copying MININT folder:

    Copying \\WDS\DeploymentShare$\Tools\X64\CcmCore.dll to C:\MININT\Tools\X64\CcmCore.dll

    Turns out, it references a different script, which does the actual copy job: LTICopyScripts.wsf. Both of these scripts are using ZTIUtility.vbs.

    ZTIUtility.vbs is used to initialize the TST environment and setup classes, these can then be used by scripts that reference it. It also provides general utility functionality - in your case enumeration of drives which could hold the MININT folder. The target drive letter is being stored in the LocalRootPath variable.

    The interesting bit is Property Get LocalRootPath: when the MDT environment is being initialized this function is executed and it goes through all removable drives attached to the computer - if it finds one, it will use it to store the MININT folder. This value is being cached since drive enumeration can be very time-consuming.

    	Property Get LocalRootPath
    		Dim sFallBack
    		If bCacheLocalRootPath and (not IsEmpty(sLocalRootPath)) then
    			LocalRootPath = sLocalRootPath ' Cache the value. Enumeration of Drives can be time expensive.
    			Exit property
    		End if
    		If oEnvironment.GetOSDV4("_SMSTSBootImageID") <> "" then
    			LocalRootPath = oEnvironment.GetOSDV4("_SMSTSMDataPath")
    			LocalRootPath = ""
    			If oEnv("SystemDrive") = "X:" then
    				' We're in PE
    				sFallBack = "X:\MININT"
    				' We're in a full OS
    				sFallBack = "C:\MININT"
    			End if
    		End if
    		' --------------------------------------------
    		If LocalRootPath = "" or IsEmpty(LocalRootPath) then
    			For each oDrive in oFSO.Drives
    				If oDrive.DriveType = 2 and oDrive.DriveLetter<>"X" then
    					If oDrive.IsReady Then
    						If OFSO.FolderExists(oDrive.DriveLetter & ":\MININT\SMSOSD\OSDLOGS") then
    							LocalRootPath = oDrive.DriveLetter & ":\MININT"
    							Exit For
    						End if
    						If oFSO.FolderExists(oDrive.DriveLetter & ":\_SMSTaskSequence") then
    							sFallBack = oDrive.DriveLetter & ":\MININT"
    						End if
    					End If
    				End if
    			If LocalRootPath = "" or IsEmpty(LocalRootPath) then
    				LocalRootPath = sFallBack
    			End if
    		End if
    		' Make sure the root path exists
    		oUtility.VerifyPathExists LocalRootPath
    		' Cache the value
    		sLocalRootPath = LocalRootPath
    	End Property

    You might be able to turn off local path caching by editing ZTIUtility on line 1502 and replacing True with False:

    		' By default, set a flag to cache the local root path
    		bCacheLocalRootPath = False

    Now obviously this is just a working theory based on five minutes of going through the code, so take it with a grain of salt. 


    Vacuum Breather Blog | Wing Commander Saga | Twitter

    Note: Posts are provided "AS IS" without warranty of any kind. If posts are helpful please don't forget to rate them as "Helpful" or as "Answer".

    Thursday, October 5, 2017 7:53 PM