Introduction to Windows XP Boot Process

  
From the time you press the computer switch to start the computer, to the login to the desktop to complete the boot, the following stages have been passed:
1, pre-boot phase
Press the computer power to start the computer, and In the period before the Windows XP Professional operating system starts, we call it the Pre-Boot phase, in which the computer first runs Power On Self Test (POST), the total memory of the POST detection system, and others. The status quo of 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.

2, guide stage

Windows XP Professional boot phase consists of four small stage.

(1), a computer to go through the initial stage boot loader (Initial Boot Loader), at this stage, 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.
(2), then the system enters 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 make the system provide operating system selection, the computer display will Displays an operating system menu, which is the result of NTLDR reading boot.ini.
In boot.ini, it mainly contains the following contents:
[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, and partition(x) represents the partition. NTLDR is the location of the system files for Windows XP Professional from here. If there is only one operating system option in boot.ini, or if the timeout value is set to 0, the system does not appear in the operating system selection menu and directs to that unique system or default system. After selecting to start Windows XP Professional, the operating system selection phase ends and the hardware detection phase begins.
(3) 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 these hardware information to the hardware under the registry HKEY_LOCAL_MACHINE.
(4) 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).
3, loading the kernel phase In the loading kernel phase, ntldr loads ntokrnl.exe called 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), after which 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.

4, when the kernel initialization phase
starting at kernel initialization phase, the color of the Windows XP logo and progress bar is displayed in the center of the screen, at this stage, the system has completed four tasks start: < BR> (1) The kernel creates the HKEY_LOCAL_MACHINE\\HARDWARE key using the data collected during hardware detection.
(2), the kernel creates a Clone Control Set by copying the Control Set by referring to 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.
(3), the system completes the initialization and loads the device driver, the kernel initializes the underlying driver that is loaded during the loading kernel phase, and then the kernel scans the device with the start key value of 1 under HKEY_LOCAL_MACHINE\\system\\CurrentControlSet\\service\\... 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 <4> (4), Session Manager starts the Windows XP Advanced Subsystem and services, and Session Manager starts controlling all input and output devices and Win32 subsystems that access the monitor screen and Winlogon processes. Kernel initialization is completed.
Copyright © Windows knowledge All Rights Reserved