Bcdedit remove the extra boot in the Boot Menu

Outline

In the last blog post " How to Uninstall science Ubuntu? "As mentioned in the Ubuntu boot removed, which has removed the Ubuntu boot by EasyUEFI with diskpart tool boot entries and Ubuntu EFI partition, but there are still residual boot may appear, the most direct expression is at boot time but still did not enter the system into normal GRUB interface. In this paper, clean up the Ubuntu boot residues, for example, demonstrates how to use Bcdedit remove the firmware application, and then thoroughly clean up residual boot, empathy also do not need a multi-boot system can be removed.

Here Insert Picture Description


Transfers from monkey Development blog: Bcdedit remove the extra boot in the Boot Menu

First, find the firmware GUID

Enter the command in PowerShell:

Bcdedit /enum firmware

Output:

固件启动管理器
---------------------
标识符                  {fwbootmgr}
displayorder            {8729d185-7270-11e7-bd79-850bbbb583d1}
                        {bootmgr}
timeout                 1

Windows 启动管理器
--------------------
标识符                  {bootmgr}
device                  partition=\Device\HarddiskVolume1
path                    \EFI\MICROSOFT\BOOT\BOOTMGFW.EFI
description             Windows Boot Manager
locale                  zh-CN
inherit                 {globalsettings}
flightsigning           Yes
default                 {current}
resumeobject            {8729d17d-7270-11e7-bd79-850bbbb583d1}
displayorder            {current}
toolsdisplayorder       {memdiag}
timeout                 30

固件应用程序(101fffff)
-------------------------------
标识符                  {8729d185-7270-11e7-bd79-850bbbb583d1}
device                  partition=\Device\HarddiskVolume1
path                    \EFI\UBUNTU\SHIMX64.EFI
description             ubuntu

Where the firmware application (101ffff) boot into Ubuntu we want to remove:

固件应用程序(101fffff)
-------------------------------
标识符                  {8729d185-7270-11e7-bd79-850bbbb583d1}
device                  partition=\Device\HarddiskVolume1
path                    \EFI\UBUNTU\SHIMX64.EFI
description             ubuntu

Note its identifier: {8729d185-7270-11e7-bd79-850bbbb583d1}

Second, delete the corresponding entry in the firmware

1. Bcdedit save a copy of your computer on the current bcd file:

Bcdedit /export savebcd

2. Copy the file copy savebcd to assist bcdedit delete operations:

Copy savebcd newbcd

Enumerate the system BCD store firmware namespace objects and output the results to a text file:

Bcdedit /enum firmware > enumfw.txt

4. Use Notepad to open enumfw.txt file, you can see the contents inside the "one, find the firmware GUID" is consistent, you wish to delete Ubuntu boot firmware application corresponding output in the text file is identified Fu: {8729d185-7270-11e7-bd79-850bbbb583d1}, backup copy.

5. Create a text file in any position RemoveDups.txt

6. Using Notepad open RemoveDups.txt and writes the following (where the subscript identifier GUID Alternatively you copied in the previous step):

Bcdedit /store newbcd /delete GUID

In particular, if there are multiple firmware application you want to delete it, it will add the top line copy multiple lines, such as:

Bcdedit /store newbcd /delete GUID1
Bcdedit /store newbcd /delete GUID2
Bcdedit /store newbcd /delete GUID3
Bcdedit /store newbcd /delete GUID4

Note: EFI firmware on your computer in the local device to initialize NVRAM entry, if needed, you can delete all GUID entries. But do not delete entries {bootmgr}!

7. The last line in RemoveDups.txt write the following command to import the new BCD file to delete all entries into NVRAM operation by using the / clean option:

Bcdedit /import newbcd /clean

8. Save RemoveDups.txt file and rename it to RemoveDups.cmd, making it a command file.

9. Copy RemoveDups.cmd file to the C: \ Windows \ system32 directory, and execute it in PowerShell:

RemoveDups.cmd

10. Restart the system. During a restart, EFI firmware will use the devices connected to the system firmware Object GUID corresponding to reinitialize NVRAM. After entering the system, use the bcdedit / enum firmware command to further verify that the firmware you want to delete to delete all the entries.

参考文献:Remove Duplicate Firmware Objects in BCD and NVRAM

Further reading: Deploy to UEFI-based Computers

Published 26 original articles · won praise 24 · views 30000 +

Guess you like

Origin blog.csdn.net/iSunwish/article/details/100097777