Repair Windows 7/Vista Startup Issues With BootRec.exe [Tutorial]


Uploaded by JAGTutorials on 24.07.2012

Transcript:
What is the Bootrec.exe tool? Bootrec.exe is a tool provided with Windows
7 as part of the “Windows Recovery Environment (Windows RE).
It is used to troubleshoot and repair problems that are preventing Windows from starting,
that are related to the “Master Boot Record (MBR)”, “Boot Sector”, or the “Boot
Configuration Data (BCD) Store”. The Bootrec.exe tool is also provided as part
of Windows Vista. For the purpose of this tutorial I will be
using Virtualbox to run a Windows 7 virtual machine so that I can record the process.
To be able to follow along with this tutorial you will need a copy of the Windows installation
media. Many times new computers will come with Windows
recovery disks. If your computer didn’t come with it, or
you don’t have it anymore, your best bet is to download a copy of it using a torrent
program. I will place a link on screen to another tutorial
showing how to download, install, and use uTorrent to download a torrent.
You can then burn the ISO file of Windows you downloaded directly to a CD/DVD. You also
have the option to create a bootable USB thumb drive with the Windows installation media
on it. I will place a link on screen to another tutorial showing how to create a bootable
USB thumb drive from the Windows ISO you downloaded. Let’s boot to our Windows installation disk
and repair our startup problems. Place the Windows CD/DVD or USB drive into
the system that you want to repair. If your system is set to boot to your CD/DVD/USB
drive with the Windows installation files on it, you will see a message as soon as you
start the computer that says “Press any key to boot from CD or DVD...”.
Let’s turn on the computer and if we see this message, we’ll press any key to boot
to the device. If when you turned on the computer you didn’t
see the message to press any key, then you need to set your boot device order.
You will need to select the CD/DVD or USB drive, as the default boot device for your
system to boot to it. This is done through the computer’s BIOS.
When you first turn the computer on, if you look at the bottom of the screen, it will
tell you what button to push. This is the black screen that you see before Windows loads,
the first 10 seconds or so after you push the power button. You typically enter the
BIOS by pressing “F1”, “F2”, or “Del” as soon as the computers turned on.
You then need to find the boot order and change it so that the Windows installation disc or
device is the first boot device. We now need to open the “System Recovery
Options” to run Bootrec.exe or other recovery tools from the Windows installation media.
On the “Install Windows” screen, select the appropriate “Language”, “Time/Currency
Format”, and “Keyboard Type”, and then click the “Next” button.
Instead of pressing the “Install now” button to install a new copy of Windows, we
will repair our existing installation of Windows using the “Recovery Console”, by clicking
the “Repair your computer” link. It will automatically search for existing
Windows installations, and then display them in the “System Recovery Options” window.
If you have more than one listed, make sure that you select the Windows 7 installation
you currently use, or wish to repair. You may get a message stating that “Windows
found problems with your computer’s startup options”, and asking “Do you want to apply
repairs and restart your computer”. If you see this message it is best to click
the “Repair and restart” button, and then come back to this point.
Leave the top option selected to “Use recovery tools...”, and then click the “Next”
button. On the “Choose a recovery tool” screen,
we would select “Command Prompt” to use the Bootrec.exe tool. In many cases Windows
can automatically repair most common errors preventing Windows from starting using the
“Startup Repair” option at the top. Let’s let Windows try to fix the problem
automatically for us. Click the “Startup Repair” link.
“Startup Repair” will attempt to correct whatever issue is preventing the system from
starting, In this case as we can see it says it did not detect a problem.
If it did correct any issues you would be prompted to restart the computer.
Click the “Finish” button. If it did find a problem that it said it fixed,
you could remove the CD/DVD or USB from the system and attempt to start the computer normally.
If the computer still does not start correctly, place the CD/DVD/USB back in your computer
and start the system again back to this point. If the automated startup repair option did
not fix the computer problem we’re going to now need to use the BOOTREC.EXE utility
from the command prompt. Click the “Command Prompt” link.
If your Master Boot Record (MBR) is corrupted or missing, you may be getting an error at
startup stating that “BOOTMGR is missing”. The MBR is first sector of your drive that
tells your computer where to find the operating system startup files, which in this case is
Windows 7. If you are having MBR corruption issues we
will need to use the Bootrec command, with the “FixMbr” switch.
At the command prompt, type in “bootrec /FixMbr”, and press enter. It doesn’t
matter if you use all uppercase or all lowercase letters.
You will get a message stating that “The operation completed successfully”, if everything
went well. You can try to boot the computer normally
now if you wish, but I usually run it together with the next command.
If the boot sector becomes damaged on your system you will want to write a new boot sector
compatible with Windows 7. In many cases you can end up with a corrupted boot sector by
installing another Operating System(OS) after Windows 7, such as installing a dual boot
with Linux. If you have boot sector issues we will need
to use the Bootrec command, with the “Fixboot” switch.
At the command prompt, type in “bootrec /fixboot”, and press enter.
Again we’ll get another message stating that “The operation completed successfully”,
if everything went well. We can now shutdown the computer again, remove
the CD/DVD/USB, and try to start the computer normally and see if it boots.
If this does not resolve the boot problems, continue on to rebuilding the BCD.
If you start Windows 7 to the error message stating "The Windows Boot Configuration Data
file is missing required information", or you have other issues with the Windows Boot
Configuration Data (BCD), or just the system will continually not boot, the best option
is to manually rebuild the BCD. The BCD contains detailed information about
what Windows is supposed to load when the computer starts up.
According to Microsoft many boot errors can be caused by missing or damaged files in the
BCD, which could be the result of viruses or spyware causing issues.
We will now attempt to repair issues with the BCD by completely rebuilding it manually.
We need to enter the following commands. After each command is entered, make sure that it
says “The operation completed successfully”. We need to first backup our existing BCD,
just in case we need it later. Type in “bcdedit /export C:\BCD_Backup”,
and then
press enter. Let’s change to the drive with our Windows
installation on it, which is usually the “C:” drive.
Type in “C:”, and then press enter. We can now see that we’ve changed to the
“C:” drive from the “X:” drive we were on previously.
We now need to change into the “boot” directory.
Type in “cd boot”, and press enter. Currently the attributes of the BCD file are
set so that we cannot change it. To be able to rebuild the BCD we need to remove the “System
file”, “Hidden file”, and “Read-only file” attributes.
Type in “attrib bcd -s -h -r”, and press enter.
With the attributes successfully changed, we’re going to rename the file to back it
up. Type in “ren c:\boot\bcd bcd_backup.old”,
and press enter. We are now going to rebuild the BCD from scratch
with the “RebuildBCD” switch on our BOOTREC command.
Type in “bootrec /RebuildBcd”, and press enter.
It will then scan for Windows installations, and display any that it finds.
We can see that it found one Windows installation here, and ask if you’d like to “Add installation
to boot list?”. Type in a “Y”, at the prompt, and press
enter. If all went well you should see the message
stating “The operation completed successfully”. Now click the “X” to close out the command
prompt window. Remove the CD/DVD/USB from your computer,
and click the “Restart” button. Hopefully now this should have fixed any startup
problems that you had with your system. You should now have a Windows 7 computer that
starts up properly if the issue is related to problems that the Bootrec command was intended
to address.