Note that the BCD Store used to boot the operating system may be in use as the system store - if a system store is in use then this will be the default store on which all bcdedit commands are carried out. I recommend using the /store switch whenever modifying a BCD store to reduce the risk of targeting the wrong store. To specify the BCD store D:\Boot\BCD we would use the command -
bcdedit.exe /store D:\Boot\BCD .....
Before modifying a BCD store I recommend that you create a backup. Be aware that modifying a BCD store could result in your system not booting, I therefore recommend that you take either of the following precautions -
All examples in this section use the same format - the commands as they would be entered at a command prompt followed by an example batch file automating these commands. All of these examples use the /store switch to specify BCD store C:\Boot\BCD. Don't forget to change the device/path when adapting these examples to your own system.
The following entry will add a menu option for either Windows Vista or 7 - don't forget to change the description entry.
Running this first command will return a Globally Unique IDentifier (GUID) value - e.g. {e05b4c23-618a-11df-89c6-001d925a73cf}. In all subsequent commands replace {guid} with this value -
These commands will boot Windows Vista/7 but will not add any advanced options such as resumeobject's or F8 Windows Recovery Environment.
The {ntldr} option can be used to boot legacy operating systems including Windows 2000/XP/2003. This option is generally only used in dual or multiboot systems. The files boot.ini and ntdetect.com (from an existing Windows 2000/XP/2003) will need to be copied to the boot partition containing BOOTMGR and the BCD store.
Don't forget to change the device partition= to the drive containing your own Windows 2000/XP/2003 installation. Also change the description as required.
At this time only limited version of Windows can be booted from a VHD - this includes Windows 7 (Ultimate and Enterprise), Windows Server 2008 R2, Windows 8/8.1. These commands will add an entry for an existing VHD installation. Edit the description and device path as required.
Running this first command will return a Globally Unique IDentifier (GUID) value - e.g. {e05b4c23-618a-11df-89c6-001d925a73cf}. In all subsequent commands replace {guid} with this value -
The following example uses device boot - this can be changed to device partition=#:. You will need to copy grldr.mbr to the device specified. You will then need to copy grldr and menu.lst to any supported partition (FAT/NTFS/EXT2/3).
Running this first command will return a Globally Unique IDentifier (GUID) value - e.g. {e05b4c23-618a-11df-89c6-001d925a73cf}. In all subsequent commands replace {guid} with this value -
As far as I am aware {ramdiskoptions} is only used in order to boot WinPE (versions 2.*/3.*/4.0/5.*). {ramdiskoptions} is used to identify the .sdi file required during the initial stages of booting WinPE.
Due to a bug any subsequent WinPE based objects do not display their own descriptions if a {ramdiskoptions} description has been set. Do not therefore specify any description for {ramdiskoptions} - thanks to boot-land forum member cdob for this tip (see here).
The following example uses device boot - this can be changed to device partition=#: if required. Edit the ramdisksdipath path as required.
A {ramdiskoptions} object must exist before creating an entry for WinPE. The following example uses device ramdisk=[boot] - this can be changed to device ramdisk=[#:] if required. Edit the description and device path as required.
Running this first command will return a Globally Unique IDentifier (GUID) value - e.g. {e05b4c23-618a-11df-89c6-001d925a73cf}. In all subsequent commands replace {guid} with this value -
Thanks to boot-land forum member cdob for this tip (see here).
Although only one {ramdiskoptions} object can be created it is possible to use a different .sdi file to the one specified in {ramdiskoptions} ramdisksdipath by using the following workaround. At present I have not found any real use for implementing this however, as cdob points out, it may be necessary in future.
Running this first command will return a Globally Unique IDentifier (GUID) value - e.g. {e05b4c23-618a-11df-89c6-001d925a73cf}. In all subsequent commands replace {ramdisk_guid} with this value -
Now to use this to boot WinPE -
Running this command will return a Globally Unique IDentifier (GUID) value - e.g. {bdaf610c-622d-11df-a7ee-a711d7fae90e}. In all subsequent commands replace {guid} with this value and replace {ramdisk_guid} with the GUID created by running the command in step 1 -