In the past few days I had updated my WinPE image to the latest codebase and made a number of changes - all was working fine. Suddenly, the image no longer works in legacy mode - but loads fine in EFI.
What happens is the loading bar gets to the end, then as soon as the splash screen appears, it changes to the "Windows failed to start screen", with an 0xc0000098 error stating that \windows\system32\ntoskrnl.exe 'couldn't be loaded because the kernel is missing or contains errors'.
I can't for the life of me figure out what is causing this. It is not a bootloader problem (all MD5 hashed). The only thing I haven't been able to hash is the base image I use to compile the current image, but that loads fine on its own. So presumably one of the regkeys I am adding is broken (I don't know how since I didn't change anything since I last compiled an image!).
Obviously noone here has the time to scratch their heads over all my modifications lol, I just made this post to see if anyone has encountered this problem before, as that may help me figure out what is doing it!