4

I am trying to set up Windows 10 for diskless boot via iSCSI, as described, for example, here or here.

I am able to run the Windows 10 installer to install Windows on the target iSCSI drive. However, on the first boot from the drive, I get a Blue Screen of Death with the error code PAGE_FAULT_IN_NONPAGED_AREA. Unfortunately, no crash dump is produced (perhaps because the bootloader never got to the point where it could write to the drive?).

How can I diagnose and fix this?

Kenton Varda
  • 251
  • 1
  • 7

2 Answers2

7

This appears to happen when the system page file is located on the iSCSI device. While locating the page file on iSCSI worked fine under Windows 7, it appears to be broken in Windows 10. Unfortunately, Windows defaults to setting up a page file on the primary disk, so when the primary disk is iSCSI, it is broken out-of-the-box.

(Note that the stop code PAGE_FAULT_IN_NONPAGED_AREA does not necessarily relate to the system page file in general, despite containing the word "page". This stop code is more like the NT kernel's version of "Segmentation Fault", a general invalid memory access. But, in my specific case, it coincidentally turned out to be related to the page file.)

I was able to solve the problem by disabling the page file entirely. (It also works to locate the page file on a local disk, if one exists, but this is easier to configure after getting the OS up and running with no page file.)

Disabling page file offline

Since your machine is not bootable, you cannot disable the page file through the UI. Luckily, it's easy to disable the page file via the registry. To do so, locate the following registry key, and set its value to be empty:

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Memory Management\PagingFiles

If your registry contains ControlSet002 and/or CurrentControlSet in addition to ControlSet001, make sure to make the same changes to those.

Editing registry offline

But how do we edit the registry without booting? There are multiple approaches. You could temporarily mount the iSCSI volume from an existing, working Windows machine, or from a Windows Preinstallation Environment (WinPE) that you booted from USB or maybe even from PXE. Many guides exist describing these options.

In order to edit a registry offline (i.e., edit a registry other than the one of the system that is running regedit):

  1. Run regedit ("Registry Editor") normally.
  2. Click on HKEY_LOCAL_MACHINE.
  3. Go to "File > Load Hive...".
  4. Browse to the offline Windows installation, and choose the file Windows\System32\config\SYSTEM.
  5. When prompted, type any arbitrary name, like "OFFLINE_SYSTEM".

The offline registry file will appear in the tree under HKEY_LOCAL_MACHINE with the name you chose. Edits you make to keys within it will usually be saved automatically, although it is advised that you explicitly unload the offline hive before closing regedit to be sure (see Harry Johnston's comment below). This is a very strange UI, but that's apparently how it is done.

Kenton Varda
  • 251
  • 1
  • 7
0

It's worth mentioning that page file works without any problems on Windows 10 up to compilation 1703. Update to newer or clean install of newer versions fail by default, though - as described above.

@KentonVarda's suggestion to turn off page file is valid, but I went another way than offline registry edit.

I have managed to work this problem around by installing Windows first to a local SSD drive. Then I booted it, disabled virtual memory and used SysInternals' tool called Disk2VHD (available at Microsoft site https://docs.microsoft.com/en-us/sysinternals/downloads/disk2vhd) to create VHDX file out of live system while working on it. Then used the resulting VHDX at iSCSI target and voila, it boots via iSCSI without issues.

The only workaround to have a working page file on iSCSI-booted machine I know currently of is to have a local physical disk for the sole purpose of page file.

Domel
  • 21
  • 4