Getting Started with the Computer Knowing the Startup Process of Windows XP

  

Getting Started with the Computer Knowing the Startup Process of Windows XP

After pressing the computer power to start the computer and before the Windows XP Professional operating system starts, we Called the Pre-Boot phase, in which the computer first runs Power On Self Test (POST), which detects the total memory of the system and the status of other hardware devices.

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 phase;

3. Load the kernel phase;

4. Initialize the kernel phase;

5. Log in.

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 four small phases.

First, the computer goes through the initial Boot Loader, in which NTLDR converts the computer microprocessor from real mode to 32-bit flat memory mode. 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 the system comes to the operating system selection phase. If the computer has more than one operating system installed (that is, multiple systems), and the boot.ini is properly set to provide the operating system to choose the operating system, the computer display will 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 content:

[ ,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) represents the disk controller, disk(0)rdisk(0) represents the disk, partition(x) Represents a partition. 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.

During 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 Stage

During 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_MACHINEsystem 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_MACHINEsystemservice... 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) Initializing the Kernel Phase

At the beginning of the initialization kernel phase, the colored Windows XP logo and progress bar are displayed in the center of the screen. At this stage, the system has completed 4 startups. Task:

? The kernel created the HKEY_LOCAL_MACHINEHARDWARE 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_MACHINEsystemCurrent. The Clone Control Set configuration is a backup of computer data, does not include changes in startup, and will not be modified.

? The system completes initialization and loads the device driver. The kernel initializes the underlying drivers that were loaded during the load kernel phase, and then the kernel scans the device driver with the start key value of 1 under HKEY_LOCAL_MACHINEsystemCurrentControlSetservice. 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 Kernel is completed.

e) Login

? 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 in the background. driver.

? Prompt for a valid username or password.

? The Service Controller finally executes and scans HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServives 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.

After the user successfully logs in to the computer, Windows XP startup is considered complete. After successful login, the system copies the Clone Control Set to the LastKnownGood Control Set. After completing this step, the system means that Successfully guided.

Copyright © Windows knowledge All Rights Reserved