Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

edit BCD in windows 7


  • Please log in to reply
4 replies to this topic

#1
mdnchauhan

mdnchauhan

    Newbie

  • Member
  • 16 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


How to remove advertisement from MSFN

#2
fizban2

fizban2

    MSFN Addict

  • Super Moderator
  • 1,900 posts
  • OS:Windows 7 x64
  • Country: Country Flag
if you sysprep your image this should be not be an issue, if it still is you could use vbscript to change the bcd configuration. what tool are you using to capture your image?

#3
gosh

gosh

    gosh 2.0

  • Patrons
  • 2,347 posts
  • OS:none specified
  • Country: Country Flag
u can also use msconfig to do limited bcd edits

#4
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,066 posts
  • OS:none specified
  • Country: Country Flag
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...?showtopic=4684

jaclaz

#5
Noise

Noise

    Windows Guru

  • Member
  • PipPipPip
  • 425 posts
Wow! BCD's are really registry hives? ... I got to check this out.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN