Adding Boot Entries (for Windows debug)

407 views
Skip to first unread message

NT

unread,
Sep 24, 2008, 12:30:47 AM9/24/08
to ComCatcher
The first step in customizing boot options in operating systems is to
add a new boot entry for an operating system. A boot entry is a set of
options that define a load configuration for an operating system or
bootable program.

You can have multiple boot entries for an operating system, each with
a different set of boot parameters. Windows Installer creates a
standard boot entry when you install an operating system, and you can
create additional, customized boot entries for an operating system by
editing the boot options.

You can add, delete, and change the options in the boot entry that
Windows Installer created. However, it is prudent to keep the standard
entry and, instead, add a separate entry that you customize.

To add a boot entry, copy an existing boot entry, and then modify the
copy.

Using Bootcfg in operating systems prior to Windows Vista
You can use the Bootcfg /copy switch to copy a boot entry on any
system, regardless of the type of firmware.

The following Bootcfg command copies the second boot entry to create a
new entry. The /ID switch identifies the line number of the entry
being copied and the /d (description) switch specifies a friendly name
for the new entry, which must be in quotation marks.

bootcfg /copy /ID 2 /d "Microsoft Windows XP Professional - new"



If you have added boot entries that you are no longer using, be sure
to delete them, especially on computers that store boot options in the
finite EFI NVRAM resource. Use the Bootcfg /delete switch to delete
unused entries.

If you have more than one boot entry for an operating system, be sure
to select your preferred entry from the boot menu or set the preferred
entry as the default boot entry. For instructions, see Changing the
Default Boot Entry.

For complete instructions for using Bootcfg, see Help and Support
Services. For examples, see Using Boot Parameters.

Editing the Boot.ini File in operating systems prior to Windows Vista
To add a boot entry to a Boot.ini file, copy and paste an existing
boot entry. Then, change the friendly name of the entry so you can
easily distinguish it in the file and on the boot menu. The friendly
name is the quoted string in the boot entry.

For example, in the following sample Boot.ini file, the original entry
for Windows XP was duplicated, and then the friendly name of the
duplicate entry was changed. The newly created entry appears in bold
text.

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000
Professional" /fastdetect
multi(0)disk(0)rdisk(0)partition(3)\WINDOWS="Microsoft Windows XP
Professional" /fastdetect
multi(0)disk(0)rdisk(0)partition(3)\WINDOWS="Microsoft Windows XP
Professional - new" /fastdetect






Adding a new boot entry in Windows Vista
In Windows Vista, you use BCDEdit to modify your boot options. To add
a new boot entry, open a Command Prompt window with elevated
privileges (right click Command Prompt and click Run as administrator
from the shortcut menu).

Use BCDEdit with the /copy option to copy an existing boot entry. For
example, in the following command, BCDEdit copies the Microsoft
Windows boot entry that was last used to boot Windows, identified as
{current}, and creates a new boot entry. The /d description option
specifies DebugEntry as the name of the new boot entry.

bcdedit /copy {current} /d "DebugEntry"




If the command succeeds, BCDEdit displays a message similar to the
following:

The entry was successfully copied to
{49916baf-0e08-11db-9af4-000bdbd316a0}.




When you copy a boot loader entry that appears on the boot menu, the
copy is automatically added as the last item on the boot menu.

The GUID in the preceding message (which appears between braces ({}))
is the identifier of the new boot entry. You use the identifier to
represent the entry in all subsequent BCDEdit commands.

If the command fails, be sure that you are running in a Command Prompt
window with administrator privileges and that all of the command
parameters are spelled correctly, including the braces around
{current}.

You can also add a boot entry using the /create option. For example,
the following creates a new operating system boot entry called "My
Windows Vista":

bcdedit /create /d "My Windows Vista" /application osloader




When you use the /create option, the new boot loader entries are not
added to the boot menu automatically. You must add the new boot entry
to the boot menu by using the /displayorder option. You can place the
boot loader entries in any order.

For information about the /create command parameters, type bcdedit /? /
create in a Command Prompt window.

Editing the boot menu in Windows Vista
In Windows Vista, new boot loader entries are not added to the boot
menu automatically. You can place the boot loader entries in any
order.

You can use the /displayorder option to set the order in which the
boot manager displays the boot entries on a multi-boot menu. The
command has the following syntax:

bcdedit /displayorder {ID} {ID} ...



The ID is the GUID of the boot entry or a reserved identifier, such as
{current}). Separate each identifier with a space. Be sure to include
the braces ({}).

For example, to add the DebugEntry boot entry to the boot menu after
the {current} entry, use the following command:

bcdedit /displayorder {current} {49916baf-0e08-11db-9af4-000bdbd316a0}



You can also use the options /addlast, /addfirst, and /remove to order
and remove items from the menu. For example, the following command
adds the DebugEntry boot entry as the last item on the menu:

bcdedit /displayorder {49916baf-0e08-11db-9af4-000bdbd316a0} /addlast




To verify that the display order is correct, use the following
command:

bcdedit



When you type bcdedit without additional parameters, BCDEdit displays
the boot manager entry and the boot loader entries in the order that
they will appear in the menu.

The Windows Boot Manager entry also includes the boot menu display
order, as the following example shows.


Windows Boot Manager
--------------------
identifier {bootmgr}
device partition=C:
description Windows Boot Manager
locale en-US
inherit {globalsettings}
default {current}
displayorder {current}
{18b123cd-2bf6-11db-bfae-00e018e2b8db}
toolsdisplayorder {memdiag}
timeout 30

Windows Boot Loader
-------------------
identifier {current}
device partition=C:
path \Windows\system32\winload.exe
description Microsoft Windows Vista
locale en-US
inherit {bootloadersettings}
osdevice partition=C:
systemroot \Windows
resumeobject {d7094401-2641-11db-baba-00e018e2b8db}
nx OptIn

Windows Boot Loader
-------------------
identifier {18b123cd-2bf6-11db-bfae-00e018e2b8db}
device partition=C:
path \Windows\system32\winload.exe
description Debugger Boot
locale en-US
inherit {bootloadersettings}
osdevice partition=C:
systemroot \Windows
resumeobject {d7094401-2641-11db-baba-00e018e2b8db}
nx OptIn
debug Yes

NT

unread,
Nov 9, 2008, 10:26:31 PM11/9/08
to ComCatcher
Enabling Test-signing in Vista:

Bcdedit.exe -set TESTSIGNING ON
Reply all
Reply to author
Forward
0 new messages