Microsoft calls the Command Prompt in the System Recovery Options “the Windows Recovery Environment (Windows RE)”. In this article we call it what it is, a command prompt.

If you need instructions on starting the recovery tools there is a step by step guide here. Once the System Recovery Options menu is displayed click Command Prompt:

Click to enlarge...

In this article you will be using a tool called Bootrec.exe to repair A) a corrupt master boot record (MBR), B) a damaged boot sector or C) Windows 7′s Boot Configuration Data (BCD) store.

The simplest way to try and fix your startup problem is to issue these three commands in succession:

bootrec /fixmbr
bootrec /fixboot
bootrec /rebuildbcd

Type the first command then press enter; wait until the process completes before moving onto the next command:

Click to enlarge...

At this point your OS should boot normally. If it doesn’t then you will have to backup the BCD store and rebuild it from scratch. Enter these commands, one after the other, to backup and rebuild the BCD:

c:
bcdedit /export backup_bcd
cd boot
attrib bcd -s -h -r
ren bcd bcd.bad
bootrec /rebuildbcd

Click to enlarge...

Exit the command prompt, remove any startup DVD and reboot the machine.

Additional Information on BCDEDIT

From the BCDEDIT help text.

BCDEDIT - Boot Configuration Data Store Editor

The Bcdedit.exe command-line tool modifies the boot configuration data store.
The boot configuration data store contains boot configuration parameters and
controls how the operating system is booted. These parameters were previously
in the Boot.ini file (in BIOS-based operating systems) or in the nonvolatile
RAM entries (in Extensible Firmware Interface-based operating systems). You can
use Bcdedit.exe to add, delete, edit, and append entries in the boot
configuration data store.

For detailed command and option information, type bcdedit.exe /? <command>. For
example, to display detailed information about the /createstore command, type:

bcdedit.exe /? /createstore

For an alphabetical list of topics in this help file, run "bcdedit /? TOPICS".

Commands that operate on a store
================================
/createstore    Creates a new and empty boot configuration data store.
/export         Exports the contents of the system store to a file. This file
                can be used later to restore the state of the system store.
/import         Restores the state of the system store using a backup file
                created with the /export command.
/sysstore       Sets the system store device (only affects EFI systems, does
                not persist across reboots, and is only used in cases where
                the system store device is ambiguous).

Commands that operate on entries in a store
===========================================
/copy           Makes copies of entries in the store.
/create         Creates new entries in the store.
/delete         Deletes entries from the store.
/mirror         Creates mirror of entries in the store.

Run bcdedit /? ID for information about identifiers used by these commands.

Commands that operate on entry options
======================================
/deletevalue    Deletes entry options from the store.
/set            Sets entry option values in the store.

Run bcdedit /? TYPES for a list of datatypes used by these commands.
Run bcdedit /? FORMATS for a list of valid data formats.

Commands that control output
============================
/enum           Lists entries in the store.
/v              Command-line option that displays entry identifiers in full,
                rather than using names for well-known identifiers.

Use /v by itself as a command to display entry identifiers
in full for the ACTIVE type.

Running "bcdedit" by itself is equivalent to running "bcdedit /enum ACTIVE".

Commands that control the boot manager
======================================
/bootsequence   Sets the one-time boot sequence for the boot manager.
/default        Sets the default entry that the boot manager will use.
/displayorder   Sets the order in which the boot manager displays the
                multiboot menu.
/timeout        Sets the boot manager time-out value.

/toolsdisplayorder  Sets the order in which the boot manager displays
                    the tools menu.

Commands that control Emergency Management Services for a boot application
==========================================================================
/bootems        Enables or disables Emergency Management Services
                for a boot application.
/ems            Enables or disables Emergency Management Services for an
                operating system entry.
/emssettings    Sets the global Emergency Management Services parameters.

Command that control debugging
==============================
/bootdebug      Enables or disables boot debugging for a boot application.
/dbgsettings    Sets the global debugger parameters.
/debug          Enables or disables kernel debugging for an operating system
                entry.
/hypervisorsettings  Sets the hypervisor parameters.

One Response to “Advanced Startup Troubleshooting in Windows 7”

Leave a Reply

Please leave these two fields as-is: