Solution to Windows 7 boot fault mbr repair

Source: Internet
Author: User

Let's take a look at the common knowledge of the Startup Process of Windows 7:
After the computer powers up, start the BIOS program. After the BIOS self-check is completed, find the Master Boot Record MBR on the hard disk, read the DPT (Partition Table) from the MBR, and find the active primary partition, then read the PBR of the active primary partition (Partition Boot Record, also known as dbr. What should it be called? The debate on the network is not over yet. Let's call it pbr ), PBR then searches for the Boot manager file BOOTMGR in the partition. After BOOTMGR is found, the control is handed over to BOOTMGR. BOOTMGR reads the \ boot \ bcd file (BCD = Boot Configuration Data, that is, "Start Configuration Data". To put it simply, the bcd file under windwows7 is equivalent to the boot file under xp. if multiple operating systems exist and the wait time for selecting the operating system is not 0, the operating system selection interface is displayed on the monitor. After we choose to start WINDOWS 7, BOOTMGR will go to the boot disk to find WINDOWS \ system32 \ winload.exe. then, we can use winload.exe to load the WINDOWS 7 kernel to start the entire WINDOWS 7 system.
This process can be summarized as follows: BIOS --> MBR --> DPT --> pbr --> Bootmgr --> bcd --> Winload.exe --> kernel loading --> the entire Windows 7 System
This article describes how to solve the possible faults of MBR> DPT> pbr> Bootmgr> bcd.


An mbr error occurs, mainly because the mbr code is rewritten. Because the changed code is different, the error information is also different. For example, we have installed Windows 7 and ubuntu dual-system systems, and ubuntu has changed mbr. After we format the partition where ubuntu is located, we can neither enter Windows 7 nor ubuntu, the following error message is displayed during startup:


[Figure 1]
The solution is to rewrite mbr. We are familiar with rewriting mbr with the fdisk/mbr command in dos. Fdisk/mbr is compatible with xp, but not Windows 7. Practice shows that after you use the fdisk/mbr command to rewrite the mbr of Windows 7, you need to re-create bcd. Otherwise, Windows 7 cannot be started normally. Some netizens pointed out that the reason is that the fdisk/mbr command overwrites the hard disk signature in mbr. Generally, partition tools can rewrite mbr, such as diskgenius. The mbr it overrides is compatible with Windows 7. You can also use the bootrec/fixmbr command to rewrite it. To run the Bootrec.exe tool, you must start Windows RE. To do this, follow these steps:
Insert the windows 7 installation disc and start the computer from the disc. After the disc is started, press shift + f10 to bring up the cmd command prompt. Enter bootrec/fixmbr In the cmd command prompt.
Press enter. In this way, mbr is rewritten.


[Figure 2]

The partition table has a problem. We will not discuss this problem in detail due to its limited space.
The system disk is not an active primary partition. In this case, you only need to use the partitioning tool (such as diskgenius) to set the system disk as an active primary partition.

The pbr code is rewritten because the code to be rewritten is different, so the error information is different. For example, the active partition of Windows 7 system is written into the pbr suitable for XP, so that the prompt will appear at startup:


[Figure 3]
The simple solution is to use the bootrec/fixboot command to override pbr:
Insert the Windows 7 installation disc and start it from the disc. After the disc is started, press shift + f10 to bring up the cmd command prompt. Enter bootrec/fixboot in the command prompt
Press enter. In this way, the pbr of the active partition is rebuilt.

Here we also need to mention a common command, which is bootsect:
Insert the Windows 7 installation disc and start it from the disc. After the disc is started, press shift + f10 to bring up the cmd command prompt. Enter bootsect/nt60 sys/mbr in the cmd command prompt.
Press enter. This command will rewrite the active partition pbr and the mbr, so that the mbr and pbr are suitable for Windows 7 and vista.
The bootsect.exe program is located in the boot directory of the Windows 7 installation CD. You can extract this file and run it on the command line of xp, you can also run this program on the command line in winpe, so this program is very convenient to use. The bootrec.exe command is not so convenient. Therefore, the BOOTSECT command is more widely used.
Another important point is that the boot folder in the vista installation CD also has this tool, but the vista bootsect command does not have the/mbr parameter, so it can only rewrite pbr, you must note that you cannot rewrite mbr. Practice shows that clearing the mbr of a hard disk and running the bootsect command of Windows 7 can indeed find that the mbr is restored to normal. This indicates that the bootsect command of Windows 7 can indeed rewrite mbr.
In addition, the bootsect command can also rewrite the mbr and pbr of xp, which cannot be done by the bootrec command. On the Recovery Console of xp, rewrite mbr with the fixmbr command, and rewrite pbr with the fixboot command.




In case of a boot file problem, you can use the bcdboot command to re-write the boot file:
Insert the Windows 7 installation disc and start it from the disc. After the disc is started, press shift + f10 to bring up the cmd command prompt. Enter:
Bcdboot x: \ windows/s x:
Note that the first x is the disk where the windows folder of windows 7 is located, generally c:. If you are not a drive c, change it to the corresponding drive letter. The next x is the drive letter of the active primary partition, which is generally a drive C. Therefore, this command is generally written as follows:
Bcdboot c: \ windows/s c:
However, you must note that the drive letters you see in windows re are not necessarily the same as those you see in windows 7. Therefore, you must first run the dir/a command to check whether the disks are correct.
For example:
Cd/d c:
Dir/
The two commands first go to the root directory of the c: drive, and then display all the files and folders under the root directory of the c drive. According to the displayed files or folders, you can determine which disk you see under Windows 7.
Boot files in Windows 7 are mainly files in the bootmgr and boot folders, while files in the boot folder are mainly bcd files. The bcdboot command re-writes all Windows 7 boot files in the specified partition.

If there is a problem with the bcd file, you can use the bootrec command to recreate the bcd:
Insert the Windows 7 installation disc and start it from the disc. After the disc is started, press shift + f10 to bring up the cmd command prompt. Enter:
Bootrec/RebuildBcd
If this Command finds the Windows 7 or vista operating system that has not written bcd, it will prompt you whether to write data, and enter Y as prompted.
Or use the bcdedit command to manually rewrite bcd, but the operation is much more complicated.


Case study:
Case 1: Strange, the system disk is not the active primary partition.
If you see a help on the Internet, the Windows 7 system runs normally, but in disk management, the system disk is not an active primary partition.


[Figure 4]
After installing the one-click Restore wizard installed version, press the F11 key to start the one-click Restore program. However, after formatting the system disk, you can still perform this operation when starting the system. The so-called pbr is generated during advanced formatting. This indicates that the startup code of the one-click Restore wizard is not written into the pbr of the active partition (If yes, it has been cleared during formatting), but into the MBR. You can set in MBR to read hidden partitions of the restore wizard with one click before reading active primary partitions. So, is the current situation that we encounter also pointing to a specific partition by rewriting mbr?

If there is no problem with mbr, the problem may be caused by pbr (also known as dbr). The code written in win7 pbr should be to find bootmgr, however, if this Code specifies that another special file is to be found, and then start bootmgr in another partition through this file, in this way, another active primary partition can be changed to a system disk.

Through the above analysis, we can draw a conclusion: the problem is either in mbr or pbr. The solution is to re-build mbr first. If it cannot be solved, then the problem must be in pbr, you only need to reconstruct pbr to solve the problem.
So the mbr was rebuilt first, and the problem remained, and then pbr was rebuilt. The problem was solved.

Case 2:
The following error occurs during startup:
BOOTMGR is missing
Press ctrl + alt + del to restart.

If bootmgr is missing, press Ctrl + Alt + Del to restart

This is a common fault. Since bootmgr is missing, we generally only need to use the bcdboot command to recreate the boot file.
The cause of this situation may be: The bootmgr file does not exist, which is the most common. One is caused by a disk error. In this case, running the chkdsk/f command in winpe may also solve the problem. Some friends used Diskeeper to sort MFT fragments. This prompt also appeared when the machine was started. It is estimated that it may be a bug in DISKEEPER after the MFT disk is organized by diskeeper. Therefore, it is not recommended to use diskeeper for mft fragment.

A netizen is curious. Set drive C to active partition ). Set the activity as follows: Right-click a computer, choose management> hard disk management. Right-click drive C and set it to active. . Why.
It cannot be started after restart! Display bootmgr is missing, Ctrl + Alt + Delete to restart. Then.

This is a case from the Internet. The analysis can draw a conclusion. There should be a hidden "system reserved" partition in Windows 7. This hidden system reserved partition is the real active primary partition, and its c disk should not be active. It sets drive C as an activity, which means that the activity status of the "system reserved" partition is canceled. But the boot file is in the "system reserved" partition, instead of in the c disk, the c disk becomes the active primary partition, mbr will start the pbr of the c disk, the pbr of the c disk will go to the C disk to find bootmgr, but the C disk does not have bootmgr, so an error is inevitable. The solution is to simply set the system reserved partition as an activity.
This friend made a problem, but it seemed that he could not solve the problem at last. It is not difficult for the meeting, but not for the difficult.




Case 3: when starting the instance:
BOOTMGR is compressed
Press Ctrl + Alt + Del to restart
Translated into Chinese:
Bootmgr is compressed, press Ctrl + Alt + Del to restart

This is because the system disk is compressed. It is strange that, in this case, we cannot solve the problem by using the bcdboot command to reconstruct the boot file.
However, you can run the following command: compact/u/a/f/I/s c :\*
This can solve the problem. The compact program is located in the windows \ system32 folder, so we need to use the CD command to enter the windows \ system32 directory. Suppose c: the disk where the bootmgr is located. If not, change it to the corresponding drive letter.
A friend on the Internet did not solve the problem when using this command because the friend ran the following command: compact/u/a/f/I/s c :\
This * is not followed, so the command does not implement the goal of the operator. From the help description provided by the command itself, this * seems unnecessary, but the actual operation shows that this * is required.
This command will completely decompress the Compressed C drive file. It is really necessary to ring the bell.
Note: Only run the following command: compact/u/a/f/I c: \ bootmgr.
The problem cannot be solved.
Some netizens find that running “bootrec.exe/fixmbr, Bootrec/fixboot "and then restarting can solve the problem. The test shows that you only need to run the Bootrec/fixboot command. This is an alternative solution. It is suggested that the BPB table in PBR is not modified after the driver is compressed, so the partition information recorded in the BPB table is inconsistent with the actual partition information. Run the Bootrec/fixboot command and then rewrite bpb to make the two consistent.
Practice shows that the bootsect command can also be used to solve this problem.
Some netizens posted a Post saying that they installed both xp and vista. When the vista system was started, BOOTMGR is compressed, so he canceled the compression status of the System Disk Under xp. However, this Netizen's words are not credible, because if ntldr is also compressed, it will appear at xp startup:
Ntldr is compressed
Press Ctrl + Alt + Del to restart
Unless this friend only compresses bootmgr, but does not compress ntldr, this is generally not possible. This compression is generally generated when the entire disk is compressed. If the specified file is compressed, no one will compress bootmgr and ntldr. Practice shows that in Windows 7, even if you specify to compress the entire system disk, the bootmgr cannot be compressed and access is denied. However, an error message will still appear during startup: bootmgr is compressed



Case 4:
If a problem occurs in the linux system, Windows 7 and later Windows 7 cannot be entered. The reason is that mbr and pbr of the active partition are rewritten. You only need to reconstruct the mbr and the pbr of the active partition, and then you can enter Windows 7. The simplest solution is to use the bootsect command:
Bootsect/nt60 sys/mbr

Case 5:
Windows 7 is installed first, xp is installed later, and the startup Item of Windows 7 is unavailable:
This requires three steps to solve the problem:
1. Use the bcdboot command to recreate the boot file for Windows 7.
2. Use the bootsect command to restore mbr and pbr of Windows 7.
3. After Entering Windows 7, run the bcdedit command to add the xp startup Item

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.