Analyze BCD management tools under Windows 7

  
        

BCD (Boot Configuration Date) is the system boot configuration data, which was introduced from Windows Vista. We know that in Windows Vista/Server 2008, the BootManager component is responsible for the initialization and booting of the system, and the boot data of the matching system is stored in the BCD. I believe that everyone is very concerned about BCD data management under Windows 7, the author and everyone together to discuss this aspect.

1, BCD data management tools

Perhaps the most commonly used and most familiar system boot management is the system advanced boot menu, and is no exception under Windows 7. When a system boot failure occurs, in order to successfully enter the system or debug, we will choose to press the F8 key during the system startup process to enter the advanced boot options menu, and select an advanced boot mode from this menu to boot the attempt. The boot methods available to us here are mainly security mode, enable boot log, last configuration correctly, directory service restore mode, and disable driver pre-force. It should be noted that these advanced modes will temporarily fix the startup mode of the operating system to help solve the problem and diagnose the fault, but these modes will not make any permanent modifications to the boot configuration or BCD storage. Therefore, the system advanced boot menu is not a valid BCD data management tool. Similar to previous Windows systems, the tools available for modifying boot configuration and managing BCD storage in Windows 7 include the "Startup and Recovery" console, the system configuration utility (msconfig.exe), and the more advanced BCD editor. (bcdedit.exe). This article uses these three tools as an example to talk about the management of BCD data. (Figure 1)


2, Implementing System Boot Configuration with the "Startup and Recovery" Console

In the Windows 7 Startup and Recovery Console You can configure basic options during system startup that you can use to set the default operating system, the display time of the available operating system selection menus, and the display time of the recovery options when needed. Whether you need to boot your computer to a different operating system, you can optimize these settings to reduce the time required for system startup and speed up the system startup process.

According to the following steps, you can enter the Windows 7 Startup and Recovery Console: right-click the Computer icon on the desktop and select Properties. In the System Properties window, click the left pane. The "Advanced System Settings" link under Tasks. In the System Properties dialog box, under the Advanced tab, click the Settings button under the Startup and Recovery option to enter the Startup and Recovery console as shown in Figure 2. In the console, we can choose the default boot operating system. On the computer with multiple operating systems installed, click the default operating system list to select the operating system that you want to start by default. If only one system is installed. The current system is the default boot system. You can set the display time of the operating system selection list by selecting the "Display the time of the operating system list" check box and entering the time (in seconds) to use in the text box on the right. In order to speed up the system startup, if only one system in the computer can set it to "0", then the boot menu will not be displayed to directly boot the default system. In addition, you can set up subsequent actions in the event of a system failure in the Startup and Recovery console. Because this part of the content has little to do with BCD, and some authors have done a very in-depth analysis of this (link is http://winsystem.ctocio.com.cn/Longhorn/88/8850588_1.sHtml), so this is slightly Over. (Figure 2)


3, use the "system configuration tool" to manage the system boot configuration

through the "system configuration tool (msconfig.exe)", we can be in Windows 7 adjust the startup mode of the computer. Typically, advanced users use the tool to troubleshoot and diagnose system failures. For example, as part of troubleshooting, you can use the diagnostic boot mode with the configuration computer to load only the most basic drivers and services.

Click "Start" → "Run" and type msconfig.exe to enter the "System Configuration Tool". This tool provides a lot of options. It should be said that we are the most convenient tool for managing BCD. Under the General tab, you can configure how your system is booted and whether you need to boot your system into debug and diagnostic mode. By using these options, you can choose to perform regular startup, diagnostic startup, or selective startup. After restarting the computer and resolving the issue, you need to open the System Configuration Tool again and select the "Normal Startup" radio button in the "General" tab. (Figure 3)


Figure 3 System Configuration Tool (msconfig.exe)

can be used to control specific startup under the "Startup" tab of the "System Configuration Tool" How the process works. Here we can configure the computer to boot into some kind of safe boot mode, and choose other options, such as no GUI boot. If you find that you need to keep these settings after troubleshooting, you can select the Make all startup settings permanent setting check box to save these settings to the boot configuration startup. (Figure 4)


Figure 4 "Startup" tab of the "System Configuration Tool"

In addition, there is an "Advanced" option in the "Startup" option page Button, click this button to enter the Launch Advanced Options dialog. Here, in addition to locking the PCI, detecting the HAL, and enabling testing, you can use advanced options to implement some special applications.

(1). Specify the number of processors the operating system can use. Some inexplicable failures usually occur in multiprocessor systems, and this option can be used if we are troubleshooting to see if the failure is caused by this.

(2). Set the maximum amount of memory the operating system can use. This option can be used if we suspect that some system boot issues are caused by the installation of additional memory. For example, the system is originally 2GB of memory. If the system fails to boot after installing another 2GB of memory, in order to determine whether this extra memory causes the above failure, we can temporarily limit the system to only use 2048MB. RAM. (Figure 5)


Figure 5 Advanced Boot Management

If you suspect that a service installed on your computer is causing a system boot failure, you can do so in the System Configuration Tool. Judgment by selecting the diagnostic or selective start mode under the General tab. If you are sure that a service has caused a startup failure, you can disable it under the Services tab. After the disabling, the problem no longer occurs and it should be confirmed that the service is a problem, then we can permanently disable the service or update the service. Similarly, if you suspect that a program that runs automatically at startup causes a system boot failure, you can troubleshoot through the settings under the Enable tab. (Figure 6)


Figure 6 System Configuration

4, use the "BCD Editor" to manage the system boot configuration

For advanced system users Using the "BCD Editor" to manage the system boot configuration is the most flexible. The BCD Editor (bcdedit.exe) is an advanced command line tool for viewing and setting up the configuration of your system's boot environment. However, the main need is to make a backup of the system before using bedit.exe to modify the BCD, so as to avoid system boot failure caused by no operation. Below I will list several application examples of bededit.exe under Windows 7.

(1). View BCD

Open a command prompt, enter and execute the bededit.exe command to display the system's BCD information. However, for general users this information is more difficult to understand, I will do to explain. The system includes system and non-system BCD storage. The BCD storage of the system contains the boot entries of the operating system and related boot information. The operation of the bededit.exe tool is the operation of the system BCD. Since there is only one system on the author's computer, there are only two items in the BCD storage as shown in the figure: one corresponds to the Windows boot manager and one corresponds to the Windows boot loader. Here, the Windows Boot Manager will call the boot loader, and then the boot loader will boot Windows 7 using winload.exe. The BCD entries for the Windows Boot Manager and the Windows Boot Loader have similar properties that define the system's BCD environment. It should be noted that the Windows 7 BCD file has two attributes, recoverysequence and recoveryenabled, than Windows Vista and Windows Server 2008. In addition, a string identifier like {ba50c1f0-3752-11de-90d5-cdf8d52a3222} is used to be referenced by the system. It should be noted that if other Windows systems are installed on the computer, we will see that each system has its own BCD entry. (Figure 7)


Figure 7 Viewing BCD items

(2). Creating BCD

By using the BCD editor, we can create non-systems. BCD storage. Execute the command "bcdedit /createstore storepath" in the following format from the command line, where /createstore is a parameter indicating the creation of BCD storage, and storepath is the time save location of the file you wish to create non-system storage. For example, we execute the command "bcdedit /createstore d:ctociobcd". (Figure 8)


Fig. 8 Create BCD

(3). Import and export BCD

We can import or export using bcdeidt.exe command BCD storage, you need to use the "/export" parameter to export the contents of the system's BCD storage to a specific file. Execute the command "bcdedit /export storepath" on the command line. The storepath is the actual file path for saving the contents of the system BCD. For example, executing the command "bcdedite /export d:ctociobackup" will save the system's BCD information to d:ctociobackup In the file. If you want to restore the system's BCD information, we can import the BCD backup through the "/import" parameter of bcdedit.exe. The command format is "bcdedicdt /import importpath", where importpath is the actual path of the folder where the BCD information is saved. For example, the command "bcdedit /import d:ctociobackup" can be used to re-import the BCD information that was just backed up. (Figure 9)


Figure 9 Import and export BCD

(4). Display Windows 7 hidden BCD project

By default we are Executing bcdedit.exe from the command line does not display all BCD entries. Windows 7 hides some BCD projects. If you want to view a hidden BCD project, we need to execute a command to open the display switch to display it. If the current system identifier is {ba50c1f0-3752-11de-90d5-cdf8d52a3222}, execute the command "bcdedit /displayorder {ba50c1f0-3752-11de-90d5-cdf8d52a3222} /addfirst" and "bcdedit /displayorder {" in the command line. Ba50c1f0-3752-11de-90d5-cdf8d52a3222} /addfirst". This will show the hidden BCD project in Windows 7 when we re-execute bcdedit.exe. At the same time, when restarting Windows 7, the Ramdisk Options option will appear in the boot menu. This is Windows 7 integrated Windows Recovery Environment. This option is very useful in system repair/recovery. (Figure 10)

Copyright © Windows knowledge All Rights Reserved