Recovery mbr what. Restoring the MBR boot record

One of the effective troubleshooting steps related to loading windows is to repair boot record Windows 10/7/8.1 with new UEFI and GPT partitioning or BIOS with MBR partitioning. One of the common reasons why the master boot record can become corrupted is due to an infection. malware or file corruption in that sector. Improper shutdown can also lead to boot record (MBR) corruption. Sometimes problems happen when Linux Grub is installed and Windows cannot detect it. In some cases you may get an error Bootmgr is Missing or BCD when you turn on your computer. In such cases, you can run bootloader repair to fix these issues.

How to repair Windows 10 bootloader

You must prepare, since the computer does not boot to your desktop and additional boot options may not be effective. Therefore, you need Windows 10 with the same bit depth (x32 or x64) that you are going to fix, and preferably the same version. You must boot in all of the methods below from a bootable flash drive in order to run command line. Remember that after restoring the bootloader, some errors may appear and you just need to restart the PC a couple of timesto get used to the bootloader.

Start installing Windows 10 from a bootable USB flash drive and go to the installation point. Next click on " System Restore" to get into advanced boot options.

Method 1. Once you're in Advanced Boot Options, go to " " > "Extra options" > and select "". Wait for the process to finish and the Windows 10 bootloader should recover.

Method 2. In the same advanced boot options go to " Troubleshooting" > "Extra options" > and run " Command line".

To begin with, we will make sure on which local disk the system in which we want to restore the bootloader is located. To do this, run the following three commands on the command line, pressing Enter after each one:

  1. diskpart
  2. list volume- displays a list of partitions.
  3. exit- Exits the Disk Tool.

In my case, the screenshot below shows that local disk on which Windows 10 is installed not "C", but "D". You will most likely have "C", but be careful, you must determine where you have the system installed. Once you have determined under which letter your system is, then enter the following command to restore the Windows 10 bootloader:

  • bcdboot D:\windows

Method 3. If you are using a Windows system with the new UEFI and GPT partition scheme, then you need to find a hidden partition with the FAT32 file system (it is about 90-300 MB). If you have a BIOS and MBR partition, then the file system will be NTFS (about 500 MB). In my case it is NTFS. So, we start the command line through bootable flash drive, as described above, and write commands:

  1. diskpart- starts the tool for working with disks.
  2. list volume- displays a list of partitions.
  3. select volume 3- Choice hidden volumes (in my case it's NTFS, you might have FAT32 hidden).
  4. format fs=ntfs or format fs=fat32- formatting the selected volume (depending on what you have).
  5. assign letter=E- Assign a new letter to that (I assigned what was already there).
  6. exit- exit from the discpart tool.
  7. bcdboot D:\Windows /s E: /f ALL- copy the bootloader files. (In my case, the D: drive is the volume on which Windows itself is located, E: is the letter that we assigned to the hidden partition).
  8. diskpart- launches back the tool for working with disks.
  9. list volume- display the list of sections.
  10. select volume 3- Number hidden volume, to which we assigned a letter.
  11. remove letter=E- remove the letter so that the partition is not displayed in the system when we reboot.


Method 4. In this method, we use the tool bootrec.exe. Enter the following commands one after the other into the command line:

  1. bootrec /RebuildBcd
  2. bootrec /fixMbr
  3. bootrec /fixboot

Exit and reboot your system.

In some cases, you will need to run an additional command:

  • bootsect /nt60sys or bootsect /nt60 ALL

MBR, which is also defined as or Master boot record, is hard disk containing information about its partitions and serving as a bootloader operating system.

The Master Boot Record is the first 512 bytes (4096 bits) of your HDD and is created the first time you Windows installation. If the MBR becomes corrupted, you will no longer be able to start the operating system and continue working in it in the usual way. This fact applies to the following versions of Windows: XP, Vista, 7 and 8.

Symptoms of MBR damage:

1. Operating System not found (The operating system was not found).

2. error loading operating system(Error loading operating system).

3. Invalid partition table (Invalid partition table).

4. FATAL: No bootable medium found.

5. Reboot and Select proper Boot device (Restart the system and select the appropriate boot device.

We have given only the main errors, messages about which may occur when the operating system is started. In fact, there are a large number of them and it makes no sense to analyze each one, since there are only a few solutions for an immense number of possible failures.

Causes of MBR corruption:

  • Malicious software, viruses.
    After restoring the boot sector, do not forget to check the hard drive for possible viruses. Some of them are able to replace the MBR code with their own, which will inevitably lead to its damage.
  • Dual boot available.
    Assume that the conditional PC has operating Windows systems and Linux. In this case, an unintentional error and damage to the MBR may occur.
  • Third party software.
    Not always the cause of a failure in the boot sector is viruses or errors in the operation of two simultaneously installed operating systems. Sometimes even popular software can cause damage to the MBR. For example, Acronis replaces disk boot drivers with its own, which may well corrupt the original MBR.

So, having figured out what the MBR is, having learned possible reasons failures and their symptoms, we are finally ready to proceed with the direct recovery of the Master Boot Record.

1. Backup MBR.

Before proceeding with the repair of the master boot record, we strongly recommend that you perform it backup. To do this, use the following command:

dd if=/dev/sda of=/path-to-save/mbr-backup bs=512 count=1

Replace Fragment /path-to-save/ on a path that will keep old version boot sector.

2. Restoring the MBR with the bootrec command.

For further work you will need a bootable device with preinstalled Windows version 10.

Brief instruction:

  • System Restore.
  • 3. Go to the section.
  • 4. Open the utility Command line.
  • Enter.
    When finished, do not close the command prompt.

    bootrec /FixMbr
    bootrec /FixBoot
    bootrec /ScanOs
    bootrec /RebuildBcd

  • 7. Enter exit and press Enter.
  • 8. Restart your computer.
  • 1. Start your computer using bootable media.
  • 2. On the welcome screen, click on the parameter System Restore.
  • 3. Go to the section Troubleshooting.
  • 4. Open the utility Command line.
  • 5. Enter the following commands in it, confirming the execution of each by pressing the key Enter.

    diskpart
    sel disk 0
    list vol

  • Fs FAT32. Chapter EFI FAT32 2 , enter the following command:

    If the volume number is not equal 2

  • 7. Assign a section new r:\

    assign letter-r:

  • 9. Enter exit to leave the utility diskpart.
  • r:\ EFI:

    cd /dr:\EFI\Microsoft\Boot\

  • bootrec /fixboot

  • ren BCD BCD.backup

  • BCD and replace r:\ previously assigned letter:
  • c:\
  • 16. Enter exit.
  • 17. Restart your computer.

MBR recovery in Windows 8 and 8.1

For further work, you will need a boot device with a preinstalled version of Windows 8.

Brief instruction:

  • 1. Start your computer using bootable media.
  • 2. On the welcome screen, click on the parameter System Restore.
  • 3. Go to the section Troubleshooting.
  • 4. Open the utility Command line.
  • 5. Enter the following commands in it, confirming the execution of each by pressing the key Enter. When finished, do not close the command prompt.

    bootrec /FixMbr
    bootrec /FixBoot
    bootrec /ScanOs
    bootrec /RebuildBcd

  • 6. Remove the boot device.
  • 7. Enter exit and press Enter.
  • 8. Restart your computer.

If this instruction to restore the master boot record was powerless, use the following:

  • 1. Start your computer using bootable media.
  • 2. On the welcome screen, click on the parameter System Restore.
  • 3. Go to the section Troubleshooting.
  • 4. Open the utility Command line.
  • 5. Enter the following commands in it, confirming the execution of each by pressing the key Enter.

    diskpart
    sel disk 0
    list vol

    These commands will allow you to select the first disk of the computer for work and display a list of its logical partitions.

  • 6. Find the volume element with the column Fs FAT32. Chapter EFI must be strictly formatted FAT32. If the volume partition is indicated by a number 2 , enter the following command:

    If the volume number is not equal 2 , replace 2 with any other available digit.

  • 7. Assign a section new letter, a letter that is different from the one already available on your computer. For example r:\. To perform this task, use the following command:

    assign letter-r:

  • 8. Wait for the following message to appear:

    Diskpart successfully assigned the drive letter or amount point.

  • 9. Enter exit to leave the utility diskpart.
  • 10. The following command will be needed in order to replace r:\ the letter that was previously assigned to the section EFI:

    cd /dr:\EFI\Microsoft\Boot\

  • 11. Enter the command below to repair the disk volume:

    bootrec /fixboot

  • 12. Now you need to do backup old BCD:

    ren BCD BCD.backup

  • 13. Enter the following command to create a new one BCD and replace r:\ previously assigned letter:

    bcdboot c:\Windows /l ru-ru /s r: /f ALL

  • 14. In the above command, we have specified the operating system letter − c:\. If you installed Windows on a drive with a different path, enter the correct drive letter.
  • 15. Remove the boot device.
  • 16. Enter exit.
  • 17. Restart your computer.

For further work, you will need a boot device with a preinstalled version of Windows 7.

  • 1. Start your computer using bootable media.
  • 2. Specify the language of the operating system.
  • 3. Select a keyboard layout.
  • 4. Click Further.
  • 5. Select your operating system and click again Further.
  • 6. On screen System Recovery Options select utility Command line.
  • 7. Once the command line is launched, enter the following command:

    bootrec /rebuildbcd

  • 8. Click Enter.
  • 9. Next, enter:

    bootrec /rebuildbcd

  • 10. Click Enter.
  • 11. Remove bootable media and restart your computer.

If these commands to restore the master boot record were powerless, use the instructions below:

  • 1. Determine the letter of your boot device by typing the following commands in sequence:

    diskpart
    select disk 0
    list volume

  • 2. Now enter:

    exit
    F:
    cd boot
    dir

    The letter F: replace with the letter under which the bootable media is defined.

  • 3. Enter the command:

    bootsect /nt60 sys /mbr

  • 4. Confirm the operation by pressing Enter.
  • 5. Remove the boot device.
  • 6. Enter a command exit.
  • 7. Now click Enter

For further work, you will need a boot device with a preinstalled version of Windows Vista.

  • 1. Start your computer using bootable media.
  • 2. Select a language and keyboard layout.
  • 3. On the welcome screen, select an option System Restore.
  • 4. Select an operating system and click Further.
  • 5. Open the utility Command line.
  • 6. Once the application starts, enter the following commands in sequence:

    bootrec /FixMbr
    bootrec /FixBoot
    bootrec /RebuildBcd

  • 7. Wait for each operation to complete.
  • 9. Type exit.

As an alternative to the bootrec command, you can try to restore the MBR automatically:

  • 1. Start your computer using bootable media.
  • 2. On the welcome screen, select an option System Restore.
  • 3. Select an option Launch Recovery.
  • 4. Wait for the process to complete and restart your computer.

There is another, more complex, alternative to MBR recovery. Her concept revolves around the direct repair of BCD. After starting Windows using the CD/DVD, open a command prompt and type in the following commands:

bcdedit /export C:\bcdbackup
C:
cd boot
attrib bcd -s -h -r
ren c:\boot\bcd bcd.backup
bootrec /rebuildbcd

Confirm the execution of each command by pressing the key Enter.

MBR recovery in Windows XP

For further work, you will need a boot device with a preinstalled version of Windows XP.

  • 1. For further work, you will need a boot device with a preinstalled version of Windows Vista.
  • 2. When the welcome screen appears, press the R key to open Recovery Console
  • 3. When asked about further actions, answer the system by entering a number 1 and confirm the operation by pressing the key Enter.
  • 4. If necessary, enter an administrator password.
  • 5. Enter a command fixmbr.
  • 6. When the system prompts you to confirm your action, press the key Y And Enter.
  • 7. Wait for the operation to complete.
  • 8. Remove the boot drive.
  • 9. Enter a command exit.
  • 10. Click Enter to restart your computer.

We hope the article was useful for you and helped to restore boot sector your disk.

MBR is an obsolete hard disk (or flash drive) format,
still in demand (due to its unpretentiousness)

Master Boot Record (MBR) - the main boot record of a storage medium containing information about its partitions. Damage or loss of the MBR makes information on the disk or flash drive inaccessible. For MBR recovery there are special utilities, of the form TestDisk.

TestDisk will "look through" the entire media and create a partition table. The program queries the BIOS or operating system for information about hard drives in the system, makes a quick check of disk structures and partition tables for "correctness". If errors are found, TestDisk will help fix them. In addition, TestDisk, when scanning media, can detect long-deleted partitions on it.

TestDisk is a free and open source program for recovering the master boot record of a disk or flash drive. The program is downloaded without problems from the Internet. The interface is English, but - this is the rare case when it is better not to chase the localizers.

TestDisk does not have a graphical shell. Communication with the program takes place in a black DOS window. It is known. If the system "fell", what kind of graphical shell is there. We boot from under DOS and run TestDisk.

TestDisk supports almost all known operating and file systems. The list of the main features of the program looks like this:

  1. Restoring deleted partitions
  2. Rebuilding the partition table
  3. MBR overwrite

- from a simple operation to restore boot files to a serious procedure for recreating a boot partition, when you have to delete the "System Reserved" partition and create it again. In this post, I decided to put together various ways on restoring the Windows MBR bootloader and offer them to you in the format of another article that reveals the potential of the resuscitation LiveDisk for system engineers from Sergey Strelts, to whom we are dedicated on our website. This LiveDisk has automated recovery tools on board Windows boot so we'll go from simple to complex.

Restoring the Windows MBR Boot Loader with a Live Disk by Sergei Strelec

Note: friends, if you have a computer with an active UEFI BIOS, and you have Windows installed on a disk with the GPT partition style, then the site has a similar article with a selection of ways to reanimate the bootloader on disks with this partition style -. Well, we will return to solving problems with the MBR bootloader. So, the Windows bootloader is damaged, what should I do?

First of all, we prepare the resuscitation LiveDisk.

1. LiveDisk by Sergei Strelec

Live-disk from Sergey Strelts is a functional resuscitation "live disk" based on WinPE for Windows Recovery after a critical failure. This is not only a collection of system recovery tools, it is a collection with more than a hundred good programs for performing various operations. To download the LiveDisk ISO image, go to the site:

http://sergeistrelec.ru

***

If the damage to the bootloader is not serious, i.e. the bootloader section is intact, its files are not damaged, and problems arose only with the boot storage (BCD file) in terms of its configuration, or some Windows disappeared from the boot menu, if there are several of them installed on the computer, you can try to cope with the task using the Windows MBR boot recovery functions that are present in the disk managers and the profile program for editing BCD - EasyBCD.

2. Repair MBR bootloader with AOMEI Partition Assistant

Function automatic recovery The bootloader is part of the disk manager AOMEI Partition assistant. You can run the program in the LiveDisk's Start menu along the path:

Bootloader auto-recovery works very simply: in the program window, click HDD, where the bootloader is located, on the operations panel on the left, click "Restore MBR".

Select the MBR bootloader for Windows 7, 8.1, 10.

We apply the operation.

3. Restoring the MBR bootloader with Paragon Hard Disk Manager

The MBR bootloader can be restored by another functional disk manager - the Hard Disk Manager program, there is its 15th version on board the LiveDisk Sagittarius. We launch it in the LiveDisk's Start menu along the path:

  • WinPE Programs - Hard Disk

Select the "Utilities" section, in the right part of the window, click "Reboot Recovery Wizard".

We select one of the types of recovery of the MBR bootloader and follow the step-by-step wizard.

If the question is about restoring the boot record that has disappeared from the Windows bootloader menu, select the “Windows OS to correct” operation. The program will search for Windows systems available on the computer and add them to the bootloader menu. Just click "Next".

And apply the changes.

Then click "Finish".

If Windows is one system installed on the computer, and you just need to restore its boot, we first try the “Fix Boot Options” operation. Further, as in the previous case, when asked if we want to apply the changes, we answer “Yes”. Click "Next", then - "Finish".

If the operation of fixing boot parameters did not help, try the operation "Fix Master Boot record (MBR)". It overwrites the MBR code. We indicate the desired hard disk with the bootloader, in our case there is only one disk. We press "Next".

And, as in the first operation, in the request window for applying changes, we answer “Yes”. Finally, click "Finish".

4. Restoring the MBR bootloader with EasyBCD

Another program onboard Sergey Strelts' LiveDisk that can be used to repair the MBR bootloader is EasyBCD. It is notable primarily for those who have several Windows on their computer. EasyBCD is a user-friendly GUI interface for adding multiple Windows to the boot menu and editing options on that menu. We launch EasyBCD in the LiveDisk's Start menu along the path:

  • WinPE Programs - BCD Editors

To add Windows to the boot menu, in the “Add Entry” section of the program, in the “Disk” column, specify the path to the desired operating system. In the "Name" column, we give it a name convenient for us. And click the green plus button to add a download record.

If necessary, adjust the bootloader menu in the "Edit boot menu" section.

With EasyBCD, you can also try to repair a damaged Windows bootloader. We go to the section of the program "Archiving / Restoring". And try the BCD configuration options - reset the BCD configuration and update the boot files. We try these parameters one by one, use them with the "Run" button.

5. Restoring the Windows Bootloader with Dism++

Friends, the simplest usable way to restore the MBR bootloader can be offered by the Dism ++ program, which is present in the LiveDisk by Sergei Strelec arsenal. With its help, you can choose which Windows home drive - i.e. hard disk, if there are several of them, and each of them has its own MBR bootloader. Read a separate article on this program .

***

These are on board LiveDisk by Sergei Strelec there are automated software, with which you can try to restore the Windows bootloader on a disk with the MBR markup style, without resorting to the procedure for recreating it. But, alas, they will not help if there are serious problems with the MBR bootloader - some of its files are missing, its section is damaged or deleted directly. For example, when we see labels like:

  • "BOOTMGR is missing" or
  • "An operating system wasn"t found. Try disconnecting any drives that don't contain an operating system.» .

In this case, the bootloader only needs to be recreated.

6. Recreate the bootloader

Recreating the MBR bootloader is recreating its partition and recreating the bootloader files. In some cases, it will be enough last operation. But we will look at the situation universally, taking into account those cases when there is damage to the bootloader partition. We will perform the first stage of the procedure using the AOMEI program Partition Assistant. At the second stage, we use the WinPE LiveDisk Sagittarius command line. Go…

We launch AOMEI Partition Assistant in the Start menu of LiveDisk along the path:

  • WinPE Programs - Hard Disk

In the program window, we look at the disk map, we find the bootloader section. This is necessarily a partition with the Active status, usually the first partition of an MBR disk, it is called System Reserved. Its volume can be different - 100, 350, 500 MB. Click this section and delete.

In the section creation form, click the "Advanced" button. And in the column "How to create" select "Primary partition". We press "Ok".

We click on the newly created partition and launch the “Activate partition” operation.

Confirm the partition setting as active. As a result, we press the "Apply" button to launch all the operations that we have just assigned to be performed.

8. Reinstall Windows

Using Sagittarius' LiveDisk to boot Windows is a temporary solution, although it can last indefinitely, in fact, until we need a flash drive for other purposes. However, sooner or later it is necessary to resolve the issue with the bootloader, and if this could not be done even by recreating it, the last option remains - reinstalling Windows. If there is nothing important in the old system, this can be done, as they say, without leaving the cash register, right in the Sagittarius LiveDisk environment. With the help of the browser present on board, we can access the Internet and download the distribution kit of any version, edition and version we need. Windows builds. And install the system using the 78Setup utility, which is, in fact, the native process of installing the system. Read more about this in the article.

This instruction although it is not directly related to the methods of combating infection under the general code name "WinLocker", but it is here because it turns out to be completely primitive blockers Microsoft Windows which are "limited" to changing the bootloader. Apparently, some schoolchildren were having fun (their energy would be, but in a peaceful direction).

If you see extortionate text just right before the operating system boots up in the form of plain text mode, quite often with errors or “artifacts” on the screen, then try to simply restore MBR master boot record.

If you are planning to develop a website and order a website in Kazan, you should contact only professionals. RafMedia web studio will do everything quickly and efficiently.

And so is the process. First, let's go through the "old woman" Windows XP or, in the common people, "piggy". For MBR recovery here we need installation disk with the distribution kit of the system. We boot from it and at the very beginning select the recovery mode by pressing the key "r". In the terminal window that opens, observe the list possible systems For loading. Under normal circumstances, there is only one. Enter the required number and click "Enter".

The next step is to repair the damaged master boot record. This is done by the command FIXMBR. Of course, we answer the request about our confidence in our actions "y".

Now let's write a new loader V rebuilt MBR. This is done by the team FIXBOOT. And, as in the previous case, we agree to make changes by introducing "y".

Well, almost everything. Left to copy ntldr And NTDETECT.COM. And "reanimate" boot.ini.

The command will help to copy "MAP", which shows a list of all connected (mounted) drives. We find our drive with the distribution kit. Typically this will be a disk. "D:". Copy then the following commands:

copy D:\i386\NTLDR C:\
copy D:\i386\NTDETECT.COM C:\

If a question arises for rewriting, we answer in the affirmative.

Only left boot.ini. Team Bootcfg /add will re-display the list of bootable systems.

  • Enter the number of the system to be added, usually "1".
  • Click "Enter".
  • Enter the name of the system to be added, let it be "Windows XP Professional".
  • Click "Enter".
  • We can enter, and it's better to do it, the key "/fastdetect". This will hide at boot the prompt to select a system to start.

Everything is ready, you can reboot and work.
And the option for the Windows 7 operating system will be considered.

Share