В современных версиях Windows информация для запуска операционной системы храните в файле конфигурации загрузки BCD (Boot Configuration Data). В этом файле хранятся данные об установленной Windows и параметрах ее загрузки. Если файл BCD удален или поврежден, Windows перестает загружаться. Также вы не сможете загрузить Windows, если повреждена MBR запись на жестком диске. В этой статье мы покажем, как корректно пересоздать файл хранилища данных конфигурации загрузки BCD и
Master Boot Record
(MBR) на примере Windows 10 и 11.
Содержание:
- Ошибка “The boot configuration data file is missing some required information”
- Автоматическое восстановление конфигурации загрузчика Windows
- Идентификация разметки дисков и букв томов
- Восстановление загрузочного сектора MBR в Windows 10/11
- Пересоздание BCD файла загрузчика Windows 10
Ошибка “The boot configuration data file is missing some required information”
Если файл BCD поврежден, отсутствует, если вы удалили / отформатировали отдельный раздел диска с меткой System Reserved (и размером 500Мб), специальный OEM раздел, то скорее всего при попытке загрузить Windows появится такое сообщение:
Your PC needs to be repaired The Boot Configuration Data file is missing some required information File: \Boot\BCD Error code: 0xc0000034
Также ошибка может выглядеть так:
The Boot Configuration Data for your PC is missing or contain errors. File: \boot\bcd Error Code: 0xc000000f
При повреждении MBR может быть ошибка No operating system found.
Автоматическое восстановление конфигурации загрузчика Windows
При появлении такой ошибки, в первую очередь попробуйте исправить проблему с загрузкой ОС с помощью режима автоматического восстановления (Startup Repair), который можно запустить из среды восстановления Windows RE.
Совет. Желательно периодически проверять работоспособность среды WinRE, и если она не работает, воспользоваться для ее восстановления методикой из статьи Восстановление среды WinRE в Windows.
Если автоматическое восстановление с помощью Startup Repair не помогло решить проблему, вам нужно загрузиться с загрузочного или установочного диска с Windows или в среде WinRe (Repair your computer -> Troubleshoot -> Advanced options -> Command Prompt), запустить командную строку и попробовать полностью пересоздать файл конфигурации загрузчика BCD и обновить MBR запись.
В этом примере я буду использовать установочный диск с Windows 10. Выберите в настройках BIOS первичным загрузочным устройство DVD диск или USB флешку с дистрибутивом Windows (в зависимости от того, с какого устройства вы хотите загрузить компьютер). Загрузитесь с установочного диска и на экране выбора языка установки нажмите сочетание клавиш Shift+F10. Перед вами откроется консоль командной строки.
Попробуйте восстановить BCD файл автоматически, выполнив команду:
bootrec /RebuildBCD
Перезагрузите компьютер и проверьте, загружается ли Windows (не забудьте изменить приоритет загрузочных устройств в BIOS). Если Windows не загружается, еще раз загрузитесь с установочного диска и откройте окно командной строки.
Идентификация разметки дисков и букв томов
Очень важно. Все инструкции, описанные ниже, подходят для обычных компьютеров с BIOS (или загружающихся в режиме UEFI legacy) и MBR таблицей разделов. На компьютерах с UEFI прошивками для пересоздания BCD нужно использовать следующе инструкци: восстановлению EFI загрузчика в Windows 10 или восстановление удаленного EFI раздела в Windows.
Как понять, используется ли у вас BIOS или UEFI система? Проще всего проверить тип таблицы разделов на диске, на котором установлена Windows: GPT или MBR. Для этого выполните команду:
diskpart
Затем выполните:
list disk
- Если у диска в столбце Gpt указана звездочка (*), значит на диске используется таблица разделов GPT. Это значит, что у вас компьютер с UEFI, и для восстановления загрузчика нужно использовать статью по ссылке выше.
- Если в столбце GPT звездочка отсутствует, значит у вас на диске таблица разделов MBR, и вы можете продолжить следовать данной инструкции.
Далее вам нужно идентифицировать локальные диски и разделы системы (скорее всего назначенные им буквы дисков будут отличаться от дисков, которые вы видели при работе в Windows). Проще всего это сделать с помощью утилиты diskpart. Выполните следующие команды:
diskpart
list vol
Перед вами появится список разделов в системе, назначенные им буквы дисков и их размер. В нашем случае к компьютеру подключен 1 жесткий диск, на котором имеются всего два раздела:
- Раздел System Reserved размером 500 Мб, которому назначена буква диска C:. На этом небольшом служебном разделе по-умолчанию хранится файл конфигурации загрузки BCD (подробнее)
- NTFS раздел размером 39 Гб, которому назначена буква D:. На этом разделе находится установленная Windows, программы и данные пользователя.
Важно. Запомните буквы дисков, назначенные разделам. Данные буквы дисков будут использоваться в последующих командах.
Восстановление загрузочного сектора MBR в Windows 10/11
С помощью утилиты bootrec.exe можно перезаписать данные в MBR и загрузочном секторе, поместим в них ссылки на загрузчик Windows (bootloader).
Попробуйте перезаписать основную загрузочную запись (MBR) системного раздела для совместимости с загрузчиком Windows (существующая таблица разделов не перезаписывается).
bootrec.exe /fixmbr
Добавьте в загрузочные секторы диска код для загрузки файла bootmgr ( диспетчера загрузки Windows):
bootsect.exe /nt60 all /force
Прежде, чем идти далее, попробуйте автоматически пересоздать конфигурацию загрузчика BCD командами (это самый простой способ для начинающих):
bootrec /FixBoot
– команда создает новый загрузочный сектор на системном разделе (перезаписывает загрузочную запись раздела PBR).
bootrec /ScanOs
– просканировать диски и найти установленные копии Window, которых нет в хранилище конфигурации загрузки
В случае успешного сканирования появится запрос на добавление записей о найденный Windows в BCD:
Scanning all disks for Windows installations. Please wait, since this may take a while... Successfully scanned Windows installations. Total identified Windows installations: 1 [1] D:\Windows Add installation to boot list? Yes/No/All:
bootrec /RebuildBcd
– пересоздать хранилище конфигурации загрузкика, добавить в BCD найденные на компьютере копии Windows/
После этого перезагрузите компьютер и проверьте загрузку Windows. Если ОС не загружается, следуйте инструкции.
Если команда bootsect.exe не найдена, попробуйте указать полный путь к ней:
X:\boot\bootsect.exe /nt60 all /force
Пересоздание BCD файла загрузчика Windows 10
Далее с помощью команды BCDedit нужно создать новый файл с конфигурацией загрузчика (предполагается, что у вас нет резервной копии BCD).
Ваши дальнейшие действия зависят от того, есть ли на диске отдельный раздел System Reserved или нет. В командной строке выполните:
diskpart
list vol
Проверьте, есть ли на диске компьютера системный раздел System Reserved. Его можно идентифицировать по метке тома, либо более точнее по размеру (500 Мб для Windows 10+, 350 Мб для Windows 8.1 и 100 Мб для Windows 7).
- Если раздела нет (вы случайно удалили его), можно хранить конфигурацию загрузчика BCD на основном диске, где находится каталог Windows. Чтобы создать конфигурационные файл загрузчика BCD и Bootmgr на указанном диске, выполните команду:
bcdboot C:\Windows /S C:
Должно появится сообщение
Boot files successfully created
. - Если раздел System Reserved у вас имеется, удалите старый (поврежденный) файл BCD и создайте вместо него новый:
del c:\boot\bcd
Если разделу System Reserved не назначена буква диска (по-умолчанию), вы можете сами назначить ее с помощью diskpart.
Запустите:
diskpart
Выберите диск (в моем случае в компьютере имеется всего один жесткий диск, а вы можете вывести список дисков командой list disk):
select disk 0
На скриншота выше видно, что раздел с меткой System Reserverd называется Volume 1. Выберите его:
select volume 1
Назначьте букву диска (я назначил букву C:, но вы можете использовать любую другую букву, в этом случае измените путь в следующих командах):
assign letter C:
exit
Создайте временный пустой файл bcd.tmp:
bcdedit /createstore c:\boot\bcd.tmp
Создайте запись для диспетчера загрузки bootmgr:
bcdedit.exe /store c:\boot\bcd.tmp /create {bootmgr} /d "Windows Boot Manager"
Импортируйте в BCD настройки из файла bcd.tmp:
bcdedit.exe /import c:\boot\bcd.tmp
Если команда bcdedit возвращает ошибку (
Ошибка создания хранилища. Отказано в доступе, access denied
) при доступе к файлу BCD, попробуйте снять с него атрибуты скрытый, read-only и системный:
attrib C:\Boot\BCD -s -h -r
Укажите, что загрузчик находится на служебном разделе System Reserved (ему назначена буква диска C: )
bcdedit.exe /set {bootmgr} device partition=c:
Настройте время ожидания при выборе ОС:
bcdedit.exe /timeout 10
Удалите временный файл:
del c:\boot\bcd.tmp
Итак, вы создали пустой BCD файл с параметрами загрузчика. Теперь в него нужно добавить записи об установленных на диске Windows .
Создайте в хранилище BCD новую запись для Windows 10:
bcdedit.exe /create /d "Windows 10" /application osloader
Команда должна вернуть уникальный идентификатор (GUID) данной записи загрузчика:
The entry {8a7f03d0-5338-11e7-b495-c7fffbb9ccfs} was successfully created.
Укажем, что bootmgr должен использовать данную запись по-умолчанию (после истечения времени ожидания при выборе ОС, для загрузки будет используется именно эта запись).
bcdedit /default {8a7f03d0-5338-11e7-b495-c7fffbb9ccfs}
Теперь в новой записи загрузчика осталось указать пути к имеющейся на диске установленной копии Windows 10. Ранее мы определили, что в среде WinPE диску с установленной Windows присвоена буква D:. Используйте эту букву диска в следующих командах:
bcdedit.exe /set {default}device partition=d:
bcdedit.exe /set {default} osdevice partition=d:
bcdedit.exe /set {default} path \Windows\system32\winload.exe
bcdedit.exe /set {default} systemroot \Windows
Осталось сделать данную загрузочную запись в BCD видимой (по умолчанию она скрыта):
bcdedit.exe /displayorder {default} /addlast
Итак, мы полностью пересоздали загрузчик Windows 10 (обновили файл BCD и перезаписали загрузочный сектор MBR).
Теперь нужно сделать раздел, на котором находится файл BCD с конфигурацией загрузчика активным (BIOS передает управлению загрузчику ОС с активным MBR раздел). Допустим, разделы на вашем диске распределены так.
- Volume 0 – загрузочная/установочная флешка (ISO образ) диск, с которого вы загрузили компьютер
- Volume 1 – раздел System Reserved с BCD загрузчиком (размер 500 Мб)
- Volume 2 – раздел с файлами Windows (здесь находятся каталог Windows, Program Files, Users и т.д.)
В этом примере нужно сделать активным раздел Volume 1 (в вашем случае определите номер раздела самостоятельно). Сделать раздел активным можно с помощью diskpart:
diskpart
list disk
sel disk 0
list vol
select volume 1
(файлы bootmgr и «\Boot\BCD» находятся на этом разделе)
active
exit
Проверьте, что раздел volume 1 теперь активный:
select vol 1
detail partition
Все верно (
Active: Yes
).
Теперь вы можете перезагрузить компьютер и убедится, что Windows загружается в штатном режиме.
by Aleksandar Ognjanovic
Aleksandar’s main passion is technology. With a solid writing background, he is determined to bring the bleeding edge to the common user. With a keen eye, he always… read more
Updated on
- The BCD error on Windows 10 will prevent the system from booting, making it get stuck in a loop.
- Using the Command Prompt to rebuild the problematic files will easily fix the issue.
- As a last resort, try the System Restore or reset the operating system to its factory settings.
Computers and laptops are a staple in today’s digitalized world. They are necessary for work, school, and even during our own free time.
We store sensitive data on our PCs, and we can’t afford for it to get lost or their system to get compromised.
Unfortunately, Windows errors are quite frequent, and many can lead to serious problems with the operating system or the PC’s components.
One of them is called the BCD (also known as Boot Configuration Data). As its name suggests, the problem will prevent the system from booting.
Seeing messages like BOOTMGR is missing or similar during the booting process indicates that there is a problem with the BCD that needs to be solved immediately.
Rebuilding the corrupted Boot Configuration Data isn’t the hardest of tasks if you know where to look. If the BCD is missing or got corrupted, your PC won’t boot into the system.
How we test, review and rate?
We have worked for the past 6 months on building a new review system on how we produce content. Using it, we have subsequently redone most of our articles to provide actual hands-on expertise on the guides we made.
For more details you can read how we test, review, and rate at WindowsReport.
Why does the corrupted BCD error occur?
This error can happen for various reasons, but it mostly points towards an installation problem (where you’ve probably deleted the BCD) or the possible failure of an HDD drive.
If the latter is the problem, rebuilding BCD won’t do you too much. However, if it occurred due to a software error, or because the data bugged out while it was being read by the PC, rebuilding BCD is the sure fix.
Another cause could be hardware. The data can get corrupt when you change one of your PCs components. These are not all of them. There are many other BSOD causes out there.
How do I fix corrupt BCD on Windows 10?
1. Rebuild the BCD
1.1. Create a bootable drive
- Download the Media Creation Tool.
- Plug in the compatible USB flash drive with at least 16GB of free storage space.
- Run Media Creation Tool and accept the License Terms.
- Select Create installation media (USB flash drive, DVD, or ISO file) for another PC.
- Choose the preferred language, architecture, and edition and click Next.
- Choose a USB flash drive and click Next.
- Wait until everything is done.
Now, before we move to the rebuilding procedure, let’s prepare all the things you’ll need to fix the BCD in Windows 10. The first thing is a bootable installation drive, which you can create with ease by using Media Creation Tool.
If you’re having trouble with the process, you can fix all issues regarding the bootable USB flash drive.
1.2. Boot with USB
- Insert the USB boot media in one of the available ports.
- Press the Windows key, right-click on the Power button, and click Restart.
- Depending on your motherboard’s manufacturer, you will see a message about pressing a certain key during the initial boot of the system. Press it until you enter the BIOS.
- Select the Boot tab.
- Then, select Hard Disk Drives.
- Next, choose 1st Driver and hit Enter.
- Select your USB from the list that appeared on the screen.
- Save the configuration changes and press OK.
1.3. Rebuild BCD
- With your USB flash drive connected to the PC, press the Windows key, and select the Power button.
- While holding Shift, click Restart.
- You can also restart it by pressing the physical button if you have one.
- After the PC reboots, you’ll see the Choose an option.
- Select Troubleshoot.
- Then, choose Advanced options.
- Next, select Command Prompt.
- Now, type in the following command in the CMD window and press Enter:
bootrec /rebuildbcd
- Now, there are two things that can happen:
- If you see this message:
execute the following commands, pressing Enter after each one:attrib c:\boot\bcd -h -r -s
ren c:\boot\bcd bcd.old
bootrec /rebuildbcd
- If you see this message instead, restart your computer:
2. Reset Windows
- Press the Windows Key + S and type in Recovery options.
- In the following Window, select Get Started.
- Choose Keep my files.
- Next, wait for the process to complete.
3. Perform a System Restore
- Press the Windows Key + S and type in System Restore, then click on Open.
Is the BCD a type of BSOD error?
Yes, it is. Since it technically causes the device to crash before it starts, it is a type of blue screen error. As such, it should be considered problematic and fixed as soon as possible.
Additionally, a BSOD that is tied to the system startup will create a never-ending loop of crashing where your system crashes, tries to restart, and crashes again.
The BCD error could also make the booting process take too long. You will have to wait minutes instead of seconds, just to enter the Windows Startup.
How can I prevent such errors from occuring?
In order to prevent BSOD errors from occurring, one has to keep his system clean and sheltered from malicious software that can corrupt the data.
Run regular full scans of your OS to make sure it hasn’t been infected by viruses. Here’s how you can do that:
- Press the Windows Key and select Settings.
- Select Update & Settings.
- Then, click on Windows Defender and select Open Windows Defender.
- Next, from the Scan Options, choose Full, then Scan now.
- Now, let the scranning process complete.
Thankfully, there are plenty of ways to remedy this problem. Simply follow them thoroughly and make sure to enter the correct lines in the CMD window and everything will end up fine.
Obviously, things change all the time, and Microsoft keeps coming up with new updates that introduce new systems, so if you think there is another way to fix this issue, don’t hesitate to tell us.
Use the comment section below to share your experience with these methods and point out which one solved the problem.
-
Home
-
News
- File: \EFI\Microsoft\Boot\BCD in Windows 10? Fix It Now
By Yamila | Follow |
Last Updated
It’s possible for you to run into the “\EFI\Microsoft\Boot\BCD” issue while attempting to boot your computer in Windows 10. How to fix it? Here, this post from MiniTool Partition Wizard provides some solutions that can help you with this issue. You can have a try.
When trying to boot your computer, you may get stuck in some boot issues. For instance, you are likely to fail to boot your Windows 10 with the “File: \EFI\Microsoft\Boot\BCD” issue. Once it occurs, you may receive an error message on your screen: The Boot Configuration Data for your PC is missing or contains errors.
Tips:
Boot Configuration Data (BCD) is a firmware-independent database that stores information about the boot options on your computer. If it is missing or corrupted, you cannot boot your computer successfully. As for this, you need to rebuild BCD.
The code for the “Windows 10 EFI Microsoft Boot BCD” error varies for some reason. So, you probably see 0xc000000f, 0xc0000034, 0xc000000d, etc. when this error happens. To help get rid of the annoying error and boot the PC properly, several effective methods are listed below. If you encounter this error, you can pay attention to the following content to sort your problem out.
Method 1: Run Windows Startup Repair
After the “file:\EFI\Microsoft\Boot\BCD” error shows up, you should try running the Windows Startup Repair in Windows RE (Recovery Environment) first. In most cases, this way can solve plenty of Windows 10 issues easily and quickly. Here’s detailed information on how to run Windows Startup Repair.
Tips:
If you have another computer that runs well at hand, you can also try to enter Windows RE by using Windows installation media.
Step 1: Turn off your PC and then restart it. Once the screen lights up, turn off your PC again.
Step 2: Repeat the above step several times until the Recovery screen appears. Then you should click See advanced repair options to continue.
Step 3: In the next window, go to Troubleshoot > Advanced options > Startup Repair.
Step 4: After the process is completed, restart your PC to see if the “\EFI\Microsoft\Boot\BCD” error is solved.
Method 2: Fix BCD
As the error message indicates, the “Windows 10 EFI Microsoft Boot BCD” issue might be caused by corrupted or damaged BCD. If it’s the culprit, you can try to fix this issue with the Bootrec.exe tool. To do this, you need to choose Troubleshoot > Advanced options > Command Prompt in Windows RE, type the following commands, and then press Enter after each to execute them.
- bootrec /fixmbr
- bootrec /fixboot
- bootrec /scanos
- bootrec /rebuildbcd
Once done, restart your computer to check if it can start up smoothly.
When the “file:\EFI\Microsoft\Boot\BCD” issue happens, rebuilding MBR with MiniTool Partition Wizard is a great solution as well. It’s professional third-party disk partition software that enables you to create a bootable media to boot your PC and rebuild MBR with ease.
To rebuild MBR with MiniTool Partition Wizard, you can follow the steps below.
Step 1: Download and install MiniTool Partition Wizard on your PC. Then launch it to the main interface.
MiniTool Partition Wizard DemoClick to Download100%Clean & Safe
Step 2: Use the Bootable Media Builder feature to create a bootable media.
Note:
The Bootable Media Builder feature is only available for the Pro or higher editions. Therefore, make sure you get the proper edition before you start the process.
Step 3: After that, boot your problematic PC from the created bootable media.
Step 4: Wait a while and then you will enter MiniTool Partition Wizard in the MiniTool PE Loader mode.
Step 5: Right-click the target disk and then select Rebuild MBR.
Step 6: Click Apply to execute the pending operation.
Hope you can fix the “\EFI\Microsoft\Boot\BCD” issue in Windows 10 with the above solutions. If you have any other great solutions to this issue, please share them with us in our comment part. We’ll appreciate you a lot.
About The Author
Position: Columnist
Yamila is a fan of computer science. She can solve many common issues for computer users by writing articles with simple and clear words. The very aspect that she is good at is partition management including create partition, format partition, copy disk and so on.
When she is free, she enjoys reading, doing some excerpts, listening to music and playing games.
In this article, you will find a method to Rebuild Boot Configuration Data/BCD on Windows 10. BCD determines the boot process of Windows so during several errors like bootmgr is missing or corrupted, Stop code 0xc00000f, you need to regenerate it. Commonly when the error screen displays File:boot/bcd, you should understand that recreation of Boot configuration data is essential. Sometimes repairing also works for the same but rebuilding is the ultimate solution.
To Rebuild Boot Configuration Data/BCD on Windows 10, you have to execute a series of commands. Moreover, rebuilding is quite effective because it allows you to fix any error associated with the startup in few steps. You can See to Fix: Error 0xc000014c Windows 10 Failed To Start caused by BCD corruption. Let us walk towards the guide and explore all the steps carefully.
For your convenience, we split the guide into two halves.
1. Launch Command Prompt from Advanced Startup Options
Assuming that you are not able to access the PC completely, we show you steps to obtain Advanced Startup Options accordingly.
Step 1 – First of all, put the installation media into the PC in order to Rebuild Boot Configuration Data/BCD.
Step 2 – So, during the boot press F12 and reach out to the menu. However, depending on the computer’s configuration, the key to boot to media may differ.
Step 3 – Windows setup screen comes into view, click Next to move ahead.
Step 4 – Now, click the option namely Repair your computer. You can see this option at the bottom of the screen.
Step 5 – Select Troubleshoot on the following screen to proceed.
Step 6 – Choose Advanced options. Finally, out of few options, select Command Prompt. The Command Prompt that opens is similar to the one that you normally access.
In this regard, you may like to follow How to start Command Prompt when Windows 10 Fails to Boot.
Run the Commands
Step 7 – Type in or copy/paste the given line of command, then press Enter and let the command search for Windows installation in the Boot Configuration Data.
bootrec /rebuildbcd
Step 8 – Now, there are two possibilities that you can see as a result of the above command.
Result 1 –
Successfully scanned Windows installations.
Total identified Windows installations: 0
The operation completed successfully.
Result 2 –
Successfully scanned Windows installations.
Total identified Windows installations: 1
[1] D:\Windows
Add installation to boot list? Yes/No/All:
If you see –
Result 1: Go to Step 9 below. This result indicates that Windows installation media prevails in the BCD store but bootrec did not locate any additional installation of the OS on your PC that can be added to BCD. So, don’t stress out, you need to execute some more commands to successfully Rebuild Boot Configuration Data/BCD.
Result 2: Type Yes to the question you see. Then wait for few seconds and you should see the message “The operation completed successfully” on the prompt. Finish up by following Step 10.
Step 9 – As Windows installation is already present in the BCD store, you have to manually remove it. And to do so, execute the below command in the prompt and press Enter.
bcdedit /export c:\bcdbackup
Note – This bcdedit command indicates the export of BCD store as a file called bcdbackup.
Step 10 – After exporting the BCD perfectly, run the given command. This command manages numerous file attributes for the BCD store. So, copy-paste the attrib command at the prompt and press Enter.
attrib c:\boot\bcd -h -r -s
Note – This command removes all the attributes from BCD store and this was necessary as they might restrict you from making modifications to the file.
Step 11 – Moving on, rename the BCD by this given ren command.
ren c:\boot\bcd bcd.old
Step 12 – Once you rename it, you can easily proceed to Rebuild Boot Configuration Data/BCD just like Step 7. So, as the final task, try executing the following command and press Enter after inserting it.
bootrec /rebuildbcd
Step 13 – Now, you should get this as the result in the prompt.
Successfully scanned Windows installations.
Total identified Windows installations: 1
[1] D:\Windows
Add installation to boot list? Yes/No/All:
Step 14 – Lastly, type Yes and press Enter to complete the rebuilding. And when you are notified about the same, restart Windows 10 PC.
If you are using dual boot, you may like to pursue Prolong Time to Display List of OS in Dual Boot in Windows 10.
Conclusion
Hopefully, you are now able to Rebuild Boot Configuration Data/BCD in Windows 10 PC pretty much easily. Most of the time rebuilding this settle down issues related to the startup of the OS. If you come across any problem while rebuilding this, write to us, we will be more than happy to help you out.
Windows OS Hub / Windows 10 / How to Repair Windows Boot Manager, BCD and Master Boot Record (MBR)
The Boot Manager in modern Windows versions uses the BCD (Boot Configuration Data) file to boot the operating system installed on the computer. This file contains information about the installed OS and boot parameters. Windows cannot boot normally if the BCD file is deleted or corrupted. Also, you won’t be able to boot your Windows if the Mater Boot Record (MBR) on the hard disk is damaged. In this article, we will show how to correctly rebuild Windows Boot Manager, BCD configuration file, and fix MBR on Windows 10 and 11.
Contents:
- The Boot Configuration Data File is Missing in Windows 10 or 11
- How to Automatically Repair Windows Bootloader?
- Identifying Disk Partition Layout and Drive Letters
- Repair Master Boot Record (MBR) on Windows 10/11
- How to Recreate a Windows Boot Configuration (BCD) from Scratch?
The Boot Configuration Data File is Missing in Windows 10 or 11
If the BCD file is missing or corrupted, if you removed/formatted a separate disk partition with the System Reserved label (and 500 MB in size) or a special OEM recovery partition, a user is likely to see the following message when trying to boot Windows:
Your PC needs to be repaired The Boot Configuration Data file is missing some required information File: \Boot\BCD Error code: 0xc0000034
Also, the error may look like this:
The Boot Configuration Data for your PC is missing or contains errors. File: \boot\bcd Error Code: 0xc000000f
If the MBR is damaged, there may be an “An operating system wasn’t found” error.
How to Automatically Repair Windows Bootloader?
If this error appears, first of all, try to fix the problem with booting the OS using the Startup Repair mode that can be started from the Windows Recovery Environment (Windows RE).
Tip. It is advisable to periodically check the health of the WinRE environment, and if it doesn’t work, use the method described in the article “How to Recover WinRE in Windows” to repair it.
If the automatic repair using Startup Repair didn’t help, boot your computer from Windows boot/installation disk or in the WinRE environment (Repair your computer -> Troubleshoot -> Advanced options -> Command Prompt). Start a command prompt, try to create a new BCD file, and update the MBR record from scratch.
In this example, I will use the Windows 10 installation disk. Change the primary boot device to a DVD drive or USB flash drive with Windows setup files in the BIOS settings (depending on which device you want to boot the computer from). Boot your computer from the Windows install image and press Shift + F10 on the language selection screen. You will see a command prompt.
Try to repair the BCD file automatically using this command:
bootrec /RebuildBCD
Reboot your computer and check if Windows boots (don’t forget to change the boot device priority in the BIOS settings). If Windows does not boot, boot from the installation media again and open a command prompt.
Identifying Disk Partition Layout and Drive Letters
Very important. All instructions given below are suitable for standard BIOS computers (or booting in UEFI legacy mode) with the MBR partition table. On computers with UEFI firmware, you need to use the following guides to repair the EFI bootloader on Windows 10 or to restore deleted EFI partition.
How to understand if you have a computer with BIOS or UEFI? The easiest way is to check the disk partition table on which Windows is installed: GPT or MBR. To do this, run the command:
diskpart
Then list available disks:
list disk
- If a disk has an asterisk (
*
) in the Gpt column, then the GPT partition table is used on this disk. This means that you have a computer with UEFI, and to restore Windows the bootloader, you need to use the article from the link above; - If there is no asterisk in the GPT column, then you have the MBR partition table on the disk, and you can continue to follow this guide.
Next, you need to identify the local drives and volumes on your computer (most likely the drive letters assigned to them will be different from those you see when working in Windows). It is easier to do it using diskpart. Run these commands:
diskpart
list vol
You will see a list of partitions, the drive letters assigned to them, and their sizes. In our case, there is one hard drive on the computer with the two volumes on them:
- System Reserved partition with the size of 500 MB and the drive letter C: assigned to it. By default, Windows Boot Manager and BCD file are located on this small service partition (read more);
- NTFS partition with the size of 39 GB and the letter D: assigned. This partition contains installed Windows, programs, and user data.
Important. Remember the assigned drive letters, since they will be used in the commands later.
Repair Master Boot Record (MBR) on Windows 10/11
You can use the bootrec.exe tool to overwrite data in the MBR and boot sector, and add the necessary path to Windows Boot Manager.
Try overwriting the master boot record (MBR) of the system partition for compatibility with the Windows boot loader (the existing partition table is not overwritten).
bootrec.exe /fixmbr
Add code to the boot sectors of the disk to load the bootmgr (Windows Boot Manager) file:
bootsect.exe /nt60 all /force
If bootsect.exe command is not found, try to specify the full path to it:
X:\boot\bootsect.exe /nt60 all /force
Before moving on, try to automatically rebuild the BCD bootloader configuration with the following commands (this is the easiest way for beginners):
bootrec /FixBoot
– the command creates a new boot sector on the system partition and overwrites the boot record of the PBR partition.
bootrec /ScanOs
– scan all drives and look for installed copies of Windows that are not in the Boot Configuration store
If the scan is successful, you will be prompted to add entries about found Windows instances to the BCD configuration:
Scanning all disks for Windows installations. Please wait, since this may take a while... Successfully scanned Windows installations. Total identified Windows installations: 1 [1] D:\Windows Add installation to boot list? Yes/No/All:
bootrec /RebuildBcd
– recreate the bootloader configuration store, add copies of Windows found on the computer to the BCD bootloader.
After that, restart your computer and check if Windows boots properly. If the OS doesn’t boot, follow the instructions below.
How to Recreate a Windows Boot Configuration (BCD) from Scratch?
Next, use the using BCDedit command to create a new Boot Configuration Data file (it is supposed, you don’t have the BCD backup file).
Your next steps depend on whether the disk has a separate System Reserved partition or not. Run the commands:
diskpart
list vol
Check if there is a System Reserved partition on the hard disk. It can be identified by its volume label, or more precisely by its size (500 MB for Windows 10+, 350 MB for Windows 8.1, and 100 MB for Windows 7).
- If there is no system reserved partition (perhaps you accidentally deleted it), you can store the Boot Manager files on the system drive where the Windows directory is located. To create the Bootmgr and BCD bootloader configuration files on the specified drive, run the command:
bcdboot C:\Windows /S C:
A message should appear:Boot files successfully created.
- If you have a System Reserved partition, delete the old (corrupted) BCD file and create a new one instead:
del c:\boot\bcd
If the drive letter is not assigned to the System Reserved partition (by default), you can assign it yourself using diskpart. Run: diskpart
Select your local disk (in my case, only one hard disk is connected, but you can list local disks with the list disk command): select disk 0
The screenshot above shows that the System Reserved partition is called Volume 1. Select it: select volume 1
Assign a drive letter (I assigned the drive letter C:, but you can use any other letter, in this case, change the path in the following commands): assign letter C:
exit
Create an empty temporary file bcd.tmp:
bcdedit /createstore c:\boot\bcd.tmp
Create an entry for the Windows Boot Manager (bootmgr):
bcdedit.exe /store c:\boot\bcd.tmp /create {bootmgr} /d "Windows Boot Manager"
Import settings from bcd.tmp to your BCD:
bcdedit.exe /import c:\boot\bcd.tmp
If the bcdedit command returns an error while accessing a BCD file (access denied
, the store import operation has failed
, the required system device cannot be found, the volume does not contain a recognized file system. please make sure that all required file system drivers are loaded and that the volume is not corrupted
), try removing hidden, read-only, and system attributes from it:
attrib C:\Boot\BCD -s -h -r
Specify that the Windows Boot Manager is located on the System Reserved partition (the drive letter C: is assigned to it):
bcdedit.exe /set {bootmgr} device partition=c:
Configure the timeout to select an OS:
bcdedit.exe /timeout 10
Remove the temporary file:
del c:\boot\bcd.tmp
So, you have created an empty BCD file with the bootloader settings. Now you have to add entries about the installed Windows.
Create a new entry in the BCD configuration for Windows 10:
bcdedit.exe /create /d "Windows 10" /application osloader
The command will return the unique identifier (GUID) of this bootloader entry.
The entry {8a7f03d0-5338-11e7-b495-c7fffbb9ccfs} was successfully created.
Specify that bootmgr should use this entry by default (after the timeout, this entry will be used to boot Windows):
bcdedit /default {8a7f03d0-5338-11e7-b495-c7fffbb9ccfs}
Now you have to specify the paths to the installed Windows 10 copy in the new bootloader entry. We found out earlier that the drive letter D: is assigned to Windows partition in WinPE. Use this drive letter in the following commands:
bcdedit.exe /set {default}device partition=d:
bcdedit.exe /set {default} osdevice partition=d:
bcdedit.exe /set {default} path \Windows\system32\winload.exe
bcdedit.exe /set {default} systemroot \Windows
Make this boot entry in BCD visible, since it is hidden by default:
bcdedit.exe /displayorder {default} /addlast
So we have completely recreated Windows 10 bootloader (bootmgr) and BCD file and overwritten the MBR boot sector.
Now you need to make active the partition on which the bootmgr and BCD file with the Windows bootloader configuration are located (BIOS transfers control to the OS bootloader on the active MBR partition). For example, the following partitions are available on your computer
- Volume 0 – installation flash drive (ISO image) from which you booted the computer;
- Volume 1 – System Reserved partition (500 MB size) with Windows bootmgr and BCD file;
- Volume 2 – partition with Windows system folders (%Windir%, Program Files, Users, and etc.)
In this example, you need to make Volume 1 the active partition (in your case, you need to find out your partition number). You can make a partition active using diskpart:
diskpart
(bootmgr and \Boot\BCD must be on this partition )
list disk
sel disk 0
list vol
select volume 1
active
exit
Check that volume 1 is now active:
select vol 1
detail partition
(Active: Yes )
Now you can restart your computer and make sure that Windows boots normally.