How to restore the boot sector - Master Boot Record. Repairing the bootloader using the recovery console in Windows XP Cannot find the boot image

Restoring the Windows 7 boot loader - performing steps to restore the operating system after problems occur when loading Windows. Due to a system failure, the user may lose data and personal files located on the computer.

At one point in time, operating system will not be able to boot on the computer. Various messages (not always in Russian) appear on the screen, indicating a problem loading Windows.

The main causes of problems with the Windows 7 bootloader:

  • user actions: attempt to use hidden system partitions, incorrect changes to boot files using EasyBCD, etc.;
  • system failure;
  • exposure to malicious software;
  • the appearance of bad blocks on the computer’s hard drive;
  • operating systems are installed on the computer in the wrong order;
  • hardware problems.

The problem with the bootloader must be solved, otherwise you will not be able to use Windows, because the system will not start on the computer. Problems can be resolved in a radical way: again on the PC.

If there is one created by the system tool, or using third party programs need to restore from backup image Windows created in advance. Many users, unfortunately, do not remove due attention backup systems, so these methods will not suit them.

How to restore Windows 7 bootloader? To restore operating system boot files, use the built-in Windows tools: automatic startup recovery, as well as using the BootRec and BCDboot utilities included in the operating system, launched in command line.

Before using operating system tools, you need to know the markup hard drive. Modern computers have a GPT hard drive layout style and new BIOS- UEFI, and in the days of Windows 7, MBR partitioning was used on the disks, and now an outdated BIOS. On some computers, Windows 7 64-bit is installed on UEFI and GPT drives, and in general, Windows 7 PCs use MBR (Master Boot Record) partitioning.

In this article, we will look at instructions on how to restore the bootloader in Windows 7 using system tools: first, we will perform an automatic recovery, and then we will try to restore the bootloader from the command line.

To perform operations to restore the bootloader, you will need either an installation DVD with the operating system, or a bootable Windows flash drive 7. Bootable media is needed to be able to boot the Windows RE recovery environment on a personal computer ( Windows Recovery Environment), with which you can try to solve the problem with the inability to start the system.

Perform Windows 7 recovery automatically using the system tool

The easiest way: automatic recovery of the boot partition on the hard drive using the operating system. This action occurs without user intervention; you only need to boot onto the computer from the boot disk.

Immediately after starting the computer, using the keyboard keys you need to enter the boot menu ( Boot Menu) to select an external device to boot: DVD disc or USB flash drives. Which keys to press depends on the hardware manufacturer, check this in advance. Another way: you can enter the BIOS and set the boot priority from the connected device there: USB storage or DVD disc.

In this example, I'm using the installer Windows disk 7, all actions from a bootable flash drive are performed in a similar way.

In the first window of the program Windows installations click on the “Next” button.

In the window asking you to start installing the operating system on your computer, in the lower left corner click on “System Restore”.

In the “System Recovery Options” window that opens, a search for installed systems will begin.

After a while, a message will appear stating that problems have been detected in the computer's boot settings.

Click on "Details" to view a description of the fix.

To run automatic troubleshooting of system boot problems, click on the “Fix and restart” button.

After restoring the bootloader, the Windows 7 operating system will boot onto the computer again.

Automatic troubleshooting using system tools can be started a little differently:

  1. In the "System Recovery Options" window, enable the option "Use recovery tools to fix problems when Windows startup. Select the operating system to restore" and then click on the "Next" button.

  1. In the window for selecting recovery tools, click on “Startup Recovery”.

  1. Wait for the operation to automatically resolve problems that are preventing the system from starting to complete.

If the problem is not automatically resolved, proceed to the following methods in which the user will have to manually enter commands in the command prompt Windows line.

Restoring the Windows 7 bootloader using the Bootrec utility

The next method involves restoring the Windows 7 boot loader via the command line. For this we use the Bootrec.exe utility. This method only works with disks that have a Master Boot Record (MBR).

From the boot disk you need to enter the Windows Recovery Environment using the method described above.

In the System Recovery Options window, click on the Command Prompt option.

The Bootrec.exe utility uses the following basic commands:

  • FixMbr - The option writes the master boot record (MBR) to the system partition of the disk, compatible with Windows 7, does not overwrite the existing partition table
  • FixBoot - using the command, a new boot sector that is compatible with Windows 7 is written to the system partition
  • ScanOS - searches all drives of installed Windows 7 compatible systems, displaying entries that are not in the system configuration store
  • RebuildBcd - searches all drives of installed Windows 7 compatible systems, selecting systems to add data to the boot configuration store

The FixMbr command is used to fix the master boot record, as well as to remove incorrect code from the master boot record.

The FixBoot command is used under the following conditions: the boot sector is damaged, the boot sector has been replaced with a non-standard boot sector, more than early version Windows (Windows XP or Windows Vista).

The ScanOS command searches all drives for operating systems compatible with Windows 7. As a result, all entries related to other operating systems installed on the computer that do not appear in the boot manager menu will be displayed.

The RebuildBcd command allows you to detect and add boot configurations installed on the system computer to the storage. This option is used to completely rebuild the system boot storage configuration.

In the command line interpreter window, enter the command (after entering commands in the command line, press the “Enter” key):

Bootrec/fixmbr

If the problem persists, you may need to enter the following command:

Bootrec /fixboot

The remaining commands are used if multiple operating systems are installed on the computer.

Close the Command Prompt, and in the System Recovery Options window, click the Restart button.

How to restore the Windows 7 bootloader from the command line using the BCDboot utility

Using the bcdboot.exe utility, you can restore the Windows 7 bootloader on computers with MBR or GPT hard disk partition styles.

Boot from the removable device, go to the window with the choice of system recovery method, and then launch the command line. Another option: in the very first window, press the “Shift” + “F10” keys on your keyboard to enter the command line window.

In the Command Prompt window, enter the command to launch the DiskPart utility:

Diskpart

To display information about your computer's drives, enter the following command:

List volume

We need to find out the drive letter (volume name) on which the operating system is installed.

The volume name (drive letter) in Diskpart may be different from the drive letter in Explorer. For example, in my case, in Explorer the system partition has the letter “C”, and in diskpart it is designated by the letter “E”.

To exit the diskpart utility, enter:

Bcdboot X:\windows

In this command: “X” is the drive letter on which the operating system is installed. In my case, it is the letter "E", you may have a different volume (disk) name.

Close the command prompt.

In the System Recovery Options window, click the button to restart your computer.

Conclusions of the article

If you have problems with the Windows 7 boot loader, you need to restore the system boot files by booting your computer from a Windows boot disk. You can restore damaged or missing files using operating system tools: automatic troubleshooting of Windows boot problems, using the Bootrec and BCDboot utilities, launched from the command line in the recovery environment.

Hi all! Today I will talk about a fairly common problem in operating systems. Windows family Vista/7/8/8.1/10 - violation of the integrity of the MBR bootloader. No matter how hard Microsoft tries to take into account possible problems the operation of your 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.

We will now look at recovering the MBR boot record using regular funds operating system. Which come either as part 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, to start the computer instead of the dispatcher Windows boot(Bootmgr.exe) uses the Windows NT boot loader (NTLDR).

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 installed systems that need to be added 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. will appear full list opportunities.
  • 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 ones to the start menu Windows versions, including XP and others.

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— the program code will be recorded for everyone existing sections, which 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.

In every operating room Windows system personal computer There are special tools that are responsible for an action or operation. But there is a tool with which you can change errors and problems, and also implement windows recovery 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 discs, 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, with the help of restorative hidden sections. Windows 7 will be able to set them in automatic mode 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

Publications on the topic