Boot Options: kernel

The kernel option specifies an executable to load as the Windows kernel.


To have the BCDEDIT tool set the kernel option for the currently running operating system, run the command

bcdedit /set kernel filename 

where filename names the proposed kernel.

To set this option at the Edit Boot Options Menu, add


which is also the syntax for the option as a BOOT.INI switch in earlier Windows versions.


The kernel option overrides the loader’s default selection of the kernel, but is itself overridden by detecthal:

filename if kernel eveluates as filename and detecthal is absent or zero
ntkrnlpa.exe if PAE is enabled (see below)
ntoskrnl.exe otherwise

Whether Physical Address Extension (PAE) is enabled is decided by the loader under the influence of the pae and nx options. If PAE is enabled, the IMAGE_FILE_LARGE_ADDRESS_AWARE (0x0020) bit in the Characteristics field of the IMAGE_FILE_HEADER for the executable represented by filename must be set. If PAE is disabled, this same bit must be clear. A mismatch is fatal to starting Windows. 

The loader appends the filename to the path for the “system32” subdirectory of the systemroot directory for the selected operating system. However, it seems that the file is required to be in the directory, as opposed to being on some deeper path. The mechanisms are indirect and are presently beyond the scope of this note.