BOOT.INI Option Reference Copyright © 1996-1999 Mark Russinovich Last Updated March 12, 1999 ---------------------------------------------------------------------------- There are number of BOOT.INI switches that are useful for driver developers that wish to test their drivers under a variety of different system configurations without having to have a separate machine for every one. For example, limiting the amount of memory NT sees can be useful for stressing memory loads, and limiting the number of processors for testing scalability. I've compiled a complete list of the options that BOOT.INI currently supports. Switches new to Win2K (NT 5) are in red, and are present in some Beta builds but may not appear in the final release. /NOGUIBOOT When this option is specified the VGA video driver responsible for presenting bit mapped graphics during Win2K's boot process is not initialized. The driver is used to display boot progress information, as well as to print the Blue Screen crash screen, so disabling it will disable Win2K's ability to do those things as well. /FASTDETECT When you dual boot NT 4.0 and Win2K the Win2K version of NTDETECT.COM is used during the boot process. In Win2K detection of parallel and serial devices is performed by plug-and-play device drivers, but NT 4.0 expects NTDETECT to perform the detection. Thus, specifying FASTDETECT causes NTDETECT to skip parallel and serial device enumeration for a boot into Win2K, whereas ommiting the switch has NTDETECT perform enumeration for a boot into NT 4.0. Win2K setup automatically recognizes dual-boot configurations and sets this switch for BOOT.INI lines that specify a Win2K boot. /YEAR= This option is obviously present for Y2K testing. Specifying it causes NT core time function to ignore the year that the computer's real-time clock reports and instead use the one indicated. Thus, the year used in the switch affects every piece of software on the system, including the NT kernel. Example: /YEAR=2001. /BOOTLOG Specifying this switch will result in NT writing a log of the boot to the file %SystemRoot%\NTBTLOG.TXT. The log has entries that detail which drivers load and do not load during the boot process. Here is example output from a log (note that the log file is un UNICODE): Microsoft (R) Windows NT (R) Version 5.0 Loaded driver \WINNT\System32\ntoskrnl.exe Loaded driver \WINNT\System32\hal.dll Loaded driver \WINNT\System32\BOOTVID.dll Loaded driver pci.sys Loaded driver isapnp.sys Loaded driver intelide.sys ... /SAFEBOOT: You should never have to specify this option manually, since NTLDR does it for you when you use the F8 menu to perform a safe boot. Following the colon in the option you must specify one of three additional switches: MINIMAL, NETWORK, or DSREPAIR. The MINIMAL and NETWORK flags correspond to safe boot with no network and safe boot with network support. A safe boot is a boot where NT only loads drivers and services that are specified by name or group in the Minimal or Network Registry keys under HKLM\System\CurrentControlSet\Control\SafeBoot. The DSREPAIR (Directory Services Repair) switch causes NT to boot into a mode where it restores the Active Directory from a backup medium you present. An additional option that you can append is "(ALTERNATESHELL)". This tells NT to use the program specified by HKLM\System\CurrentControlSet\SafeBoot\AlternateShell as the graphical shell, rather than to use the default which is Explorer. /PERFMEM= These flags are not likely to be supported in the /PERFPAGES= final release of Windows 2K, as they are used to have NT reserve physical memory for the purposes of Basic Block Testing (BBT). There is only one reference I've been able to find BBT: the transcript (posted at Microsoft's web site) of the US vs. Microsoft trial from February 2, 1999. In the transcript Jim Allchin is on the stand and responds to questions about BBT by DOJ attorney David Boies, saying that it is a performance optimizing system Microsoft uses on code before releases in order to minimize their paging footprints. PERFMEM specifies the physical memory to reserve in MB, and PERFPAGES in number of pages - they should not be specified together. A pointer to the reserved BBT buffer is inserted in the Thread Environment Block (TEB) of every thread, but there appears to be no other references to the buffer in Beta 3. /INTAFFINITY This new switch directs the multiprocessor HAL (HALMPS.DLL) to set interrupt affinities such that only the highest numbered processor in a SMP will receive interrupts. Without the switch the HAL defaults to its normal behavior of letting all processors receive interrupts. /MAXPROCSPERCLUSTER=It seems that the multiprocessor HAL in Win2K (HALMPS.DLL) has the ability to work with multiprocessors that are made up of tightly-coupled clusters of smaller multiprocessors. For example, if you had an 8-way system that was made up of 2 4-way clusters, the processor IDs of each processor would have to be specified in a cluster-oriented manner by the HAL. The maximum cluster size is 4 and the default is 0 (system is not based on clusters). Example: /MAXPROCSPERCLUSTER=3. /TIMERES= On the multiprocessor HAL (HALMPS.DLL) this option will set the resolution of the system timer. The argument is a number interpreted in 100's of nanoseconds, but the rate will be set to the closest resolution the HAL supports that is not larger than the one requested. The HAL supports the following resolutions: 100's of nanoseconds milliseconds 9766 .98 19532 2.0 39063 3.9 78125 7.8 The default resolution is 7.8ms. The system timer resolution affects the resolution of waitable timers. Example: /TIMERES=9000 would set the timer to a resolution of .98ms. /CLKLVL Has the Multiprocessor x86 HAL (HALMPS.DLL) configure itself for a level-sensitve system clock, rather then an edge-triggered clock. /USE8254 This switch is intended for systems with older BIOS's. It instructs the NT HAL to use the 8254 timer chip as its base timer. See Microsoft KB Article Q169901 for more information. /MAXMEM= This option will limit NT to using only the amount of memory you specify. The number is interpreted as MB. Example: /MAXMEM=16 would limit NT to using 16MB of the system's memory. /BURNMEMORY= This option will cause NT to "forget" about the amount of memory specified, which limits memory like /MAXMEM. The value specified is interpreted as MB. Example: /BURNMEMORY=128 would have NT discard 128MB of the physical memory on the machine as unusable. /ONECPU This option will have NT only enable one CPU of a multiprocessor system. /NUMPROC= Only the number of CPUs specified will be enabled. Example: /NUMPROC=2 on a 4-way system will cause 2 of the 4 processors to be unused by NT. /SOS Causes NT to print information about what drivers are being loaded as the system boots. /BASEVIDEO Causes NT to use the standard VGA display driver when moving to GUI mode. This switch is obsolete in Win2K. /NODEBUG Prevents kernel-mode debugging from being initialized. Overrides the specification of any of the three debug-related switches, /DEBUG, /DEBUGPORT and /BAUDRATE. /CRASHDEBUG Its name implies otherwise, but this option is synonymous for /NODEBUG. /DEBUG Enables kernel-mode debugging. /DEBUGPORT= Enables kernel-mode debugging and specifies an override for the default serial port (COM1) to which a remote debugee is connected. Example: /DEBUGPORT=COM2. /BAUDRATE= Enables kernel-mode debugging and specifies an override for the default baud rate (19200) at which a remote debugee will connect. Example: /BAUDRATE=115200. /BREAK Causes the HAL to stop at a breakpoint at HAL initialization. The first thing that the NT kernel does when it initializes is to intialize the HAL, so this breakpoint is the earliest one possible. The HAL will wait indefinitly at the breakpoint until a debugger connection is made. If the switch is used without the /DEBUG switch the system will Blue Screen with STOP code of 0x00000078 (PHASE0_EXCEPTION). /KERNEL= These options pecify overrides of NTLDR's selection of /HAL= the file named NTOSKRNL.EXE in the system root (\system32) as the kernel's image file and of the file named HAL.DLL as the HAL image file. They are extremely useful for alternating between a checked kernel environment and a free kernel environment. If you wish to boot into a checked environment that consists solely of the checked kernel and HAL, which is typically all that is needed to test drivers, follow these steps on a system installed with the free build (retail NT): 1. Copy the checked version of the kernel from the checked build distribution CD to your \system32 directory, naming it NTOSKCHK.EXE. If you are on a uniprocessor then copy NTOSKRNL.EXE, otherwise copy NTKRNLMP.EXE. 2. Copy the checked version of the HAL from the checked build distrution CD to your \system32 directory, naming it HALCHK.DLL. To determine which HAL to copy, go into your \repair directory and open setup.log in Notepad. Search for HAL.DLL and you'll find a line like "\WINNTF\system32\hal.dll = "halmps.dll","1a01c". The name to the right of the equal sign is the name of the HAL you should copy. 3. Make a copy of the default line in the system's BOOT.INI. 4. In the string description of the boot selection add something that indicates that the new selection will be for a checked build environment e.g. "Windows NT Server Version 4.0 CHECKED". 5. Add the following to the end of the new selection's line: /KERNEL=NTOSKCHK.EXE /HAL=HALCHK.DLL You're done. Now you can select the new line to boot into a checked environment or select the pre-existing selection to boot into the free build. /3GB This switch made its debut in NT 4.0 Service Pack 3 and is supported on all later releases of NT. It will cause the split between the user and system portions of NT's virtual address map to move from 2GB (2GB user, 2GB system) to 3GB (3GB user, 1GB system). Giving virtual memory intensive applications like database servers a larger address space can improve their performance. Note, however that for an application to take advantage of this feature two additional conditions must hold: The system must be part of the NT Enterprise suite (SP3 is not) and the application must be flagged as a 3-GB aware application. See Microsoft KB Article Q171793 for additional information. /WIN95 This switch is only pertinent on a triple-boot system that has DOS, Win9x and Windows NT installed. Specifying the /WIN95 switch directs NTLDR to boot the Win9x boot sector stored in BOOTSECT.W40. See Microsoft KB Article Q157992 for more information. /WIN95DOS This switch is only pertinent on a triple-boot system that has DOS, Win9x and Windows NT installed. Specifying the /WIN95DOS switch directs NTLDR to boot the DOS boot sector stored in BOOTSECT.DOS. See Microsoft KB Article Q157992 for more information. /PCILOCK Stops Windows NT from dynamically assigning IO/IRQ resources to PCI devices and leaves the devices configured by the BIOS. See Microsoft KB Article Q148501 for more information. /NOSERIALMICE=[COMx Disables serial mouse detection of the specified COM | COMx,y,z...] port(s). Use this switch if you have a component other than a mouse attached to a serial port during the startup sequence. If you use /NOSERIALMICE without specifying a COM port, serial mouse detection is disabled on all COM ports. See Microsoft KB Article Q131976 for more information. /SCSIORDINAL: Adding a new SCSI device to a system with an on-board SCSI controller can cause the controller's SCSI ID to change, so you use this switch to direct NT to the SCSI ID of the controller. See Microsoft KB Article Q103625 for more information. Thanks to Jonas Fischer for pointing out the PCILOCK and NOSERIALMICE switches. Thanks to Rob Green for information on the FASTDETECT switch. ---------------------------------------------------------------------------- [Image]