Tuesday, November 12, 2013

8dot3name Short File Name settings not enabled via ADK Partition Disk step in SCCM OSD 2012 SP1



We updated our SCCM 2012 environment to SP1 back in late January of 2013. About 6-8 weeks later I was escalated a problem that some Design software was not installing nor working correctly and they were blaming the image. Primarily, it was several Bentley apps such as ProjectWise. In digging into it we found that 8dot3name (SFN) were no longer enabled for the file system and these applications were installing or calling the executable via SFN.

As part of the SP1 upgrade, it changes from using AIK (windows 7 base) to ADK (windows 8 base) for OSD deployments and Windows 8 does not enable 8dot3name by default. So when you deploy a system, the Partition Disk step creates the volume with no SFN support. Microsoft added native LFN support in the Windows 95/NT4 days via VFAT so in their defense it’s been many many years, so is a good time to remove it as they gave well over a decade for vendors to catch up. My issue is they did not tell anyone of this change, none that I can certainly find. So how did we fix it? I made a few TS changes.

I normally create an updated WIM quarterly so after we upgraded to SP1 I created a new WIM via a Build and Capture TS along with PE media. This WIM contains the OS, .NET Frameworks, Visual Studio Tools, and all applicable patches. Then the deployment TS deals with drivers, apps A-Z and what not. I was in the middle of this cycle when this problem arose and since it takes a while to send out an updated WIM to several hundred DPs so I had to do a break/fix in the mean time to get our users productive again. Since I sent out a new WIM built with ADK it did not have SFN in it so I had to enable SFN on the affected folders.

Production TS
After much trial and error down other roads, I kept coming back to FSUTIL.EXE. I did a lot of comparison using this tool to pre SP1 deployments trying to figure it out before discovering that the Partition Disk step ran via ADK does not enable SFN from this post over at scug.be.

After the Apply Operating System steps (my production TS has both 32-Bit and 64-Bit in it), we had to use FSUTIL to enable SFN and create the SFN for the affected folders. In the Deployment TS, I created a group with the following items as Run Command Line steps.

As everyone knows, MS had to strip stuff out so that PE can be small and agile. They took out obvious stuff like ACPI, games, etc.,  however they also took out FSUTIL. This EXE allows you to mess with the file system, really it should be in PE. Since ADK is Windows 8 based, I went to my W8 media and pulled out FSUTIL and tried to run it. It failed with some weird errors. Turns out I needed the MUI as well to get correct error messages. That failed and got different errors. Turns out while experimenting more that FSUTIL must be ran from %WINDIR%\System32. So the first two entries are to get FSUTIL over to the PE ramdrive from a package.

 CMD /C COPY fsutil.exe.mui %WINDIR%\System32\en-US  

 CMD /C COPY fsutil.exe %WINDIR%\System32  

To turn it on was a simple endeavor via FSUTIL and anything created this point forward will get SFN created. NOTE that during my Partition Disk step I save that partition letter as the variable OSDISK.

 %WINDIR%\System32\FSUTIL.EXE 8dot3name set %OSDISK% 0  

Since the source WIM did not have SFN enabled, I created SFN for the affected folders. Since the TS has both X86 and X64 arches (chosen via HTA),  it will handle both deployment scenarios.
32-Bit Only.

 %WINDIR%\System32\FSUTIL.EXE file setshortname "%OSDISK%\Program Files" progra~1  


 %WINDIR%\System32\FSUTIL.EXE file setshortname "%OSDISK%\Program Files\Common Files" common~1  

Additionally if the OS being deployed is 64-Bit it will enable SFN for the Program Files (X86) folders as well.

 %WINDIR%\System32\FSUTIL.EXE file setshortname "%OSDISK%\Program Files (x86)" progra~2  

 %WINDIR%\System32\FSUTIL.EXE file setshortname "%OSDISK%\Program Files (x86)\Common Files" common~1  

While I had to push out a small package for FSUTIL it definitely shows how quickly a change can be made if you do your entire deployment via Task Sequence and keep your WIM thin.

Build and Capture TS

To fix it in the B&C is a lot simpler as you just do the first three steps between the Partition Disk step and Apply OS step. When the OS is installed, it will create the SFN and you have a WIM captured with SFN enabled and all created. Once I deployed the updated WIM the above was removed from the Production TS.
Also as a change in SP1 is the move from Installation source to using the install.wim for the Apply OS step, so I no longer have to maintain a separate 64-BIT PE instance to do the B&C. All deployments are done via 32-Bit PE.

I wonder what changes 2012 R2 and ADK 8.1 hold for OSD.

Update

While not as fun as mine, a quick and dirty way is to do another format with a switch. Do this right after built in Partition Disk step. The /s switch is what your after.

 cmd /c format %OSDISK% /fs:ntfs /q /v:SYSTEM /s:enable /y  

No comments:

Post a Comment