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

BCDBOOT problem after image applying

- - - - -

  • Please log in to reply
6 replies to this topic

#1
gustavo21

gustavo21

    Newbie

  • Member
  • 25 posts
  • Joined 14-November 10
  • OS:Windows 7 x86
  • Country: Country Flag

Hi everyone. I am having some problems after apply the wim image with imagex. I do this

 

diskpart.txt:

 

sel disk 0

clean

create part pri

sel part 1

assign letter c

active

 

next i format and tranfer the wim. Thats works OK.

 

But when i transfer bcdboot with "bcdboot c:\windows" some times in some computers when boot i have bootmgr error. It happens in less than 10% of the computers.

 

If i apply bcd with "bcdboot c:\windows /s c:" works 100% of times but in 90% i have dual boot and i have to manual delete one entrie.

 

I was thinking there is a way to avoid this, maybe deleting all bcd in disk and next generate it again?

 

I hope you understand me. 

 

 

Thanks!!




How to remove advertisement from MSFN

#2
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,902 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

If the source image was captured from a single partition, you do not need to run BCDBoot. It is only needed if your source image was captured from a system that used the System Reserved partition.

 

Also, when you have Diskpart clean a disk, the BCD is removed.


MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg

#3
cdob

cdob

    MSFN Expert

  • Member
  • PipPipPipPipPipPip
  • 1,000 posts
  • Joined 29-September 05

But when i transfer bcdboot with "bcdboot c:\windows" some times in some computers when boot i have bootmgr error. It happens in less than 10% of the computers.

 

Which computers do you use? Describe the hardware. 

Which computers list bootmgr error? Which bootmgr error do you get?

 

Which image do you apply? Does this image contain a file \boot\bcd already?

 

Do you use one hard disk or more hard disks?

Are there any card readers?

 

How do you run imagex? Do you boot a PE? 

How do you boot the computer Do you boot from CD/DVD, USB flash, USB hard disk, network,...?



#4
gustavo21

gustavo21

    Newbie

  • Member
  • 25 posts
  • Joined 14-November 10
  • OS:Windows 7 x86
  • Country: Country Flag

I run a PE from windows 7 AIK. I capture the syspreped image from a single drive and a single partition in a standard pc (sempron 145, asrock n68) that i use to deploy only.

 

The same image some times boot and some times doesn't. When doesn't, i have to load PE and enter bcdboot c:\windows /s C:. But if i apply that command everytime, in most cases i have a dual boot.



#5
cdob

cdob

    MSFN Expert

  • Member
  • PipPipPipPipPipPip
  • 1,000 posts
  • Joined 29-September 05

The same image some times boot and some times doesn't. When doesn't, i have to load PE and enter bcdboot c:\windows /s C:. But if i apply that command everytime, in most cases i have a dual boot.

Do you run bcdedit to adjust partition layout settings after image apply?

 

Which error message do you get, if it dosn't boot?

 

Run a bcdedit, post the output from the failed computer.

 

Rename the file c:\boot\bcd first, 'run bcdboot c:\windows /s C:' next



#6
JFX

JFX

    Advanced Member

  • Member
  • PipPipPip
  • 470 posts
  • Joined 17-January 11
  • OS:Windows 7 x64
  • Country: Country Flag

I run a PE from windows 7 AIK. I capture the syspreped image from a single drive and a single partition in a standard pc (sempron 145, asrock n68) that i use to deploy only.

 

The same image some times boot and some times doesn't. When doesn't, i have to load PE and enter bcdboot c:\windows /s C:. But if i apply that command everytime, in most cases i have a dual boot.

This perfect sounds like the usually mistake to also capture the boot files.

Mount your wim file rw and remove the \Boot folder and the \bootmgr file in the root. They aren't supposed to be there.

 

And always use bcdboot after apply an image.



#7
daremo

daremo

    Newbie

  • Member
  • 25 posts
  • Joined 26-February 12
  • OS:Windows 7 x64
  • Country: Country Flag

JFX is right.

While capturing an image with imagex, you must have captured the existing boot folder and bcd store data. As a default, imagex can skip certain files, but you can use the "/Config <drive:\folder\myconfig.ini" option to direct imagex to use your custom config file which should specify which folders and files to skip during capture operation.

Since you have a single drive - single partition, your boot files (BCD store) are on the same partition, instead of the system reserved partition. Because default imagex configuration does not exclude \boot folder and files (as well as bootmgr), imagex capture operation will include the folder and the files in the wim image. When applied, you will have the boot folder, files and bootmgr written to the new disk, which will cause you the problems you indicated.

See http://technet.micro...7(v=ws.10).aspx for info on config.ini, and how you can customize it and use it during imagex capture operation.

 

You have several choices:

1. Fixing the problem disk where image is applied: Before booting the system after applying an image containing old BCD store (boot files), boot into windows PE (using the win 7 install media), go to the drive where the image is applied, locate and take ownership of the existing boot folder and files and bootmgr, change permissions and then remove them. Use "bcdboot C:\windows /s C:" command to create a proper BCD store, and reboot the system from the drive. Ensure that the partition is set to active!!!

 

2. Fixing the wim image itself (for re-use): Mount the existing wim image, remove the existing boot folder and files and bootmgr and save the image. You may need to take ownership and change permissions to be able to remove the boot files. Now, your image will be ready for use without any other modifications for the next use. You can test the image by re-applying the image to the new system (new disk).

 

3. Fixing imagex capture operation issues: This option is, of course, a general case for when capturing images, and hwtahow to capture images! In principle, you might go through this process for your current situation as a test case, to confirm that your capture ops and apply ops are being performed correctly and as expected. What you need to do (if you have the time) is to create a custom imagex config.ini file, specify boot folder and files, and bootmgr as exclusions in the configuration, and then use this config.ini file during a wim image capture from an existing system (Note: the system is sysprepped with OOBE, Generalize options, and ready for capture, correct?).

Finally, you test functionality of the new system (after the wim image is applied and new BCD store - boot files are created by issuing the BCDBOOT command) and check that the system boots correctly. Control your bcd store contents with bcdedit!. Keep a copy of the custom config.ini file with your WAIK-3 tools for re-use for other capture ops!

 

Dai

 

Addendum--

On a subject related to capturing and applying images, I wanted to remind you about an issue with the sysprep - OOBE - Generalize operation to prepare a system for WIM image capture. There's a registry key "skiprearm" which may cause sysprep operation to fail, because you have exceeded rearm counts! When you try to sysprep a system that was already sysprepped previously, eventually you will run out of the rearm counts which is triggered during a sysprep - OOBE - Generalize operation (i.e. rearm count is decremented during the sysprep oper). There are ways around this issue which you may want to check by googling for "enable/disable skiprearm".

There is also a method to reset the "rearm" count by removing a hive from the registry, and later re-installing a license, which might be of interest. Ensrure that you have good backups of your existing system before sysprepping and playing with the skiprearm registry key, and resetting rearm counts!!!

Tip: Usually when I prepare a computer (or virt. machine) for imaging with Win7, Win 2008, I enable skiprearm, and put the system into Sysprep-Audit mode (CTRL+Shift+F3 at the initial boot of the OS after the installation of OS). I perform driver and software installs, configs, and customizations. When the system is configured as I want it, I boot the machine into WinPE, access the offline registry of the installed OS, and remove registry item related to rearm counts (WPA key under HKLM\System) [source info: http://www.zimbio.co...sage without].

Reboot the machine into sysprep-Audit, install the product license, and keep skiprearm registry enabled (to prevent decrement of rearm count). When you check activation, you will see the license info, grace period and remaining rearm counts. I will disable skiprearm before I perform a Sysprep-OOBE-generalize before attempting an image capture.

The enable/disable skiprearm, and deleting of WPA key enables me to overcome/resolve issues arising from activation grace period, and sysprepping a machine multiple times.

It is good that with win 8 and win 2012, sysprepping is not limited to 3 times as it is with Win Vista/7/2008.


Edited by daremo, 02 October 2013 - 08:30 AM.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users