Saturday, June 14, 2008

Window Vista - Changing an Entry Option

With our new OS entry created and set to the default, we're ready to start with playing with entry options. Recall that "entry option" is the bcdedit phrase for what we used to call "boot.ini switches." Some switches have values, like the /NoExecute=AlwaysOff example that I've already offered, and some, like /basevideo (which says to boot the system with the basic VGA driver) don't have values, and you enable them by including them in the OS entry and disable them by leaving them out. In BCD and bcdedit, however, every entry option has both a name, like NoExecute, and a value, like AlwaysOff. (Case seems not to matter to BCD and bcdedi t, in my experience.) Boot.ini switches that didn't previously have a value, like "/basevideo," now get a value of "yes" or "no." (/basevideo is now called simply "vga," by the way.)

You can include an entry option by typing bcdedit /set [{entry guid}]entry-option-name [entry-option-value]. To set nx to AlwaysOff in the currently running operating system entry, then, we could type

bcdedit /set {current} nx AlwaysOff

If, however, we hadn't included an OS entry at all, then bcdedit would have assumed that we wanted that change done on the currently booted OS entry anyway, and so this would get the same job done:

bcdedit /set nx AlwaysOff

To set nx in the default OS entry, we'd type

bcdedit /set {default} nx AlwaysOff

To tell the OS entry with a GUID of {} to boot using the standard VGA video driver, we could type

bcdedit /set {} vga yes

(Just to be clear, that command would be typed as one line.)

Now that you know how to modify boot options, here are a few of the available Vista boot options in BCD and, for the boot.ini black belts out there, the corresponding boot.ini switches of each option entry:

nx, as I've mentioned, controls DEP. Its boot.ini value was just /NoExecute. nx can be can be set to AlwaysOn, which applies DEP to all user applications and operating system programs; AlwaysOff, which does not apply DEP to anything; OptOut, which applies DEP to everything except particular programs that you exclude; or OptIn, which applies DEP to all operating system programs and any applications that you add in. (You can do the excluding or including in the Control Panel's System applet.)

vga is, as I've already explained, the setting telling your system to forgo whatever video driver it's currently using and instead use the generic VGA driver. It takes values "yes" or "no." Its boot.ini counterpart was /basevideo.

numproc, which lets you limit your OS to a certain number of processors, was also /numproc in boot.ini, and takes a number; bcdedit /set numproc 1 would tell your system to only run one processor on the currently running OS entry. This can be useful because once in a while, you'll run into an application that was only tested on single-processor systems but that contains bugs that only pop up in multiprocessor computers.

removememory lets you exclude some amount of memory from Vista. Its boot.ini counterpart was called /burnmemory. It takes a value in either decimal or hex (prefix a hex number with "0x" so it recognizes it as hex) of the exact number of bytes of memory to give Vista-specifying "500000" would remove about a half a megabyte of memory from Vista, not about a half a gigabyte!

truncatememory is another command restricting the amount of RAM that you allow Vista to use. Where removememory specifies how much RAM to take away from Vista, leaving it the rest, truncatememory specifies how much RAM to give to Vista, denying it the rest. You wouldn't use both of these in the same OS entry, by the way. As with removememory, truncatememory takes a number as a parameter. That number is, like removememory, the exact number of bytes to give Vista. Truncatememory's name in boot.ini was /maxmem.

If that's still not clear, imagine that you've got a system with 2 GB of RAM. removememory 500000000 would remove a half gig, leaving 1.5 GB of RAM for Vista. You could do the same thing with truncatememory, but you'd feed truncatememory 1500000000.

quietboot skips the GUI's little animated rectangles that ripple left-to-right as an indicator that the OS is loading. Set it to "yes" or "no." It was /noguiboot in boot.ini.

sos, which was named /sos in boot.ini, tells the operating system to show each driver and service's name as the operating system boots. This can be useful if your system locks up on boot; just sos to "yes" and reboot (clearly you need a different way to boot to make this setting, perhaps another OS entry!), and the name of the last driver loaded may be the culprit. This takes "yes" or "no" for parameters.

bootlog tells your system to create a log of the drivers that the OS loads, in the order in which it loads them. It then saves that log in Windows directory in a file called ntbtlog.txt. This option takes "yes" or "no" and was called /bootlog in boot.ini.


*.* Source of Information : Administering Windows Vista Security: The Big Surprises


No comments: