Home
Computer Services
Computer Courses
Online Business
About Me
Contact
Newsletter
WinXP Introduction
WinXP Installation
WinXP Home
WinXP Media
WinXP x64
WinXP Tablet PC
WinXP SP
WinXP SP2
WinXP Updates
WinXP Repair
WinXP Backup
WinXP Startup
WinXP Activation
WinXP Forgot Pwd
MS Office
MS Word
MS Excel
MS Access
MS Access Pwd
MS Frontpage
MS PowerPoint
MSPP Slide Show
MS Outlook
MS Publisher
Outlook Express
Outlook Exp Setup
Internet Explorer
Computer Software
Computer Hardware
Computer Shopping
XP Blog
Win XP Search
Link Partners
Computer Reviews
PC Reviews
Desktop Reviews
Laptop Reviews
Anti Virus Reviews
Spyware Reviews
Firewall Reviews

XML RSS
What is this?
Add to My Yahoo!
Add to My MSN
Add to Google

Window XP Startup Program the Startup Process


Window XP Startup Program describes the Window XP Professional startup process.

Every time you turn your system on for the first time or you restart your system after installing software you just downloaded from the internet, you go through the Windows XP startup process.

So it becomes important to take note of what phases the Windows XP startup process goes through.

If the Windows XP startup process had an error while starting up, you need to know which phase was processing.

So by understanding the different Window XP startup phases you can pinpoint what the most likely solution will be.

All computers running Window XP Professional share the same Window XP startup sequence:

  • Power-on self test (POST) phase

  • Initial Windows XP startup phase

  • Boot loader phase

  • Detect and configure Computer Hardware Equipment phase

  • Kernel loading phase

  • Logon phase

The preceding Window XP Startup program sequence applies to systems started or restarted after a normal shutdown.

It does not apply when you bring your computer out of hibernation or standby.

For Window XP Professional to start, the system and boot partitions must contain the files listed below:

Window XP Startup Program Files:

File Name

Disk Location Description
Ntldr Root of the system partition The operating system loader
Boot.ini Root of the system partition A file that specifies the paths to Window XP Professional installations. For multiple-boot systems, Boot.ini contains the operating system choices that display on the startup menu.
Bootsect.dos (multi-boot systems only) Root of the system partition A hidden system file that Ntldr loads for a Window XP Professional multiple-boot configuration that includes MS-DOS, Windows 95, Windows 98, or Windows Me. Bootsect.dos contains the boot sector for these operating system.
Ntdetect.com Root of the system partition The file that passes information about the Computer Hardware Equipment configuration to Ntldr.
Ntbootdd.sys Root of the system partition (required for SCSI or Advanced Technology Attachment [ATA] controllers with firmware disabled or that do not support extended INT-13 calls). The device driver used to access devices attached to a SCSI or ATA Hard Drive whose adapter is not using BIOS. The contents of this file depend on the startup controller used.
Ntoskrnl.exe systemroot\system32 The core (also called the kernel) of the Window XP Professional operating system. Code that runs as part of the kernel does so in privileged processor mode and has direct access to system data and hardware.

During installation of single processor systems, Window XP Professional setup copies Ntoskrnl.exe from the operating system CD. During installation on multiprocessing systems, Window XP Professional setup copies Ntoskrnlmp.exe and renames it to Ntoskrnl.exe.

Hal.dll systemroot\system32 The hardware abstraction layer (HAL) dynamic-link library file. The Hal abstracts low-level Computer Hardware Equipment details from the operating system and provides a common programming interface to devices of the same type (such as Video Cards).

The Microsoft Window XP Professional operating system CD contains several HAL files. Setup copies to your computer the file that fits your Computer Hardware Equipment configuration and then renames the file as Hal.dll.

System registry file systemroot\system32\config\system The registry file that contains the data used to create the registry key HKEY_LOCAL_MACHINESYSTEM This key contains information that the operating system requires to start devices and system services.
Device drivers systemroot\system32\drivers Driver files for Computer Hardware Equipment devices, such as Keyboard, Mouse, and Video Cards.

Window XP Startup Program - Phase 1

Power-On Self Test (POST) Phase

As soon as you turn on the computer, its CPU - Central Processing Unit begins to carry out the programming instructions contained in the basic input/output system (BIOS).

The BIOS, which is a type of firmware, contains the processor-dependent code that starts the computer regardless of the operating system installed.

The first set of Window XP startup program instructions is the power-on self test (POST).

The POST is responsible for the following system and diagnostic functions:

  • Performs initial Computer Hardware Equipment checks, such as determining the amount of RAM - Random Access Memory present.

  • Verifies that the devices needed to start the operating system, such as a Hard Drive, are present.

  • Retrieves system configuration settings from nonvolatile complementary metal-oxide semiconductor (CMOS) memory, which is located on the Motherboard.

  • The contents of the CMOS memory remain even after you shut down the computer. Examples of hardware settings stored in CMOS memory include boot order and Plug and Play information.

After the Motherboard POST completes, add-on adapters that have their own firmware (for example, Video Cards and Hard Drive controllers) carry out internal diagnostic tests.

Window XP Startup Program - Phase 2

Initial Startup Phase

After the POST, the settings that are stored in CMOS memory, such as boot order, determine the devices that the computer can use to start an operating system.

For example, if the boot order specifies the floppy disk as the first Window XP startup program device and the Hard Drive as second (some firmware displays this order as "A, C"), the following scenarios might occur at startup:

The floppy disk drive contains a floppy disk

The BIOS searches the floppy disk drive for a bootable floppy disk. If one is present, the first Window XP startup program sector (the floppy disk boot sector) loads into RAM - Random Access Memory. If the floppy disk is not bootable, an error message similar to the following appears:

  • Non-system disk or disk error
  • Replace and press any key when ready

The computer displays the preceding message until you insert a bootable floppy disk or until you remove the floppy disk and restart the computer.

The floppy disk drive does not contain a floppy disk

If you restart the computer without a floppy disk, the computer reads the boot code instructions located on the master boot record (MBR).

The MBR is the first Window XP startup program sector of data on the Window XP startup program hard disk and contains instructions (called boot code) and a table (called a partition table) that identify primary and extended partitions.

The BIOS reads the MBR into memory and transfers control to the code in the MBR.

The computer then searches the partition table for the active partition.

The first Window XP startup program sector of the active partition contains boot code that enables the computer to do the following:

  • Determine the file system used.

  • Locate and start the operating system loader file, Ntldr.

If an active partition does not exist or if boot sector information is missing or corrupt, a message similar to any of the following might appear:

  • Invalid partition table
  • Error loading operating system
  • Missing operating system
  • BOOT: Couldn't find NTLDR
  • NTLDR is missing

If an active partition is successfully located, the code in the boot sector locates and starts Ntldr and the BIOS releases control to it.

The boot order specifies another Window XP startup program device

In addition to floppy disks or Hard Drive attached to SCSI and ATA controllers, some computer firmware can start an operating system from other devices, such as:

  • CD-ROM Drive

  • Network Cards

  • Removable disks, such as Iomega Zip disks

  • Secondary storage devices installed in docking stations for portable computers

It is possible to specify a custom boot order, such as "CD-ROM Drive, A, C".

When you specify "CD-ROM Drive, A, C" as a boot order, the following events occur at startup:

  • The computer searches the CD-ROM Drive for bootable media.

  • If a bootable CD is present, the computer uses the CD-ROM Drive as the Window XP startup program device. Otherwise, the computer searches the next device in the boot order.

  • The computer searches the floppy disk for bootable media.

  • If a bootable floppy is present, the computer uses the floppy disk as the Window XP startup program device. Otherwise, the computer searches the next device in the boot order or displays an error message.

  • The computer uses the Hard Drive as the Window XP startup program device.

  • The computer typically uses the Hard Drive as the Window XP startup program device only when the CD-ROM Drive and the floppy disk drive are empty.

There are exceptions where code on bootable media transfers control to the Hard Drive.

For example, when you start your system by using the bootable Window XP Professional operating system CD, Setup checks the Hard Drive for Window XP Professional installations.

If one is found, you have the option of bypassing CD-ROM Window XP startup program by not responding to the Press any key to boot from CD prompt that appears.

You cannot use a nonbootable CD to start your system.

The presence of a nonbootable CD in the CD-ROM Drive can add to the time the system requires to start.

If you do not intend to start the system from CD, remove all CDs from the CD-ROM Drive before restarting.

Window XP Startup Program - Phase 3

Boot Loader Phase

Ntldr loads Window XP startup program files from the boot partition and then does the following:

Sets an x86-based processor to run in 32-bit flat memory mode

An x86-based computer first starts in real mode.

In real mode, the processor disables certain features to allow compatibility with software designed to run on 8-bit and 16-bit processors.

Ntldr then switches the processor to 32-bit mode, which allows access to large amounts of memory and enables Window XP Professional to start.

Starts the file system

Ntldr contains the program code that Window XP Professional needs to read and write to disks formatted by using the NTFS or file allocation table (FAT16 or FAT32) file systems.

Reads the Boot.ini file

Ntldr parses the Boot.ini file to determine the location of the operating system boot partition.

For systems that use a single-boot configuration, Ntldr initiates the hardware-detection phase by starting Ntdetect.com.

For multiple-boot configurations that include Window XP Professional, Windows 2000, Windows Server 2003, Windows NT 4.0, Windows 95, Windows 98, Windows Me, or MS-DOS, you receive a menu of operating system choices at startup.

In addition, if the Recovery Console has been installed, the boot loader menu is displayed during Window XP startup program with the Recovery Console as one of the available options.

If you choose Window XP Professional, Windows 2000, Windows Server 2003, or Windows NT 4.0, Ntldr proceeds with the hardware-detection phase.

If you do not select Window XP Professional, Windows 2000, Windows Server 2003, or Windows NT 4.0, control is passed to the boot sector for the other operating system.

For example, if you select Windows 95, Windows 98, Windows Me, or MS-DOS, Ntldr passes control to Bootsect.dos by reading MBR code that Bootsect.dos contains.

This action causes the MBR code in Bootsect.dos to execute as if the instructions were read from the disk.

Detects hardware and hardware profiles

Ntldr starts Ntdetect.com, a program that performs basic device detection.

Ntldr then passes Boot.ini information, as hardware and software data in the registry, to Ntoskrnl.exe.

Ntdetect.com detects hardware profile information (for example, docked and undocked configurations for portable computers).

It also checks for information stored in Advanced Configuration and Power Interface (ACPI) tables.

ACPI-compliant firmware enables Window XP Professional to detect device power management features and determine device resource requirements.


Window XP Startup Program - Phase 4

Detect and Configure Computer Hardware Equipment Phase

After processing the Boot.ini file, Ntldr starts Ntdetect.com.

Ntdetect.com collects information about installed Computer Hardware Equipment by using calls to system firmware routines.

Ntdetect.com then passes this information back to Ntldr.

Ntldr gathers the data received from Ntdetect.com and organizes the information into internal data structures.

Ntldr then starts Ntoskrnl.exe and provides it with information obtained from Ntdetect.com.

Ntdetect.com collects the following type of Computer Hardware Equipment and device information:

  • System firmware information, such as time and date

  • Bus and adapter types

  • Video Cards

  • Keyboard

  • Communication ports

  • a href="http://www.windows-xp-how-to.com/computer-hardware-components.html#HardDrive">Hard Drive

  • Floppy disks

  • Input devices (such as Mouse devices)

  • Parallel ports

  • Devices installed on the Industry Standard Architecture (ISA) bus

Ntdetect.com plays a greater role for device enumeration in computers that are not ACPI compliant because in those computers, the firmware, not the operating system, determines the resources assigned to devices.

For computers with ACPI firmware, Window XP Professional assigns the Computer Hardware Equipment resources to use.

During this phase, Ntdetect.com searches for Computer Hardware Equipment profile information.

Window XP Professional assigns the Computer Hardware Equipment resources to use.

During this phase, Ntdetect.com searches for Computer Hardware Equipment profile information.

Window XP Professional creates a single default profile for desktop computers and creates two default profiles for portable computers.

For portable computers, the operating system selects the appropriate profile based on the Computer Hardware Equipment state of the computer:

  • Desktop computer.
    • Profile 1

  • Portable computer.
    • Docked Profile
    • Undocked Profile

Computer Hardware Equipment profiles are especially useful for portable computers because the Computer Hardware Equipment state of these computers is not static.

Drivers for devices not listed in a particular Computer Hardware Equipment profile are not loaded during Window XP startup program.

Window XP Startup Program - Phase 5

Kernel Loading Phase

Ntldr is responsible for loading the Windows kernel (ntoskrnl.exe) and the Computer Hardware Equipment abstraction layer (HAL) into memory.

The Hal.dll file that your computer uses can vary.

During installation, Window XP Professional Setup copies one of several HAL files and renames the file Hal.dll.

Together, the kernel and the HAL initialize a group of software components that are called the Windows executive.

The Windows executive processes the configuration information stored in registry control sets, and starts services and drivers.

Control Sets

Ntldr reads control set infromation from the HKEY_LOCAL_MACHINESYSTEM registry key, which is created from information in the systemrootSystem32Config System file.

So that Ntldr can determine which device drivers need to be loaded during startup.

Typically, several control sets exist, which the actual number depending on how often system configuration settings change.

Typical registry control set subkeys are:

  • CurrentControlSet, a pointer to a ControlSetxxx subkey (with xxx representing a control set number, such as 001) designated in the SelectCurrent entry.

  • Clone, a copy of CurrentControlSet, created each time you start your computer.

  • Select, which contains the following entries:
    • Default, which points to the control set number (for example, 001=ControlSet001) that the system has specified for use at the next startup. If no error or manual invocation of the LastKnownGood Window XP startup program option occurs, this control set number is designated as the value of the Default, Current, and LastKnownGood entries (assuming that a user is able to log on successfully).

    • Current, which points to the last control set that was used to start the system.

    • Failed, which points to a control set that did not start Window XP Professional successfully. This value is updated when the LastKnownGood option is used to start the system.

    • LastKnownGood, which points to the control set that was used during the last user session. When a user logs on, the LastKnownGood control set is updated with configuration information from the previous user session.

Ntldr uses the control set identified by the Default value unless you choose the Last Known Good Configuration from the Windows Advanced Options menu.

The kernel uses the internal data structures provided by Ntldr to create the HKEY_LOCAL_MACHINEHARDWARE key, which contains the Computer Hardware Equipment data collected at system Window XP startup program.

The data includes information about various Computer Hardware Equipment components and system resources allocated to each device.

To monitor the kernel load process, watch the Starting up progress indicator that appears during Window XP startup program.

Window XP Professional supports an extensive set of devices.

New or updated drivers that are not on the Window XP Professional operating system CD are provided by Computer Hardware Equipment manufacturers.

In addition, Window XP Service Pack such as Window XP Service Pack 2 provide signed drivers for Computer Hardware Equipment devices were not available when Windows XP was first released.

Drivers are kernel-mode components required by devices to function within an operating system.

Services are components that support operating system functions and applications.

Services can run in a different context than user applications and typically do not offer many user-configurable options.

Services, such as the Print Spooler, do not require a user to be logged on to run and act independently of the user who is logged on to the system.

Window XP Professional driver and services files are typically stored in the systemrootSystem32 and systemrootSystem32Drivers folders and use .exe or .dll file name extensions.

Drivers are also services.

Therefore, during kernel initialization, Ntldr and Ntoskrnl.exe use the information stored in the HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServiceservicename registry subkeys to determine both the drivers and services to load.

For example, Ntldr searches the Services subkey for drivers with a Start value of 0, such as hard disk controllers.

After Ntldr starts Ntoskrnl.exe, an Ntoskrnl.exe component searches for and starts drivers, such as network protocols, that have a Start value of 1.

The table below lists the values (in decimal) for the Start entry. Boot drivers (those with a Start value of 0) and file system drivers are always loaded regardless of their Start value because they are required to start Window XP Professional.

Values for a (servicename) Start Entry

Value Start Type Value Descriptions for Start Entries
0 Boot Specifies a driver that is loaded (but not started) by firmware calls made by Ntldr. If no errors occur, the kernel starts the driver.
1 System Specifies a driver that loads at kernel initialization during the startup sequence by calling Window XP Professional boot drivers.
2 Auto load Specifies a driver or service that is initialized at system startup by Session Manager (Smss.exe) or Service Controller (Services.exe).
3 Load on demand Specifies a driver or service that is manually started by a user, a process, or another service.
4 Disabled Specifies a disabled (not started) driver or service.

Values for a (servicename) Type Entry

Value Value Descriptions for Type Entries
1 Specifies a kernel device driver
2 Specifies a file system driver (also a kernel device driver)
4 Specifies parameters passed to the device driver
16 Specifies a service that obeys the service control protocol, can run in a process by itself, and can be started by the Services Controller
32 Specifies a service that can share a process with other services

Some drivers and services require that certain dependencies be met before they start.

You can find dependencies listed under the DependOnGroup and DependOnService entries in the HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesservicename subkey for each service or driver.

The Services subkey also contains information that affects how drivers and services are loaded, a few of which are in table below.

Other Registry (servicename) Entries

Entry Description
DependOnGroup At least one item from this group must start before this service is loaded. The subkey SYSTEMCurrentControlServiceGroupOrder contains the service group load order.
DependOnService Lists the specific services that must load before this service loads.
Description Describes the component.
DisplayName Specifies the display name of the component.
ErrorControl Controls whether a driver error requires the system to use the LastKnownGood control set or to display a Stop message.

If the value is 0x0 (Ignore, no error is reported), do not display a warning and proceed with startup.

If the value is 0x1 (Normal, error reported), record the event to the System Event Log and display a warning message, but proceed with startup.

If the value is 0x2 (Severe), record the event to the System Event Log, use the LastKnownGood settings, restart the system, and proceed with startup.

If the value is 0x3 (Critical), record the event to the System Event Log, use the LastKnownGood settings, and restart the system. If the LastKnownGood settings are already in use, display a Stop message.

Group Designates the group that the driver or service belongs to. This allows related drivers or services to start together (for example, file system drivers).
ImagePath Identifies the path and file name of the driver or service if the ImagePath entry is present. Use Windows Explorer to verify the path and file name.
ObjectName Specifies an object name. If the Type entry specifies a Window XP Professional service, it represents the account name that the service uses to log on when it runs.
Tag Designates the order in which a driver starts within a driver goup.

Session Manager

After all entries that have Boot and Startup data types are processed, the kernel starts Session Manager.

Session Manager (Smss.exe) performs important initialization functions, such as:

  • Creating system environment variables.

  • Starting the kernel-mode portion of the Windows subsystem which causes Window XP Professional to switch from text mode to graphics mode. Windows-based applications run in the Windows subsystem. This environment allows applications to access operating system functions, such as displaying information to the screen.

  • Starting the user-mode portion of the Windows subsystem.

  • Starting the Logon Manager.

  • Creating additional virtual memory paging files.

  • Performing delayed rename operations for files. For example, you might be prompted to restart the computer after installing a new driver or application so that Window XP Professional can replace the file in use.

The Windows subsystem and the applications that run within it are user mode processes; they do not have direct access to Computer Hardware Equipment or device drivers.

User-mode processes run at a lower priority than kernel-mode processes.

When the operating system needs more memory, it can page to disk the memory that is used by user-mode processes.

Session Manager searches the registry for service information.

Window XP Startup Program - Phase 6

Logon Phase

The Windows subsystem starts Winlogon.exe, a system service that enables logging on and off.

Winlogon.exe then does the following:

  • Starts the Services subsystem (Services.exe), also known as the Service Control Manager (SCM).

  • Starts the Local Security Authority (LSA) process (Lsass.exe).

  • Parses the Ctrl+Alt+Del key combination at the Begin Logon prompt.

The Graphical Identification and Authentication (GINA) component collects the user name and password, and passes this information securely to the LSA for authentication.

If the user supplied valid credentials, access is granted by using either the Kerberos V 5 authentication protocol or NTLM.

Winlogon initializes security and authentication components while the Service Control Manager initializes Auto-load services and drivers.

After the user logs on, the following events occur:

  • Control sets are updateed.

  • The control set referenced by the LastKnownGood registry entry is updated with the contents in the Clone. Clone which is a copy of the CurrentControlSet entry, is created each time you start your computer. When a user logs on, the LastKnownGood control set is updated with configuration information from the previous user session.

  • Group Policy settings take effect.

  • Group Policy settings that apply to the user and computer take effect.

  • Windows XP Startup programs run.

  • Window XP Professional starts logon scripts, startup programs, and services.

    The windirProfiles folders exist only on systems that are upgraded from Windows NT 4.0.

    Window XP Startup program is now complete.

    Window XP Startup Program Conclusion

    We have covered all of the Window XP Startup Program phases.

    All computers running Window XP Professional share the same startup sequence:

    • Power-on self test (POST) phase

    • Initial startup phase

    • Boot loader phase

    • Detect and configure hardware phase

    • Kernel loading phase

    • Logon phase

    Subscribe here for FREE!

    Every once in a while we're sending out a Windows XP How To ezine. We would be honored if you signed up for it.

    We understand you are careful about giving your email address to anyone. But we promise we won't sell or give your email address to anyone, or use it for any other purpose than to send Windows XP How To Ezine.

    Enter your E-mail Address
    Enter your First Name (optional)
    Then

    Don't worry -- your e-mail address is totally secure.
    I promise to use it only to send you Windows XP How To Newsletter.

    Important Note: Spam filters that are active at your ISP, mail service and/or mail client, may accidentally filter out any email we send in response. Read how you can make sure you receive messages from us..


    Return from Window XP Startup Program to the Home Page

    Google