A Digital Age Deserves A Digital Leader

How To: Edit the Windows Vista Boot Menu Options

How To: Edit the Windows Vista Boot Menu Options

Postby gries818 » Tue Jul 04, 2006 1:12 pm

How To: Edit the Windows Vista Boot Menu Options - BCDEDIT


Note: For an easy way to make changes to the BCD (Boot Configuration Data) please check out VistaBootPRO

Introduction

In Windows Vista, the Boot Configuration Data (BCD) store contains boot configuration parameters which control how the operating system is started in the Windows Vista and Windows Server Code Name "Longhorn" operating systems. These were found in the boot.ini file in previous versions of Microsoft Windows. To edit the Windows Vista Boot Menu Options, the Boot Configuration Data Editor - BCDEDIT is used.

The Bcdedit.exe command-line tool can be used to add, delete and edit entries in the BCD store which contains objects. Each object is identified by a GUID (Globally Unique Identifier). Every drive or partition on the system will have its own GUID and could be {legacy} (to describe a drive or partition on which a pre-Windows Vista operating system), {default} (to describe the drive or partition containing the current default operating system), or {current} (to describe the current drive or partition one is booted to), or for example {c34b751a-ff09-11d9-9e6e-0030482375e7} (to describe another drive or partition on which an operating system has been installed).

Bcdedit.exe is located in the \Windows\System32 directory of the Windows Vista partition and can be accessed only from the Command Prompt which is found on the Windows Vista start menu at Start>All Programs>Accessories


Command-line Help

bcdedit /? Shows all commands one is able to use

bcdedit.exe /? CREATESTORE Shows detailed information for the command CREATESTORE or any other command available in bcdedit as shown when running bcdedit /? followed by the particular command more information is required for.

bcdedit or bcdedit /enum all Shows the current structure of your boot configuration data.
The GUID tags {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} of all Windows installations present on your computer will be displayed.


Create a Backup

It is strongly recommended that one creates a backup of the BCD store before making any changes to it.

bcdedit /export "D:\BCD Backup\Bcd Backup" Creates a backup to a pre-created folder, in this case "BCD Backup" on drive D:

bcdedit /import "D:\BCD Backup\Bcd Backup" Restores the backup previously created


Making Changes to the Boot Configuration Data

Before making any changes or attempting to use the commands below, run the command bcdedit or bcdedit /enum all to make sure that you use the correct GUID tag. These have been seen to change from build to build and it may be necessary to use {ntldr} instead of {legacy} for example.

bcdedit /set {legacy} Description "Windows XP Professional SP2" Changes the text description of the "Legacy" OS line in the boot menu. The quotation marks must be included in the command

bcdedit /set {current} description "Windows Vista Build 5270 x86" Changes the text of the boot menu line for the Vista or non-Vista installation one is currently booted to, from the default "Microsoft Windows" or other description to that shown in the quotation marks

bcdedit /set {5189b25c-5558-4bf2-bca4-289b11bd29e2} description "Windows Vista Build 5270 x64" Changes the text of the boot menu line for any other Vista installation. One must use the GUID for that particular installation as shown when one runs the bcdedit or bcdedit /enum all command

bcdedit /default {current} Sets the current Windows installation one is booted to as the default Windows boot OS

bcdedit /default {5189b25c-5558-4bf2-bca4-289b11bd29e2} Sets the referenced Windows OS as the {default} Windows boot OS

bcdedit /default {legacy} Sets the legacy (Windows XP) OS as {default} boot item

bcdedit /displayorder Sets the display order of boot menu items for example:

bcdedit.exe /displayorder {legacy} {current}

bcdedit /timeout 15 Changes the default 30 second time-out of the boot menu to 15 seconds or any other value inserted.


Correcting changes to the Partition/Disk structure

Where a partition or a hard drive has been added or removed and has caused the partition/disk structure to change, this can be corrected by running these commands in the order shown:

X:\>X:\boot\fixntfs.exe -lh -all (Where X: is the drive/partition on which the folder "boot" is to be found)

bcdedit /set {5189b25c-5558-4bf2-bca4-289b11bd29e2} device partition=X: Changes boot partition of the OS whose GUID is indicated. (Where X: is new drive/partition required). Must be used together with the osdevice command below

bcdedit /set {5189b25c-5558-4bf2-bca4-289b11bd29e2} osdevice partition=X: Changes boot partition of the OS whose GUID is indicated. (Where X: is new drive/partition required). Must be used together with the device command above


Msconfig - System Configuration Utility

The System Configuration Utility (msconfig) is accessible from the Windows Vista start menu, Start>All Programs>Accessories>System Tools>System Configuration. It has limited funcionality as regards the BCD store however, with the only relevant functionalities being to change the default boot operating system, to delete a boot menu item and to change the timeout display period of the boot menu.

CAUTION: Making incorrect or invalid changes to one's BCD store can result in the system no longer booting and only those comfortable with using command line entries and who understand the inherent risks of making a mistake should do so.


Advanced Options

Please do not run these commands unless you know what the outcome will be.

bcdedit /set {current} numproc 2

bcdedit /set {current} removememory 0


For information on editing the BCD (Boot Configuration Data) when installing a "legacy" Operating System AFTER Windows Vista see How To: Modify BCD using bcdedit when install XP after Vista
Software Development
User avatar
Posts: 3991
Joined: Wed Jul 07, 2004 6:28 pm

Multiple XP-version to boot

Postby Yosji » Sat Aug 19, 2006 4:07 pm

Hi,

I found this topic using 'Google'. I read it multiple times, but I don't come out ...

Point of start : A laptop, running 2 versions op XP, on two disks (one is removable). On the default version (build-in disk), I have all admin-rights. The second version is pre-installed by our IT-department on a separate disk, and I 'm just al regular user. I guess it is just dropped on the disk using a Ghost-image. All boot files (boot.ini, ntldr an NTDETECT.COM) are on that partition too, but to boot into this version, it was the boot.ini from the default version that was modified. So I mean, it is not necesarry that this boot-files are on that second disk too. Whatever, it works.

First, I splitted my disk(s) in different partitions. I installed Linux on, witch was already the first to attack my MBR. When I boot, I see first the GRUB-menu to make a choice between Windows and Linux. Second, there was the Windows menu (wich can be modified by the boot.ini).

Now, I also installed Vista (Beta 2, build 5384). This installation attacks also the MBR. Afther the installation, there was the selection-menu "Earlier versions of Windows" and "Microsoft Windows" (witch means : Vista). Linux was disappeared. No prob, I reinstalled GRUB and now I have 3 selections to make ! Thirst "Windows" or "Linux", second "Previous version" or "Vista", and if I go to the "Previous Version" once again the old know selection by the "boot.ini"-menu.

What I like to realise, is to put into the Vista boot loader, the second XP-version that I have on my removable disk. I tried this already with VistaBootPro 2.1, as well as manually with BCDEDIT. Creating a new entry is not the prob, however he always read the default "boot.ini" with the two entry's. The second XP-version is located on drive "E" (seen from Vista). However, when I boot into this version, the same partition is indicated as C-drive. And my Vista-partition has the drive-letter "H".

Maybe important to know : the second drive was NOT installed when I did the installation of Vista. When you work on a portable, it is OR the second disk, OR the DVD-reader (wich I needed to install Vista, of course).

Any help sould be welcome, so I can eleminate at least one boot-selection menu.... (but it works !)

Disk configuration (as represented by Vista):

Disk 1:

Partition 1: - Dell Utility - EISA-configuration - NOT shown in Windows
Partition 2: - Default XP - Primary partition - C-drive
Partition 3: - Vista - Extended Partition - D-drive
Partition 4: - Linux - Extended Partition - NOT shown in Windows
Partition 5: - Linux - Extended Partition - NOT shown in Windows
Partition 6: - Linux - Extended Partition - NOT shown in Windows

Disk 0: (removable disk)

Partition 1: - Second XP - Primary Partition - E-drive
Partition 2: - Data - Extended Partition - H-drive

All boot information is on the C-drive.

Hopes somebody has an idea how to fix this ...

I tried also (after te move of my post) to correct my disk-configuration :

bootsect.exe /NT60 ALL,
result : 'bootsect.exe' is not recognize as an internal or external command,
operable program or batch file.

So .. I tried this :

C:\>C:\boot\fixntfs.exe -lh -all,
result : Access denied :confused

(I'm running it 'as administrator', otherwise you can't do anything)

split from old BCD thread, merged to new BCD thread by gries818
Greetz,

Yosji
PRO Level 2
Posts: 22
Joined: Sat Aug 19, 2006 3:10 pm
Location: Belgium

Postby gries818 » Sat Aug 19, 2006 8:46 pm

Help for Grub and Vista can be found in this guide: http://www.pro-networks.org/forum/viewtopic.php?t=78184
Image

Mac OS 10.6.7 - Personal
Ubuntu Server 11.04 - Server
Software Development
User avatar
Posts: 3991
Joined: Wed Jul 07, 2004 6:28 pm

Postby Yosji » Sat Aug 19, 2006 9:12 pm

GRUB works fine ! I want to modify the Vista-Boot-menu
Greetz,

Yosji
PRO Level 2
Posts: 22
Joined: Sat Aug 19, 2006 3:10 pm
Location: Belgium

Postby gries818 » Sat Aug 19, 2006 9:25 pm

Yosji wrote:GRUB works fine ! I want to modify the Vista-Boot-menu


Oh, I am sorry, I must have misunderstood. Have you tried VistaBootPRO??? This really should be your first stop when messing with BCD stuff.

If you still can't get anything to work right, we have some great BCD experts (I am not one of them)
Image

Mac OS 10.6.7 - Personal
Ubuntu Server 11.04 - Server
Software Development
User avatar
Posts: 3991
Joined: Wed Jul 07, 2004 6:28 pm

Postby jrfree1 » Sat Aug 19, 2006 9:32 pm

Yosji wrote:GRUB works fine ! I want to modify the Vista-Boot-menu


If I understand you correctly, you want to have it so that when the Vista Boot Menu comes up, you can access either one of your XP installations from there, without having to go through another boot screen (the legacy, or previous OS screen.)

Unfortunately, the way that the Vista Boot loader currently works, it is only possible to have one legacy entry that will work in the Vista boot menu - which in the case of multiple legacy entries will then take you to the XP boot menu which is based upon boot.ini. The reason for this is because the Vista Boot loader will only recognize one ntldr entry - if you add another legacy entry, no matter what drive you point it to, it will read the original ntldr entry and take you to whatever drive that it is pointing to. I have tried working around this multiple times to no avail, and it is a limitation of the Vista Boot loader. Perhaps they will modify this in the future, but at the current time it is just not possible.
[html]<a href="http://vistamania.org" target="_blank"><img src="http://img116.imageshack.us/img116/1784/sig1pa4.jpg" alt="VistaMaNiA" border="0">[/html]
Image
PROfessional Member
User avatar
Posts: 3779
Joined: Mon Aug 30, 2004 4:24 pm
Location: Florida

Postby Yosji » Sun Aug 20, 2006 10:01 am

gries818 wrote:Oh, I am sorry, I must have misunderstood. Have you tried VistaBootPRO??? This really should be your first stop when messing with BCD stuff.


Yeah, I tried VistaBootPrO ... :dontgetit

jrfree1 wrote:If I understand you correctly, you want to have it so that when the Vista Boot Menu comes up, you can access either one of your XP installations from there, without having to go through another boot screen (the legacy, or previous OS screen.)


That's right ! Thanks to your answer, I know it is not possible ... :no

However, my system works ! And I can do all the test that i want to do. Maybe in final release. Wait and see ^*^
Greetz,

Yosji
PRO Level 2
Posts: 22
Joined: Sat Aug 19, 2006 3:10 pm
Location: Belgium

Postby kd1966 » Sun Aug 20, 2006 1:08 pm

I'm thinking that "maybe" the possible answer for this (Single Legacy line in Vista bootloader) has more to do with multiple Legacy OS's (Multibooting several XP's/9x.....).
The key is ONE BOOT.INI file, and Vista reads it once. I have x86/x64 XP on a system plus a few Vista builds, and I was curious when I saw how it dealt with the XP's............. initially I was thinking I would get separate entries for each XP, but expecially now after reading this, I think I more fully understand why they did it that way. It's sorta like when I installed SUSE to see if I could get XP/Vista/Suse on the SUSE bootloader................ it worked, but in a similar fashion; I could go straight into SUSE, but selecting Vista (After I manually added it), I was taken to the Vista bootloader where I could select each OS (XP/Vista builds)

So it's sortof like "Levels" and which level you are in as to what you can boot directly to; If you have Vista loaded and multibooting, you have your Vista builds directly available to boot into, but the XP OS's are on a different "Level" (BOOT.INI) so selecting that takes you to that Level where you can boot into the various XP/9x OS's that are loaded in that Level.
PRO PLATINUM
User avatar
Posts: 6831
Joined: Tue Aug 09, 2005 2:00 am
Location: USA - GSO - NC

Postby Yosji » Sun Aug 20, 2006 4:29 pm

As you say with your SUSE, it is simular with Ubuntu that I run on the same machine.

It is still a bit strange that you can't add a second XP, because VistaBootPRO allows you to add an entry for it ! It just won't work ... :(
And there IS a second BOOT.INI (and NTLDR and NTDETECT.COM), because the second XP-version was just dumped on the second disk using a ghost of another machine...
Greetz,

Yosji
PRO Level 2
Posts: 22
Joined: Sat Aug 19, 2006 3:10 pm
Location: Belgium

Postby kd1966 » Sun Aug 20, 2006 4:40 pm

Not really,........ if you only have ONE "Legacy" entry, you can directly point to it, but with >1 entry, Vista simply creates an entry to that "sub-level" menu. The only way I see this changing is if somehow MS makes XP "compatible" with boot entries, but I doubt it.......... boot.ini has worked all these years and there's really no reason to change it.

Yes, VBPro does "allow" you to make the entry, however, this is for maintenance purposes in case your XP install boot entry gets corrupted somehow and you need to re-enter it. There is no provision for "multiple" Legacy entries as you are currently trying to make happen, as there is no support for this in BCDEDIT.exe or the Vista bootloader. I think a previous poster said it best:
You can only have ONE \NTLDR entry (Legacy)
PRO PLATINUM
User avatar
Posts: 6831
Joined: Tue Aug 09, 2005 2:00 am
Location: USA - GSO - NC

Next

Return to General Windows Support

Who is online

Users browsing this forum: Google [Bot] and 4 guests