• Tools for Managing the BCD
  • The Shell
  • BCDEdit
  • Boot Configuration Data in Windows Vista Feb. 4, 2008 Abstract




    Download 162.72 Kb.
    bet4/5
    Sana21.03.2017
    Hajmi162.72 Kb.
    1   2   3   4   5

    BCD Elements


    An element is an item of configuration data for a boot environment application or part of the Windows boot process. With boot.ini, these properties and their values were specified as boot options. With BCD, each item of input data is contained in a separate BCD element.

    BCD elements are contained within a BCD object. A boot environment application has a BCD application object that contains BCD elements to specify the configuration properties for the application. A BCD application object can also include inheritable objects that contain additional configuration data.

    Some elements can be associated only with certain objects, whereas others can be applied to any type of boot environment application. To manage the different types of elements, the element namespace is divided into three classes. The following table shows the classes and their associated numerical code.

    Element Classes

    Description

    Value

    Description

    Library

    0001

    Elements can be applied to all boot environment applications.

    Application

    0010

    Elements can be applied to only a particular class of boot environment applications, such as boot loaders.

    Device

    0011

    Elements can be included only by device objects.

    BCD elements are structured data. The following table shows the formats and their associated numerical code.



    Element Formats

    Description

    Value

    Description

    String

    0010

    For example, kernel debugger on or off.

    Object

    0011

    For example, NX policy.

    Integer

    0101

    For example, the boot menu default value.

    Boolean

    0110

    For example, the path to the operating system loader.

    The techniques for adding, deleting, or modifying BCD elements depend on the particular tool.

    BCDEdit and the BCD WMI API provide well-known names for the standard elements. However, for custom element types, Figure 8 shows the layout.



    Figure 8. Layout of the BCD element type

    Tools for Managing the BCD


    The BCD store is in a binary format and can be modified only by tools that are designed for that purpose. The first two discussed here are designed for regular users and provide limited access to BCD. The BCDEdit tool is designed for developers and support professionals. It provides fairly complete access to BCD, including the ability to create BCD stores. The most flexible and powerful approach to managing BCD stores is programmatically, with the BCD WMI API. This API is discussed later in this paper.

    The Shell


    The System Control Panel application allows the user to specify values for two global BCD elements:

    The default operating system and configuration

    The boot manager's timeout setting

    MSConfig


    MSConfig.exe is used primarily by product support service (PSS) when it assists users with boot settings. It supports BCD and allows the user to enumerate the loader-type objects in the display order along with selected elements. MSConfig can also be used to modify selected elements, including the debug and safe-mode settings.

    BCDEdit


    BCDedit is a command-line tool that support professionals and developers can use to manage BCD stores. It can be used for a variety of purposes, including creating new stores, modifying existing stores, adding boot menu options, and so on. BCDEdit serves essentially the same purpose as Bootcfg.exe on earlier versions of Windows, but with two major improvements:

    It exposes a wider range of boot options than Bootcfg.exe.

    It has improved scripting support.
    Note: Administrative privileges are required to use BCDEdit to modify BCD.

    BCDEdit is the only boot configuration editor that can be used to edit the boot configuration for Windows Vista and later versions of Windows. It is included with the Windows Vista distribution in the %WINDIR%\System32 folder. However, BCDEdit can also be used on earlier versions of Windows. Bootcfg.exe is also included with Windows Vista, but it can be used only to edit the boot configuration for earlier versions of Windows that might also be installed on the computer.

    BCDEdit is limited to the standard data types and is designed primarily to perform single common changes to BCD. For more complex operations or nonstandard data types, consider using the BCD WMI API to create more powerful and flexible custom tools. The command syntax for BCDEdit is straightforward:

    BCDEdit /Command [Argument1] [Argument2] ...


    The following list gives the BCDEdit commands plus a brief description. Unless otherwise specified, BCDEdit operates on the system store by default. For examples of how to use BCDEdit for common tasks, see “BCD Cookbook,” later in this paper. For complete details, see the online reference.

    General Commands

    /?. Displays a list of BCDEdit commands. Running this command without an argument displays a summary of the available commands. To display detailed help for a particular command, run "bcdedit /? command", where command is the name of the desired command without the leading forward slash (/). For example, "bcdedit /? createstore" displays detailed help for the createstore command.


    Commands that Operate on a Store

    /createstore. Creates a new empty boot configuration data store. The created store is not a system store.

    /export. Exports the contents of the system store into a file. This file can be used later to restore the state of the system store. This command is valid only for the system store.

    /import. Restores the state of the system store by using a backup data file previously generated by using the /export command. This command deletes any existing entries in the system store before the import takes place. This command is valid only for the system store.

    /store. This option can be used with most BCDedit commands to specify the store to be used. If this option is not specified, then BCDEdit operates on the system store. Running bcdedit /store by itself is equivalent to running bcdedit /enum ACTIVE.
    Commands that Operate on Entries in a Store

    /copy. Makes a copy of a specified boot entry in the same system store.

    /create. Creates a new entry in the boot configuration data store. If a well-known identifier is specified, then the /application, /inherit, and /device options cannot be specified. If an identifier is not specified or not well known, a /application, /inherit, or /device option must be specified.

    /delete. Deletes an element from a specified entry.


    Commands that Operate on Entry Options

    /deletevalue. Deletes a specified element from a boot entry.

    /set. Sets an entry option value.
    Commands that Control Output

    /enum. Lists entries in a store. The /enum command is the default value for BCDEdit, so running "bcdedit" without parameters is equivalent to running bcdedit /enum ACTIVE.

    /v. Verbose mode. Usually, any well-known entry identifiers are represented by their friendly shorthand form. Specifying /v as a command-line option displays all identifiers in full. Running "bcdedit /v" by itself is equivalent to running bcdedit /enum ACTIVE /v.
    Commands that Control the Boot Manager

    /bootsequence. Specifies a one-time display order to be used for the next boot. This command is similar to /displayorder, except that it is used only the next time the system is booted. After that has occurred, the system reverts to the original display order.

    /default. Specifies the default entry that the boot manager selects when the timeout expires.

    /displayorder. Specifies the display order that the boot manager uses when displaying boot options to a user.

    /timeout. Specifies the time to wait, in seconds, before the boot manager selects the default entry.

    /toolsdisplayorder. Specifies the display order for the boot manager to use when displaying the tools menu.


    Commands that Control EMS

    /bootems. Enables or disables Emergency Management Services for the specified entry.

    /ems. Enables or disables Emergency Management Services for the specified operating system boot entry.

    /emssettings. Sets the global Emergency Management Services settings for the system. Emssettings does not enable or disable Emergency Management Services for any particular boot entry.


    Commands that Control Debugging

    /bootdebug. Enables or disables the boot debugger for a specified boot entry. Although this command works for any boot entry, it is effective only for boot applications.

    /dbgsettings. Specifies or displays the global debugger settings for the system. This command does not enable or disable the kernel debugger; use /debug for that purpose. To set an individual global debugger setting, use bcdedit /set {dbgsettings} type value.

    /debug. Enables or disables the kernel debugger for a specified boot entry.



    1   2   3   4   5


    Download 162.72 Kb.

    Bosh sahifa
    Aloqalar

        Bosh sahifa


    Boot Configuration Data in Windows Vista Feb. 4, 2008 Abstract

    Download 162.72 Kb.