Add the PE boot guide menu to the WIN7 disc by editing the BCD File

Source: Internet
Author: User

Add PE boot menu to the WIN7 disc by editing the BCD file. This tutorial is reproduced in a technical blog. Original article title: how to edit the BCD file and add PE boot menu to the WIN7 disc, hope this articleBoot DiskSome help.

I. WIN7 boot files and directories

In the root directory bootmgr, BOOT the BCD file in the BOOT directory, start the Options menu, and enter WIN7 installation or PE. Of course, only these files are required to start the BOOT, and other files in the BOOT directory are also required (see the last part of this Article ). For a typical Cd, see WIN7 33IN1 series.

For the UEFI motherboard, It is the BCD file in the microsoft directory of bootmgr. efi boot EFI. Similarly, other files in the EFI directory are indispensable (some font files can be deleted ). Note: The 32-bit Windows 7 drive does not contain the EFI directory and files. If you want to use it, use the WIN8 drive.

Therefore, the core of adding a PE to the WIN7 CD is to edit the BCD file.

Ii. Use BCDEDIT. EXE to edit the BCD File

The BCDEDIT. EXE file comes with the WIN7 system. XP does not exist. Does WIN7 PE check whether the PE producer retains it.

Start the instance operation. The example is to add dual PE, 32-bit PE3.0, and 64-bit PE3.0 to the WIN7 disc.

Extract the BOOT directory of the Windows 7 drive to the f drive (for example, the F drive)

1. Create a batch file with the CMD suffix on disk F. Name: A. cmd. The content is as follows and executed.

Set path = f: \ boot \ bcd

Bcdedit/store % path %

Bcdedit/store % path %/timeout 20

Bcdedit/store % path %/set {globalsettings} locale zh-cn

Bcdedit/store % path %/set {bootloadersettings} locale zh-cn

Bcdedit/store % path %/set {bootmgr} locale zh-cn

Bcdedit/store % path %/set {default} locale zh-cn

Bcdedit/store % path %/set {memdiag} locale zh-cn

Bcdedit/store % path %/set {default} description "Install Windows 7"

Bcdedit/store % path %/copy {default}/d "Start WinPE 3.0 (64-bit )"

Bcdedit/store % path %/copy {default}/d "Start WinPE 3.0 (32-bit )"

PAUSE

2. Create a New PEenum_all.cmd file with the following content:

Bcdedit/store F: \ boot \ bcd/enum all> bcd.txt

Pause

3. Check whether drive F has a BCD. TXT file. The content of this file is as follows (see the blue and green text for details ):

Windows Startup Manager

-------------------

Identifier {bootmgr}

Description Windows Boot Manager

Locale zh-cn

Inherit {globalsettings}

Default {default}

Displayorder {default}

{18422457-4f48-11e2-a83a-003018a02f3b}

{1852d4cd-4f48-11e2-a83a-003018a02f3b}

Toolsdisplayorder {memdiag}

Timeout 20

Windows boot loader

-------------------

Identifier {18422457-4f48-11e2-a83a-003018a02f3b} note: this string of data is randomly generated and you will not be the same as the example.

Device ramdisk = [boot] \ sources \ boot. wim, {7619dcc8-fafe-11d9-b411-000476eba25f}

Path \ windows \ system32 \ boot \ winload.exe

Description starts WinPE 3.0 (64-bit)

Locale zh-cn

Inherit {bootloadersettings}

Osdevice ramdisk = [boot] \ sources \ boot. wim, {7619dcc8-fafe-11d9-b411-000476eba25f}

Systemroot \ windows

Detecthal Yes

Winpe Yes

EMS Yes

Windows boot loader

-------------------

Identifier {1852d4cd-4f48-11e2-a83a-003018a02f3b}

Device ramdisk = [boot] \ sources \ boot. wim, {7619dcc8-fafe-11d9-b411-000476eba25f}

Path \ windows \ system32 \ boot \ winload.exe

Description starts WinPE 3.0 (32-bit)

Locale zh-cn

Inherit {bootloadersettings}

Osdevice ramdisk = [boot] \ sources \ boot. wim, {7619dcc8-fafe-11d9-b411-000476eba25f}

Systemroot \ windows

Detecthal Yes

Winpe Yes

EMS Yes

Windows boot loader

-------------------

Identifier {default}

Device ramdisk = [boot] \ sources \ boot. wim, {7619dcc8-fafe-11d9-b411-000476eba25f}

Path \ windows \ system32 \ boot \ winload.exe

Description install Windows 7

Locale zh-cn

Inherit {bootloadersettings}

Osdevice ramdisk = [boot] \ sources \ boot. wim, {7619dcc8-fafe-11d9-b411-000476eba25f}

Systemroot \ windows

Detecthal Yes

Winpe Yes

EMS Yes

Note that the identifier of the section for starting WinPE 3.0 (64-bit) is different from that for starting WinPE 3.0 (32-bit. It will be used below. During editing, these identifiers are not necessarily the same as those in the example. Do not copy the identifiers in my example here.

4. Create a B. CMD file with the following content and execute the file. Note: The blue color indicates 64-bit, and the green color indicates 32-bit, which makes it easier to understand.

Set bcd_path = f: \ boot \ bcd

Set dev = {7619dcc8-fafe-11d9-b411-000476eba25f}

The following two lines under REM are X64. boot \ pe_x64.wim indicates that the pe_x64.wim file under the boot directory will be guided.

REM {18422457-4f48-11e2-a83a-003018a02f3b} is the identifier, which must be consistent with the above when viewing the BCD file.

Bcdedit/store % bcd_path %/set {18422457-4f48-11e2-a83a-003018a02f3b} device ramdisk = [boot] \ boot \ pe_x64.wim, % dev %

Bcdedit/store % bcd_path %/set {18422457-4f48-11e2-a83a-003018a02f3b} osdevice ramdisk = [boot] \ boot \ pe_x64.wim, % dev %

The following two lines under REM are X86. boot \ pe_x86.wim indicates that the pe_x86.wim file under the boot directory will be guided.

Bcdedit/store % bcd_path %/set {1852d4cd-4f48-11e2-a83a-003018a02f3b} device ramdisk = [boot] \ boot \ pe_x86.wim, % dev %

Bcdedit/store % bcd_path %/set {1852d4cd-4f48-11e2-a83a-003018a02f3b} osdevice ramdisk = [boot] \ boot \ pe_x86.wim, % dev %

Pause

3. Prepare the startup language file MUI

Assume that you have installed Windows 7 (Simplified Chinese), and make the CD with PE menu in simplified Chinese. Copy bootmgr.exe.muiand memtest.exe in the C: \ Windows \ Boot \ PCAT \ zh-cndirectory. the mui files are stored in the F: \ boot \ zh-cn directory. If you do not mind using the English menu, skip this step.

Iv. WIM file named PE

According to the BCD instruction, the WIM file of the 64-bit PE must be named pe_x64.wim, And the WIM file of the 32-bit PE must be named pe_x86.wim. These two files are stored in the F: \ boot directory.

5. Create ISO

Use ULTRAISO to open the ISO file of the WIN7 installation disk and replace the F: \ BOOT directory with the root directory of the ISO file.

Vi. Others

1. the PE menu for WIN8 is similar.

2. Similar menu editing practices for EFI.

3. If it is a simplified Chinese disc, the chs_boot.ttf and wgl4_boot.ttf files in the boot directory should be retained, and other font files can be deleted. Similarly, the same font files can be deleted in the EFI directory. Do not delete other files in the boot directory. For example, if bootfix. bin is missing, you will not be prompted to press any key to start the DVD/CD. Instead, you will be directed to the disc (USB flash disk ).

4. I figured out how to use bcdedit.exe. at the command prompt, enter the following command to get help.

Bcdedit.exe /?

5. The example is to add a double PE. If you only want to add one PE, you can remove the command line about the other PE in batch processing.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.