Windows XP startup process overview

  
        From the time you press the computer switch to start the computer, to the login to the desktop to complete the startup, the following stages have been passed:

1. Pre-Boot stage;

2. Boot stage ;

3. kernel loading stage;

4. kernel initialization phase;

5. landing.

Detailed description of each startup phase

a) Pre-boot phase

Press the computer power to start the computer, and before the Windows XP Professional operating system starts For a while, we call it the Pre-Boot phase, in which the computer first runs the Power On Self Test (POST), which detects the total memory of the system and the status of other hardware devices. If the computer system's BIOS (basic input/output system) is plug-and-play, the computer hardware device will be verified and configured. The computer's basic input/output system (BiOS) locates the computer's boot device, and then the MBR (Master Boot Record) is loaded and running. In the pre-boot phase, the computer is going to load the NTLDR file for Windows XP.

b) Boot phase

The Windows XP Professional boot phase consists of 4 small phases.

First, the computer to go through the initial stage boot loader (Initial Boot Loader), at this stage, the NTLDR computer microprocessor from real mode to 32-bit flat memory model. In real mode, the system reserves 640kb of memory for MS-DOS
, and the rest of the memory is treated as extended memory. In 32-bit flat memory mode, the system (Windows XP Professional) treats all memory as available memory. Next, NTLDR launches the built-in mini-file system drivers. Through this step, NTLDR can identify each partition formatted with NTFS or FAT file system to discover and load Windows XP Professional, here, the initial boot loader stage. It is over. Then

system to operating system selection phase, if more than one computer operating system (i.e. multi-system) is installed, is set correctly so that the system provides the operating system boot.ini conditions selected, the computer will display Displays an operating system menu, which is the result of NTLDR reading boot.ini. (As for the operating system menu, because the temporary conditions are not enough, there is no way to take a screenshot, but the author has simulated one, see Figure 1.)

In boot.ini, it mainly contains the following contents:

[ ,null,null,3],Boot loader]

timeout=30

default=multi(0)disk(0)rdisk(0)partition(1)\\Windows

[Operating systems]

multi(0)disk(0)rdisk(0)partition(1)\\WINDOWS="Microsoft Windows XP Professional" /fastdetect

multi(0)disk(0)rdisk(0)partition (2)\\WINNT="Windows Windows 2000 Professional"

.

where multi(0) means disk controller, disk(0)rdisk(0) means disk, partition(x ) indicates partitioning. NTLDR is the location of the system files for Windows XP Professional from here. (*This article will not explain the composition of boot.ini in more detail, because it has little to do with this topic. If you want to know, you can go to some special websites to check the relevant information.) If there is only one operation in boot.ini System option, or set the timeout value to 0, the system does not appear in the operating system selection menu, directly to the unique system or the default system. After selecting to start Windows XP Professional, the operating system selection phase ends and the hardware detection phase begins.

In the hardware detection phase, ntdetect.com will collect a list of computer hardware information and return the list to NTLDR. The purpose of this is to facilitate the later addition of this hardware information to the hardware under the registry HKEY_LOCAL_MacHINE.

After the hardware detection is completed, enter the configuration selection phase. If your computer contains multiple hardware profile lists, you can select it by pressing the up and down buttons. If there is only one hardware profile, the computer does not display this screen and loads Windows XP Professional directly with the default profile.

The boot phase ends. In the boot phase, the files used by the system are: NTLDR, Boot.ini, ntdetect.com, ntokrnl.exe, Ntbootdd.sys, bootsect.DOS (optional).

c) Loading the kernel phase

In the kernel loading phase, ntldr loads ntokrnl.exe called the Windows XP kernel. The system loaded the Windows XP kernel but did not initialize it. Then ntldr loads the hardware abstraction layer (HAL, hal.dll). Then, the system continues to load the HKEY_LOCAL_MACHINE\\system key. NTLDR reads the select key to determine which Control Set will be loaded. The control set contains the drivers for the device and the services that need to be loaded. NTLDR loads the lowest device driver with the start key value of 0 under HKEY_LOCAL_MacHINE\\system\\service\\.... When the Current Control Set, which is the mirror of the Control Set, is loaded, ntldr passes control to the kernel, and the initialization kernel phase begins.

d) Initialize the kernel phase

At the beginning of the initialization kernel phase, the color Windows XP logo and progress bar are displayed in the center of the screen. At this stage, the system completes the startup 4 items. Task:

The kernel created the HKEY_LOCAL_MacHINE\\HARDWARE key using the data collected during hardware detection.

? The kernel creates a Clone Control Set by copying the Control Set by referencing the default value of HKEY_LOCAL_MacHINE\\system\\Current. The Clone Control Set configuration is a backup of computer data, does not include changes in startup, and will not be modified. Under

? Complete system initialization and loading device drivers, kernel initialization those underlying driver in loading the kernel is loaded stage and then core scanning HKEY_LOCAL_MacHINE \\ system \\ CurrentControlSet \\ service \\ ... start key 1 Device driver. These device drivers are initialized when they are loaded. If an error occurs, the kernel uses the ErrorControl key value to determine what to do. When the value is 3, the error flag is Crisis/Key. The first time the system encounters an error, it will be restarted with LastKnownGood Control Set. Startup, if the startup using LastKnownGood Control Set still generates an error, the system reports that the startup fails, the error message will be displayed, the system stops starting; when the value is 2, the error condition is serious, the system fails to start and restarts with LastKnownGood Control Set, if the system starts Already using the LastKnownGood value, it ignores the error and continues to start; when the value is 1, the error is normal, the system will generate an error message, but will still ignore the error and continue to start; ignore the value when the value is 0, the system Continue to run without displaying any error messages

Session Manager starts the Windows XP Advanced Subsystem and services, Session Manager starts controlling all input and output devices and accesses the Win32 subsystem of the monitor screen and Winlogon process, initial The kernel is finished.

e) Log in

? Winlogon.exe starts the Local Security Authority, and the Windows XP Professional welcome screen or login dialog is displayed. At this time, the system may continue to initialize the driver that has not been completed in the background.

? Prompt for a valid username or password.

? The Service Controller finally executes and scans HKEY_LOCAL_MacHINE\\SYSTEM\\CurrentControlSet\\Servives to check if there are still services to load. The Service Controller looks for a service with a start key of 2 or higher. The service loads according to the value of start and the values ​​of DependOnGroup and DepandOnService.

only after the user has successfully logged on to the computer, Windows XP startup was only considered to be completed, after a successful landing, the system copies Clone Control Set to the LastKnownGood Control Set, complete this step, the system only has meaning Successfully guided.

Copyright © Windows knowledge All Rights Reserved