Repositioning Boot Files To Fix a Dell, Windows 7, BING/BIBM Problem

Last Updated:   11/19/12   03:09                 Jeffrey Knauth

This document was originally written for BootIt Next Generation (BING); however it also applies to BootIt Bare Metal (BIBM). There is only one minor difference, in which a BING button was moved to different screen in BIBM. That is highlighted in the appropriate steps in the procedures below. Other than that, wherever the term "BING" is used, you can consider it applies also to "BIBM".

The way Dell formats Windows 7 hard drives for new systems can cause a problem for users of BootIt NG (BING). The boot files are placed in a partition incompatible with BootIt NG's multi-boot operation. Dell now formats the hard drive into three primary partitions:

   DELLUTILITY   hardware diagnostics from Dell
   RECOVERY      factory restore image, Win7 boot files, Win7 Recovery Environment
   OS            the vast majority of Win7 files

BootIt NG expects the Windows 7 boot files to be in the OS partition with the rest of the Windows 7 files. That would allow copying the OS partition to another partition for modification and testing. It would allow booting either partition, the original or the copy, using BootIt NG's partition rearrangement and multi-boot abilities. However all this is no longer possible, given the way Dell places the Windows 7 boot files.

To make the configuration be what BootIt NG expects, the boot files must be copied from RECOVERY to OS. Then the Boot Configuration Data (BCD) in the OS partition must be edited to show that the OS partition is to be booted when BootIt NG passes control to the OS boot program. The following procedure makes these changes; the partition names used in the procedure are those assigned by Dell. The procedure was stitched together from three articles on the TeraByte website:

Those articles are really about other problems that can occur when installing Windows 7 in a Vista environment, or when installing Windows 7 on a bare hard drive. In the former case, if the Vista partition is active during the install, the Windows 7 boot files end up in the Vista partition. In the latter case, a 100 MB primary System Partition is created. It contains the boot files while the rest of Windows 7 is put into another primary partition. In both cases the boot files are not put in the Windows 7 partition, just as with the Dell RECOVERY partition case. It's as if Dell leaves the RECOVERY partition active when they install Windows 7 on the system being built.

After the following procedure, the boot records are copied to the OS partition and the BCD there is corrected. The DELLUTILITY and RECOVERY partitions are unchanged. In theory those two partitions could then be deleted, but some useful function they provide would be lost. On the other hand, they each take up a primary partition slot and some disk space. That's not so important if you turn off BootIt NG's default "Limit Primaries" option (thus allowing more than four primary partitions), and if the space used (under 20 GB) is not significant. On my systems, I have just left the two Dell partitions in place and created a number of other primary partitions for testing. Note there are some caveats described in the BootIt NG documentation if "Limit Primaries" is turned off.

For the following it is assumed that BootIt NG was already installed on the hard drive, e.g., in space at the end left by resizing the OS partition. If some subsequent Windows 7 installation or repair has replaced the hard drive's boot record so Windows 7 boots instead of BootIt NG, then BootIt NG will need to be reactivated by booting a BootIt NG CD and selecting "Reactivate BootIt NG".

  1. Reactivate BootIt NG if it was deactivated during a Windows 7 installation or repair.
  2. Boot into BootIt NG. Select Maintenance and then Boot Edit. A default menu item probably already exists (maybe named Windows 7 in Identity) with RECOVERY specified in Boot under Boot Details and the following partitions in this order under MBR Details:
    If such a menu item doesn't yet exist, create it. In either case, rename (or name) it DELL in Identity to keep things clear in the following. Make sure the RECOVERY partition is not marked with Hide.
  3. Boot into Windows 7, most of whose code is in the OS partition. To do this, reboot the PC and choose DELL from BootIt NG's Boot Menu. This will cause the RECOVERY partition to be booted, which will then pass control to the OS partition containing Windows 7. This roundabout path is because of the current location of the boot files and the way the BCD data is configured in the boot files in the RECOVERY partition.
  4. Assign a drive letter to the RECOVERY partition. In the following "R" is used, but you can use any free letter. Also, in the following "C" is used for the OS partition. Be sure to adjust the command steps below if any other drive letters are used for these two partitions. Use Disk Management to assign a drive letter to the RECOVERY partition:
    1. Click the Start button.
    2. Right-click on Computer.
    3. Click on Manage in the pop-up menu. Computer Management will open.
    4. Click on Disk Management in the tree on the left side.
    5. Right-click on the RECOVERY partition and select "Change Drive Letter and Paths..." from the pop-up menu.
    6. Click the Add button.
    7. An available drive letter will be selected automatically. You can keep it or select a different one. In this example, R: will be assigned to the RECOVERY partition. When finished, click the OK button and then close Computer Management. If an AutoPlay popup appears, you can close it.
  5. The boot files attributes are Hidden and System. By default Windows does not show such files. To make them visible, do the following:
    1. Click the Start button.
    2. Right-click on Computer and then select Open.
    3. Click Tools, then Folder Options, then View. To see Tools, you may first need to press Alt to make the menu bar appear.
    4. Under "Hidden files and folders" select "Show hidden files, folders, and drives".
    5. Uncheck "Hide protected operating system files" and say Yes to the prompt.
    6. Select OK for Folder Options and close the Computer folder.
  6. Start an Administrator mode Command Prompt. To do this, click on the Start button, then All Programs, then Accessories. Right-click on the Command Prompt item and select "Run as administrator" from the pop-up menu. If a UAC prompt is displayed, click the Yes button.
  7. Unload the BCD registry hive by running the following command:
    reg unload HKLM\BCD00000000
    If you get a "The parameter is incorrect" message, the hive was probably already unloaded. You can use REGEDIT to verify this key is not present.
  8. Copy the bootmgr file from the RECOVERY partition to the OS (Windows 7) partition. Make sure to use the drive letters as assigned on your computer. Run the following command:
    robocopy r:\ c:\ bootmgr
  9. Copy the Boot folder from the RECOVERY partition to the OS partition. Run the following command:
    robocopy r:\Boot c:\Boot /s
  10. The boot files have now been copied. If you wish to verify that they were copied correctly, run the following command (make sure to use the drive letter of the OS partition):
    dir c:\ /ah
    If the bootmgr file and the Boot folder show up in the list, the procedure was successful.
  11. You can now rehide the hidden and system files by reversing what you did in Step 5 above.
  12. You can also now explicity remove the drive letter (R:) from RECOVERY by reversing what you did in Step 4 above (use Remove instead of Add). However this isn't necessary if the RECOVERY partition will not be included in the menu item you will eventually use to boot Windows 7, which is usually the case, or if the RECOVERY partition is marked as hidden in that menu item.

The next step is to use BootIt NG to modify the BCD file settings in the boot files you just copied to the OS partition. In the standard Dell installation, only Windows 7 is specified in the BCD Menu section, so no change is needed there. (That is, in the BCD Menu section, for the Windows 7 item, the Device and OS Device properties should already specify the OS partition.) However the BCD Boot section must be updated as follows to point to the OS partition instead of to the RECOVERY partition.

  1. Reboot to BootIt NG.
  2. Select Maintenance and then Boot Edit. Use Add to create a boot menu item (let's call it WIN7 in Identity) with the OS partition specified for Boot under Boot Details and OS as the only partition specified under MBR Details. Click OK twice to get back to the BootIt NG Maintenance window.

    Note that after this procedure has been completed and everything is working as expected, you can rename the WIN7 menu item and OS partition as you desire, add more partitions to be seen by Windows 7 under this menu item, and do all the other BootIT NG tailoring you normally do. That's not needed now.
  3. Go into Partition Work and select the OS partition. For BIBM, click the BCD Edit button. For BING, first click the Properties button, or simply double-click the partition, and then click the BCD Edit button).
  4. Select the Boot radio button on the left side of the BCD Edit window. An entry titled Windows Boot Manager should appear in the Items list.
  5. Select the Windows Boot Manager item and then click the Edit button (or double-click the Windows Boot Manager item). The properties of the Windows Boot Manager item will appear in a new window.
  6. Select the Device entry from the list of Properties and then click the Edit button (or double-click the Device entry). The Edit window appears.
  7. Generally, you should have {boot} selected in the upper Type drop-down list. In this case, the lower Type drop-down list will be unused and inaccessible. However, you may use the upper Type drop-down list to select the hard drive number on which the BCD file resides (i.e. the hard drive where the file bootmgr can be found).
  8. If you do have a specific hard drive selected in the upper Type drop-down list, you must also select the partition on which the BCD file resides for the lower Type drop-down list. (I had to do this step on my system.) In this case, specify the OS partition, i.e., the partition containing the BCD you are now modifying.
  9. Click OK in the Edit window. You will be returned to the window showing the properties of the Windows Boot Manager item (or Windows Memeory Diagnostic item when editing that item). Click Close to return to the BCD Edit window.
  10. Repeat Steps 5 - 9 for the Windows Memory Diagnostic item (i.e. in Step 5, select the Windows Memory Diagnostic item).
  11. When done, click Close on the BCD Edit window, then (only for BING, not BIBM) click OK in the partition Properties window. Click Close on the Work with Partitions window to return to the BootIt NG Maintenance window.

At this point the Windows 7 boot files have been copied to the OS (Windows 7) partition; the BCD there has been reconfigured to point to the OS partition; and a WIN7 BootIt NG boot menu item has been set up to boot the OS partition. (The DELL menu item is no longer needed and can be deleted now or later.) Now click on Resume in the Maintenance window and select the WIN7 menu entry to be sure Windows 7 boots as expected. If that works, you can now boot BootIt NG and do any tailoring you want, e.g., renaming menu items and partitions. What I do is described below.

I have chosen to keep the DELLUTILITY and RECOVERY partitions. I turned off "Limit Primaries" so there can be more than four primary partitions. I renamed the OS partition to WIN7 and resized it to be much smaller than what Dell had set up. I then added TEST1 and TEST2 partitions, each with exactly the same size as WIN7, so BootIt NG Copy can be done between all three partitions. I also added a DATA extended partition, split into several logical volumes. The following three boot menu items allow each partition to be booted and have access to the DATA partition:

         Menu Details
         ---- -------
            Identity  WIN7          TEST1           TEST2
                  HD  0             0               0
                Boot  WIN7          TEST1           TEST2

         Boot Details
         ---- -------
                  0)  WIN7          TEST1           TEST2
                  1)  DATA          DATA            DATA

The DELLUTILITY and RECOVERY partitions are probably still reachable via Dell-specific keystrokes during boot. I usually don't try to access them via BootIt NG facilities, so I have deleted the DELL menu item. If necessary, you can always create a boot menu item to access the desired partition.