How to restore the boot file of Windows 7. Recovery after an unsuccessful restart of the computer

What is a Windows bootloader? In simplest terms, this is a boot program. operating system  directly after turning on the computer. If we look at the evolution of Windows operating systems, then in Windows 2000 and Windows XP, Windows was NTLDR (NT Loader), which can load other operating systems by setting the appropriate boot sector in a separate file. But with the advent of new system  BIOS - EFI and UEFI - the old NTLDR no longer meets the requirements. Starting from Windows Vista and beyond, in Windows 7, Windows 8 and Windows 8.1, a new boot manager (boot manager) - BOOTMGR has been applied. His work is closely related to the Master Boot Record (MBR) or the Master Boot Sector (MBS). When you boot your computer, after checking the hardware, the BIOS reads from the boot hard drive  The first sector is 512 bytes of data. The MBR may occupy more than one sector, but this is not the case now. The MBR contains the primary boot loader code and the hard disk partition table.

In case of damage to the boot loader or boot record, your operating system - whether it is Windows 7, Windows 8 or Windows 8.1 - will issue here bOOTMGR error  is missing - press CTRL + ATL + DEL to restart.

In some cases, an error BOOTMGR is corrupt. The system cannot boot:

In this case, you will not be able to start the Windows operating system in normal mode.

Note:  First of all, before resorting to cardinal actions, check whether the loading sequence is probably just incorrectly set. hard drives, or the BIOS settings were simply reset to default (this happens when the CR2032 battery sits on motherboard). This is especially common on computers where 2 or more hard drives are installed. You just need to go into the computer BIOS and check which one is set to boot. To do this, when loading, when the primary hardware diagnostics are in progress (white letters on a black background) we press the Delete button several times. The BIOS screen should open. We are looking for the “Hard Disk Boot Priority” item in the BIOS sections or simply the “Boot Device Priorit” and select it:


Before you change something, you need to know which of the disks has the operating system installed on it. If you do not know, put each of the hard disks in turn first, press the F10 button to save and try to boot. The main thing is to remember which disk first stood first and, if the sequence change does not bring results, return everything as it was.

How to repair Windows bootloader.

There are two ways to recover: using standard tools  from Microsoft and using third-party programs. In the first version you will need boot disk  or flash drive with the original windows view  7 or Windows 8. A third-party build of Windows may not work, since on many builds everything starts right from the beginning of the installation of the operating system. In case of use by third-party programs, the Hiren’s Boot CD boot disk will suit you.

Recovery loader using Microsoft tools.

Method for Windows 8 and Windows 8.1

Step 1 . Restart the computer, when loading, press the Delete button and get into the BIOS. In the “Boot Device Priority” section, set the CDROM value in the case of a disk or USB in the case of using a bootable USB flash drive.


It is necessary to set the “1st Boot Device” parameter to “CDROM” (or USB-HDD for a flash drive). Press F10 to save the BIOS configuration. Reboot the computer.

Step 2. When booting from the disk, the Install Windows window should open:


At the bottom, select the item "System Restore."
  A hard drive check will be performed and a list of available operating systems will be displayed. Often there is one item in the list, and you should select it:


The "Select Action" window will open:


Click on the "Diagnostics" icon - the section menu will open:


Select the item "Advanced Options".

Step 3. Select the item "Automatic recovery":


Run system diagnostics. If any error is detected, you will be shown a message about it. Then you will need to click the Repair button and wait until the repair is completed and the computer is restarted.

Step 4  . If auto repair  didn’t reveal any problems with diagnostics or didn’t help and all the same, Windows 8 does not load at startup and the error “Bootmgr is Missing” appears, then boot from the disk again and in the “Additional parameters” section of the diagnostic select the “Command line” item:


The Windows 8 or Windows 8.1 command prompt opens.

Step 5  . In command windows prompt  8 enter the command:
bootrec.exe / FixMbr
  Press Enter.
The “/ FixMbr” key is used to write to the system partition the master boot record compatible with Windows 8 and Windows 8.1. This parameter does not overwrite the existing partition table.
  Then we enter the command:
bootrec.exe / FixBoot
  and press Enter again.
  The “/ FixBoot” key is used to write to the system partition of the new boot sector using the boot sector that is compatible with Windows 8 and Windows 8.1.


Restart the computer and check the boot of Windows 8.

Step 6. If after the reboot the error “BOOTMGR is missing - Press Ctrl + Alt + Del to restart” has not been eliminated - run the command line again, where we type the command
bootrec.exe / RebuildBcd
  Key " / RebuildBcd »  used to completely rebuild configuration data. The result of the program with this key will be scanning the hard disk for the presence of an operating windows systems  and a request to add it to the download list.


Click - Yes (Y) and restart the computer and check.

After the above operations are usually able to restore the boot loader Windows 8 and Windows 8.1. If these methods did not help, then you need to try to restore the download using third-party programs. And if they do not help, reinstall Windows 8, as probably nothing else will help.

Method for Windows 7.

Step 1 . Restart the computer, when loading, press the Delete button and get into the BIOS. In the “Boot Device Priority” section, set the “CDROM” value in the case of a disk or USB in the case of using a bootable USB flash drive.

It is necessary to set the “1st Boot Device” parameter to “CDROM” (or USB-HDD for a flash drive). Press F10 to save the configuration. Bios. Reboot the computer.

Step 2. When booting from disk, you will see the following start window. install windows 7:


Here you need to select "System Restore".
  After checking the hard drives, you will be shown a list of available operating systems:


As a rule, there is only one system in the list, although there are users who have 2, 3 or even more operating systems on the screw. But this is less common.
  Click the Next button and the System Recovery Options window opens.


Step 3. Select the item "Startup Recovery". The system will be diagnosed. If an error is found, you will see the message:


You will need to click the "Repair and restart" button.
  After that, the system should boot up in normal mode.

Step 4. If after rebooting, the normal boot of Windows 7 has not recovered or when diagnosing the system, no problems were found:


It is necessary in the window "Recovery Options" of the system select the item "Command Line":


Step 5. At the Windows command line, enter the bootrec.exe / FixMbr command and press Enter. Then enter the bootrec.exe / FixBoot command and press Enter. I already wrote about what the / FixMbr and / FixBoot keys mean above.


Reboot the computer and check.

Step 6. If, after restarting the computer, the work of the bootloader has not recovered and the error BOOTMGR is missing has not been eliminated - run the command line again and type the command:
bootrec.exe / RebuildBcd


Key " / RebuildBcd »  searches for installed operating systems compatible with Windows 7  and perform a complete rebuilding of the boot configuration data. The program will result in scanning the hard disk for the presence of the Windows operating system and a request to add it to the download list. Click - Yes (Y) and restart the computer.

Step 7  . If error windows boot  7 has not been eliminated, that is, one more, the way from Microsoft is the BCDBoot utility, which is used to create a system partition or restore the boot environment located in the system partition.
  At the command prompt, type the command:
bcdboot.exe c: \\ windows (If you have Windows installed on another disk, correct the path in the command, for example, to d: \\ windows).


The result will be the message "Boot file successfully created » . Reboot the computer and check.

Restore normal Windows boot using Hiren’s Boot CD.

Unfortunately, there is not always an original boot disk of Windows 7 or Windows 8 at hand, and downloading it from the Internet can be quite problematic. In this case, various small boot assemblies usually come to the rescue - the so-called liveCD, which can also be written to disk or USB flash drive. In my opinion, the most optimal, convenient and easy service set of programs for restoring the Windows 7 or Windows 8 operating system is the “Hiren’s Boot CD”. There are a lot of utilities for recovering the Windows bootloader on the disk, so I’ll show those used by system administrators most often: graphic program  Paragon Hard Disk Manager and console utility MBRfix.
  First you need to download “Hiren’s Boot CD”, burn it to a USB flash drive or CD-ROM and set the BIOS to boot from CDROM or USB-HDD, depending on whether you are booting from a disk or flash drive.
If everything is done correctly, you will see the start menu of the “Hiren’s Boot CD”:


Option 1. Paragon Hard Disk Manager.

To run Paragon Hard Disk Manager, you need to select the DOS Programs item or Run DOS Programs ( alternative method) ”, And then the subsection“ Disk Partition Tools ”and, accordingly, the item“ Paragon Hard Disk Manager ”.

Now, in the main window of the program, select the menu item “Wizards” =\u003e “Restore Windows Boot”:


The Restore Windows Boot menu opens:


Select the first item - "Search for installed copies of Windows" and click Next.


The program scans the drives and will give a list of operating systems, in which usually only one item. Put a tick "Change boot record" and click Next.


Paragon Hard Disk Manager will overwrite the boot record (MBR). Click Finish and restart the computer.

Option 2. Utility MBRFix.

To run the MBRFix utility, select the “Mini Windows XP” option in the Hiren’s Boot CD start menu. After the operating system is loaded, you need to click the "Start" button =\u003e "HBCD menu".

In the HBCD menu that opens, select the item “Partition / Boot / MBR” =\u003e “Commandline” =\u003e “MBRFix”:


To restore bootable windows records  (MBR)   and windows loaderon the C: \\ drive for Windows 7,command parameters should be as follows:
MBRFix.exe / drive 0 fixmbr / win7 / yes.
  To view information about the disk - you can enter the command:
MBRFix.exe / drive 0 driveinfo.
  On Windows 8 and Windows 8.1, I have not yet verified this utility, so I cannot recommend it.

Windows 8 boot loader recovery is an action that every user should know. After all, the operating system is quite vulnerable to viruses and other malwarewhich may disrupt its structure or damage the database. Because of this, Windows 8 may produce an error when loading. In this case, we will need to restore the bootloader.

How it's done? Everything is very simple. However, before moving on to the main issue, you should understand what a bootloader is, what it is for and how it works.

it special programwhich performs the OS boot. It starts working immediately after turning on the computer. After the appearance of Windows Vista, 7 and 8.1, the old bootloader was replaced with a new one - BOOTMGR. The operation of this program is associated with the master boot record MBR or with the main boot sector MBS.

The essence of the work lies in the fact that after turning on the computer, the BIOS firmware is activated, which scans the PC for the presence of existing equipment. The BIOS finds and reads out the MBR sector, which is located on the hard disk. This sector contains the initial boot code, as well as the partition table of the hard drive. If this sector or code is damaged, the computer will not be able to boot Windows 8. In this case, you will see an error: BOOTMGR is missing - press Ctrl + Alt + Del to restart.

So, what is the OS loader, we have disassembled. Moreover, now you know how it works. But what to do if the OS does not boot. How to restore loading Windows 8 without calling the wizard?

System Restore in Windows 8. How to create a restore point on Windows 8: Video

Recovery of loading of Windows 8

If you have an error loading the OS, then you can not start Windows 8 in normal mode. But before proceeding to the cardinal measures, you should check the BIOS settings. Such errors may be caused by resetting its settings due to insufficient battery power that powers the motherboard.


Next, in the "Automatic Recovery" window, select "Windows 8". At the next stage, select "Diagnostics", then go to the "Advanced Options" section. Now click "Automatic Recovery".

The PC will automatically scan for errors and give you a report. You just need to click the "Fix" button and wait a bit until the system fixes it. Now you know how to repair Windows 8 bootloader automatically. But, if this method did not help you, you can use the command line.

Repair Windows 8 bootloader: Video

Boot recovery on command line

To open the command line, perform all of the above steps until we selected "Automatic recovery" in the "Advanced settings" section. Here we need to open the “Command Line” item.

Now it only remains to register several commands:

  • Bootrec.exe / FixMbr. After entering each command, press "Enter". This command overwrites the boot entry in the main system partition. It should be noted that this key does not overwrite the existing volume table.
  • Bootrec.exe / FixBoot — This command writes the new boot sector to the main system partition.

After entering these commands, restart your PC and try to log into Windows 8. If the system still does not boot, then open the command prompt again. Now we register such a command - bootrec.exe / RebuildBcd. After executing the command, the PC scans the hard drive in search of the installed Windows 8 OS, and then adds it to the boot list. To confirm the action, press Y (yes) and reboot the computer.

If the above methods did not help to eliminate the error, and the OS still does not boot, then it remains only completely, since no other method will help you.

Sometimes it happens that the operating system loader crashes. Normal Recovery helps in most cases. start windows  7, but not always. You can also try. If this does not help, then read below. detailed instructions, how to restore boot loader windows 7.

Remember: you cannot install a higher-class operating system after the younger one, that is, if you install Windows XP, then Windows 7 will not boot because the master boot record (MBR) will be overwritten by the old system.

To restore the Windows 7 bootloader, we will use the recovery environment, where we need the command line. I will write all the commands and describe below. But first, let's look at what the MBR is. MBR (master boot record) - the very first sector on the disk, which contains the partition table, as well as a small utility loader, which indicates which part of the disk the operating system will be loaded from. In that case, if the MBR contains incorrect information about the location of the OS, then Windows 7 will not start and most likely will knock out a similar error: “BOOTMGR is CTR-Alt-Del for restart”.

To fix the operating system loader, we will need a Windows 7 installation disk, which will contain the Bootrec.exe utility that we need, or a recovery disk. This utility  will register a new boot sector using certain commands.

Well, let's get started. Boot from the installation disk with Windows 7 or from the recovery disk, the text “Press any key to boot from CD ...” pops up and immediately press any key on the computer, otherwise it will not boot from the disk.

In this window, select System Restore.



In most cases, problems are found automatically, after which you will be asked to fix them automatically. To do this, simply click on the Fix and restart button, after which the system will reboot and Windows 7 will boot without errors.


However, if the problems remain the same or the system does not offer to fix the errors automatically, then in the same window you need to select the OS that you need to restore (usually it is one). Click Next

For many years, Microsoft has improved the recovery system of the Windows operating system, and in Windows 7 and Windows Vista it works almost automatically. If you boot from the installation windows disk  7 and click " System Restore" ("Repair computer") system windows recovery  will be launched and will independently try to correct all the errors that she finds. It is able to fix a large number of problems, however, a situation is quite likely when the boot loader is damaged, and the recovery system cannot cope with this problem. In this case, you can manually restore the bootloader using the Bootrec.exe utility.

The Bootrec.exe application is used to fix errors related to the boot loader corruption and, as a result, the inability to run Windows 7 and Windows Vista operating systems.

  Sequencing

  Description of the launch keys of the utility Bootrec.exe

  Bootrec.exe / fixmbr

Launched with the / FixMbr key, the utility writes a Windows 7 and Windows Vista compatible Master Boot Record (MBR) to the system partition. Use this option to resolve issues related to damage to the master boot record, or if you want to remove a non-standard code from it. The existing partition table is not overwritten in this case.

Bootrec.exe / FixBoot

Launched with the / FixBoot key, the utility writes a new boot sector to the system partition that is compatible with Windows 7 and Windows Vista. Use this option in the following cases:

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

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

Bootsect / nt60 sys

The boot sector of the system partition will be overwritten by BOOTMGR compatible code. More information about using the utility bootsect.exe can be found 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, using it displays a list of found systems that are this moment  not specified 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 installed Windows Vista or Windows 7 operating systems. Found operating systems appear in the list from which they can be added to the Windows Boot Configuration Data Store. Also use this option if you want to completely rebuild the boot configuration data store. Before this, you must delete the previous storage. The set of commands may be as follows:

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

In the example above, the boot configuration repository is exported to the file C: \\ BCDcfg.bak, the system, hidden and read-only attributes are removed from it, after which it is deleted with the DEL command and the bootrec / RebuildBcd is rebuilt again.



Enlarge picture

Of course, the utility Bootrec.exe  quite functional, however, it does not help if, for example, the Windows bootloader file bootmgr  damaged or physically missing. In this case, you can use another utility, also part of the Windows 7 distribution media - bcdboot.exe.

  Restoring a boot environment using BCDboot.exe

BCDboot.exe  is a tool that is used to create or restore a boot environment located in 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 damaged Windows boot environment, including the boot data configuration storage (BCD) files, including the bootmgr file mentioned above.

Bcdboot command line syntax

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

BCDBOOT source]

a source

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

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

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

Optional parameter. Enables detailed logging of the utility operation.

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

  Summary

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

Skills to help the user recover windows bootloader  7 are necessary in the event that the operating system does not start at all or there are a number of problems in the process of its inclusion.

The operating system loader is a system program that is designed to start the OS. Speaking of simple expressions, it is a utility with the help of which the computer is turned on.

With the advent of new versions of operating systems and boot loaders are improved. For example, the Windows XP operating system is loaded using UEFI. Newer versions of the OS (starting with the seventh) use the system utility BOOTMGR during its boot process.

Types of problems with the loader

The most common cause for concern is the following errors:

  • When you try to start the system, messages appear under the name “Bootmgr is missing” and / or “Non system disk”. They occur as a result of damage to the bootloader or master boot record;
  • .
      In this case, you need to restore the bootloader, if a message from a hacker asking you to send money for the destruction of the virus appears immediately after the user presses the start button of the personal computer or laptop;

Remember! If the operating system has already started the startup process and errors began to appear only later, this does not indicate a problem with the bootloader. Try to turn on the OS in safe mode and troubleshoot problems (for example, virus software).

Before attempting to adjust the work of the bootloader, go to the BIOS and make sure that the system has the correct order of loading of all hard drives.

If you have two hard disks installed on your computer at once, the order of their launch is incorrect, you may have problems with the bootloader.


The first in the queue should be the disk on which the operating system is installed.

Automatic recovery using a USB drive

Solve the problem you need, starting with the easiest way. If you fail to fix the work of the loader using the following method, try the following solution to the problem presented in the article.

To begin the process of solving the problem, take the disk from which the operating system was installed. If you do not have it, you can restore it without a disk - in this case, you need to create a bootable usb external media.

The version of the operating system that is located on the media must fully correspond to that installed on the computer.

To perform an automatic recovery from a flash drive or disk, follow these steps:

  • Insert the disk into the drive or USB flash drive into the slot. Start the computer and in the first few seconds press the F button on the keyboard. Thus, you instantly start the BIOS menu before the malfunction occurs.
      In BIOS, change the boot order of the OS components - the disk or USB flash drive should be in the first place (depending on what device with the OS image you connected to the computer).
      After the boot queue has been set, save all changes and exit BIOS settings. The process of starting the OS will start again, however, now it will be loaded directly from the image media. The following window will appear;


  • At the bottom of the window (Figure 2), locate the OS recovery item and click on it. Now you need to select the OS that needs to be restored (in case several computers are installed on the computer at the same time);


  • After you have decided on the name of the OS whose work you want to fix, a window will appear with all the available options for restoring the operating system. First, select automatic troubleshooting.
    This method can help, but not in all cases. If the system after such automatic repair still does not turn on, repeat steps 1-3 again and now select the second item (switching on the previously saved OS state).
      Wait until all the necessary actions will be carried out by the program automatically. If the system boots successfully, the problem is resolved. If not, restore manually.


Recovery of OS boot configuration data

The OS startup configuration information contains details on the order in which data should be loaded when the computer's operating system is turned on.

Often, the OS loader cannot shut down due to corrupted items in the Boot Configuration Data. To correct the problem, you need to add new configuration data to the OS loader:

A full configuration update can be accomplished with the rebuildbcd command. To execute it, you need to open the command line window in the system recovery options (as in the figure above).

In the line, enter the text “bootrec.exe / rebuildbcd” (without quotes) and click the Enter button to execute the command. The update process may take several minutes. After it is completed, a line about the result of the command appears in the utility window.


After data recovery, turn off the computer, remove the disk with the OS image from it, configure the standard boot order in BIOS and turn on the device again. If all actions have been done correctly, the system will start in standard mode.

If, after executing the command, you received a system notification that the configuration could not be restored, you must boot into safe mode.

To do this, enter the command bootrec.exe / safeboot in the command line - it allows you to launch the operating system using the minimum number of drivers and third-party utilities that can cause an OS boot loader error.

To view and edit the bootloader configuration parameters, type the BCDEdit.exe command:


Loader configuration edit command