Woes with 4k drives and Windows 2012

A tale of 4k drives and windows 2012

(Not a love story)

Recently I had to install windows 2012 r2 on a cisco ucs b200 M4. I wont go in detail about the horrors of getting the drivrs and network to work correctly. Bu trust me, it was ugly. Some of the things that made it ugly, was that the server were ordered with some lovely 4k disks. Normally Windows and 4k disks are not friends. But the disk were on the approved list and promised to be compatible with Windows.

In the end Windows installed. And setup of various programs was finished. And server rebooted, which resulted in reboot loop.

And I got a problem to solve.

Error message was: SYSTEM_THREAD_EXCEPTION_NOT_HANDLED (WppRecorder.sys)
Not a lot to go on, but still a starting point. And turns out its most likely a bug related to 4K disks and windows. After installing updates to Windows, there is a scheduled task that will scan winsxs folder and compress files.

Some files being used when compressed can become troublesome., if the driver accesses memory past the declared .data section. So when Windows unpacks the file, its done in place, so that the memory region past the declared .data section is filled with random bits. Whne the sector size of the disks are 512 bytes all is fine, because those random bits are all zeroes. But with 4k drives, the .data section might contain bits from the .pdata section.

So how to fix?

Boot to the recovery console (you should automatically get there after a few Blue Screen crashes).
We need to get to a state where we can undo the filecompression so that Windows will boot normally.

c:\windows\system32\compact.exe /U c:\windows\system32\drivers\*.sys

Then we need to disable this behaviour in Windows.

fsutil behavior set DisableCompression