Shortly after releasing MDT 2012 on the general public I got a call from a colleague who told me that his LiteTouch deployment was failing. He was able to boot to LiteTouch media, go though the configuration wizard, and initiate setup. LiteTouch would partition the drive, Windows Setup would start, the image would get written to the computer, and then the system would reboot… so far so good. What happened next was unexpected. The computer booted to the PGP BootGuard screen.
Turns out we were dealing with a system that had been encrypted using PGP Whole Disk Encryption. However, we have a lot of those, and deployment has not failed on them before. In the past, LiteTouch dutifully has erased the Master Boot Record (MBR) and all existing partition tables on the system, effectively wiping PGP BootGuard from the machine before running Windows Setup.
So what changed? Is this a bug in MDT 2012? Something new in PGP Desktop version 10.2.0 MP4? Or a configuration problem in our LiteTouch environment.
Let’s omit the details of ~6 hours of troubleshooting… it was a change in the WinPE LiteTouch environment, and PGP. It appears, though investigation, that the PGP filter drivers attempt to block access to the MBR of the hard drive. Since I had injected PGP drivers into the LiteTouch 32-bit boot media, I had, effectively created a situation where DiskPart.exe would be unable to remove PGP BootGuard from the system. The really irritating part is that the PGP drivers do not pass any indication to the Windows utilities that there has been an error writing to the MBR. DiskPart.exe, BootSect.exe, and the DaRT Disk Commander all can be used to repair MBRs. But when used in a PGP-enabled environment they all report success in manipulating the disk MBR, but all of them fail to make any real change to the true MBR. How do you usually erase a drive? For me, I would run “diskpart.exe, select disk 0, clean”. With PGP drivers in place, you could run this series of commands, think that you had erased the drive, but still end up with PGP BootGuard in your MBR. It really is maddening.
Symantec/PGP claim that you can remove the MBR data by “deinstrumenting” the disk using the “pgpwde.exe” command. The problem with this is, pgpwde will not let you deinstrument an encrypted drive. So, you would have to decrypt the drive first, then deinstrument. I am not wasting time on that. Worse yet, if your drive was partially encrypted when you erased the data partition, PGPWDE still reports the drive status as “partially encrypted”, and refuses to perform any actions on the drive (such as “deinstrument”) until the current encryption (on the nonexistent drive) completes. AARGH!
Fortunately, I was able to find a low-level disk manipulation utility that actually works in 32-bit PGP-enabled WinPE environments. PlDD.exe:
There are other “DD” equivalents for Windows. Most of them either fail to work against PGP (GnuWin32 DD.exe and the Crysocome DD), or will not function under WinPE (FAU DD). PlDD is pretty old, and it does not work under 64-bit Windows. But, we don’t need 64-bit support (PGP does not provide 64-bit drivers for WinPE!), it works perfectly in 32-bit Windows. Thus, this is the perfect tool for the time being.
Getting the right command syntax to pldd.exe was a bit challenging as the tool itself has scarce documentation. I wish I could credit all of the resources that I used to put this dense command together, but I have since lost the browser tabs. The following is the pldd.exe command, suitable for plugging into an MDT task sequence as a custom command:
cmd.exe /c “%SCRIPTROOT%\Pldd.exe if of=\\.\PhysicalDrive0 bs=512 count=1”
- if = In File. In this version of DD, if provided with parameters, will use a string of zeros as input.
- of = Out file. In this case, we are using the Windows device path “\\.\PhysicalDrive0”, which is fixed disk zero. I think this device path is referenced in the gnuwin32 dd docs.
- bs = Block size. We are choosing to write in 512 byte blocks.
- count = The number of blocks to write. We are going to write one 512 byte block to the “out file”.
To summarize, we use pldd to write 512 bytes of zeros to the start of physical drive zero. This action wipes out the MBR and the disk signature of the drive (sorry, I lost my reference for this factoid, too). Zeroing 512 bytes of disk is rather faster than zeroing the entire drive, which is the only other option I have seen referenced in the tubes for fixing this issue.
Share and Enjoy.