How to identify and remove unused boot entries on Windows 2008 server after mirrored disk failure

1

I had one of the software mirrored disks on a Server 2008 R2 server fail. It dropped off, a reboot brought it back, but it was out of date, so I had to revert to the mirror and rebuild the bad disk (not knowing it was bad at this point). It then dropped off again, so I replaced it.

Now I have 5 entries in my startup menu:

Windows Server 2008 R2
Windows Server 2008 R2 - secondary plex
Windows Server 2008 R2 - secondary plex - secondary plex
Windows Server 2008 R2 - secondary plex
Windows Server 2008 R2 - secondary plex - secondary plex - secondary plex

The default entry (Windows Server 2008 R2) does not boot. You have to manually select a different entry in order to boot the server.

My bcdedit list appears as such:

Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  unknown
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {default}
resumeobject            {3c1a07d1-3aaf-11e3-be1a-d6c22ece83ca}
displayorder            {default}
                        {current}
                        {3c1a07dc-3aaf-11e3-be1a-d6c22ece83ca}
toolsdisplayorder       {memdiag}
timeout                 30

Windows Boot Loader
-------------------
identifier              {default}
device                  partition=\Device\HarddiskVolume2
path                    \Windows\system32\winload.exe
description             Windows Server 2008 R2
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {3c1a07d3-3aaf-11e3-be1a-d6c22ece83ca}
recoveryenabled         Yes
osdevice                partition=\Device\HarddiskVolume2
systemroot              \Windows
resumeobject            {3c1a07d1-3aaf-11e3-be1a-d6c22ece83ca}
nx                      OptOut

Windows Boot Loader
-------------------
identifier              {current}
device                  unknown
path                    \Windows\system32\winload.exe
description             Windows Server 2008 R2 - secondary plex
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {3c1a07d3-3aaf-11e3-be1a-d6c22ece83ca}
recoveryenabled         Yes
osdevice                unknown
systemroot              \Windows
resumeobject            {3c1a07d1-3aaf-11e3-be1a-d6c22ece83ca}
nx                      OptOut

Windows Boot Loader
-------------------
identifier              {3c1a07dc-3aaf-11e3-be1a-d6c22ece83ca}
device                  partition=C:
path                    \Windows\system32\winload.exe
description             Windows Server 2008 R2 - secondary plex - secondary plex
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {3c1a07d3-3aaf-11e3-be1a-d6c22ece83ca}
recoveryenabled         Yes
osdevice                partition=C:
systemroot              \Windows
resumeobject            {3c1a07d1-3aaf-11e3-be1a-d6c22ece83ca}
nx                      OptOut

I'm not sure which ones I should delete, and which should be set as active. The fact that the {current} entry shows a device as "unknown" is making me a bit shy at trial and error. This is a production server at a remote hosting site, so I can't really experiment to try to get it right.

diskpart shows that disk 1 (of 0 and 1) is the boot device.

Anyone have any suggestions?

ITFlyer

Posted 2015-10-14T17:15:49.843

Reputation: 31

Answers

1

You can use Disk Management to view and map disks and partitions (alternatively use diskpart.exe).

Usually first disk (disk 0) is boot candidate and checked for presence of active partition. If no active partition present on first disk, second disk (disk 1) is checked for active partition and so on.

Strange but device of {bootmgr} is also listed as "unknown" in current system BCD! This could create problems.

A.) The best you can do would be rewriting MBR and PBR on all disks and partitions using bootsect.exe command:

bootsect /nt60 all /mbr

B.) Then use bcdboot.exe command to rewrite(fix) BCD:

bcdboot Z:\windows 

where Z: is drive where Windows is installed. Later you have to fix recovery loader using ReAgentC.exe.

C.) You could write another BCD on non-system disk too (if it has an active partition) using

bcdboot z:\windows /s y:

where y: is active partition on non-system disk.

This way you can boot from either disk.

For viewing BCD in a graphical and structured way you could use Visual BCD Editor.

After executing bcdboot command you should check that devices for boot manager and loader are listed correctly.

After fixing BCD and reboot you can delete all loaders which have a "unknown" device, loaders pointing to partitions which are not the "boot" partition(where Windows is installed and started from).

Note:

Backup your current BCD(!) either using Visual BCD Editor or using

bcdedit /export full_path_filename

(you can restore BCD at any moment using "bcdedit /import filename")

All "links" in BCD are through GUIDs. For example element "display order" is a list of GUIDs which are GUIDs of loaders. Every object in BCD has a GUID which is unique.

Hope this helps.

snayob

Posted 2015-10-14T17:15:49.843

Reputation: 4 044