|
|

Copyright © 1996-1999
Mark Russinovich
Last Updated: August 4, 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 are in red. This list is reproduced in the Startup, Shutdown and
Crashes chapter of
Inside Windows 2000, 3rd Ed.,
where you'll find more information about the boot process.
/PAE
This has NTLDR load ntkrnlpa.exe, which is the version of the x86 kernel
that is able to take advantage of Intel Physical Address Extensions (PAE),
even when a system doesn't have more than 4GB of physical memory. PAE
permits an x86 sytem to have up to 64GB of physical memory, but an operating
system must be specially coded to use memory beyond 4GB (the standard x86
limit). The PAE-version of the Win2K kernel presents 64-bit physical
addresses to device drivers, so this switch is helpful for testing device
driver support for large memory systems.
/NOPAE
This switch forces NTLDR to load the non-PAE version of the Win2K kernel,
even if the system is detected as supporting x86 Physical Address Extensions
(PAE) and has more than 4GB of physical memory.
/NOLOWMEM
This switch requires that the /PAE switch be present and that the system
have more than 4GB of physical memory. If these conditions hold, then the
PAE-enabled version of the Win2K kernel, ntkrnlpa.exe, will not use the
first 4GB of physical memory. Instead, it will load all applications and
device drivers, and allocate all memory pools, from above that boundary.
This switch is useful only to test device driver compatability with large
memory systems.
/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 ommitting the switch has NTDETECT perform enumeration for a
boot into NT 4.0. For Win2K boots the switch is present and for boots into
NT 4 the switch is omitted.
/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=
/PERFPAGES=
These flags are
not likely to be supported in the 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 an 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.
/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. Note: this option is only available on NT 4.0, Service Pack 4
and later, and Windows 2000.
/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.
/NODEBUG
Prevents
kernel-mode debugging from being initialized. Overrides the specification of
any of the three debug-related switches, /DEBUG, /DEBUGPORT and /BAUDRATE.
/CRASHDEBUG
If you include this switch, the kernel debugger is loaded when the system
boots, but remains inactive unless a crash occurs. This allows the COM port
that you specify (or COM1 by default) to be available for other use while
the system is running.
/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 initialize the HAL,
so this breakpoint is the earliest one possible. The HAL will wait
indefinitely 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=
/HAL=
These options
specify overrides of NTLDR's selection of 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 on a multiprocessor copy
NTKRNLMP.EXE. Note that the kernel file name must be a 8.3-style short
names.
2.
Copy the
checked version of the HAL from the checked build distribution CD to your
<winnt>\system32 directory, naming it HALCHK.DLL. To determine which HAL to
copy, go into your <winnt>\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. Note that the kernel file
name must be a 8.3-style short names.
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 user, 2GB system to
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
3GB-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 |
COMx,y,z...]
Disables serial
mouse detection of the specified COM 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.
|
|