NTLDR
NTLDR (abbreviation of NT loader) is the boot loader for all releases of Windows NT from 1993 with the release of Windows NT 3.1 up until Windows XP and Windows Server 2003. From Windows Vista onwards it is replaced by Windows Boot Manager (BOOTMGR).
NTLDR is typically run from the primary storage device, but it can also run from portable storage devices such as a CD-ROM, USB flash drive, or floppy disk. NTLDR can also load a non NT-based operating system given the appropriate boot sector in a file.
NTLDR requires, at a minimum, the following two files to be on the system volume:
- ntldr, the main boot loader itself
- NTDETECT.COM, 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). On non-English versions of NTLDR, it may also load bootfont.bin; this is not the case for BOOTMGR.
NTLDR is launched by the volume boot record of system partition, which is typically written to the disk by the Windows FORMAT or SYS command.
History
[edit]Windows NT was originally designed for ARC (Advanced RISC Computing)-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 an ARC-compatible boot manager when a user chooses to start a specific Windows NT operating system. However, because IBM PC compatible machines lacked any kind of ARC support (as they predate the creation of the ARC specification), an additional layer was added specifically for that platform: a custom boot manager code presenting a text-based menu allowing the user to choose from one or more operating systems and its options configured in a boot.ini configuration file, prepended by a special StartUp module which is responsible for some preparations such as switching the CPU to 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:
load osloader=<Windows Path>\System32\NTLDR
systempartition=<Windows Partition>
osloadpartition=<Windows Partition>
osloadoptions=<Windows Boot Parameters>
consolein=multi(0)key(0)keyboard(0)
consoleout=multi(0)video(0)monitor(0)
x86systempartition=<NTLDR partition>
Versions of NTLDR aside from the x86 IA-32 architecture were also used; an IA-64 version of NTLDR was used in all versions of Windows XP 64-Bit Edition while an x86-64 version of NTLDR was used in Windows XP Professional x64 Edition (although beta builds retained the x86-only NTLDR).
In Windows releases starting from Windows Vista and Windows Server 2008, NTLDR was split off into two parts: Windows Boot Manager for the boot manager and winload.exe for the system loader. The boot manager part has been completely rewritten; it no longer uses boot.ini as a configuration file, although the bootcfg utility for modifying boot.ini is still present in the case of multi-boot configurations with Windows versions up to Windows XP and Windows Server 2003.
Command-line interface
[edit]| bootsect | |
|---|---|
| Developer | Microsoft |
| Operating system | Microsoft Windows |
| Type | Command |
| License | Proprietary commercial software |
| Website | Bootsect Command-Line Options |
This section needs expansion. You can help by adding missing information. (June 2020) |
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.[1] The command can be used for FAT and NTFS based file systems. It replaces the FixFAT and FixNTFS tools.[2]
Example
[edit]The following example applies the NTLDR compatible master boot code to the D: volume:[2]
C:\>bootsect /nt52 D:
Startup process
[edit]When a PC is powered on its BIOS 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 (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 {ntldr} entry pointing to another partition with a NTLDR boot sector.[3]
When booting, the loader portion of NTLDR does the following in order:
- Accesses the file system on the boot drive (either FAT or New Technology File System, NTFS).
- 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.[4])
- Starts ntoskrnl.exe, passing to it the information returned by ntdetect.com.[5]
boot.ini
[edit]NTLDR's first action is to read the boot.ini file.[6] It 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 ARC path. 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.
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. Extreme caution should be taken when modifying boot.ini, as erroneous information can result in an OS that fails to boot.
Example
[edit]An example of a boot.ini file, extracted from a working Windows XP Professional installation:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
Note: If the boot loader timeout option in boot.ini is set to 0, the NTLDR boot menu does not appear. This happens especially on multi-booted systems; the boot menu also does not appear when only one operating system is installed, like the example above, even if the timeout option is set into any other value other than 0.
NT kernel switches
[edit]This section may require cleanup to meet Wikipedia's quality standards. The specific problem is: Rewrite any visible copyrighted material that was directly copypasted from these sources: https://learn.microsoft.com/en-us/previous-versions/bb963892(v=msdn.10), https://learn.microsoft.com/en-us/troubleshoot/windows-server/performance/switch-options-for-boot-files. (January 2026) |
This section contains instructions or advice. (July 2016) |

Note: Unless otherwise stated, the following kernel switches apply to both Windows XP and Windows Server 2003 as well as prior versions of Windows NT.
- /3GB – Option used only on 32-bit x86-based systems that allocates 3 GB for the user-mode address space and 1 GB for the system-mode (or kernel-mode) address space (more than that of the 2 GB allocation used for both user-mode and system/kernel-mode address spaces). It is intended for programs that can take advantage of the additional memory address space, such as certain Windows Server 2003 and Microsoft Exchange Server 2003 configurations.[7][8] Activating this option however may break VMR-9 video;[9] it may also cause audio problems with certain Sound Blaster X-Fi sound cards (X-Fi Gamer / X-Fi Titanium @ WINXP 32-bit 3/2012) due to the way that Creative's drivers handle memory over 2 GB.[10][11]
- /BASEVIDEO – Starts Windows in "VGA mode", where a VGA-compatible display driver is used with a 16-color, 640 × 480 resolution.[8] This can be used to recover from configuration problems with certain display drivers; using the /SOS switch in conjunction with the /BASEVIDEO switch can help with diagnosing display driver failures on startup (this is the case for Windows NT 4.0 for the "VGA mode" option in the boot menu, which has both /BASEVIDEO and /SOS switches enabled).[7]
- /BAUDRATE=nnn – Specifies the baud rate for the debug port used by the kernel debugger, overriding the default value (9600–19200 Kbps with a modem and 115200 Kbps with a null modem). Enabling this option under boot.ini automatically enables kernel debugging with the /DEBUG switch.[7][8]
- /BOOTLOG – Writes a log of the boot process to the file %SystemRoot%\Ntbtlog.txt for diagnostic purposes.[7][8]
- /BOOTLOGO – Displays a custom bitmap instead of the default graphical boot screen on startup. This must be a 640 × 480 16-color bitmap named boot.bmp, which should be placed in the Windows directory. The /NOGUIBOOT switch must be used in conjunction with the /BOOTLOGO switch, otherwise the custom bitmap will not display properly.[8]
An editor has launched a copyright investigation involving this section. The text under investigation is currently hidden from public view, but is accessible in the page history. Please do not remove this notice or restore blanked content until the issue is resolved by an administrator, copyright clerk, or volunteer response agent.
The purported copyright violation copies text from https://learn.microsoft.com/en-us/previous-versions/bb963892(v=msdn.10), https://learn.microsoft.com/en-us/troubleshoot/windows-server/performance/switch-options-for-boot-files ; as such, this page has been listed on the copyright problems noticeboard. Unless the copyright status of the text of this page or section is determined to be compatible with Wikipedia's licenses, the problematic text and revisions or the entire page may be deleted one week after the time of its listing (i.e. after 15:52, 30 January 2026 (UTC)). What can I do to resolve the issue?
Steps to list an article at Wikipedia:Copyright problems:
|
See also
[edit]- Booting process of Windows
- ntoskrnl.exe
- ntdetect.com
- Emergency Management Services
- Comparison of boot loaders
- Windows Boot Manager
References
[edit]- ^ "Bootsect Command-Line Options". Windows Vista: Technical Reference. Microsoft Technet. 2009. Retrieved 2011-07-03.
- ^ a b "Bootsect Command". Computer Hope.
- ^ "Boot Configuration Data Editor Frequently Asked Questions". Windows Server. Microsoft Learn. 2007. Retrieved 2024-01-04.
- ^ "Ntdetect.com (Installd.cmd)". Microsoft. Archived from the original on 2006-02-06.
- ^ Microsoft (2000). Windows 2000 Professional Resource Kit (1st ed.). Redmond, WA: Microsoft Press. ISBN 1-57231-808-2.
- ^ Rick Maybury (2009). "Startup and Shutdown Problems, part 1". Bootcamp. Archived from the original on 2012-07-11. Retrieved 25 April 2012.
- ^ a b c d e f g h i j k l m n o p q r s t u Microsoft (November 28, 2007). "Available switch options for the Windows XP and the Windows Server 2003 Boot.ini files". Retrieved January 4, 2024.
- ^ a b c d e f g h i j k l m n o p q r s t u v w x y z aa ab ac ad ae af ag ah ai Russinovich, Mark (November 1, 2006). "Boot INI Options Reference". Microsoft Learn. Microsoft. Retrieved January 4, 2023.
- ^ "Loss of DirectDraw Overlay and VMR9 after upgrade/update". VideoHelp Forum. July 2008.
- ^ "Trying to re-enable X-Fi MB2 with more recent Realtek HDA drivers... - Windows 10 Help Forums". www.tenforums.com. July 24, 2020. Retrieved January 22, 2026.
- ^ "Sound problem with New RAM - Windows 7 Help Forums". www.sevenforums.com. Retrieved January 22, 2026.
- ^ a b c d e "A description of the Safe Mode Boot options in Windows XP". Microsoft Support. Archived from the original on 2015-02-19.
- ^ "Programs that use the QueryPerformanceCounter function may perform poorly". Microsoft Support. 23 February 2023.
External links
[edit]- How to edit the Boot.ini file in Windows XP at the Wayback Machine (archived 2006-12-16)
- BOOT.INI and ARC Path Naming Conventions and Usage at the Wayback Machine (archived 2006-08-30)
- MS Knowledge Base help on "NTLDR Is Missing" error message in Windows 2000 and Windows XP (also [1] Archived 2007-06-13 at the Wayback Machine, [2] Archived 2007-07-09 at the Wayback Machine, [3] Archived 2007-07-16 at the Wayback Machine, [4] Archived 2009-02-28 at the Wayback Machine)
- How to fix "NTLDR Is Missing" error at the Wayback Machine (archived 2013-12-16)
- Explanation of BOOT.INI by Daniel B. Sedory