Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
NTLDR
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== boot.ini == NTLDR's first action is to read the ''boot.ini'' file.<ref>{{cite web |author=Rick Maybury |author-link=Rick Maybury |url=http://www.pctoptips.co.uk/Bootcamp/2009/559.htm |title=Startup and Shutdown Problems, part 1 |work=Bootcamp |date=2009 |access-date=25 April 2012 |archive-url=https://web.archive.org/web/20120711014954/http://www.pctoptips.co.uk/Bootcamp/2009/559.htm |archive-date=2012-07-11 |url-status=unfit}}</ref> 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 attribute]]s: system, hidden, read-only. To manually edit it, the [[User (system)|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: <syntaxhighlight lang="ini"> [boot loader] timeout=40 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 </syntaxhighlight> 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 === {{how-to|section|date=July 2016}} [[File:Windows Advanced Options menu.png|thumb|300px|'''NTLDR''' Bootloader's Advanced Option Menu]] * '''{{Mono|/3GB}}''' {{En dash}} Forces [[x86]]-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 (operating system)|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]] that run [[virtual memory]]-intensive applications such as database servers or [[History of Microsoft Exchange Server#Exchange Server 2003|Microsoft Exchange Server 2003]] may require this switch<ref name="switches">{{cite web |author=Microsoft |title=Available switch options for the Windows XP and the Windows Server 2003 Boot.ini files |url=https://learn.microsoft.com/en-us/troubleshoot/windows-server/performance/switch-options-for-boot-files |date=November 28, 2007 |access-date=January 4, 2024}}</ref> or may benefit from improved performance.<ref name="bootopts">{{cite web |first=Mark |last=Russinovich |publisher=Microsoft |title=Boot INI Options Reference |website=Microsoft Learn |url=https://learn.microsoft.com/en-us/previous-versions/bb963892(v=msdn.10) |date=November 1, 2006 |access-date=January 4, 2023}}</ref> Activating this option may break VMR-9 video.<ref>{{Cite web|url=https://forum.videohelp.com/threads/292160-Loss-of-DirectDraw-Overlay-and-VMR9-after-upgrade-update|title = Loss of DirectDraw Overlay and VMR9 after upgrade/update |website=VideoHelp Forum |date=July 2008}}</ref> 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. * '''{{Mono|/BASEVIDEO}}''' {{En dash}} Forces the system into standard 640 Γ 480 16-color [[VGA]] mode by using a video [[device driver]] 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 {{Mono|/SOS}} switch helps to determine the driver that is triggering a failure.<ref name="switches"/> * '''{{Mono|/BAUDRATE{{=}}<var>nnn</var>}}''' {{En dash}} Sets the [[baud rate]] of the debug port that is used for kernel debugging. Use of this switch automatically enables the {{Mono|/DEBUG}} switch.<ref name="switches"/> Specifies an override for the default baud rate (19200) at which a remote kernel debugger host will connect.<ref name="bootopts" /> Example: {{Mono|/BAUDRATE{{=}}115200}}. * '''{{Mono|/BOOTLOG}}''' {{En dash}} Turns on boot logging to a file named {{Mono|[[%SYSTEMROOT%#System path variables|%SystemRoot%]]\Ntbtlog.txt}}.<ref name="switches"/> * '''{{Mono|/BOOTLOGO}}''' {{En dash}} Displays an alternate 640 Γ 480 16-color custom [[bitmap]]. The bitmap must be saved in the \Windows directory with the name {{Mono|boot.bmp}}. Use with the {{Mono|/NOGUIBOOT}} switch.<ref name="bootopts" /> * '''{{Mono|/BURNMEMORY{{=}}<var>nnn</var>}}''' {{En dash}} 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 [[Random-access memory|RAM]] depletion.<ref name="switches"/> * '''{{Mono|/CHANNEL{{=}}<var>nn</var>}}''' {{En dash}} Use with the {{Mono|/DEBUG}} switch and the {{Mono|/DEBUGPORT{{=}}1394}} switch to selects the [[IEEE 1394]] interface channel (numbered 0 to 62) through which kernel debugging communications will flow.<ref name="switches"/> * '''{{Mono|/CRASHDEBUG}}''' {{En dash}} Loads the [[kernel debugger]] at OS startup, but it remains inactive until a [[Blue Screen of Death|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.)<ref name="switches"/> * '''{{Mono|/DEBUG}}''' {{En dash}} Turns on the [[kernel debugger]] when Windows starts. Unlike the {{Mono|/CRASHDEBUG}} switch, {{Mono|/DEBUG}} uses the COM port whether you use debugging or not.<ref name="switches"/> * '''{{Mono|/DEBUGPORT{{=}}com<var>x</var>}}''' {{En dash}} Specifies the [[Serial port|COM port]] to use for the debug port. By default, {{Mono|/DEBUGPORT}} uses COM2 if it exists. Otherwise, the default is COM1. Use of this switch automatically enables the {{Mono|/DEBUG}} switch.<ref name="switches"/> * '''{{Mono|/FASTDETECT[:com<var>x</var>[,com<var>y</var>]]}}''' {{En dash}} 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 {{Mono|/NOSERIALMICE}}.)<ref name="switches"/> * '''{{Mono|/HAL{{=}}<var>filename</var>}}''' {{En dash}} 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 {{Mono|HAL.DLL}}. 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 {{Mono|/KERNEL}} switch. <var>filename</var> must be in System32 directory. It can be a simple file, hard link, but not a symbolic link or a junction point.<ref name="switches"/> * '''{{Mono|/KERNEL{{=}}<var>filename</var>}}''' {{En dash}} Defines the kernel that is loaded at startup. With this switch, the [[User (system)|user]] can switch between a debug-enabled kernel that is full of debugging code and a regular kernel. Same limitations for <var>filename</var> location and type as for /HAL switch.<ref name="switches"/> * '''{{Mono|/MAXMEM{{=}}<var>nnn</var>}}''' {{En dash}} Specifies the maximum amount of [[random access memory|RAM]], in megabytes, that Windows can use.<ref name="switches"/> However, the {{Mono|/MAXMEM}} switch does not account for memory holes. Therefore, it is recommended to use the {{Mono|/BURNMEMORY}} switch instead.<ref>{{cite web |url=http://msdn.microsoft.com/en-us/library/ff556246.aspx |title=/burnmemory (Windows Drivers |work=Boot.ini Boot Parameter Reference |publisher=Microsoft |archive-url=https://web.archive.org/web/20130110184955/http://msdn.microsoft.com/en-us/library/ff556246.aspx |archive-date=2013-01-10 |url-status=deviated}}</ref> * '''{{Mono|/MININT}}''' {{En dash}} This option is used by [[Windows Preinstallation Environment]] (WinPE) and loads the [[Windows registry#HKEY LOCAL MACHINE .28HKLM.29|Registry SYSTEM hive]] as a volatile hive such that changes made to it in memory are not saved back to the hive image.<ref name="bootopts"/> * '''{{Mono|/NODEBUG}}''' {{En dash}} Turns off debugging. This scenario can cause a [[Blue Screen of Death|Stop Error]] if a program has a debug hardcoded breakpoint in its software.<ref name="switches"/> * '''{{Mono|/NOEXECUTE{{=}}{OPTIN{{pipe}}OPTOUT{{pipe}}ALWAYSON{{pipe}}ALWAYSOFF}}}''' {{En dash}} 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 (system)|user]] can specify with this switch:<ref name="bootopts"/> ** '''{{Mono|/NOEXECUTE{{=}}OPTIN}}''' {{En dash}} Enables DEP for core system images and those specified in the DEP configuration dialog. ** '''{{Mono|/NOEXECUTE{{=}}OPTOUT}}''' {{En dash}} Enables DEP for all images except those specified in the DEP configuration dialog. ** '''{{Mono|/NOEXECUTE{{=}}ALWAYSON}}''' {{En dash}} Enables DEP on all images. ** '''{{Mono|/NOEXECUTE{{=}}ALWAYSOFF}}''' {{En dash}} Disables DEP. * '''{{Mono|/NOGUIBOOT}}''' {{En dash}} Displays the device driver names while they are being loaded. Use with the {{Mono|/BASEVIDEO}} switch to determine the driver that is triggering a failure.<ref name="switches" /> * '''{{Mono|/NOPAE}}''' {{En dash}} Forces Ntldr to load the non-[[Physical Address Extension]] (PAE) version of the Windows kernel, even if the system is detected as supporting [[x86]] PAEs and has more than 4 GB of physical memory.<ref name="bootopts"/> * '''{{Mono|/NOSERIALMICE[{{=}}com<var>x</var>]}}''' {{En dash}} (Obsolete on all versions post-[[Windows NT 4.0]]) Replaced by the absence of the {{Mono|/FASTDETECT}} switch. Disables serial mouse detection on the specified COM ports. Using {{Mono|/NOSERIALMICE}} without specifying a COM port disables serial mouse detection on all COM ports.<ref name="bootopts"/> * '''{{Mono|/NUMPROC{{=}}<var>nnn</var>}}''' {{En dash}} Sets the number of [[Central processing unit|processors]] that Windows will run at startup. With this switch, the [[User (system)|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.<ref name="switches"/> * '''{{Mono|/ONECPU}}''' {{En dash}} Equivalent to using {{Mono|/NUMPROC{{=}}1}}. Causes Windows to use only one CPU on a multiprocessor system.<ref name="bootopts"/> * '''{{Mono|/PAE}}''' {{En dash}} Enables [[Physical Address Extension]] support. In [[Safe Mode]], the computer starts by using normal kernels, even if the {{Mono|/PAE}} switch is specified.<ref name="switches"/> * '''{{Mono|/PCILOCK}}''' {{En dash}} For [[x86]]-based systems, this stops the [[operating system]] from dynamically assigning hardware input, hardware output, and [[interrupt request]] resources to [[Peripheral Component Interconnect|PCI]] devices. Instead, the [[BIOS]] configures the devices.<ref name="switches"/> * '''{{Mono|/REDIRECT}}''' {{En dash}} Turns on [[Emergency Management Services]] (EMS) on a [[Windows Server 2003#Enterprise|Windows Server 2003, Enterprise Edition]]-based computer. To turn on EMS by editing the Boot.ini on an [[x86]]-based computer, edit both the [boot loader] section and the [operating systems] section of the Boot.ini file.<ref name="switches"/> * '''{{Mono|/SAFEBOOT:{MINIMAL{{pipe}}NETWORK{{pipe}}DSREPAIR}[(ALTERNATESHELL)]}}''' {{En dash}} Starts Windows in [[Safe Mode]]. You must include the colon plus one of the three types listed above. An additional option the [[User (system)|user]] can append is {{Mono|(ALTERNATESHELL)}}, which tells Windows to use the program specified by the {{Mono|HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot\AlternateShell}} value as the graphical shell rather than to use the default, which is Windows Explorer.<ref name="bootopts"/> The user can also combine other {{Mono|boot.ini}} parameters with {{Mono|/SAFEBOOT:<var>type</var>}}. The following examples illustrate the parameters that are in effect when you select a Safe Mode option from the startup recovery menu. (Note: The {{Mono|/SOS}}, {{Mono|/BOOTLOG}}, and {{Mono|/NOGUIBOOT}} switches are not required with any one of these settings, but the switches can help with troubleshooting.)<ref name="switches"/> ** '''Safe Mode''' ({{Mono|/SAFEBOOT:MINIMAL /SOS /BOOTLOG /NOGUIBOOT}}) {{En dash}} Default: Uses a minimal set of [[device driver]]s and services to start Windows.<ref name="safemodes">{{cite web |url=http://support.microsoft.com/kb/315222 |title=A description of the Safe Mode Boot options in Windows XP |website=Microsoft Support |archive-url=https://web.archive.org/web/20150219071404/http://support.microsoft.com/kb/315222/ |archive-date=2015-02-19 |url-status=dead}}</ref> ** '''Safe Mode with Networking''' ({{Mono|/SAFEBOOT:NETWORK /SOS /BOOTLOG /NOGUIBOOT}}) {{En dash}} Default mode together with the drivers necessary to load networking.<ref name="safemodes"/> ** '''Safe Mode with Command Prompt''' ({{Mono|/SAFEBOOT:MINIMAL(ALTERNATESHELL) /SOS /BOOTLOG /NOGUIBOOT}}) {{En dash}} Default mode, except that [[Cmd.exe]] starts instead of [[Windows Explorer]].<ref name="safemodes"/> ** '''Windows in [[Directory Services Restore Mode]]''' ({{Mono|/SAFEBOOT:DSREPAIR /SOS}}) {{En dash}} (This mode is valid only for Windows-based domain controllers.) Performs a directory service repair.<ref name="safemodes"/> * '''{{Mono|/SOS}}''' {{En dash}} 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). * '''{{Mono|/USEPMTIMER}}''' {{En dash}} 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.<ref name="switches"/> By default, Windows Server 2003 Service Pack 2 (SP2) uses the PM timer for all multiprocessor [[Advanced Programmable Interrupt Controller|APIC]] or [[Advanced Configuration and Power Interface|ACPI]] [[Hardware abstraction layer|HAL]]s. If you are not running Windows Server 2003 SP2, you must force the computer to use the PM timer by using the {{Mono|/USEPMTIMER}} switch.<ref>{{cite web |url=https://learn.microsoft.com/en-US/troubleshoot/windows-server/performance/programs-queryperformancecounter-function-perform-poorly |title=Programs that use the QueryPerformanceCounter function may perform poorly |website=Microsoft Support|date=23 February 2023 }}</ref> * '''{{Mono|/USERVA{{=}}<var>nnn</var>}}''' {{En dash}} Customizes the amount of memory, in megabytes, that is allocated to processes when using the {{Mono|/3GB}} switch. This switch permits more [[page table]] entry kernel memory but still maintains almost 3 GB of process memory space.<ref name="safemodes"/> * '''{{Mono|/WIN95}}''' {{En dash}} Directs Ntldr to boot the Windows boot sector stored in {{Mono|bootsect.w40}}.<ref name="bootopts"/> * '''{{Mono|/WIN95DOS}}''' {{En dash}} Directs Ntldr to boot the MS-DOS boot sector stored in {{Mono|bootsect.dos}}.<ref name="bootopts"/> * '''{{Mono|/YEAR{{=}}<var>yyyy</var>}}''' {{En dash}} 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: {{Mono|/YEAR{{=}}2001}}. (This switch was created to assist in [[Year 2000 problem|Y2K]] testing.)<ref name="bootopts"/>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)