Set VHD native boot, bcdedit

This is second part of bcdedit basic usage.
Here is first part how to backup menu, clone entry and restore from backup.

This time I already have two menu entries which simply do the same thing. I will modify the last entry and set the operating system to boot from VHD file for this last entry:
bcdedit /enum
Now I want to modify "Another OS" and set custom VHD image. To do it so I use identifier (purple in the screen) of "Another OS":
bcdedit /set {792b5050-7a8f-11e6-9050-001a4b742bac} device vhd=[locate]\win7x64ultimate.vhd
bcdedit /set {792b5050-7a8f-11e6-9050-001a4b742bac} osdevice vhd=[locate]\win7x64ultimate.vhd
[locate] means that the boot manager will look for VHD image in all available drives automatically. Another thing is I need to leave enough free space on my real drive as big it is inside VHD file otherwise I will get and error on boot up. For example, if the operating system has 127 gigabytes disk then I need this much free space before I boot into VHD.

This is how it looks like at the end:
bcdedit /enum
Finally I can force again boot menu time out to 10 seconds:
bcdedit /timeout 10

1 comment:

  1. Same vhd for every version?
    https://www.borncity.com/blog/2012/11/16/windows-8-bootmen-mit-starteinstellungen-per-bcd-injection-erzwingen/

    ReplyDelete