6

I have Windows Server 2008 R2 software mirror.

I boot from volume c:.

When i use:

bcdedit 

I can see 3 different "Windows Boot Loader" entries with "device partition=C:". How can I figure out which boot entry is related to which physical disk?

Windows Boot Loader
-------------------
identifier              {77777777-bbbb-bbbb-bbbb-bbbbbbbbbbbb}
device                  partition=C:
path                    \windows\system32\winload.exe
description             Windows Server 2008 R2 - secondary plex
locale                  en-us
inherit                 {bootloadersettings}
osdevice                partition=C:
systemroot              \windows
resumeobject            {55555555-bbbb-bbbb-bbbb-bbbbbbbbbbbb}
nx                      OptOut
detecthal               Yes

Windows Boot Loader
-------------------
identifier              {99999999-bbbb-bbbb-bbbb-bbbbbbbbbbbb}
device                  partition=C:
path                    \windows\system32\winload.exe
description             Windows Server 2008 R2 - secondary plex
locale                  en-us
inherit                 {bootloadersettings}
osdevice                partition=C:
systemroot              \windows
resumeobject            {55555555-bbbb-bbbb-bbbb-bbbbbbbbbbbb}
nx                      OptOut
detecthal               Yes

Windows Boot Loader
-------------------
identifier              {eeeeeeee-bbbb-bbbb-bbbb-bbbbbbbbbbbb}
device                  partition=C:
path                    \windows\system32\winload.exe
description             Windows Server 2008 R2 - secondary plex - secondary plex
locale                  en-us
inherit                 {bootloadersettings}
osdevice                partition=C:
systemroot              \windows
resumeobject            {55555555-bbbb-bbbb-bbbb-bbbbbbbbbbbb}
nx                      OptOut
detecthal               Yes
rumburak
  • 299

4 Answers4

4

Use the undocumented /raw flag when running bcdedit /enum.

Instead of printing unknown, partition=\Device\HarddiskVolume1 or partition=C: you will see output such as PartEx 6500000 HD MBR Sig:1a2b3c4d. This is showing you what is actually recorded in the BCD, as opposed to an interpretation of the data given currently accessible disks/partitions/filesystems.

The meaning in this case is "find the MBR disk with signature 1a2b3c4d and then look for the partition starting at byte offset 0x6500000".

There are other possible formats, for instance if your entry refers to a partition on a disk with a GPT partition table it will probably refer to the partition UUID.

(My heartfelt thanks to SS64.com which is the only place on the entire internet that documents this /raw flag. My heartfelt curses to Microsoft for failing to document this vital diagnostic option to bcdedit!).

2
  1. Open a command prompt with administrator privileges.
  2. Run the following set of commands:

    DISKPART
    SELECT DISK 0
    UNIQUEID DISK ID=<random_disk_signature>
    

    (<random_disk_signature> is e.g. 1a2b3c4d)

  3. Quit DISKPART, but stay in the command prompt.
  4. Enter the following commands, one at a time, in the command prompt pressing Enter key after each command:

    bcdboot c:\windows /s c:
    bcdedit /set {DEFAULT.EN_US} device partition=c:
    bcdedit /set {DEFAULT.EN_US} osdevice partition=c:
    bcdedit /set {BOOTMGR.EN_US} device partition=c:
    
  5. Close the command prompt.

  6. Reboot.
Indrek
  • 24,874
saber tabatabaee yazdi
  • 1,691
  • 8
  • 22
  • 29
1

You can use diskpart to identify your disks. Example: I have two disks. They have one partition on which is the system (C:). bcdedit shows two boot entries one being the secondary plex but they seem the same. Using disk part:

diskpart
sel disk 0
detail disk
sel disk 1
detail disk

The output of the detail disk commands will show two different Disk IDs.

Then export the BCD (ex. bcdedit /export c:\test).

Open registry editor (regedit). Select the HKEY_USERS and use File menu -> Load hive. Select the C:\test file and enter a name under which the hive will be loaded (ex. test). Then expand the test key under HKEY_USERS. Expand the Objects subkey and the respective GUIDs that "bcdedit /enum /v" lists for the respective boot entries. Expand the Elements subkey and check the 11000001 and 21000001 subkeys Elements value. At position 0x38 it contains the Disk ID found using diskpart. Note that it is byte reversed (little endian format). So if the Disk ID is 01020304 the bytes at offset 0x38 will be 04 03 02 01.

1

All 3 entries shown in bcdedit output point to same partition and disk.

To find out which partition (and disk) is mapped to c: you can use Windows DiskManagement or diskpart.exe on command prompt.

snayob
  • 4,500