HOME

TheInfoList



OR:

The
booting In computing, booting is the process of starting a computer as initiated via hardware such as a button or by a software command. After it is switched on, a computer's central processing unit (CPU) has no software in its main memory, so som ...
process of
Windows NT Windows NT is a proprietary graphical operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems sc ...
includes
Windows NT 4.0 Windows NT 4.0 is a major release of the Windows NT operating system developed by Microsoft and oriented towards businesses. It is the direct successor to Windows NT 3.51, which was released to manufacturing on July 31, 1996, and then to retail ...
,
Windows 2000 Windows 2000 is a major release of the Windows NT operating system developed by Microsoft and oriented towards businesses. It was the direct successor to Windows NT 4.0, and was Software release life cycle#Release to manufacturing (RTM), releas ...
,
Windows XP Windows XP is a major release of Microsoft's Windows NT operating system. It was released to manufacturing on August 24, 2001, and later to retail on October 25, 2001. It is a direct upgrade to its predecessors, Windows 2000 for high-end and ...
and
Windows Server 2003 Windows Server 2003 is the sixth version of Windows Server operating system produced by Microsoft. It is part of the Windows NT family of operating systems and was released to manufacturing on March 28, 2003 and generally available on April 24, 2 ...
. In
Windows Vista Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, which was released five years before, at the time being the longest time span between successive releases of ...
and later, this process has changed significantly; see
Windows NT 6 startup process The booting process of Windows Vista and later versions differ from the startup process part of previous versions of Windows. In this article, unless otherwise specified, what is said about Windows Vista also applies to all later NT operati ...
for information about what has changed.


Installer

The Windows NT installer works very similarly to a regular Windows NT boot except that it runs from a
CD-ROM A CD-ROM (, compact disc read-only memory) is a type of read-only memory consisting of a pre-pressed optical compact disc that contains data. Computers can read—but not write or erase—CD-ROMs. Some CDs, called enhanced CDs, hold both comput ...
. For this boot method to work, the BIOS must be compatible with the
El Torito El Torito (Spanish for "the little bull") is an American chain that serves Mexican food. El Torito operates 69 restaurants primarily in California.ISO 9660 ISO 9660 (also known as ECMA-119) is a file system for optical disc media. Being sold by the International Organization for Standardization (ISO) the file system is considered an international technical standard. Since the specification is av ...
file system on the install CD is not fully compatible with the standard. Although it is "Level 1", the file names don't have the file version appended to it. The boot image is of the "no emulation" type, 1 sector long (2048 bytes) and is loaded at segment 0x7c0. It can be extracted from an ISO image by using a file-extraction program such as
7-Zip 7-Zip is a free and open-source file archiver, a utility used to place groups of files within compressed containers known as "archives". It is developed by Igor Pavlov and was first released in 1999. 7-Zip has its own archive format called 7z, ...
or
WinZip WinZip is a trialware file archiver and data compression, compressor for Microsoft Windows, macOS, iOS and Android (operating system), Android. It is developed by WinZip Computing (formerly Nico Mak Computing), which is owned by Corel, Corel Co ...
. The ISO image is also not hybridized like ISO images from most
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which ...
distributions and therefore it does not contain any
master boot record A master boot record (MBR) is a special type of boot sector at the very beginning of partitioned computer mass storage devices like fixed disks or removable drives intended for use with IBM PC-compatible systems and beyond. The concept of MBR ...
(MBR) which makes it unable to boot by just copying the image over a block device such as a pen drive. The installer can also be run from a
MS-DOS MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few ope ...
command prompt so previous versions of Microsoft Windows that are already installed can be upgraded. To run the installer from a MS-DOS based operating system such as Windows 98 or Windows ME, the user must start the system "in DOS mode" and then execute I386/WINNT.EXE on the CD-ROM. A floppy disk containing MS-DOS can be used to start the installer. Versions of the installer in floppies were also available for sale. From
Windows Vista Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, which was released five years before, at the time being the longest time span between successive releases of ...
onwards, the installer runs from BOOT.WIM which contains a bootable version of
Windows PE Windows Preinstallation Environment (also known as Windows PE and WinPE) is a lightweight version of Windows used for the deployment of PCs, workstations, and servers, or troubleshooting an operating system while it is offline. It is intended t ...
. Windows PE 2.0 is based on the Windows Vista kernel, later Windows PE versions are based on later Windows versions.


CD-ROM boot image phase

On a regular CD-ROM install, the BIOS executes the
POST Post or POST commonly refers to: *Mail, the postal system, especially in Commonwealth of Nations countries **An Post, the Irish national postal service **Canada Post, Canadian postal service **Deutsche Post, German postal service **Iraqi Post, Ira ...
and then searches for a boot descriptor on the CD-ROM. The boot descriptor points to a boot catalog file on the
ISO 9660 ISO 9660 (also known as ECMA-119) is a file system for optical disc media. Being sold by the International Organization for Standardization (ISO) the file system is considered an international technical standard. Since the specification is av ...
file system. The BIOS searches for a boot image compatible with the current architecture, loads it into memory and then runs it. The boot image is analogous to the boot sector on a hard drive. The boot image loads SETUPLDR.BIN which is analogous to NTLDR. If this fails for any reason, a message is displayed saying that NTLDR was not found, which may of itself be misleading; moreover, the NTLDR on the CD is never used during the loading phase of the installer. The process also assumes that file versions are unavailable. Before starting the boot loader, the boot image checks whether there is a Windows install (system) already present and, if so, it starts BOOTFIX.BIN. If no install is found, or if the disk does not have an MBR, then it starts the boot loader directly, thus obviating the need for BOOTFIX.BIN. If BOOTFIX.BIN is started, it displays the string "Press any key to boot from CD." and waits for user input. If none is detected for some seconds, then it boots the next device, and so on. This behavior is essential for booting the second stage of the installer, which starts from the hard disk.


Boot loader phase

Both SETUPLDR.BIN and NTLDR are composed of two binary files concatenated. They also can be found on the installation CD as compressed CAB files. The first file is STPBOOT.BIN, which is a flat binary file that just loads the second file. The second file is a regular
EXE Exe or EXE may refer to: * .exe, a file extension * exe., abbreviation for executive Places * River Exe, in England * Exe Estuary, in England * Exe Island, in Exeter, England Transportation and vehicles * Exe (locomotive), a British locomotive ...
file in the
Portable Executable The Portable Executable (PE) format is a file format for executables, object code, DLLs and others used in 32-bit and 64-bit versions of Windows operating systems. The PE format is a data structure that encapsulates the information necessary fo ...
format. In SETUPLDR.BIN the second file is SETUPLDR.EXE and in NTLDR the second file is OSLOADER.EXE. Both SETUPLDR.EXE and OSLOADER.EXE have embedded file system drivers for basic access on FAT, NTFS and ISO 9660. Differently from regular *.SYS drivers, the boot loader uses BIOS interrupts to access the boot disk. It also contains a built-in INI parser and CAB decompressor. After the installer starts running, it prints the string "Setup is inspecting your computer's hardware configuration...". NTDETECT.COM is called and the system information is stored in memory. It then displays a blue screen in
VGA text mode VGA text mode was introduced in 1987 by IBM as part of the VGA standard for its IBM PS/2 computers. Its use on IBM PC compatibles was widespread through the 1990s and persists today for some applications on modern computers. The main features of V ...
with the title "Windows Setup", or "Windows *version name here* Setup", with a white line on the bottom that serves as a status bar.NTDETECT.COMthen looks for TXTSETUP.SIF and parses it. This file works as a key-value database just like the registry or an *.INI or *.INF file. The keys may either contain a list of files associated with their install location or a script line. Therefore, the database stores data and code. During the parsing, the blank lines are ignored and sections with the same name are merged. The file BIOSINFO.INF is also loaded to resolve hardware quirks. The key-value syntax in the SourceDisksFiles section is as follows: filename_on_source = disk_id,subdir,upgrade_code,new_install_code,spare,spare,new_filename The installer asks if any additional drivers need to be loaded and loads text mode drivers. * "Press F6 if you need to install a third party SCSI or RAID driver..." * "Press F2 to run Automated System Recovery (ASR)..." If so, they can be loaded from a floppy disk only. There is a hidden feature that shows a screen prompting the user to select a computer type if F5 is pressed during the first message. Text mode drivers are a different from PnP drivers as they are loaded regardless if the hardware is present or not. The loading phase of the installer displays some messages on the screen about the current file being loaded. The message is "Setup is loading files ( he file description...". The files loaded in this phase are those located in sections ending in .Load. In those sections, the key gives a driver name and the value gives a file. The driver name is then looked up in the same section without the .Load suffix to find the driver's user-friendly name. The kernel also needs a registry hive mounted to load the registry from, so SETUPREG.HIV is also loaded. All the file names of the files loaded by the boot loader are hard-coded except for the drivers. As for PnP devices, after being identified by a bus driver, the address in checked in the section HardwareIdsDatabase and a corresponding driver name is given. But those are not used in this step.


Kernel phase

After all boot files are loaded by the boot loader, the message "Setup is starting Windows" is displayed and the kernel starts. Just like a normal install, it starts the drivers and loads the only service which is setupdd.sys. It runs in
kernel mode In computer science, hierarchical protection domains, often called protection rings, are mechanisms to protect data and functionality from faults (by improving fault tolerance) and malicious behavior (by providing computer security). Computer ...
and starts a
GUI The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inste ...
still in text mode. From now on, all the drivers are NT based and BIOS interrupts are not used anymore. The user is asked to choose a file system layout. The selected partition is formatted if necessary and the files from TXTSETUP.SIF are copied to the system. Then it creates the registry hives and automatically restarts the system so the NT system can start and bootstrap itself. The section HiveInfs points to the files used to fill the hives with the default values. On a fresh install this section is named HiveInfs.Fresh. The files are not reg files but are also ini files that can be understood by the ini interpreter bundled with the installer. The disk formatter program is statically linked with setupdd.sys.


Remastering

There are many freeware tools available on the internet that customize TXTSETUP.SIF for the creation of unattended installs or to integrate drivers and hotfixes. This process is sometimes referred as
slipstreaming Drafting or slipstreaming is an aerodynamic technique where two vehicles or other moving objects are caused to align in a close group, reducing the overall effect of drag due to exploiting the lead object's slipstream. Especially when high spee ...
. The following command shows how a remastered CD can be created with a minimum set of options on Linux. It assumes that the current directory is the CD mount point. The image will be created at the home directory. mkisofs -b Bootable_NoEmulation.img -no-emul-boot -N . > ~/ntsetup.iso The file winnt.sif can be used to make the install unattended but it is not required to be present. There is a model file on the CD named UNATTEND.TXT. Setup tries to detect winnt.sif in the I386 directory or on the root directory of a floppy disk.


Boot loader phase

The Windows NT startup process starts when the computer finds a ''Windows boot loader'', a portion of the Windows operating system responsible for finding Microsoft Windows and starting it up. Prior to Windows Vista, the boot loader was
NTLDR NTLDR (abbreviation of ''NT loader'') is the boot loader for all releases of Windows NT operating system from 1993 with the release of Windows NT 3.1 up until Windows XP and Windows Server 2003. From Windows Vista onwards it was replaced by the BOO ...
. Microsoft has also released operating systems for
Intel Itanium Itanium ( ) is a discontinued family of 64-bit Intel microprocessors that implement the Intel Itanium architecture (formerly called IA-64). Launched in June 2001, Intel marketed the processors for enterprise servers and high-performance comput ...
processors which use
IA-64 IA-64 (Intel Itanium architecture) is the instruction set architecture (ISA) of the Itanium family of 64-bit Intel microprocessors. The basic ISA specification originated at Hewlett-Packard (HP), and was subsequently implemented by Intel in coll ...
architecture. The boot loader of these editions of Windows is IA64ldr.efi (later referred as simply IA64ldr). It is an
Extensible Firmware Interface UEFI (Unified Extensible Firmware Interface) is a set of specifications written by the UEFI Forum. They define the architecture of the platform firmware used for booting and its interface for interaction with the operating system. Examples of f ...
(EFI) program.


Operating system selection

The boot loader, once executed, searches for Windows operating systems. Windows Boot Manager does so by reading
Boot Configuration Data The booting process of Windows Vista and later versions differ from the startup process part of previous versions of Windows. In this article, unless otherwise specified, what is said about Windows Vista also applies to all later NT operatin ...
(BCD), a complex firmware-independent database for boot-time configuration data. Its predecessor, NTLDR, does so by reading the simpler
boot.ini NTLDR (abbreviation of ''NT loader'') is the boot loader for all releases of Windows NT operating system from 1993 with the release of Windows NT 3.1 up until Windows XP and Windows Server 2003. From Windows Vista onwards it was replaced by the ...
. If the boot.ini file is missing, the boot loader will attempt to locate information from the standard installation directory. For Windows NT and 2000 machines, it will attempt to boot from C:\WINNT. For Windows XP and 2003 machines, it will boot from C:\WINDOWS. Both databases may contain a list of installed Microsoft operating systems that may be loaded from the local hard disk drive or a remote computer on the
local network A local area network (LAN) is a computer network that interconnects computers within a limited area such as a residence, school, laboratory, university campus or office building. By contrast, a wide area network (WAN) not only covers a larger ...
. NTLDR supports operating systems installed on disks whose file system is
NTFS New Technology File System (NTFS) is a proprietary journaling file system developed by Microsoft. Starting with Windows NT 3.1, it is the default file system of the Windows NT family. It superseded File Allocation Table (FAT) as the preferred fil ...
or
FAT In nutrition science, nutrition, biology, and chemistry, fat usually means any ester of fatty acids, or a mixture of such chemical compound, compounds, most commonly those that occur in living beings or in food. The term often refers spec ...
file systems, CDFS (ISO 9660) or UDFS. Windows Boot Manager also supports operating systems installed inside a VHD file, stored on an NTFS disk drive. In Windows 2000 or in later versions of Windows in which
hibernation Hibernation is a state of minimal activity and metabolic depression undergone by some animal species. Hibernation is a seasonal heterothermy characterized by low body-temperature, slow breathing and heart-rate, and low metabolic rate. It most ...
is supported, the Windows boot loader starts the search for operating systems by searching for ''hiberfil.sys''. NTLDR looks into the root folder of the default volume specified in boot.ini. Windows Boot Manager looks up the location of hiberfil.sys in BCD. If this file is found and an active memory set is found in it, the boot loader loads the contents of the file (which is a compressed version of a physical memory dump of the machine) into memory and restores the computer to the state that it was in prior to hibernation. Next, the boot loader looks for a list of installed operating system entries. If more than one operating system is installed, the boot loader shows a boot menu and allow the user to select an operating system. If a non NT-based operating system such as
Windows 98 Windows 98 is a consumer-oriented operating system developed by Microsoft as part of its Windows 9x family of Microsoft Windows operating systems. The second operating system in the 9x line, it is the successor to Windows 95, and was released to ...
is selected (specified by an
MS-DOS MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few ope ...
style of path, e.g. C:\), then the boot loader loads the associated "boot sector" file listed in ''boot.ini'' or BCD (by default, this is ''bootsect.dos'' if no file name is specified) and passes execution control to it. Otherwise, the boot process continues.


Loading the Windows NT kernel

The operating system starts when certain basic drivers flagged as "Boot" are loaded into memory. The appropriate file system driver for the partition type (NTFS, FAT, or FAT32) which the Windows installation resides in is amongst them. At this point in the boot process, the boot loader clears the screen and displays a textual progress bar (which is often not seen due to the initialization speed); Windows 2000 also displays the text "Starting Windows..." underneath. If the user presses F8 during this phase, the advanced boot menu is displayed, containing various special boot modes including Safe mode, with the Last Known Good Configuration, with debugging enabled, and (in the case of Server editions) Directory Services Restore Mode. Once a boot mode has been selected (or if F8 was never pressed) booting continues. The following files are loaded sequentially. # ntoskrnl.exe (the kernel) # hal.dll (type of hardware abstraction layer) # kdcom.dll (Kernel Debugger HW Extension DLL) # bootvid.dll (for the Windows logo and side-scrolling bar) # config\system (one of the registry hives) Next, NTDETECT.COM and the Windows NT kernel (''
Ntoskrnl.exe ntoskrnl.exe (short for Windows NT operating system kernel executable), also known as the kernel image, contains the kernel and executive layers of the Microsoft Windows NT kernel, and is responsible for hardware abstraction, process handling, an ...
'') and the
Hardware Abstraction Layer Hardware abstractions are sets of routines in software that provide programs with access to hardware resources through programming interfaces. The programming interface allows all devices in a particular class ''C'' of hardware devices to be acce ...
(''
hal.dll The Microsoft Windows operating system supports a form of shared libraries known as " dynamic-link libraries", which are code libraries that can be used by multiple processes while only one copy is loaded into memory. This article provides an o ...
'') are loaded into memory. If multiple hardware configurations are defined in the
Windows Registry The Windows Registry is a hierarchical database that stores low-level settings for the Microsoft Windows operating system and for applications that opt to use the registry. The kernel, device drivers, services, Security Accounts Manager, and use ...
, the user is prompted at this point to choose one. With the kernel in memory, boot-time device drivers are loaded (but not yet initialized). The required information (along with information on all detected hardware and Windows Services) is stored in the HKEY_LOCAL_MACHINE\System portion of the registry, in a set of registry keys collectively called a ''Control Set''. Multiple control sets (typically two) are kept, in the event that the settings contained in the currently-used one prohibit the system from booting. HKEY_LOCAL_MACHINE\System contains control sets labeled ControlSet001, ControlSet002, etc., as well as CurrentControlSet. During regular operation, Windows uses CurrentControlSet to read and write information. CurrentControlSet is a reference to one of the control sets stored in the registry. Windows picks the "real" control set being used based on the values set in the HKLM\SYSTEM\Select registry key: * Default will be the boot loader's choice if nothing else overrides this * If the value of the Failed key matches Default, then the boot loader displays an error message, indicating that the last boot failed, and gives the user the option to try booting anyway, or to use the "Last Known Good Configuration". * If the user choose (or has chosen) Last Known Good Configuration, the control set indicated by the LastKnownGood key is used instead of Default. When a control set is chosen, the Current key gets set accordingly. The Failed key is also set to the same as Current until the end of the boot process. LastKnownGood is also set to Current if the boot process completes successfully. Which services are started and the order which each group is started in are provided by the following keys: * HKLM\SYSTEM\CurrentControlSet\Services * HKLM\SYSTEM\CurrentControlSet\Control\ServiceGroupOrder For the purposes of booting, a driver may be one of the following: #A "Boot" driver that is loaded by the boot loader prior to starting the kernel. "Boot" drivers are almost exclusively drivers for hard-disk controllers and file systems ( ATA,
SCSI Small Computer System Interface (SCSI, ) is a set of standards for physically connecting and transferring data between computers and peripheral devices. The SCSI standards define commands, protocols, electrical, optical and logical interface ...
, file system filter manager, etc.); in other words, they are the absolute minimum that the kernel will need to get started with loading other drivers, and the rest of the operating system. #A "System" driver which is loaded and started by the kernel after the boot drivers. "System" drivers cover a wider range of core functionality, including the display driver, CD-ROM support, and the TCP/IP stack. #An "Automatic" driver which is loaded much later when the GUI already has been started. With this finished, control is then passed from the boot loader to the kernel.


Kernel phase

The initialization of the kernel subsystem and the Windows Executive subsystems is done in two phases. During the first phase, basic internal memory structures are created, and each CPU's interrupt controller is initialized. The memory manager is initialized, creating areas for the file system cache, paged and non-paged pools of memory. The
Object Manager Object Manager (internally called Ob) is a subsystem implemented as part of the Windows Executive which manages Windows ''resources''. Resources, which are surfaced as logical ''objects'', each reside in a namespace for categorization. Resources ...
, initial
security token A security token is a peripheral device used to gain access to an electronically restricted resource. The token is used in addition to or in place of a password. It acts like an electronic key to access something. Examples of security tokens incl ...
for assignment to the first
process A process is a series or set of activities that interact to produce a result; it may occur once-only or be recurrent or periodic. Things called a process include: Business and management *Business process, activities that produce a specific se ...
on the system, and the Process Manager itself. The System idle process as well as the System process are created at this point. The second phase involves initializing the device drivers which were identified by
NTLDR NTLDR (abbreviation of ''NT loader'') is the boot loader for all releases of Windows NT operating system from 1993 with the release of Windows NT 3.1 up until Windows XP and Windows Server 2003. From Windows Vista onwards it was replaced by the BOO ...
as being system drivers. Through the process of loading device drivers, a "progress bar" is visible at the bottom of the display on Windows 2000 systems; in Windows XP and Windows Server 2003, this was replaced by an animated bar which does not represent actual progress. Prior to Windows XP, this part of the boot process took significantly longer; this is because the drivers would be initialized one at a time. On Windows XP and Server 2003, the drivers are all initialized asynchronously.


Session Manager

Once all the Boot and System drivers have been loaded, the kernel (system thread) starts the
Session Manager Subsystem Session Manager Subsystem, or , is a component of the Microsoft Windows NT family of operating systems, starting in Windows NT 3.1. It is executed during the Windows NT startup process, startup process of those operating systems (it is the first ...
(smss.exe). Before any files are opened, Autochk is started by ''smss.exe''. Autochk mounts all drives and checks them one at a time to see whether or not they were cleanly unmounted. If autochk determines one or more volumes are dirty, it will automatically run chkdsk and provides the user with a short window to abort the repair process by pressing a key within 10 seconds (introduced in Windows NT 4.0 Service Pack 4; earlier versions would not allow the user to abort chkdsk). Since Windows 2000, XP and 2003 show no text screen at that point (unlike NT 3.1 to 4.0, which displayed a blue text screen), the user will see a different background picture holding a mini-text-screen in the center of the screen and show the progress of chkdsk there. At boot time, the Session Manager Subsystem: * Creates environment variables (HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment) * Starts the kernel-mode side of the Win32 subsystem (win32k.sys). This allows Windows to switch into graphical mode as there is now enough infrastructure in place. * Starts the user-mode side of the Win32 subsystem, the Client/Server Runtime Server Subsystem (csrss.exe). This makes Win32 available to user-mode applications. * Creates
virtual memory In computing, virtual memory, or virtual storage is a memory management technique that provides an "idealized abstraction of the storage resources that are actually available on a given machine" which "creates the illusion to users of a very l ...
paging files (HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management) * Performs any rename operations (HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations) that are queued up. This allows previously in-use files (e.g. drivers) to be replaced as part of a reboot. * Executes any programs listed in HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\BootExecute such as autocheck and convert. * Starts the Windows Logon Manager (winlogon.exe). Winlogon is responsible for handling interactive logons to a Windows system (local or remote). The
Graphical Identification aNd Authentication The graphical identification and authentication (GINA) is a component of Windows NT 3.51, Windows NT 4.0, Windows 2000, Windows XP and Windows Server 2003 that provides secure authentication and interactive Logging (computer security), logon servic ...
(GINA) library is loaded inside the Winlogon process, and provides support for logging in as a local or
Windows domain A Windows domain is a form of a computer network in which all user accounts, computers, printers and other security principals, are registered with a central database located on one or more clusters of central computers known as domain controlle ...
user. The Session Manager stores its configuration at HKLM\SYSTEM\CurrentControlSet\Control\Session Manager. The exact operation of most of these items is based on the configuration set in the registry.


Authentication

Winlogon starts the
Local Security Authority Subsystem Service Local may refer to: Geography and transportation * Local (train), a train serving local traffic demand * Local, Missouri, a community in the United States * Local government, a form of public administration, usually the lowest tier of administrat ...
(LSASS) and
Service Control Manager Service Control Manager (SCM) is a special system process under the Windows NT family of operating systems, which starts, stops and interacts with Windows service processes. It is located in the %SystemRoot%\System32\services.exe executable. Service ...
(SCM), which in turn will start all the Windows services that are set to ''Auto-Start''. It is also responsible for responding to the secure attention sequence (SAS), loading the user profile on logon, and optionally locking the computer when a
screensaver A screensaver (or screen saver) is a computer program that blanks the display screen or fills it with moving images or patterns when the computer has been idle for a designated time. The original purpose of screensavers was to prevent phosphor ...
is running. The login process is as follows: *The Session Manager Subsystem starts Winlogon. *Winlogon starts the Service Control Manager (services.exe). **Starts the ''auto-start'' services. **Updates the Control Sets; the LastKnownGood control set is updated to reflect the current control set. *(Windows XP) Winlogon starts UIHost (logonui.exe), a full-screen graphical UI. *Winlogon loads GinaDll (msgina.dll) **(Optional) Login prompt is displayed by GINA, and the user presses the Secure Attention Sequence (SAS) (
Control-Alt-Delete Control-Alt-Delete (often abbreviated to Ctrl+Alt+Del, also known as the "three-finger salute" or "Security Keys") is a computer keyboard command on IBM PC compatible computers, invoked by pressing the Delete key while holding the Control key, C ...
). Winlogon checks if the system is configured to log into a specific account automatically (AutoAdminLogon). **Login dialog is displayed by GINA **User enters credentials (username, password, and domain) **GINA passes credentials back to Winlogon *Winlogon passes credentials to LSASS *LSASS tries to use cached data in the LSA database (SYSTEM hive) *If there is none, LSASS determines which account protocol is to be used by using the Security Packages listed in the key HKLM/SYSTEM/CurrentControlSet/Control/Lsa: **msv1_0.dll implements the NT LAN Manager protocols. This package is used in stand-alone systems and domain-member systems for backward compatibility. **Kerberos.dll provides remote login by using
Active Directory Active Directory (AD) is a directory service developed by Microsoft for Windows domain networks. It is included in most Windows Server operating systems as a set of processes and services. Initially, Active Directory was used only for centralize ...
. *LSASS enforces the local security policy (checking user permissions, creating audit trails, doling out security tokens, etc.). *Control is passed back to Winlogon to prepare for passing the control to the user. **Create Windows Stations (WinSta0) **Create the desktops (Winlogon, Default and ScreenSaver) **It then starts the program specified in the Userinit value which defaults to userinit.exe. This value supports multiple executables. If the user is trying to log into the local host then the HKLM/SAM key will be used as database. If the user is trying to log into another host then the NetLogon service is used to carry the data. msv1_0.dll<->netlogon<->remote netlogon<->remote msv1_0.dll<->remote SAM On Windows XP, GINA is only shown if the user presses the secure attention sequence. Winlogon has support for plugins that get loaded and notified about specific events and LSASS also supports plugins (security packages). Some rootkits bundle Winlogon plugins because they are loaded before any user logs in. Some keys allow multiple comma-separated values to be supplied that allow a malicious program to be executed at the same time as a legitimate system file. The hashing algorithms used to store credentials in the SAM database are weak and can be brute-forced quickly on consumer hardware. Winlogon's responsibilities and the login process have changed significantly from the above in Windows Vista.


Shell

Userinit is the first program that runs with the user credentials. It is responsible to start all the other programs that compose the user shell environment. The shell program (typically Explorer.exe) is started from the registry entry Shell= pointed to by the same registry entry in key HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\system.ini\Boot; its default value is SYS:Microsoft\Windows NT\CurrentVersion\Winlogon, which evaluates to HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon. *Userinit loads the user profile. There are a few types of user profiles and it can be local or remote. This process can be very slow if the user profile is of the "roaming" type. *User and Computer
Group Policy Group Policy is a feature of the Microsoft Windows NT family of operating systems (including Windows 7, Windows 8.1, Windows 10, Windows 11, and Windows Server 2003+) that controls the working environment of user accounts and computer accounts. G ...
settings are applied. **Run user scripts **Run machine scripts **Run proquota.exe *Runs the startup programs ''before'' the shell gets started. *Starts the shell configured in registry, which defaults to explorer.exe. *Userinit exits and the shell program continues running without a parent process. Userinit runs startup programs from the following locations: *HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce *HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run *HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run *HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows\Load *HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows\Run *HKCU\Software\Microsoft\Windows\CurrentVersion\Run *HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce *%ALLUSERSPROFILE%\Start Menu\Programs\Startup\ (this path is localized on non-English versions of Windows before Vista) *%USERPROFILE%\Start Menu\Programs\Startup\ (this path is localized on non-English versions of Windows before Vista)


Remote booting and installation

To successfully boot, the client must support
PXE PXE may refer to: * Preboot Execution Environment, booting computers via a network * Proof and Experimental Establishment, an Indian defense laboratory * Pseudoxanthoma elasticum, a genetic disease * Pentium Extreme Edition, a variant of Pentium D ...
booting and the
Windows Deployment Services Windows Deployment Services is a server technology from Microsoft for network-based installation of Windows operating systems. It is the successor to Remote Installation Services. WDS is intended to be used for remotely deploying Windows Vista, W ...
(WDS)
component Circuit Component may refer to: •Are devices that perform functions when they are connected in a circuit.   In engineering, science, and technology Generic systems *System components, an entity with discrete structure, such as an assemb ...
must be installed on the server. It is not installed by default. WDS is the successor of
Remote Installation Services RIS, Remote Installation Services is a Microsoft-supplied server that allows PXE BIOS-enabled computers to remotely execute boot environment variables. These variables are likely computers that are on a company's (or that company's client's) net ...
(RIS). The PXE program is found on the BIOS or on a ROM chip on the network card. PXE booting is not a technology specific to Windows and can also be used to start a Linux system. In fact, a Linux system can act as a server to service DHCP or TFTP. PXE can be used to start Windows Setup to install the system on the client computer or to run the operating system from RAM. The latter, called Remote Boot, was introduced by Windows XP Embedded SP1 and is only available for this flavor of Windows. The general process for both methods is as follows: *
PXE PXE may refer to: * Preboot Execution Environment, booting computers via a network * Proof and Experimental Establishment, an Indian defense laboratory * Pseudoxanthoma elasticum, a genetic disease * Pentium Extreme Edition, a variant of Pentium D ...
boot **
DHCP The Dynamic Host Configuration Protocol (DHCP) is a network management protocol used on Internet Protocol (IP) networks for automatically assigning IP addresses and other communication parameters to devices connected to the network using a cli ...
request broadcast **(Optional) DHCP router redirects to the server **The server sends the Network Bootstrap Program (NBP) (PXEboot.com) through
TFTP Trivial File Transfer Protocol (TFTP) is a simple lockstep File Transfer Protocol which allows a client to get a file from or put a file onto a remote host. One of its primary uses is in the early stages of nodes booting from a local area netwo ...
*The NBP program downloads the required files through the BINL protocol The Boot Information Negotiation Layer (BINL) is a
Windows 2000 Windows 2000 is a major release of the Windows NT operating system developed by Microsoft and oriented towards businesses. It was the direct successor to Windows NT 4.0, and was Software release life cycle#Release to manufacturing (RTM), releas ...
service running on the server that communicates with the client after the NBP was already loaded by the PXE.


See also

*
Architecture of Windows NT The architecture of Windows NT, a line of operating systems produced and sold by Microsoft, is a layered design that consists of two main components, user mode and kernel mode. It is a preemptive, reentrant multitasking operating system, whic ...
*
Windows Startup Process The booting process of Microsoft Windows varies between different releases. DOS-based Windows Windows 1.x/2.x In Windows versions 1.01 to Windows 2.11, the system was loaded when WIN.COM was executed. It then loaded WIN100.BIN or WIN200.BIN and ...
*
Linux startup process The multi-stage booting process of Linux is in many ways similar to the BSD and other Unix-style boot processes, from which it derives. Booting a Linux installation involves multiple stages and software components, including firmware initializat ...
*
Booting In computing, booting is the process of starting a computer as initiated via hardware such as a button or by a software command. After it is switched on, a computer's central processing unit (CPU) has no software in its main memory, so som ...
*
Master boot record A master boot record (MBR) is a special type of boot sector at the very beginning of partitioned computer mass storage devices like fixed disks or removable drives intended for use with IBM PC-compatible systems and beyond. The concept of MBR ...
*
Power-on self-test A power-on self-test (POST) is a process performed by firmware or software routines immediately after a computer or other digital electronic device is powered on. This article mainly deals with POSTs on personal computers, but many other embed ...
* BootVis


References


Further reading

# # # # #


External links


Startup Applications List
{{DEFAULTSORT:Windows Nt Startup Process Windows NT architecture Booting