NTLDR (
abbreviation
An abbreviation () is a shortened form of a word or phrase, by any method including shortening (linguistics), shortening, contraction (grammar), contraction, initialism (which includes acronym), or crasis. An abbreviation may be a shortened for ...
of ''NT loader'') is the
boot loader
A bootloader, also spelled as boot loader or called bootstrap loader, is a computer program that is responsible for booting a computer and booting an operating system. If it also provides an interactive menu with multiple boot choices then it's o ...
for all releases of
Windows NT
Windows NT is a Proprietary software, proprietary Graphical user interface, graphical operating system produced by Microsoft as part of its Windows product line, the first version of which, Windows NT 3.1, was released on July 27, 1993. Original ...
operating system
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
from 1993 with the release of
Windows NT 3.1 up until
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 successor to Windows 2000 for high-end and business users a ...
and
Windows Server 2003
Windows Server 2003, codenamed "Whistler Server", is the sixth major version of the Windows NT operating system produced by Microsoft and the first server version to be released under the Windows Server brand name. It is part of the Windows NT ...
. 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, released five years earlier, which was then the longest time span between successive releases of Microsoft W ...
onwards it was replaced by the
BOOTMGR bootloader. NTLDR is typically run from the primary
storage device, but it can also run from portable storage devices such as 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 computer data storage, data computers can read, but not write or erase. Some CDs, called enhanced CDs, hold b ...
,
USB flash drive
A flash drive (also thumb drive, memory stick, and pen drive/pendrive) is a data storage device that includes flash memory with an integrated USB interface. A typical USB drive is removable, rewritable, and smaller than an optical disc, and u ...
, or floppy disk. NTLDR can also load a non NT-based operating system given the appropriate
boot sector
A boot sector is the disk sector, sector of a persistent data storage device (e.g., hard disk, floppy disk, optical disc, etc.) which contains machine code to be loaded into random-access memory (RAM) and then executed by a computer system's bui ...
in a file.
NTLDR requires, at the minimum, the following two files to be on the
system volume:
* , the main boot loader itself
* , required for booting an NT-based OS, detects basic hardware information needed for successful boot
An additional important file is ''boot.ini'', which contains boot configuration (if missing, NTLDR will default to ''\Windows'' on the first partition of the first hard drive).
NTLDR is launched by the
volume boot record of system partition, which is typically written to the disk by the Windows or command.
History
Windows NT was originally designed for
ARC-compatible platforms, relying on its boot manager support and providing only ''osloader.exe'', a loading program accepting ordinary command-line arguments specifying Windows directory partition, location or boot parameters, which is launched by ARC-compatible boot manager when a user chooses to start specific Windows NT operating system. However, because
IBM PC compatible
An IBM PC compatible is any personal computer that is hardware- and software-compatible with the IBM Personal Computer (IBM PC) and its subsequent models. Like the original IBM PC, an IBM PC–compatible computer uses an x86-based central p ...
machines lacked any of the ARC support, as that platform preceded ARC, the additional layer was added specifically for that platform: custom boot manager code presenting text menu allowing the user to choose from one or more operating system and its options configured in ''boot.ini'' configuration file, prepended by special StartUp module which is responsible for some preparations such as switching the
CPU to the protected mode. When a user chooses an operating system from the boot menu, the following command-line arguments are then passed to the part of the ''osloader.exe'' common to all processor architectures:
In Windows releases starting 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, released five years earlier, which was then the longest time span between successive releases of Microsoft W ...
and
Windows Server 2008
Windows Server 2008, codenamed "Longhorn Server" (alternatives: "Windows Vista Server" or "Windows Server Vista"), is the seventh major version of the Windows NT operating system produced by Microsoft to be released under the Windows Server b ...
, NTLDR has been split off back to its boot manager and system loader parts: the
Windows Boot Manager and ''
winload.exe''. The boot manager part has been completely rewritten; it no longer uses ''boot.ini'' as a configuration file, although the ''
bootcfg
In computing, bootcfg is a command (computing), command on Microsoft Windows NT-based operating systems which acts as a Wrapper pattern, wrapper for editing the boot.ini file.
Overview
The command is used to configure, query, or change Boot.ini f ...
'' utility for modifying boot.ini is still present for the case of multi-boot configurations with Windows versions up to
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 successor to Windows 2000 for high-end and business users a ...
and
Windows Server 2003
Windows Server 2003, codenamed "Whistler Server", is the sixth major version of the Windows NT operating system produced by Microsoft and the first server version to be released under the Windows Server brand name. It is part of the Windows NT ...
.
Command-line interface
The bootsect.exe utility program in the
Windows PE tools has options /nt52 (NTLDR) and /nt60 (Vista and up) to store a NTLDR or Vista boot record in the first sector of a specified partition. The
command
Command may refer to:
Computing
* Command (computing), a statement in a computer language
* command (Unix), a Unix command
* COMMAND.COM, the default operating system shell and command-line interpreter for DOS
* Command key, a modifier key on A ...
can be used for
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 specif ...
and
NTFS
NT File System (NTFS) (commonly called ''New Technology File System'') is a proprietary journaling file system developed by Microsoft in the 1990s.
It was developed to overcome scalability, security and other limitations with File Allocation Tabl ...
based
file systems. It replaces the FixFAT and FixNTFS tools.
Example
The following example applies the NTLDR compatible master boot code to the D: volume:
C:\>bootsect /nt52 D:
Startup process
When a PC is powered on its
BIOS
In computing, BIOS (, ; Basic Input/Output System, also known as the System BIOS, ROM BIOS, BIOS ROM or PC BIOS) is a type of firmware used to provide runtime services for operating systems and programs and to perform hardware initialization d ...
follows the configured boot order to find a bootable device. This can be a harddisk, floppy, CD/DVD, network connection, USB-device, etc. depending on the BIOS. In the case of a floppy the BIOS interprets its boot sector (first sector) as code, for NTLDR this could be a NTLDR boot sector looking for the
ntldr
file on the floppy. For a harddisk the code in the
Master Boot Record
A master boot record (MBR) is a type of boot sector in the first block of disk partitioning, partitioned computer mass storage devices like fixed disks or removable drives intended for use with IBM PC-compatible systems and beyond. The concept ...
(first sector) determines the active partition. The code in the boot sector of the active partition could then be again a NTLDR boot sector looking for
ntldr
in the root directory of this active partition. In a more convoluted scenario the active partition can contain a Vista boot sector for the newer Vista boot manager with an
entry pointing to another partition with a NTLDR boot sector.
When booting, the loader portion of NTLDR does the following in order:
#Accesses the file system on the boot drive (either
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 specif ...
or New Technology File System,
NTFS
NT File System (NTFS) (commonly called ''New Technology File System'') is a proprietary journaling file system developed by Microsoft in the 1990s.
It was developed to overcome scalability, security and other limitations with File Allocation Tabl ...
).
#If Windows was put in the hibernation state, the contents of ''hiberfil.sys'' are loaded into memory and the system resumes where it left off.
#Otherwise, reads ''boot.ini'' and prompts the user with the boot menu accordingly.
#If a non NT-based OS is selected, NTLDR loads the associated file listed in ''boot.ini'' (''bootsect.dos'' if no file is specified or if the user is booting into a DOS based OS) and gives it control.
#If an NT-based OS is selected, NTLDR runs ''
ntdetect.com'', which gathers information about the computer's hardware. (If ''ntdetect.com'' hangs during hardware detection, there is a debug version called ''ntdetect.chk'' that can be found on Microsoft support.)
#Starts ''
ntoskrnl.exe'', passing to it the information returned by ''ntdetect.com''.
boot.ini
NTLDR's first action is to read the ''boot.ini'' file. NTLDR allows the user to choose which operating system to boot from at the menu. For NT and NT-based operating systems, it also allows the user to pass preconfigured options to the kernel. The menu options are stored in ''boot.ini'', which itself is located in the root of the same disk as NTLDR. Though NTLDR can boot DOS and non-NT versions of Windows, boot.ini cannot configure their boot options.
For NT-based OSs, the location of the operating system is written as an
Advanced RISC Computing (ARC) path.
''boot.ini'' is protected from user configuration by having the following
file attributes: system, hidden, read-only. To manually edit it, the
user would first have to remove these attributes.
A more secure fashion to edit the file is to use the ''bootcfg'' command from a console. ''bootcfg'' will also relock the file (setting the file back to system, hidden, and read-only). Additionally, the file can be edited within Windows using a text editor if the folder view option "Show hidden files and folders" is selected, the folder view option "Hide protected operating system files" is unchecked, and the "Read-only" option is unchecked under the file's properties.
''bootsect.dos'' is the boot sector loaded by NTLDR to load DOS, or if there is no file specified when loading a non NT-based OS.
Example
An example of a ''boot.ini'' file:
oot loadertimeout=40
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
perating systemsmulti(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
If the boot loader timeout option in ''boot.ini'' is set to 0, the NTLDR boot menu does not appear.
Extreme caution should be taken when modifying the boot loader, as erroneous information can result in an OS that fails to boot.
NT kernel switches

* Forces
x86
x86 (also known as 80x86 or the 8086 family) is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel, based on the 8086 microprocessor and its 8-bit-external-bus variant, the 8088. Th ...
-based systems to ''increase'' the virtual address space allocated for user programs to 3 GB, and to ''decrease'' to 1 GB allocated to the
kernel and to executive components. Used for some programs that require more than the standard 2 GB allocated to user programs and 2 GB allocated to the system. Some configurations of
Windows Server 2003
Windows Server 2003, codenamed "Whistler Server", is the sixth major version of the Windows NT operating system produced by Microsoft and the first server version to be released under the Windows Server brand name. It is part of the Windows NT ...
that run
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 ver ...
-intensive applications such as database servers or
Microsoft Exchange Server 2003 may require this switch
or may benefit from improved performance.
Activating this option may break VMR-9 video. Activating this option may also cause audio problems with Creative SB X-Fi series sound cards with (X-Fi Gamer / X-Fi Titanium @ WINXP 32-bit 3/2012). These problems may be connected to the way that Creatives drivers handle memory over 2 GB.
* Forces the system into standard 640 × 480 16-color
VGA mode by using a video
device driver
In the context of an operating system, a device driver is a computer program that operates or controls a particular type of device that is attached to a computer or automaton. A driver provides a software interface to hardware devices, enabli ...
that is compatible with any
video adapter. If the operating system fails to load due to a faulty or incorrectly configured video driver, this switch allows the system to load, so the user may then remove, update, or roll back the video driver causing the problem. Using this switch in conjunction with the switch helps to determine the driver that is triggering a failure.
* Sets the
baud rate of the debug port that is used for kernel debugging. Use of this switch automatically enables the switch.
Specifies an override for the default baud rate (19200) at which a remote kernel debugger host will connect.
Example: .
* Turns on boot logging to a file named .
* Displays an alternate 640 × 480 16-color custom
bitmap
In computing, a bitmap (also called raster) graphic is an image formed from rows of different colored pixels. A GIF is an example of a graphics image file that uses a bitmap.
As a noun, the term "bitmap" is very often used to refer to a partic ...
. The bitmap must be saved in the \Windows directory with the name . Use with the switch.
* Specifies the amount of memory, in megabytes, that Windows cannot use. Use this parameter to confirm a performance problem or other problems that are related to
RAM depletion.
* Use with the switch and the switch to selects the
IEEE 1394 interface channel (numbered 0 to 62) through which kernel debugging communications will flow.
* Loads the
kernel debugger at OS startup, but it remains inactive until a
Stop error occurs. With this switch, the COM port can be used for normal operations while Windows is running. If Windows crashes, the switch converts the port to a debug port. (This action turns on remote debugging.)
* Turns on the
kernel debugger when Windows starts. Unlike the switch, uses the COM port whether you use debugging or not.
* Specifies the
COM port to use for the debug port. By default, uses COM2 if it exists. Otherwise, the default is COM1. Use of this switch automatically enables the switch.
* Turns off serial and bus mouse detection for the specified port(s), or for all ports if none are specified. Use this switch when there is a component other than a mouse attached to a serial port during the startup process. Ports may be separated with commas to turn off more than one port. (Note: In earlier versions of Windows, including
Windows NT 4.0, this switch was named .)
* Defines the
Hardware Abstraction Layer that is loaded at startup. This switch is useful to try out a different HAL before you rename the file to . This switch is also useful when you want to try to switch between starting in multiprocessor mode and starting in single processor mode. To do this, use this switch with the switch.
filename must be in System32 directory. It can be a simple file, hard link, but not a symbolic link or a junction point.
* Defines the kernel that is loaded at startup. With this switch, the
user can switch between a debug-enabled kernel that is full of debugging code and a regular kernel. Same limitations for
filename location and type as for /HAL switch.
* Specifies the maximum amount of
RAM, in megabytes, that Windows can use.
However, the switch does not account for memory holes. Therefore, it is recommended to use the switch instead.
* This option is used by
Windows Preinstallation Environment
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 ...
(WinPE) and loads the
Registry SYSTEM hive as a volatile hive such that changes made to it in memory are not saved back to the hive image.
* Turns off debugging. This scenario can cause a
Stop Error if a program has a debug hardcoded breakpoint in its software.
* This option is only available on 32-bit versions of Windows when running on processors supporting
Data Execution Prevention (DEP). It enables DEP, which results in the memory manager marking pages containing data as no-execute so that they cannot be executed as code. This can be useful for preventing malicious code from exploiting buffer overflow bugs with unexpected program input in order to execute arbitrary code. No-execute protection is always enabled on 64-bit versions of Windows on processors that support no-execute protection. There are several options the
user can specify with this switch:
** Enables DEP for core system images and those specified in the DEP configuration dialog.
** Enables DEP for all images except those specified in the DEP configuration dialog.
** Enables DEP on all images.
** Disables DEP.
* Displays the device driver names while they are being loaded. Use with the switch to determine the driver that is triggering a failure.
* Forces Ntldr to load the non-
Physical Address Extension
In computing, Physical Address Extension (PAE), sometimes referred to as Page Address Extension,
is a memory management feature for the x86 architecture. PAE was first introduced by Intel in the Pentium Pro, and later by AMD in the Athlon process ...
(PAE) version of the Windows kernel, even if the system is detected as supporting
x86
x86 (also known as 80x86 or the 8086 family) is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel, based on the 8086 microprocessor and its 8-bit-external-bus variant, the 8088. Th ...
PAEs and has more than 4 GB of physical memory.
* (Obsolete on all versions post-
Windows NT 4.0) Replaced by the absence of the switch. Disables serial mouse detection on the specified COM ports. Using without specifying a COM port disables serial mouse detection on all COM ports.
* Sets the number of
processors that Windows will run at startup. With this switch, the
user can force a multiprocessor system to use only the quantity of processors (number) that you specify. Useful for troubleshooting performance problems and defective CPUs.
* Equivalent to using . Causes Windows to use only one CPU on a multiprocessor system.
* Enables
Physical Address Extension
In computing, Physical Address Extension (PAE), sometimes referred to as Page Address Extension,
is a memory management feature for the x86 architecture. PAE was first introduced by Intel in the Pentium Pro, and later by AMD in the Athlon process ...
support. In
Safe Mode
Safe mode is a diagnosis, diagnostic mode of a computer operating system (OS). It can also refer to a mode of operation by application software. ''Safe mode'' is intended to help fix most, if not all, problems within an operating system. It is a ...
, the computer starts by using normal kernels, even if the switch is specified.
* For
x86
x86 (also known as 80x86 or the 8086 family) is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel, based on the 8086 microprocessor and its 8-bit-external-bus variant, the 8088. Th ...
-based systems, this stops the
operating system
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
from dynamically assigning hardware input, hardware output, and
interrupt request
In a computer, an interrupt request (or IRQ) is a hardware signal sent to the processor that temporarily stops a running program and allows a special program, an interrupt handler, to run instead. Hardware interrupts are used to handle events s ...
resources to
PCI devices. Instead, the
BIOS
In computing, BIOS (, ; Basic Input/Output System, also known as the System BIOS, ROM BIOS, BIOS ROM or PC BIOS) is a type of firmware used to provide runtime services for operating systems and programs and to perform hardware initialization d ...
configures the devices.
* Turns on
Emergency Management Services (EMS) on a
Windows Server 2003, Enterprise Edition-based computer. To turn on EMS by editing the Boot.ini on an
x86
x86 (also known as 80x86 or the 8086 family) is a family of complex instruction set computer (CISC) instruction set architectures initially developed by Intel, based on the 8086 microprocessor and its 8-bit-external-bus variant, the 8088. Th ...
-based computer, edit both the
oot loadersection and the
perating systemssection of the Boot.ini file.
* Starts Windows in
Safe Mode
Safe mode is a diagnosis, diagnostic mode of a computer operating system (OS). It can also refer to a mode of operation by application software. ''Safe mode'' is intended to help fix most, if not all, problems within an operating system. It is a ...
. You must include the colon plus one of the three types listed above. An additional option the
user can append is , which tells Windows to use the program specified by the value as the graphical shell rather than to use the default, which is Windows Explorer.
The user can also combine other parameters with . The following examples illustrate the parameters that are in effect when you select a Safe Mode option from the startup recovery menu. (Note: The , , and switches are not required with any one of these settings, but the switches can help with troubleshooting.)
** Safe Mode () Default: Uses a minimal set of
device driver
In the context of an operating system, a device driver is a computer program that operates or controls a particular type of device that is attached to a computer or automaton. A driver provides a software interface to hardware devices, enabli ...
s and services to start Windows.
** Safe Mode with Networking () Default mode together with the drivers necessary to load networking.
** Safe Mode with Command Prompt () Default mode, except that
Cmd.exe starts instead of
Windows Explorer.
** Windows in
Directory Services Restore Mode () (This mode is valid only for Windows-based domain controllers.) Performs a directory service repair.
* Disables the graphical boot screen and uses the NT4 style text-boot, listing the Windows build number, version number, etc. In Windows 2000 and XP, the text is rendered inside the CHKDSK bitmap (and with a progress bar in 2000).
* Specifies that Windows uses the Power Management Timer (PM_TIMER) timer settings instead of the
Time Stamp Counter (TSC) timer settings if the processor supports the PM_TIMER settings.
By default, Windows Server 2003 Service Pack 2 (SP2) uses the PM timer for all multiprocessor
APIC or
ACPI HALs. If you are not running Windows Server 2003 SP2, you must force the computer to use the PM timer by using the switch.
* Customizes the amount of memory, in megabytes, that is allocated to processes when using the switch. This switch permits more
page table entry kernel memory but still maintains almost 3 GB of process memory space.
* Directs Ntldr to boot the Windows boot sector stored in .
* Directs Ntldr to boot the MS-DOS boot sector stored in .
* Instructs the Windows core time function to ignore the year that the computer's real-time clock reports and instead use the one indicated. Example: . (This switch was created to assist in
Y2K testing.)
See also
*
Booting process of Windows NT
*
ntoskrnl.exe
*
ntdetect.com
*
Emergency Management Services
*
Comparison of boot loaders
The following tables compare general and technical information for a number of available bootloaders.
General information
Technical information
Note: The column MBR (Master Boot Record) refers to whether or not the boot loader can be stored ...
*
Windows Boot Manager
References
External links
How to edit the Boot.ini file in Windows XPBOOT.INI and ARC Path Naming Conventions and Usage* MS Knowledge Base help on "NTLDR Is Missing" error message i
Windows 2000an
Windows XP(als
How to fix "NTLDR Is Missing" errorby Daniel B. Sedory
{{DEFAULTSORT:Ntldr
Windows components
Boot loaders