bcdedit /copy syntax not correct
Asked Answered
M

4

13

I'm trying to run Oracle Virtual Box on my work laptop. I'm getting an error saying that it can't run because I'm running Hyper-v. I'm trying to follow the instructions at Scott Hanselman's Blog, which have worked for me in the past on my personal laptop with a similar issue.

I run:

bcdedit /copy {current} /d "No Hyper V"
The copy command specified is not valid.
Run "bcdedit /?" for command line assistance.
The parameter is incorrect.

I run

bcdedit /copy {current} /d /?

This command creates a copy of the specified boot entry.

bcdedit [/store <filename>] /copy {<id>} /d <description>

    <filename>      Specifies the store to be used. If this option is not
                    specified, the system store is used. For more information,
                    run "bcdedit /? store".

    <id>            Specifies the identifier of the entry to be copied.
                    For more information about identifiers, run
                    "bcdedit /? ID".

    <description>   Specifies the description to be applied to the new entry.

Example:

The following command creates a copy of the specified operating system boot
entry:

    bcdedit /copy {cbd971bf-b7b8-4885-951a-fa03044f5d71} /d "Copy of entry"

and

bcdedit /? ID

IDENTIFIERS

Many of the Bcdedit commands require identifiers. An identifier
uniquely identifies entries contained in the store. An identifier takes the
form of a globally unique identifier, or GUID. A GUID has the following format,
where each "x" represents a hexadecimal digit.

    {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}

For example:

    {d2b69192-8f14-11da-a31f-ea816ab185e9}

The position of the dashes (-) and the braces at the beginning and end of the
GUID are required.

Several entries can be identified by well-known identifiers. If an entry has a
well-known identifier, BCDedit displays it in output unless the /v command-line
switch is used. For more information, run "bcdedit /? /v".

The well-known identifiers are as follows:

    {bootmgr}               Specifies the Windows boot manager entry.

    {fwbootmgr}             Specifies the firmware boot manager entry,
                            specifically on systems that implement the
                            Extensible Firmware Interface (EFI) specification.

    {memdiag}               Specifies the memory diagnostic application entry.

    {ntldr}                 Specifies a OS loader (Ntldr) that can be used
                            to start operating systems earlier than Windows
                            Vista.

    {current}               Specifies a virtual identifier that corresponds to
                            the operating system boot entry for the operating
                            system that is currently running.

but it looks like there's nothing wrong with my syntax, does anyone know what I'm doing wrong?

Moralist answered 27/4, 2018 at 17:37 Comment(0)
M
12

Powershell seems to have been the problem. In my powershell prompt I typed cmd and then ran bcdedit /copy {current} /d "No Hyper V" with no errors.

Moralist answered 27/4, 2018 at 18:13 Comment(0)
H
13
bcdedit --% /copy {current} /d "No Hyper V"

stop-parsing symbol --%

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_parsing

Heavyarmed answered 9/7, 2018 at 9:9 Comment(0)
M
12

Powershell seems to have been the problem. In my powershell prompt I typed cmd and then ran bcdedit /copy {current} /d "No Hyper V" with no errors.

Moralist answered 27/4, 2018 at 18:13 Comment(0)
E
11

I had exactly the same problem. I found the solution on this documentation of bcdedit from microsoft. This is just a problem when you are using powershell instead cmd.

You just have to set the identifier of the boot entry into double quotes:

bcdedit /copy "{current}" /d "No Hyper-V"
Exchangeable answered 16/1, 2019 at 7:39 Comment(0)
D
0

I had the same problem when the shell/command prompt is not running as administrator.

When not running as administrator, windows does not allow any read or write to BCD

> bcdedit /v
The boot configuration data store could not be opened.
Access is denied.

Running the shell or command prompt as administrator solved the issue.

Drollery answered 8/8, 2019 at 7:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.