Transfering a (now corrupted) BCD store to a different OS partition

a.k.a.

New Member
#1
Hello everyone,

NOTE: Mahmoud, in the next version of EasyBCD, can you please add a CLEAR option for how to transfer a BCD store? There's no indication how that can be done. And I got into a really bad fix by trying.

Here's the situation:

My main goal is to extend the C OS partition into some empty space adjacent. Neither Vista nor Windows Server 2008 will let me do this. (Beyond me why not, or how to work around it more efficiently.)

My workaround was to restore the same OS on D, and also EasyBCD. Then I tried to sort out how to choose the D partition as the source of the BCD store, but just corrupted the BCD store.

Currently I know that I am still booting into C. That is clear from the difference in partition sizes. (I say this because if I were booting into D, it would also think of itself as C.)

Disk Management says the boot partition is C, so I am going with that as the primary evidence that the BCD store being drawn on is C. I might be wrong.

The EasyBCD store is corrupted. Bizarrely, the C entry is totally gone! The only entry showing is D! (And yet I'm booting into C.) Is there a possibility the active BCD store is actually the one located on D? That sounds far-fetched, but I raise it as a possibility.

Yes, I have tried to restore the BCD store from the backup. Nothing is changing.

I can't be sure that the inactive BCD store on D is not corrupted as well, given my fiddling.

What are my next steps?

1. Any tricks to expanding the C partition?

2. Short of that, how do I ensure the integrity of the C store so that it is showing the C partition?

3. How do I THEN add the D partition entry back in to the BCD store?

4. How do I NEXT ensure the integrity of the inactive BCD store on D?

5. And finally, how do I transfer the active BCD store from C to D?

Thanks for your help!

a.k.a.
 

JustinW

Super Moderator
Staff member
#2
Move the bcd store file itself to the new partition into a folder called boot if its the store you use to boot the computer in addition to bootmgr. Set that partition as active and re-install the vista bootloader with EasyBCD/preform startup repair. If its just a backup, EasyBCD already provides this. In addition 2.0 will support loading a bcd store for editing besides the assumed system default.
 

a.k.a.

New Member
#3
Justin,

Thanks for helping. Can you clarify this part?

re-install the vista bootloader with EasyBCD/preform startup repair. If its just a backup, EasyBCD already provides this.
Are you talking about the Vista repair DVD? Or the Diagnostics panel in EasyBCD for reloading a BCD store?

Second, what are you referring to exactly by these phrases: "If it's just a backup" EasBCD already provides "this"?

Thanks,

a.k.a.
 
#4
Justin,

Thanks for helping. Can you clarify this part?



Are you talking about the Vista repair DVD? Or the Diagnostics panel in EasyBCD for reloading a BCD store?

Second, what are you referring to exactly by these phrases: "If it's just a backup" EasBCD already provides "this"?

Thanks,

a.k.a.
Hi.
No, I believe he was talking about the "Reinstall the Vista Bootloader" option in EasyBCD in the "Manage Bootloader" section, and as for the startup repair, yes, you will need to use the Vista DVD (if you have one) to perform that action, or if you don't have one, you can use the Recovery CD downloadable from this site.

Hope this helps! :smile:

-Coolname007
 

Terry60

Knows where his towel is.
Staff member
#5
a.k.a. I think you may be fundamentally misinterpreting the disk management flags.
Microsoft unfortunately uses language differently from us normal English speakers.
Whereas LInux and human beings talk of the boot drive, meaning "where you boot from",
MS says "boot" = "this is the system you are running at this instant, the one from which you are looking at your disks"
MS says "system" = "where all your boot files are". This is where you'll find the active BCD
MS acknowledges that other people's OSs can also have boot files ("system" partitions in its terms)
so it also sets the "active" flag which means "if there's more than one "system" (ie sets of boot files) on this disk, use this "active" one.
Also, booting from an OS doesn't necessarily mean it thinks it's C:\.
My Vista is C: and my XP is D: whichever one is booted.
 

a.k.a.

New Member
#7
Mahmoud,

I'm following your guide, and getting a couple of errors -- even when I set the EasyBCD shortcut to 'Run as Administrator.' I assume that launching the EasyBCD Power Console from within EasyBCD does NOT make it Run as Administrator.


1. For instance, this step does not work -- access denied.

move D:\Boot\bootmgr D:\bootmgr

I copied it manually, by taking ownership of both the source and destination files.

But the replacement bootmgr file isn't recognized as a system file, just a generic 'File.' That seems odd. Do I change the extension? (Not daring to yet.)


2. And there is NO 'Mark Partition as Active' context menu option for the new boot volume. Not 'greyed out' -- just NONE. (I'm using Server Manager.) Currently the C drive is still listed as the Active partition. Do I have to use diskpart.exe at this point?

Oh wait. Duh. The place where the BCD store is located has to be a primary partition, correct? Can't be a logical partition?

I just did myself in, it looks like. How would I undo these procedures at this point?

Uhh.... Help?
 
Last edited:

mqudsi

Mostly Harmless
Staff member
#8
EasyBCD's power console runs with full administrative privileges (that's what the "power" in the name refers to :smile:)

BOOTMGR doesn't have an extension, so it's always going to be generic "file"
You can't change the active partition on the boot drive from within Windows. You can use diskpart or any other partition manager to do that instead.

BCD doesn't need to be on a primary partition.
 

a.k.a.

New Member
#9
Puzzled, though. I actually tried changing the active partition using diskpart.exe (from within C to D), and it gave me this error:

"The selected partition cannot be marked as an active partition because of its type."

Any idea what's going on here?

THIS SEEMS IMPORTANT, BECAUSE WITHOUT AN ANSWER, I AM NOT SURE WHAT WILL HAPPEN ON REBOOT.
 

Terry60

Knows where his towel is.
Staff member
#10
A logical drive cannot be "active", only a primary partition.

see below (from Vista help)

Mark a partition as active


You must be logged on as an administrator to perform these steps.
Marking a partition as active is an advanced task that should only be performed by advanced users. Marking a partition as active on a basic disk means that the computer will use the loader (an operating system tool) on that partition to start the operating system.
Warning

  • Do not mark a partition as active if it does not contain the loader for an operating system. Doing so will cause your computer to stop working.
  1. <LI class=step>
    Click to open Computer Management.
    If you are prompted for an administrator password or confirmation, type the password or provide confirmation.
    <LI class=step>In the Navigation pane, under Storage, click Disk Management.
  2. Right-click the primary partition that you want to make active, and then click Mark Partition as Active.
    Notes
    • There can be only one active partition per physical hard disk.
    • If you have multiple hard disks installed on your computer, it is possible for each hard disk to have a partition set as active. However, the active partition on the first hard disk that your computer's basic input/output system (BIOS) detects is the one that will start the computer. For more in-depth information, go to the Microsoft website for IT professionals.
See also
 

a.k.a.

New Member
#11
Terry -- THANK YOU!

Hmm.

Have you taken a look at Mahmoud's (Guru's) tutorial on changing the boot drive?
http://neosmart.net/wiki/display/EBCD/Changing+the+Vista+Boot+Drive

If I am in the middle of this walkthrough (haven't rebooted), and have done everything except set a partition to active (which proved impossible)...

Can I just repeat the steps in the walkthrough to revert to C, or will I run into glitches? Which drive should I treat as the drive with the BCD store? C or D?

I can't reboot until this gets figured out.

Thanks!

a.k.a.
 

mqudsi

Mostly Harmless
Staff member
#12
Terry, is that limitation for the Windows partitioning tools or in general?

aka - just repeat the steps, this time from D: to C:
 

mqudsi

Mostly Harmless
Staff member
#14
Interesting. I seem to recall having a logical partition as the active partition once upon a time - though all the resources online indicate it just isn't possible.

I must have done something really crazy to get it going or am simply misremembering.

At any rate, I probably should clarify that point in the guide.
 

Terry60

Knows where his towel is.
Staff member
#15
Yes CG, It's a general restriction. Remember we had a similar problem months ago with HnS, where someone tried using it with XP on a logical drive. The "makeactive" failed for the same reason.
 

a.k.a.

New Member
#16
Thanks, both of you!

Mahmoud, in the guide, it might also be nice to just provide a capsule explanation of what is going on in each of the commands you give to EasyBCD. The first command ran forever. It was doing a lot of work, and I was really curious what was taking place.

Thanks once again.

Cross your fingers -- about to reboot....


Addendum:


Well THAT sure didn't work.

Had to do an OS restore. Nothing booted.

Ok, back to square one. I can move the BCD store to a primary partition WITHOUT an OS, is that correct? I have a 2.5GB spare partition to the left of the current OS (meant for BitLocker if I ever want it.) I can put the BCD store there, change that partition to active, and then wipe+expand the C partition, which was the original goal. Correct?

So the lessons for the tutorial are:

1. It is NOT one you want to screw up, because it doesn't roll back.

2. Yes, I'd say make a note of the logical partition problem for sure.

3. Whatever this error is with moving bootmgr may actually be a problem. CG, what I meant about the generic "file" type is that the OS does NOT recognize it as a system file. When it's in the Windows folder, it has a system file .ICO, but when it's moved from the Boot subdirectory up a level, it loses the system file .ICO and looks blank. I wonder if the OS doesn't like it for some reason.
 
Last edited:

Terry60

Knows where his towel is.
Staff member
#17
You can have all your Windows OSs (from XP SP1 onwards, I think) on logical drives, but the boot files must be on a primary partition.
The MBR will look for the "active" primary and execute the code in the PBR of that primary to locate the bootmanager.
Point 4 in the sticky.
Yes, you can have a small primary dedicated to the boot files if you want.
 

a.k.a.

New Member
#18
Mahmoud and Terry,

I'm following the tutorial on moving the BCD store to a different volume.

Again, this isn't working.

Here are the instructions, and I'll tell you what's not working after that:

bootsect.exe /nt60 all /force
mbrfix.exe /drive 0 fixmbr /vista /yes
xcopy %systemroot%\Boot\PCAT\* D:\Boot\ /K /Y /R /H /E /I
move D:\Boot\bootmgr D:\bootmgr
bcdedit /set {bootmgr} device boot
bcdedit /export D:\Boot\BCD
exit
I'm moving the files to a blank partition (as described just above, in the exchange with Terry). When I ran the xcopy line, it copied only the folder structure, NOT the files!

1. What other files do I need to copy apart from the 4 BCD files in the C:\Boot\ directory?

For instance, I don't have contents in the EFI and PXE folders.

2. I tried to move the BCD and 3 BCD log files, and only the LOG 1 and LOG 2 files moved. BCD and LOG are "open in another program." I even tried closing EasyBCD, taking ownership, and moving them, and they wouldn't budge.

What I've just done is to save a Recovery.bcd file to C, and then copy that, plus the Recovery.bcd.LOG, to the empty partition, and renamed them appropriately. That should work, right?

Suggestions?
 
Last edited:

mqudsi

Mostly Harmless
Staff member
#19
You don't need the contents of the PXE and EFI folders.

Try this instead of the move command:
Code:
xcopy /r /h source dest
 

a.k.a.

New Member
#20
I am probably being obtuse, but if there was no bootmgr created on D to begin with, how can I copy it? I just copy and pasted bootmgr from C. Will that suffice, or is there a transformation the file has to go through?

Right now I have copied these files, mostly manually.

D:\bootmgr
D:\Boot\PCAT\en-US\bootmgr.exe.mui
D:\Boot\PCAT\en-US\memtest.exe.mui [irrelevant, I know]
D:\Boot\PCAT\BCD
D:\Boot\PCAT\BCD.LOG
D:\Boot\PCAT\BCD.LOG1
D:\Boot\PCAT\BCD.LOG2
D:\Boot\PCAT\bootstat.dat
D:\Boot\Fonts\wgl4_boot.ttf

Seems promising, right?
 
Last edited: