Windows XP/2003 Boot Process:

PREBOOT SEQUENCE

The following four steps occur during the preboot sequence:

  • (POST) check the amount of physical memory and other hardware.
  • BIOS locates the boot device and loads and runs the master boot record (MBR).
  • The MBR scans the partition table to locate the active partition, loads the boot sector of the active partition into memory, and then executes it.
  • The computer loads and initializes the NTLDR file, which is the operating system loader.

 

BOOT SEQUENCE

After the computer loads NTLDR into memory, the boot sequence gathers information about hardware and drivers in preparation for the Windows XP Professional load phases. The boot sequence uses the following files: NTLDR, BOOT.INI, BOOTSECT.DOS (optional), NTDETECT.COM, and NTOSKRNL.EXE.

The boot sequence has four phases: initial boot loader phase, operating system selection, hardware detection, and configuration selection.


a. Initial Boot Loader Phase

During the initial boot loader phase, NTLDR switches the microprocessor from real mode to 32-bit flat memory mode, which NTLDR requires to carry out any additional functions. Next, NTLDR starts the appropriate mini file system drivers. The mini file system drivers are built into NTLDR so that NTLDR can find and load Windows XP Professional from partitions formatted with file allocation table (FAT), FAT32, or NT file system (NTFS).


b. Operating System Selection

During the boot sequence, NTLDR reads the BOOT.INI file. If more than one operating system selection is available in the BOOT.INI file, then the Please Select The Operating System To Start screen appears, listing the operating systems specified in the BOOT.INI file. If you do not select an entry before the timer reaches zero, NTLDR loads the operating system specified by the default parameter in the BOOT.INI file. Windows XP Professional Setup sets the default parameter to the most recent Windows XP Professional installation. If there is only one entry in the BOOT.INI file, the Please Select The Operating System To Start screen does not appear and the default operating system is automatically loaded.

If the BOOT.INI file is not present, NTLDR attempts to load Windows XP Professional from the first partition of the first disk, typically C:\.


c. Hardware Detection

NTDETECT.COM and NTOSKRNL.EXE perform hardware detection. NTDETECT.COM executes after you select Windows XP Professional on the Please Select The Operating System To Start screen (or after the timer times out).

If you select an operating system other than Windows XP Professional, such as Microsoft Windows 98, NTLDR loads and executes BOOTSECT.DOS, which is a copy of the boot sector that was on the system partition at the time that Windows XP Professional was installed. Passing execution to BOOTSECT.DOS starts the boot process for the selected operating system.
NTDETECT.COM collects a list of currently installed hardware components and returns this list to NTLDR for later inclusion in the registry under the HKEY_LOCAL_MACHINE\HARDWARE key.

NTDETECT.COM detects the following components:

  • Bus/adapter type
  • Communication ports
  • Floating-point coprocessor
  • Floppy disks
  • Keyboard
  • Mouse/pointing device
  • Parallel ports
  • SCSI adapters
  • Video adapters


d. Configuration Selection

After NTLDR starts loading Windows XP Professional and collects hardware information, the operating system loader presents you with the Hardware Profile/Configuration Recovery menu, which contains a list of the hardware profiles that are set up on the computer. The first hardware profile is highlighted. You can press the down-pointing arrow key to select another profile. You also can press L to invoke the LastKnownGood configuration.

If there is only a single hardware profile, NTLDR does not display the Hardware Profile/Configuration Recovery menu and loads Windows XP Professional using the default hardware profile configuration.

 

KERNEL LOAD:

After configuration selection, the Windows XP Professional kernel (NTOSKRNL.EXE) loads and initializes. NTOSKRNL.EXE also loads and initializes device drivers and loads services. If you press Enter when the Hardware Profile/Configuration Recovery menu appears, or if NTLDR makes the selection automatically, the computer enters the kernel load phase. The screen clears and a series of white rectangles appears across the bottom of the screen.

During the kernel load phase, NTLDR does the following:

  • Loads NTOSKRNL.EXE but does not initialize it.
  • Loads the hardware abstraction layer file (HAL.DLL).
  • Loads the HKEY_LOCAL_MACHINE\SYSTEM registry key from %systemroot%\System32\Config\System.
  • Selects the control set it will use to initialize the computer. A control set contains configuration data used to control the system, such as a list of the device drivers and services to load and start.
  • Loads device drivers with a value of 0x0 for the Start entry.
    These typically are low-level hardware device drivers, such as those for a hard disk. The value for the List entry, which is specified in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ServiceGroupOrder subkey of the registry, defines the order in which NTLDR loads these device drivers.


KERNEL INITIALIZATION:

When the kernel load phase is complete, the kernel initializes, and then NTLDR passes control to the kernel. At this point, the system displays a graphical screen with a status bar indicating load status. Four tasks are accomplished during the kernel initialization stage:


1. The Hardware key is created. On successful initialization, the kernel uses the data collected during hardware detection to create the registry key HKEY_LOCAL_MACHINE\HARDWARE. This key contains information about hardware components on the system board and the interrupts used by specific hardware devices.


2. The Clone control set is created. The kernel creates the Clone control set by copying the control set referenced by the value of the Current entry in the HKEY_LOCAL_MACHINE\SYSTEM\Select subkey of the registry. The Clone control set is never modified, as it is intended to be an identical copy of the data used to configure the computer and should not reflect changes made during the startup process.


3. Device drivers are loaded and initialized. After creating the Clone control set, the kernel initializes the low-level device drivers that were loaded during the kernel load phase.
The kernel then scans the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services subkey of the registry for device drivers with a value of 0x1 for the Start entry. As in the kernel load phase, a device driver's value for the Group entry specifies the order in which it loads. Device drivers initialize as soon as they load.If an error occurs while loading and initializing a device driver, the boot process proceeds based on the value specified in the ErrorControl entry for the driver. Table 18.4 describes the possible ErrorControl values and the resulting boot sequence actions.


Table 18.4
ErrorControl Values and Resulting Action

ErrorControl value

Action

0x0 (Ignore)

The boot sequence ignores the error and proceeds without displaying an error message.

0x1 (Normal)

The boot sequence displays an error message but ignores the error and proceeds.

0x2 (Severe)

The boot sequence fails and then restarts using the LastKnownGood control set. If the boot sequence is currently using the LastKnownGood control set, the boot sequence ignores the error and proceeds.

0x3 (Critical)

The boot sequence fails and then restarts using the LastKnownGood control set. However, if the LastKnownGood control set is causing the critical error, the boot sequence stops and displays an error message.

 

 

 
Previous Page (Boot Sequence in Short)
Connect With Us
Instant Query
Your Name :

Email Address :

Message :