Windows' built-in System Restore tool can fix most computer problems. However, very often problems have to be solved manually, for example, when the operating system does not boot. In these cases, you can use a utility called Bootrec.exe. It can help you troubleshoot and fix data such as the master boot record (MBR), boot sector, or boot configuration file (BCD).

Whether you're using Windows 7 or Windows 8.1, if your operating system won't boot and Startup Repair isn't able to fix the problem, you might want to try Bootrec.exe.

This tool is operated via the command line. However, since you have problems loading the operating system, it is obvious that you will not be able to run Bootrec.exe directly on Windows.

If you have Windows 7, then you will need to boot using the installation media or system repair disc.

To boot from a DVD or USB drive, the device must be the first device in the partition « FirstBootDevice" in BIOS. Depending on the motherboard manufacturer and BIOS version, this section may have a slightly different name.

If the boot process from the installation disk was successful, select your preferred language and click “Next”. In the next window, click on the “System Restore” link.

Then select the operating system you want to restore. This is an important step when you have multiple operating systems installed, but only one is damaged. Click Next to continue.

In the window that opens, you will see all the system recovery options, but in this case we are only interested in the command line.

If you don't have a Windows 7 installation disk or a system repair disk, you can access system recovery options by using the hidden recovery partition that Windows 7 automatically creates when you install the operating system. To learn how to do this, see the section “How to run System Restore using Advanced Boot Options in Windows 7.”

If you are using Windows 8 or Windows 8.1, follow the steps described in the third, fourth or fifth sections of this guide: . Depending on the method you choose to boot your system, you can launch Command Prompt from either Advanced Options or the Safe Mode interface.

Now that Command Prompt is running, type the command and press Enter to see all the options that are available for this tool. As the screenshot below suggests, there are four parameters in total: /FixMbr, /FixBoot, /ScanOs And /RebuildBcd.

Later in this article, I'll discuss how each of these options can help you solve boot problems. Bootrec.exe can help resolve most problems, however it does not guarantee success in all scenarios, so keep that in mind.

How to recover Master Boot Record (MBR)

The first parameter of Bootrec.exe is /FixMbr. It allows you to recover a damaged Master Boot Record (MBR). The Master Boot Record is the first sector of the disk, and it tells the BIOS where to look for the operating system on the computer.

In general, you should use this option when you encounter one of these error messages: “Operating System not found”, “Error loading operating system”, “Missing operating system” or “Invalid partition table”.

To start the MBR recovery process, run the command bootrec.exe /fixmbr.

How to write a new boot sector

The /FixBoot parameter writes a new boot sector to the system partition. The tool will use a boot sector that is compatible with your version of Windows. Using this option can help in the following situations:

  • the boot sector has been replaced by a non-standard boot sector for Windows Vista, 7, 8 or 8.1;
  • boot sector is damaged;
  • After installing your operating system, an earlier version of Windows was installed.

To write a new boot sector, use the command bootrec.exe /fixboot.

How to Recover Boot Configuration Data (BCD)

Boot Configuration Data (BCD) contains a detailed list of what should be loaded when the system starts. Microsoft points out that the boot failure can also be caused by missing or corrupt files in the BCD. The /rebuildbcd option can be very useful when you need to fix errors by completely rebuilding the BCD.

To completely restore Boot Configuration Data, run the following command: bootrec.exe /rebuildbcd.

How to Add Missing Windows Installations to Boot Configuration Data

If you have multiple operating systems installed on your computer, but not all of them are available, use the /ScanOS option (command bootrec.exe /scanos) to have bootrec.exe scan all drives for any installed versions of Windows that are not included in the boot configuration data (BCD).

In the screenshot below you can see what this scanning process looks like.

If the bootrec.exe /scanos command returns results, you can continue the recovery process to return the "lost" Windows installation back to the safe BCD table, making it bootable again.

First, you should clear the Master Boot Record (MBR) using bootrec/fixmbr. Then enter bootsect.exe /nt60 all /force and press Enter. Parameter /nt60 uses a basic boot code that is compatible with BOOTMGR. Parameter /all Updates the main boot code on all partitions. The /force option forces the volume(s) to dismount while the boot code is being updated.

By running all these commands, you will create a new master boot record (MBR) that will use the correct Windows boot loader to launch that particular operating system from your drive.

If you have any questions, feel free to leave a comment.

Have a great day!

For many years, Microsoft has been improving the recovery system for the Windows operating system, and in Windows 7 and Windows Vista it works almost automatically. If you boot from the Windows 7 installation disc and click " System Restore" ("Repair Computer"), the Windows recovery system will launch and will independently try to fix all the errors that it finds. It can fix a large number of problems, however, it is quite likely that the bootloader is damaged, and the recovery system cannot cope with this problem. In this case You can restore the bootloader manually using the Bootrec.exe utility.

The Bootrec.exe application is used to fix errors associated with bootloader corruption and, as a result, the inability to start the Windows 7 and Windows Vista operating systems.

Sequencing

Description of keys for launching the Bootrec.exe utility

Bootrec.exe /FixMbr

Launched with the /FixMbr switch, the utility writes a Windows 7 and Windows Vista-compatible Master Boot Record (MBR) to the system partition. Use this option to resolve problems with the master boot record being corrupted, or if you wish to remove non-standard code from it. In this case, the existing partition table is not overwritten.

Bootrec.exe /FixBoot

Launched with the /FixBoot key, the utility writes a new boot sector compatible with Windows 7 and Windows Vista to the system partition. This option should be used in the following cases:

  1. The Windows Vista or Windows 7 boot sector has been replaced with a non-standard boot sector.
  2. The boot sector is damaged.
  3. A previous version of the Windows operating system was installed after installing Windows Vista or Windows 7. For example, if Windows XP was installed, NTLDR (Windows NT Loader, Windows NT loader) will be used, the code of the standard NT 6 loader (Bootmgr) will be overwritten by the Windows XP installer .

It should be noted that a similar effect can be achieved using the bootsect.exe utility, also located on the Windows 7 bootable media. To do this, you need to run bootsect.exe with the following parameters:

Bootsect /NT60 SYS

The boot sector of the system partition will be overwritten with BOOTMGR compatible code. You can learn more about using the bootsect.exe utility by running it with the parameter /help.

Bootrec.exe /ScanOs

Launched with the /ScanOs key, the utility scans all disks for installed Windows Vista and Windows 7 operating systems. In addition, when used, it displays a list of found systems that are not currently registered in the Windows boot configuration data store (Boot Configuration Data (BCD) )Store).

Bootrec.exe /RebuildBcd

Launched with this key, the utility scans all disks for the presence of installed Windows Vista or Windows 7 operating systems. Found operating systems are displayed in a list from which they can be added to the Windows boot configuration data store (Boot Configuration Data Store). Also use this option if you want to completely rebuild the boot configuration data store. Before doing this, you must delete the previous storage. The set of commands could be as follows:

Bcdedit /export C:\BCDcfg.bak attrib -s -h -r c:\boot\bcd del c:\boot\bcd bootrec /RebuildBcd

The example above exports the current boot configuration store to C:\BCDcfg.bak, removes its system, hidden, and read-only attributes, removes it with DEL, and rebuilds it with bootrec /RebuildBcd.


Enlarge picture

Of course the utility Bootrec.exe is very functional, however, it will not help if, for example, the Windows boot loader file bootmgr damaged or physically missing. In this case, you can use another utility, also included in the Windows 7 distribution media - bcdboot.exe.

Recovering the boot environment using BCDboot.exe

BCDboot.exe is a tool that is used to create or restore a boot environment located on the active system partition. The utility can also be used to transfer download files.

The command line in this case might look like this:

Bcdboot.exe e:\windows

Replace e:\windows with the path that matches your system.
This operation will repair the corrupted Windows boot environment, including the boot configuration data (BCD) store files, including the bootmgr file mentioned above.

Syntax of bcdboot command line parameters

The bcdboot.exe utility uses the following command line parameters:

BCDBOOT source ]

source

Specifies the location of the Windows directory used as the source when copying boot environment files.

Optional parameter. Sets the boot environment language. The default is English (US).

Optional parameter. Specifies the drive letter of the system partition where the boot environment files will be installed. By default, the system partition specified by the BIOS firmware is used.

Optional parameter. Enables detailed logging mode of the utility operation.

Optional parameter. Combines the parameters of the newly created and existing boot storage record and writes them to the new boot record. If an operating system boot loader GUID is specified, combines the boot loader object with the system template to create a boot entry.

Summary

The article discussed the principles of working with the bootrec.exe and bcdboot.exe utilities, which are used to resolve problems associated with the inability to start the Windows 7 operating system due to a damaged or missing bootloader.

Need good advice on how to produceWindows 7 Boot Loader Recovery, if restoring the startup using the 7 installation disk did not help. I’ll briefly explain what’s going on: Windows 7 was first installed on the computer, then the second system needed Windows XP, after installation it naturally started alone, to boot two operating systems I used the EasyBCD program. Later, XP was no longer needed and I formatted the partition on which it was located from Windows 7. Now, when loading, there is nothing except a black screen. What can be done in this case? More details if possible. Sergey.

Restoring the Windows 7 bootloader

Hello friends! The most important thing is not to worry, your problem is not complicated and, in principle, the simple “Windows 7 Startup Recovery” tool described in our article should help, but! If this article does not help you, then two others should help:

These articles describe several more good ways to restore the boot of your operating system, besides them there is one more, so try it and don’t just give up.

Let me remind you that you cannot install an older operating system after a younger one; Windows 7 will under no circumstances boot after installing Windows XP on a computer, since the latter overwrites the master boot record (MBR) during installation. Therefore, you installed an additional boot manager, which is used to configure the boot of several operating systems and, in turn, has its own bootloader.

  1. I also want to say that file system errors are often to blame for unsuccessful loading of Windows 7; they can be corrected even if the operating system does not boot; all the details are in our other article." "
  2. Friends, in this article we will work with the Windows 7 recovery environment, or more precisely with the recovery environment command line. I will give you the necessary commands, but if it is difficult for you to remember them, you can. This will make your work much easier.
  • The master boot record (MBR) is the first sector on the hard drive, which contains a partition table and a small bootloader program that reads from this table the data from which partition of the hard drive to boot the OS, and then the information is transferred to the partition with the installed operating system, to download it. If the master boot record contains incorrect information about the location of the system, then we will receive various errors during boot, here is one of them “BOOTMGR is missing press CTR-Alt-Del for restart” or we will see a black screen. The problem is being fixed restoring the Windows 7 boot loader.

When you uninstalled old XP along with EasyBCD, you left your computer to the mercy of fate with an incomprehensible boot record, and it gives you a black screen as a sign of gratitude. To rectify the situation, we will carry out boot recovery Windows 7, namely, we will overwrite the master boot record using the Bootrec.exe utility located on the recovery disk or on the Windows 7 installation disk (friends, if you have a netbook and you want to use the recovery environment located on a flash drive, then read the comments first). We will also use this utility to record a new boot sector, understandable to Windows 7.

Recovering Windows 7 bootloader automatically

We boot from a recovery disk or installation disk with Windows 7, in the initial phase of booting the computer, when prompted to boot from the disk “Press any key to boot from CD...”, press any key on the keyboard for 5 seconds, otherwise you will not boot from the disk

There is a short search for installed Windows systems and analysis of problems that prevent them from loading

Usually problems are quickly found and the recovery environment offers to fix them automatically. Click on the "Fix and restart" button, after which the computer will restart and boot Windows 7 will be restored.

If problems with loading the system continue or you are not prompted to fix the problems automatically, then in this window you need to select the operating system that you need to restore, you most likely have one and Next.

First of all, choose a productStartup recovery, it can also solve Windows 7 boot problems

Restoring the Windows 7 bootloader manually

If this remedy does not help, choose a remedy Command line

Enter the commands:

diskpart

lis vol (we display a list of hard drive partitions and see that “Volume 1” is a hidden System Reserved partition, volume 100 MB, it should contain Windows 7 boot files and it is this that needs to be made active). We also see a partition with Windows 7 installed, it has the letter D:, the volume is 60 GB.

sel vol 1 (select Volume 1)

activ (make it active)

exit (exit diskpart)

bcdboot D:\Windows (where D: the partition with Windows 7 installed), this command restores the Windows 7 boot files (bootmgr file and boot storage configuration files (BCD))!

"Download files created successfully"

Restoring the Windows 7 bootloader manually (method No. 2)

In the command line window, enter the command Bootrec and Enter

full information about the capabilities of the utility is displayed. Select the master boot record entry Bootrec.exe /FixMbr.

The operation was completed successfully. A new boot record is written to the first sector of the boot partition.
The second command, Bootrec.exe /FixBoot, writes a new boot sector.

The operation was completed successfully. Exit. Next, we try to load our Windows 7.


Friends, if the Bootrec.exe /FixMbr and Bootrec.exe /Fixboot commands do not help you, do not despair, there is another remedy.

Method No. 3

Enter the command Bootrec/ScanOs, it will scan all your hard drives and partitions for the presence of operating systems and if any are found, an appropriate warning will be issued. Then you need to enter the command Bootrec.exe /RebuildBcd, this utility will offer to add the found Windows to the boot menu, we agree and enter Y and press Enter, all the found Windows are added to the boot menu.

In my case, two operating systems were found. Everything can be seen on the screenshot.

In addition to the above method, there is another one, enter bootsect /NT60 SYS on the command line, the main boot code, it will also be updated.

Hi all! Today I will talk about a fairly common problem with operating systems of the Windows Vista/7/8/8.1/10 family - violation of the integrity of the MBR boot loader. No matter how hard Microsoft tries to take into account possible problems in the operation of its software, it is probably impossible to foresee everything at the development and testing stage. Various third-party loaders (activators, other versions of operating systems, viruses) add problems to stability.

What is needed to restore the bootloader.

  1. Windows Vista/7/8/8.1/10 installation media.
  2. User.
  3. DVD drive.

Let's get started!

The easiest way to restore the bootloader. To use the Startup Repair tool, you must first start the Windows RE recovery environment.

For this:

  • Set the BIOS to boot from installation media.
  • Select an item System Restore.

  • Further.
  • In the dialog box, select Startup recovery.

  • Follow further instructions.

After the Startup Repair tool completes, restart your computer. Try starting Windows normally, without installation media.

If the problem persists, let's proceed with further actions.

Now we will look at restoring the MBR boot record using standard operating system tools. Which come either as part of the installation disk or as a component of the operating system. Namely BOOTREC.EXE And BOOTSECT.

BOOTREC.EXE- boot record recovery tool. Supports the following options, from which you can choose the one that suits you best.

This option writes a master boot record compatible with Windows 7 or Windows Vista to the system partition. It does not overwrite the existing partition table. This option should be used to troubleshoot problems with MBR corruption or if you need to remove non-standard code from the MBR.

/FixBoot

This option writes a new boot sector to the system partition using a boot sector that is compatible with Windows Vista or Windows 7. This option should be used if at least one of the following conditions is true.

  • The boot sector has been replaced with the non-standard Windows Vista or Windows 7 boot sector.
  • The boot sector is damaged.
  • After you installed Windows Vista or Windows 7, you installed an earlier version of the Windows operating system on your computer. In this case, the Windows NT Boot Loader (NTLDR) is used instead of Windows Boot Manager (Bootmgr.exe) to start the computer.

This option searches all drives for installed systems that are compatible with Windows Vista or Windows 7. It also displays any entries not included in the boot configuration data store. Use this option if your computer has Windows Vista or Windows 7 installed and does not appear in the boot manager menu.

/RebuildBcd

This option searches all drives for installed systems that are compatible with Windows Vista or Windows 7. It also allows you to select the installed systems that you want to add to the boot configuration data store. This option should be used if you need to completely rebuild the boot configuration data store.

Let's get started!

To use the Bootrec.exe tool, you must first start the Windows RE recovery environment.

  • Insert the Windows 7 or Windows Vista installation disc into your DVD drive and turn on your computer.
  • When prompted, press the key.
  • Select an item Restore your computer.
  • Specify the operating system you want to restore and click Further.
  • In the dialog box System Recovery Options select item Command line.
  • Type Bootrec.exe and press ENTER. A complete list of options will appear.
  • Write down the MBR sector, what is the command for?

Bootrec.exe /FixMbr;

  • After pressing Enter, the computer will notify the user about the successful completion of the operation in the next line;
  • Next, carry out the procedure for recording a new boot sector by entering

Bootrec.exe /FixBoot;

  • All that remains is to enter Exit and try to restart the computer.

If not, we will describe how to restore the Windows bootloader in another way using the same program:

  • Enter the command line from the installation disk or flash drive.
  • Enter Bootrec /ScanOs, after which the utility will scan your computer for the presence of an operating system.

Bootrec/ScanOs

  • Write the command Bootrec.exe /RebuildBcd in the next line, the program will offer to add all found versions of Windows, including XP and others, to the start menu.

Bootrec.exe /RebuildBcd

  • All you have to do is agree with this by pressing Y and Enter in sequence, after which when loading the system you will have a choice of which OS to load - XP or Seven.

If that didn't help either. You can also fix the problem with the MBR with one more command. To do this, on the command line you need to enter bootsect /NT60 SYS, then Enter.

Team BOOTSECT allows you to write the specified program code of boot sectors that provide loading or ntldr, or bootmgr .

Command line format:
bootsect (/help|/nt60|/nt52) (SYS|ALL|< DriveLetter >:}

Bootsect command line options:
/help— display of help information;
/nt52— recording the boot sector code that enables the use of the ntldr bootloader for operating systems prior to Windows Vista.
/nt60- writing program code to boot sectors to ensure loading of the bootmgr file - the boot manager of Windows Vista/Server 2008 and later operating systems of the Windows family.
SYS— the recording will be performed in the sectors of the Windows system boot partition in the environment in which this command is executed.
ALL— program code will be written for all existing partitions that can be used to boot Windows.
DriveLetter— drive letter for which the program code of boot sectors will be rewritten.
/force— forced disabling of disk volumes used by other programs to ensure exclusive access for the bootsect.exe utility
/mbr- changing the program code of the master boot record (MBR - Master Boot Record) without changing the disk partition table. When used with the /nt52 parameter, the MBR will be compatible with previous versions of Windows Vista. When used with the /nt60 parameter, the MBR will be compatible with Windows Vista and later operating systems.

bootsect /nt52 E:— create for drive E: boot records for Windows XP/2000/NT operating systems, i.e. for booting based on ntldr;
bootsect /nt60 /mbr C:— change the boot sectors of drive C: to ensure that the bootmgr manager loads, and this is Windows Vista/7/8/8.1/10;
bootsect /nt60 SYS— changing boot sectors for the partition from which the current Windows OS was loaded.

Let's also try using the command BCDBOOT. This is a tool that is used to create a system partition or restore the boot environment located on a system partition. The system partition is created by copying a small set of boot environment files from an installed Windows® image. Means BCDBOOT creates a boot configuration data store ( BCD) on the system partition with a new boot entry that allows you to boot the installed Windows image.

Each Windows operating system on a personal computer has special tools that are responsible for an action or operation. But there is a tool with which you can change errors and problems, as well as restore Windows from the command line.
If loading the OS fails, you need to use the Bootrec.exe utility.

With its help, computer problems are resolved, data is corrected, including Windows downloads or download configuration files.

Bootrec.exe - help with fixing Windows boot

If you have problems starting your computer and find problems with it, you should use the method for fixing Windows boot errors. It doesn’t matter which Windows is installed, the problem must be solved so that you can continue to perform the tasks assigned to you.

When working with a tool like Butrek.exe, they use commands for, but if a problematic situation arose in the OS itself, the tool must be launched inside it.

If this happened in Windows 7, you will need installation media or a disk that is capable of restoring the boot sector of the hard drive. You can boot from USB or DVD disks, it depends on the OS version.

Fig.1. When you see such a picture on the monitor, click on the highlighted function

Then you need to decide on the choice of operating system that needs to be updated. This is a serious task, since among many systems there is only one that requires fixing. To continue, click the “Next” button.

Fig.2. A new window will open with recovery properties, but only the boot command line is needed here

If you do not have a disk for installation on Windows 7 or a disk responsible for restoring the boot sector, you will need access to tools. They are using recovery hidden partitions. Windows 7 will be able to set them automatically when the OS is installed.

Follow a specific sequence: you need access to Recovery Systems, Diagnostics, Advanced Options and Command Line

Writing new boot sectors

The bootrec function with the /FixBoot parameter will make it possible to write to the boot sector inside the system partition on hard drives. When performing this procedure, you need to use boot partitions, but only those that are compatible with Windows OS versions 7 and 8.

The following parameters can be used:

  • If there is damage on the boot sectors, and their structure and size do not meet the requirements of the hard drive.
  • When recording boot sectors that are not compatible with the Windows system.
  • When the old Windows OS was installed in place of the new version.
In order to write a new boot sector, you need to run bootrec.exe as in the picture