How to use BCDEdit command line tool

Dumindu Akalanka
4 min readOct 2, 2018

--

BCDEdit is a essential tool when you need to configure the boot options on your computer. BCD stands for Boot Configuration Data.

In this article I will go through some questions about dual booting and how to solve them with BCDEdit tool. Furthermore, I will introduce some commands that will help you to work with your boot configuration data.

First you need to open the Command prompt as Administrator. Click on your start menu icon and type cmd.

Then we can see some default configurations of BCD by typing bcdedit in the command prompt. You will see the following results.

How to stop dual boot straight boot into windows without showing any boot options or the grub?

You are here because you have installed windows first and then ubuntu second hoping grub will overwrite windows boot manager but it didn’t or suddenly grub have disappeared and computer boots straight into windows. Don’t worry yet. There are some things you can try. :-)

In this case you want to change the path for {bootmgr} entry shown in the above figure. In my computer I have already changed it into the grub. The path value was originally, “\WINDOWS\system32\winload.efi”. Following command might do the trick.

bcdedit /set {bootmgr} path “\EFI\ubuntu\grubx64.efi”

Now I need you to understand this command. So it is easier for you to type any command in bcdedit later since it uses the same pattern for any work. Therefore, let’s go through one part by one of this command.

bcdedit- tell the command prompt that we want to use the bcdedit tool

/set- this is the command.

path- this is the parameter. In this case it states what is there to set.

value- then the value to be set in the path parameter.

Now, you might want to restart and see whether the problem solved. No? don’t worry we can try something else.

bcdedit /set {bootmgr} path “\EFI\ubuntu\shimx64.efi”

Change the bootmgr path to this and then restart. If this also did not work, you can reverse all the changes by executing the following command.

bcdedit /set {bootmgr} path “\EFI\Microsoft\Boot\bootmgfw.efi”

I have encountered this issue again and again after windows 10 new (October 2018) update. Try avoiding the update if possible.

How to set the default operating system when you have several windows operating systems?

Let’s say if you have Windows 10 and Windows 8.1 installed in the same machine. Now you want to change the default operating system i.e. if you want to boot straight into Windows 8.1 without choosing from the list. BCDEdit will come into help here as well. Type bcdedit in command prompt and then you will see several “Windows Boot Loaders” for each and every operating system. You can identify the which boot loader belongs to which by looking at the description. Following command will change the default operating system to Windows 8.1.

bcdedit /default <identifier of windows 8.1>

Thencommand prompt will return a message saying the operation was successful. Restart and see if it is really changed.

Now, Let’s look at some of the important commands in BCDEdit.

If you want to display all the boot entry records you can type,

bcdedit /enum firmware

This command will show every firmware details.

bcdedit /?

This is the help command in bcdedit. You can see all the possible command after this. You can use “/?” after any command to see what should be next and sometimes with examples.

Then, let’s look at the /displayorder command in bcdedit. This command can change the display order of your boot options. But when using this command you must be very careful because if you forgot to add any of the important boot options your computer will not boot at all. Therefore if you are doing anything with this command you should know what you are doing.

bcdedit /displayorder <identifier 1> <identifier 2> <identifier 3> ….

If you do not need to change whole order you can use following command. This will add the “identifier 1” boot entry to the top of the display order.

bcdedit /displayorder <identifier 1> /addfirst

These are the most common commands used to edit boot configuration data.

Thanks for reading. :-)

--

--

Dumindu Akalanka

Cricket lover, computer science enthusiastic. Currently an undergraduate at University of Moratuwa.