How to repair the EFI bootloader of Windows 7 and Windows 10?
In this article, we will try to restore the EFI bootloader for Windows 7 /8 /10 . A little earlier, we already disassembled. Now let me immediately note that bootloader damage in our case is most often (among other things) caused by:
Using the presented tools, you can try to restore the bootloader EFI, which refuses to boot the system due to a missing or broken configuration file at:
Hidden Drive:\EFI\Microsoft\Boot\ BCD
By the way, here is its approximate content from:
The partition structure in the GPT table on Windows booted in UEFI mode most often looks like this:
Windows 10 adds a disk here too Recovery. By default (i.e. when installing Windows on an UNFORMATED disk), the first two partitions have a clear volume. And therefore, if necessary, it is easy to isolate them, focusing only on the size of both. In Windows 7, for example, these are respectively 100 MB And 128 MB. And this, as they say, is a typical configuration. Some computer manufacturers create partitions as they see fit, such as putting the environment in there. Windows Recovery PE to file winre.wim. If you find such a file in your possession, be aware that it is it that contains the system recovery image from the manufacturer. Chapter EFI required on GPT disks with UEFI support. When the computer is turned on, the UEFI environment loads the bootloader ( EFI\Microsoft\Boot\bootmgfw.efi) from the section EFI (ESP), giving it control over booting Windows itself. No section - no download.
Section same MSR on the disk is created to facilitate the overview of partitions and is used for system operations (such as converting a disk from simple to dynamic). This is a spare partition that Windows never recognizes. And it does not contain user data. In Windows 10 MSR partition size is 16 MB(in Windows 8 - 128 MB), the file system type is NTFS.
That the file is at the above address EFI\Microsoft\Boot\BCD damaged, you can be informed blue screen death BSOD with the following error:
The boot configuration data for your PC is missing or contains errors. File:\EFI\Microsoft\Boot\BCD Error code: 0xc0000***
This means that the data in the file Boot Configuration Data do not recognize your Windows bootloader configuration. However, users familiar with the bootloader repair utility in the MFT bcdedit.exe, this time she will not help out. When trying to run it, the user will see something unusual:
The boot configuration data store could not be found. The requested system device cannot be found
Like, neither the data nor the device itself exists. There is only one reason: since the configuration of the BCD bootloader in the UEFI boot mode lies in a special EFI partition:
efi partition in Windows 7
efi partition in Windows 10
... then our utility simply does not see it. Those. does not see the loader itself, or even the entire partition. In general, traditional recovery tools created for such a case do not save either:
Do you also misspelled it?
I have EFI - this is an unnamed Volume 3
After closing the program, we go to this section:
cd /d Y:\EFI\Microsoft\Boot\There is a slight digression here. This path exists by default, and there is no reason for the console to refuse you to go to the specified folder. If an error occurs, see paragraph Possible mistakes or go directly to the next part How to restore the Windows 7/10 EFI bootloader: recreate the EFI.
I got the Access Denied error right away
/f ALL- copy boot files (both UEFI and BIOS modes) to possibly support booting on EFI and BIOS;
/l ru– ru– indicates the language locale of the system to be used, i.e. into Russian. If everything goes smoothly, skip the paragraph.
We reboot into Windows 10 on the hard drive and check.
The administrator may encounter some errors here. Among them, the most frequent are:
where c is the disk with the system
The most important thing here - do not miss the partition / lamas and do not delete the one in which Windows data and your information. So once bootrec.exe I couldn’t get into the section we needed, we remove the section. To do this, we will need to return to diskpart.exe, again decide on the partitions and select the one that is 100 MB. We return to the repair console:
cd /dx:
And we start again:
Diskpart select disk 0 list partition select partition 2
remove it:
Delete partition override
you can check the result:
List partition
We have some unallocated space left, in which we re-create the partition we just deleted:
Create partition efi size=100 list partition select partition 1 format quick fs=fat32 label="System"
But when you try to assign the previously used letter Y, the console refused (it was necessary to restart it). I'll give the section a letter Z:
Assign letter=Z exit
Prepare the ground for bootrec.
They won't go anywhere unless you accidentally delete them, or they don't fall into the bad sector zone. Remains...
Turn off the computer, remove the flash drive and turn on the machine. We are waiting for the appearance of Windows. Let it boot up to the Desktop and check if everything is in place.
Do not worry. If you delved into the process, and entered all commands consciously and correctly, the situation has most likely been corrected. You just need to take into account the peculiarities of the peculiar security filters adopted for UEFI mode, and don't confuse drive letters. They can be completed by following these steps:
That's all I wanted to say. Good luck.
Read: 1 641
As soon as we turn on the computer, it immediately starts running a miniature operating system, which we know as the BIOS. It deals with testing devices, memory, loading operating systems, and allocating hardware resources. Many of the features in this set of programs (usually around 256-512 KB in size) make it possible to support older operating systems like MS-DOS, giving them a lot of options. Since the days of the PC/AT-8086, the BIOS has changed very little, and by the time the first Pentiums were launched, its development had almost stopped. Actually, there was nothing to change in it, except for the dual BIOS, support for network tools and the possibility of flashing. But there were a lot of minuses: the starting entry into the real mode of the processor, 16-bit addressing and 1 MB of available memory, the inability to have a "repair" console. And, of course, the eternal problem of support hard drives. Even now, drives up to 2.2 TB are guaranteed to be supported, no more.
Back in 2005, Intel decided to change the BIOS to EFI / UEFI (Unified Extensible Firmware Interface). The EFI system is a more advanced base operating system. On some Unix and Windows platforms, UEFI has been around for a long time, but the mass transition has not yet happened, despite good intentions. And they are:
UEFI can use a generic executing machine like the JVM to consume hardware independent code, and this opens up vast possibilities for creating "bootable" software.
There is also criticism of this technology. In particular, its implementation can lead to cutting off new players from the operating system market: there will always be some technological loophole in the code for this. Like, for example, the inability to boot Windows 98 from modern BIOSes. But, worse, you will have to forget about the millions of MS-DOS programs and other systems that relied on BIOS functions for their work. Perhaps they will still be emulated, but there are doubts about this. And among them, there are probably important programs that there will be no one to rewrite. However, all these issues are solvable - at least through virtual operating systems. But the fact that new types of viruses will appear is certain, and we will be able to see this pretty soon.
In this article, we'll show you how to manually restore an accidentally deleted bootloader. Windows partition on a UEFI system. Initially, the article described my experience in restoring a bootable EFI partition on Windows 7, but the article is also relevant for modern Microsoft operating systems (from Windows 7 to Windows 10). It has helped me more than once after accidentally formatting or deleting an EFI partition in Windows 10. In this article, we will show you an easy way to manually recreate bootable EFI and MSR partitions in Windows.
So, suppose that somehow accidentally (or not very accidentally, for example, when trying) the boot EFI partition on a UEFI system (not BIOS) was deleted or formatted, as a result of which Windows 10 / 8.1 / 7 stopped loading, cyclically offering to select boot device (Reboot and select proper boot device or insert boot media in selected). Let's see if it is possible to restore Windows to working capacity when deleting a partition with Boot Manager without reinstalling the system.
Warning. The instruction involves working with disk partitions and is not intended for beginners. If the commands are interpreted incorrectly, you may accidentally delete all data on the hard drive. It is also highly recommended that you back up your important data to a separate medium.
Consider how the boot partition table should look like hard drive with GPT partitioning on . At a minimum, the following sections must be present:
This is the minimum configuration. These partitions are created by the Windows Installer when you install the system to an unpartitioned drive. PC manufacturers or users themselves can additionally create their own partitions containing, for example, the Windows Recovery Environment in a file winre.wim(), a partition with a backup image of the system from the manufacturer (allows you to roll back to the original state of the computer), user partitions, etc.
EFI section with the Fat32 file system is required on disks with GPT partitioning on UEFI systems. This partition, by analogy with the System Reserved partition on disks with MSR partitioning, stores the boot configuration storage (BCD) and a number of files necessary for Windows boot. When the computer boots, the UEFI environment loads from the EFI partition (ESP) the bootloader (EFI\Microsoft\Boot\ bootmgfw.efi) and passes control to it. If this partition is removed, the OS cannot be loaded.
MSRchapter on a GPT disk is used to simplify partition management and is used for service operations (for example, when converting a disk from simple to dynamic). This is a standby partition that is not assigned a partition code. This partition cannot store user data. In Windows 10, the size of the MSR partition is only 16 MB (in Windows 8.1, the size of the MSR partition is 128 MB), the file system is NTFS.
Because the system does not boot correctly, we need an installation disk with Windows 10 (Win 8 or 7) or any other boot disk. So let's boot from installation disk and on the installation start screen, press the key combination Shift+F10 . A window should open command line:
Run the disk and partition management utility:
Let's display a list of hard drives in the system (in this example, it is one, disk 0 . Asterisk ( * ) in the Gpt column means that the drive is using a GPT partition table).
Let's select this disk:
Let's list the partitions on the disk:
In our example, there are only 2 partitions left in the system:
As we can see, the EFI partition is missing (deleted).
Our task is to remove the remaining MSR partition so that at least 228 MB of free space remains unallocated on the disk (for MSR and EFI partitions). You can delete the remaining partition using the graphical GParted or directly from the command line (we will do just that).
Select the section to delete:
select partition 1
And remove it:
Delete partition override
Make sure that only the Windows partition remains:
Now we can manually recreate the EFI and MSR partitions. To do this, in the context of the diskpart utility, run the following commands in sequence:
Select disk:
create partition efi size=100
We make sure that a 100 MB partition is selected (an asterisk opposite the Partition 1 line):
list partition
select partition 1
format quick fs=fat32 label="System"
assign letter=G
create partition msr size=128
list partition
list vol
In our case, the Windows partition is already assigned a drive letter. C:, if it's not, assign it a letter like this:
select vol 1
assign letter=C
exit
After you have created a minimal disk partition structure for UEFI systems, you can proceed to copy the EFI boot files to disk and create configuration file bootloader (BCD).
Let's copy the EFI environment files from the directory on your drive where your Windows is installed:
mkdir G:\EFI\Microsoft\Boot
xcopy /s C:\Windows\Boot\EFI\*.* G:\EFI\Microsoft\Boot
Let's recreate the configuration Windows bootloader 10 / 7:
g:
cd EFI\Microsoft\Boot
bcdedit /createstore BCD
bcdedit /store BCD /create (bootmgr) /d "Windows Boot Manager"
bcdedit /store BCD /create /d "Windows 7" /application osloader
You can replace the inscription “My Windows 10” with any other.
Advice. In the event that only the files of the EFI environment were damaged on the EFI partition, and the partition itself remained in place, you can skip the process of recreating partitions using diskpart. Although in most cases it is enough to restore the bootloader according to the article. You can manually recreate BCD on regular MBR+BIOS systems.
The command returns the GUID of the created entry, in the next command this GUID must be substituted for (your_guid).
bcdedit /store BCD /set (bootmgr) default (your_guid)
bcdedit /store BCD /set (bootmgr) path \EFI\Microsoft\Boot\bootmgfw.efi
bcdedit /store BCD /set (bootmgr) displayorder (default)
Further commands are executed in context (default):
bcdedit /store BCD /set (default) device partition=c:
bcdedit /store BCD /set (default) osdevice partition=c:
bcdedit /store BCD /set (default) path \Windows\System32\winload.efi
bcdedit /store BCD /set (default) systemroot \Windows
exit
We restart the computer ... In our case, it did not boot the first time, we had to additionally dance with a tambourine:
Then in our case (tested on ) I had to add a new boot menu item by selecting the EFI\Microsoft\Boot\bootmgrfw.efi file on the EFI partition.
In some UEFI menus, by analogy, you need to change the priority of boot partitions.
After all the above manipulations, Windows should boot correctly.
Most Windows 7 installations include tiny 100 MB partitions called `system Reserved', also known as MSRs or "Microsoft System Reserved" partitions. For the rest of this article, I will refer to this section as MSR for brevity.
One of the most important parameters of each air conditioner is its power. The power of the air conditioner is calculated depending on where you intend to install the equipment or depending on the area of \u200b\u200bthe living space. If you install household air conditioners that are not designed to work in a large room in terms of power, then in this situation you simply cannot get proper cooling. Since the system will work to the maximum.
Note: Some OEM installations may have this section titled `system` or even `recovery`. In either case, this will be the `Active` partition on the same drive as the `C` drive.
Some OEM installations of Windows 7 do not include an MSR partition. To check if you have this partition, run Macrium Reflect and find the partition on system drive called `System Reserved'.
Note: If the `C` drive is your `Active` partition, you just need to do backup and recovery drive `C` for full system recovery.
The MSR section handles the second stage of the boot process after the Master Boot Record (MBR) . The MBR is located on the first sector of the disk and is loaded at system startup, after loading control is transferred to the code section boot sector the active partition is the MSR partition if it exists on your `C` drive. The MSR contains the `oot` directory containing the Boot Configuration Data (BCD) . BCD controls the next step in the boot process and loads the operating system from the C: drive. The MSR partition is always the `Active` partition on the system drive, and must be set to the `Active` partition. The contents of this partition will not change, and by default, no drive letter is assigned in Windows, so you cannot change it.
The image in the MSR partition is necessary to restore your system in order to move the system to a new drive. However, if you only need to update the system to an earlier date, the MSR recovery partition is not needed, you just need to restore the C drive. This is necessary to restore the Windows 7 partitions to the same location for the BCD to still be able to reference them while loading. If you restore to a new or unformatted drive and then go to the primary C drive as "primary". The simplest solution is to use DiskRestore to restore both partitions at the same time. DiskRestore - available in the Windows PE CD rescuer and can be run from BartPE if you are running the free edition of Macrium Reflect.
Hello! Windows 8.1 won't boot on laptop with UEFI BIOS and I can't do anything. When loading, an error occurs on the screen File: \ EFI \ Microsoft \ Boot \ BCD ... I studied all the Internet articles on this topic, but nothing helps in my case.
What have I done!
I entered commands that are successful, but Windows is not loaded.
bootrec /FixMbr
bootrec /FixBoot
I don’t know what else to do and how to restore the Windows 8.1 bootloader. What can you suggest?
Hello friends! My name is Vladimir and I will answer this question.
If your Windows 8.1 does not boot and you have used all available means to restore the bootloader, then you can delete the system boot manager: the 300 MB encrypted (EFI) system partition, as well as the 128 MB MSR partition and create them again.
In Disk Management you can only see 300 MB encrypted (EFI) system partition, 128 MB MSR partition visible only on the command line when typing a command"lispar".
Note: If you are inexperienced, do not perform this operation unless necessary, use other methods from the section on first. If you want to experiment on a working laptop, then do not start work without first creating backup these sections, and best of all, create a .
We will delete and create new partitions:
1. Section (400 MB) containing the Windows 8.1 recovery environment (you can get rid of this section altogether and use the recovery environment located on the bootable media with Win 8.1).
2. Section (300 MB), Encrypted (EFI) system partition containing all Windows 8.1 boot loader files.
3. Service section MSR (Microsoft System Reserved) 128 MB, required for partitioning GPT disks.
We boot the laptop from and in the initial window of the system installation, press the keyboard shortcut Shift + F10,
A command prompt window opens, enter the following commands:
diskpart
lis dis (lists physical disks).
sel dis 0 (we select a 931 GB laptop hard drive, and a second 14 GB drive is bootable Windows flash drive 8.1).
lis par (show all partitions of the selected disk, we will delete the first three partitions).
sel par 1 (select the first section
del par override (delete the partition, to delete the ESP and MSR partition or the laptop OEM partition, you must specify the override parameter)
sel par 2
del par override
sel par 3
del par override
Everything, we deleted all three hidden sections.
Now, if you select a drive and enter the lis par command, then we will see only two partitions on the laptop's hard drive:
Section 4 - installed Windows 8.1
Partition 5 is a hidden recovery partition with factory settings.
Create a newly encrypted (EFI) 300 MB system partition, as well as a 128 MB MSR partition
We enter the commands:
diskpart
lis dis (displays a list of disks).
sel dis 0 (select laptop hard drive).
create par efi size=300 (we create an encrypted (EFI) 300 MB system partition).
format fs=fat32 (we format it into the FAT32 file system).
creat par msr size=128 (create a 128 MB MSR partition)