Loading and Initializing the Kernel
After you choose a hardware profile or configuration, or when NTLDR automatically makes the selection for you, the kernel load phase of the Windows 2000 startup process begins. During this process, NTLDR performs the following operations:
Loads the Windows 2000 kernel (Ntoskrnl.exe) and the hardware abstraction layer (Hal.dll) into memory (NTLDR does not initialize these programs yet).
Loads the registry key HKEY_LOCAL_MACHINE\SYSTEM from %SystemRoot%\System32\Config\System.
Selects a Configuration. The first hardware profile is highlighted by default. If you have created other hardware profiles, use the DOWN ARROW key to select the one that you want to use.
Selects the control set that it uses to initialize the computer.
Loads device drivers that have a Start value of 0x0.
Do not change the values in the folder %SystemRoot%\System32\Config\System.
For more information about hardware profiles, use see Windows 2000 Server Help.
Selecting the Control Set
The values of the entries in the HKEY_LOCAL_MACHINE\SYSTEM\Select subkey determine which control set to use.
If you did not press F8 when the OS Loader V5.0 screen was displayed, or if you have only one hardware profile, NTLDR uses the control set identified by the value of the Default entry in the subkey HKEY_LOCAL_MACHINE\SYSTEM \Select. However, if you chose Last Known Good Configuration from the Windows 2000 Advanced Options menu that is displayed when you pressed F8 and you selected Last Known Good Configuration from the Hardware Profile/Configuration Recovery menu, the value of the LastKnownGood entry in the subkey HKEY_LOCAL_MACHINE\SYSTEM\Select specifies the control set.
Based on your actions and the value of the corresponding Select subkey entry, NTLDR determines which ControlSet00 x to use. NTLDR sets the Current value of the subkey HKEY_LOCAL_MACHINE\SYSTEM\Select to the number of the control set it will use.
The two registry editors, Regedt32.exe and Regedit.exe, are included on the Windows 2000 Setup CD. You can use either one to view the registry. For more information about the registry, see the Technical Reference to the Registry on the Windows 2000 Resource Kit companion CD.
Loading Device Drivers
NTLDR scans the driver-specific registry subkeys in HKEY_LOCAL_MACHINE\SYSTEM \CurrentControlSet\Services for Start entries with a value of 0x0. This value indicates that the device drivers should be loaded but not initialized. Device drivers are loaded into memory by using BIOS calls in real mode or by Ntbootdd.sys.
Next, Ntoskrnl.exe initializes the kernel. If the Boot.ini ARC path entry contains the /SOS switch, text similar to the following is displayed:
Microsoft (R) Windows 2000 (TM) Version 5.0 (Build xxxx)
1 System Processor (16 MB Memory)
Upon successful initialization, Ntoskrnl.exe:
Creates the Clone control set by making a copy of the control set pointed to by the value of Current.
Creates the HKEY_LOCAL_MACHINE\HARDWARE key using the information that was passed from NTLDR. This key contains the hardware data that is detected and computed at each system startup. The data includes information about hardware components on the system board and about the interrupts hooked by specific hardware devices.
Initializing Device Drivers
Ntoskrnl.exe initializes the low-level device drivers with a start value of 0x0, which were loaded during the Kernel load phase. Ntoskrnl.exe then scans the subkey HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services for device drivers with a Start value of 0x1, which are initialized as soon as they are loaded. They are not loaded by BIOS, but by the device drivers loaded during the kernel load phase and that have already been initialized.
If an error occurs during the loading and initializing of a device driver, the action taken is based on the value of the ErrorControl entry in the registry subkey HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services for the device driver that has a problem.