Boot configuration Data Store --BCDEdit /set


The BCDEdit /set command sets a boot entry option value in the Windows boot configuration data store (BCD). Use the BCDEdit /set command to configure specific boot entry elements, such as kernel debugger settings, data execution protection (DEP) and processor address extension (PAE) options, and to load alternate hardware abstraction layer (HAL) and kernel files. You can use these boot entry options when you are testing and debugging your driver for Windows Vista, Windows 7, and later versions of Windows.
     bcdedit  /set [{ID}] datatype value 

   

Parameters

[{ID}]
The {ID} is the GUID that is associated with the boot entry. If you do not specify an {ID}, the command modifies the current operating system boot entry. If a boot entry is specified, the GUID associated with the boot entry must be enclosed in braces { }. To view the GUID identifiers for all of the active boot entries, use the bcdedit /enum command.
datatype value
The following list shows some useful datatypes and their associated values.
bootlog [ yes | no]
Enables the system initialization log. This log is stored in the Ntbtlog.txt file in the %WINDIR% directory. It includes a list of loaded and unloaded drivers in text format.
groupsize maxsize
Sets the maximum number of logical processors in a single processor group, where maxsize is any power of 2 between 1 and 64 inclusive. By default, processor groups have a maximum size of 64 logical processors. You can use this boot configuration setting to override the size and makeup of a computer's processor groups for testing purposes. Processor groups provide support for computers with greater than 64 logical processors. This boot option is available on 64-bit versions of Windows 7 and Windows Server 2008 R2 and later versions. This boot option has no effect on the 32-bit versions of Windows 7.
Use the groupsize option if you want to force multiple groups and the computer has 64 or fewer active logical processors. For more information about using this option, see Boot Parameters to Test Drivers for Multiple Processor Group Support.
groupaware on | off ]
Forces drivers to be aware of multiple groups in a multiple processor group environment. Use this option to help expose cross-group incompatibilities in drivers and components. Processor groups provide support for computers with greater than 64 logical processors. This boot option is available on 64-bit versions of Windows 7 and Windows Server 2008 R2 and later versions. This boot option has no effect on the 32-bit versions of Windows 7. You can use the groupaware option and the groupsize option to test driver compatibility to function with multiple groups when computer has 64 or fewer active logical processors.
The groupaware on setting ensures that processes are started in a group other than group 0. This increases the chances of cross-group interaction between drivers and components. The option also modifies the behavior of the legacy functions, KeSetTargetProcessorDpc,KeSetSystemAffinityThreadEx, and KeRevertToUserAffinityThreadEx, so that they always operate on the highest numbered group that contains active logical processors. Drivers that call any of these legacy functions should be changed to call their group-aware counterparts (KeSetTargetProcessorDpcExKeSetSystemGroupAffinityThread, and KeRevertToUserGroupAffinityThread).
For more information about using this option, see Boot Parameters to Test Drivers for Multiple Processor Group Support.
hal file
Directs the operating system loader to load an alternate HAL file. The specified file must be located in the %SystemRoot%\system32directory.
increaseuserva Megabytes
Specifies the amount of memory, in megabytes, for user-mode virtual address space. This variable can have any value between 2048 (2 GB) and 3072 (3 GB) megabytes in decimal notation. Windows uses the remaining address space (4 GB minus the specified amount) as its kernel-mode address space.
kernel file
Directs the operating system loader to load an alternate kernel. The specified file must be located in the %SystemRoot%\system32 directory.
loadoptions busparams=Bus.Device.Function
Specifies the target controller when multiple controllers exist. This syntax is appropriate when using either a 1394 cable or a USB 2.0 debug cable for debugging. Bus specifies the bus number, Device specifies the device number, and Function specifies the function number.
Note   For 1394 debugging, the bus parameters must be specified in decimal, regardless of which version of Windows is being configured. The format of the bus parameters used for USB 2.0 debugging depends on the Windows version. In Windows Vista and Windows Server 2008, the USB 2.0 bus parameters must be specified in hexadecimal. In Windows 7 and Windows Server 2008 R2 and later versions of Windows, the USB 2.0 bus parameters must be specified in decimal.
maxgroup on | off ]
Maximizes the number of groups created in a processor group configuration.
The maxgroup on setting assigns NUMA nodes to groups in a manner that maximizes the number of groups for a particular computer. The number of groups created is either the number of NUMA nodes the computer has, or the maximum number of groups supported by this version of Windows, whichever is smaller. The default behavior (maxgroup off) is to pack the NUMA nodes tightly into as few groups as possible.
Use this option if you want to use multiple groups, the computer has 64 or fewer active logical processors, and the computer already has multiple NUMA nodes. This option can also be used to alter the default group configuration of a computer that has more than 64 logical processors.
Processor groups provide support for computers with greater than 64 logical processors. This option is available on 64-bit versions of Windows 7 and Windows Server 2008 R2 and later versions. This boot option has no effect on the 32-bit versions of Windows 7.
For more information about using this option, see Boot Parameters to Test Drivers for Multiple Processor Group Support.
nolowmem [ on | off ]
Controls the use of low memory. When nolowmem on is specified, this option loads the operating system, device drivers, and all applications into addresses above the 4 GB boundary, and directs Windows to allocate all memory pools at addresses above the 4 GB boundary.
nx [Optin |OptOut | AlwaysOn |AlwaysOff]
Enables, disables, and configures Data Execution Prevention (DEP), a set of hardware and software technologies designed to prevent harmful code from running in protected memory locations. For information about how to use the Control Panel to change the DEP settings, see the Change Data Execution Prevention settings page on the Windows Help and How-to website.
Optin
Enables DEP only for operating system components, including the Windows kernel and drivers. Administrators can enable DEP on selected executable files by using the Application Compatibility Toolkit (ACT).
Optout
Enables DEP for the operating system and all processes, including the Windows kernel and drivers. However, administrators can disable DEP on selected executable files by using System in Control Panel.
AlwaysOn
Enables DEP for the operating system and all processes, including the Windows kernel and drivers. All attempts to disable DEP are ignored.
AlwaysOff
Disables DEP. Attempts to enable DEP selectively are ignored.
On Windows Vista, this parameter also disables Physical Address Extension (PAE). This parameter does not disable PAE on Windows Server 2008.
onecpu on | off ]
Forces only the boot CPU to be used in a computer that has more than one logical processor.
For example, the following command configures the current operating system loader to use one processor.
bcdedit /set onecpu on 

pae Default | ForceEnable | ForceDisable ]
Enables or disables Physical Address Extension (PAE). When PAE is enabled, the system loads the PAE version of the Windows kernel.
The pae parameter is valid only on boot entries for 32-bit versions of Windows that run on computers with x86-based and x64-based processors. On 32-bit versions of Windows, PAE is disabled by default. However, Windows automatically enables PAE when the computer is configured for hot-add memory devices in memory ranges beyond the 4 GB region, as defined by the Static Resource Affinity Table (SRAT). Hot-add memory supports memory devices that you can add without rebooting or turning off the computer. In this case, because PAE must be enabled when the system starts, it is enabled automatically so that the system can immediately address extended memory that is added between restarts. Hot-add memory is supported only on Windows Server 2003, Datacenter Edition; Windows Server 2003, Enterprise Edition; Windows Server 2008, Datacenter Edition; Windows Server 2008 for Itanium-Based Systems; and on the datacenter and enterprise editions of all later versions of Windows Server. Moreover, for versions of Windows prior to Windows Server 2008, hot-add memory is supported only on computers with an ACPI BIOS, an x86 processor, and specialized hardware. For Windows Server 2008 and later versions of Windows Server, it is supported for all processor architectures.
On a computer that supports hardware-enabled Data Execution Prevention (DEP) and is running a 32-bit version of the Windows operating system that supports DEP, PAE is automatically enabled when DEP is enabled and, on all 32-bit versions of the Windows operating system, except Windows Server 2003 with SP1, PAE is disabled when you disable DEP. To enable PAE when DEP is disabled, you must enable PAE explicitly, by using /set nx AlwaysOff and /set pae ForceEnable. For more information about DEP, see Boot Parameters to Configure DEP and PAE.
PAE is required to support Cache Coherent Non-Uniform Memory Architecture (known as ccNUMA or NUMA) on computers with x86 processors, although Windows can run in non-NUMA mode on NUMA-capable computers without PAE. Even when it is required, PAE is not enabled automatically. NUMA is supported in all editions of Windows XP and Windows Vista, and in the Enterprise and Datacenter editions of Windows Server 2003.
For more information about using the pae parameter and the other parameters that affect PAE configuration, see Boot Parameters to Configure DEP and PAE.
If you are running a 32-bit version of Windows Vista on a computer that has 4 GB of memory installed, the amount of RAM available for use could be less than what you would expect. For more information about memory usage, see article Q929605, "The system memory that is reported in the System Information dialog box in Windows Vista is less than you expect if 4 GB of RAM is installed" in the Microsoft Knowledge Base.
quietboot on | off ]
Controls the display of a high-resolution bitmap in place of the Windows boot screen display and animation. In operating systems prior to Windows Vista, the /noguiboot serves a similar function.
removememory Megabytes
Removes memory from the total available memory that the operating system can use.
For example, the following command removes 256 MB of memory from the total available to the operating system associated with the specified boot entry.
bcdedit /set {49916baf-0e08-11db-9af4-000bdbd316a0} removememory 256 

sos on | off ]
Controls the display of the names of the drivers as they load during the boot process. Use sos on to display the names. Use sos off to suppress the display.
testsigning on | off ]
Controls whether Windows 7, Windows Server 2008, or Windows Vista will load any type of test-signed kernel-mode code. This option is not set by default, which means test-signed kernel-mode drivers on 64-bit versions of Windows 7, Windows Server 2008, and Windows Vista will not load by default. After you run the BCDedit command, restart the computer so that the change takes effect. For more information, see Introduction to Test-Signing.
truncatememory address
Limits the amount of physical memory available to Windows. When you use this option, Windows ignores all memory at or above the specified physical address. Specify the address in bytes.
For example, the following command sets the physical address limit at 1 GB. You can specify the address in decimal (1073741824) or hexadecimal (0x40000000).
bcdedit /set {49916baf-0e08-11db-9af4-000bdbd316a0} truncatememory 0x40000000 

usefirmwarepcisettings [ yes | no ]
Enables or disables the use of BIOS-configured peripheral component interconnect (PCI) resources.
vga on | off ]
Forces the use of the VGA display driver.

Comment

For more information about specific BCD elements and boot options, you can use the commands BCDEdit /? OSLOADER and BCDEdit /? TYPES OSLOADER.
To view the current boot entries and their settings, use the bcdedit /enum command. This command displays the active boot entries and their associated globally unique identifiers (GUID). Use the identifiers with the /set command to configure options for a specific boot entry.
To delete a boot option value that you have set, use the /deletevalue option. The syntax for the command is as follows:
bcdedit [{ID}] /deletevalue datatatype
For example, if you change the processor group option, groupsize, to a new value for testing purposes, you can revert to the default value of 64 by typing the following command and then restarting the computer.

Comments

Popular posts from this blog

ADSI Edit

Userenv logging (User Environment logging)