Jump to content

edit BCD in windows 7


mdnchauhan

Recommended Posts

Hi all,

I am making a tool to clone hard drives. I successfully clone windows 7 but the problem is arising while booting the clone disk.

Before putting my queries about windows 7 I would like to explain some thing about other Windows OS beside Windows 7.

As we know each hard drive has its signature that is written in MBR of hard drive just before partition table. This hard disk signature is unique for each hard disk that is connected to machine. In case of Windows Vista and XP this disk signature does not make effect on booting process of OS. If OS find that there is same disk signature in more than one hard drive then it change it randomly-(no effect on booting process). If I manually change this disk signature or do it zero then Vista and XP both boot smoothly and assign a new disk signature to hard drive.

NOW move to windows 7----> I install windows 7 and let it make a small System Reserved partition of 100MB and install windows 7 in C: drive of my hard drive.

The disk signature that this hard drive has is suppose (AB BC CD DA). If I make change in to this disk signature then machine does not boot and one error message appears "Windows failed to start. A recent hardware or software change might be the cause". It means windows 7 depends on disk signature.

After some research I came to know that the disk signature is written in BCD file. this BCD file is in Boot folder of System Reserved Partition. It means this signature is configured in to BCD during installing the Windows 7.

when I clone disk0 to disk1(I clone sector by sector from low label) then this BCD file also copied to disk1 and inside this BCD file source disk signature is configured and disk1 disk signature is different from that. Due to this reason this clone disk does not boot. If I replace disk1 signature in all the places of BCD file then clone disk easily boot. It means I need to configure BCD according to destination disk(disk1) before cloning or some thing else so that the problem can be resolved.

In Windows Vista before cloning I need edit BCD by executing some commands that are- bcdedit /set {bootmgr} device boot

bcdedit /set {default} device boot

bcdedit /set {default} osdevice boot

After running these commands booting with clone disk issue has resolved.

In same way for windows 7 are there some commands or any other utility that can configure BCD?

Please suggest me some way.

Thanks

Madan

Link to comment
Share on other sites


If I may, if you change the signature in the target, it is not anymore "cloning", it is "duplicating".

I.e. if "cloning" you write to the MBR of the "new" drive the Signature of the "old" one.

Have you checked the BCD by importing it (as a Registry Hive) with Regedit?

It should be possible to automate registry changes with REG.EXE.

Have you tried using this tool (beware, UNFINISHED, may or may NOT work/be useful :ph34r:) to peek (and possibly poke) in the BCD?:

RawReg:

http://www.boot-land.net/forums/?showtopic=4684

jaclaz

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...