Где хранится файл bcd windows 10

В современных версиях 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 file is missing some required information

Также ошибка может выглядеть так:

The Boot Configuration Data for your PC is missing or contain errors.
File: \boot\bcd
Error Code: 0xc000000f

При повреждении MBR может быть ошибка No operating system found.

ошибка 0xc000000f отсутсвует файл boot\bcd при загрузке Windows 10bcd-

Автоматическое восстановление конфигурации загрузчика Windows

При появлении такой ошибки, в первую очередь попробуйте исправить проблему с загрузкой ОС с помощью режима автоматического восстановления (Startup Repair), который можно запустить из среды восстановления Windows RE.

Совет. Желательно периодически проверять работоспособность среды WinRE, и если она не работает, воспользоваться для ее восстановления методикой из статьи Восстановление среды WinRE в Windows.

Если автоматическое восстановление с помощью Startup Repair не помогло решить проблему, вам нужно загрузиться с загрузочного или установочного диска с Windows или в среде WinRe (Repair your computer -> Troubleshoot -> Advanced options -> Command Prompt), запустить командную строку и попробовать полностью пересоздать файл конфигурации загрузчика BCD и обновить MBR запись.

Advanced options - data-lazy-src=

В этом примере я буду использовать установочный диск с 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, и вы можете продолжить следовать данной инструкции.

проверить тип разметки диска gpt или mbr

Далее вам нужно идентифицировать локальные диски и разделы системы (скорее всего назначенные им буквы дисков будут отличаться от дисков, которые вы видели при работе в Windows). Проще всего это сделать с помощью утилиты diskpart. Выполните следующие команды:

diskpart
list vol

diskpart: list volumes

Перед вами появится список разделов в системе, назначенные им буквы дисков и их размер. В нашем случае к компьютеру подключен 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

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).

проверить есть ли раздел system reserved в Windows

  • Если раздела нет (вы случайно удалили его), можно хранить конфигурацию загрузчика 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

bcdedit.exe /set {bootmgr} device partition=c:

Итак, вы создали пустой BCD файл с параметрами загрузчика. Теперь в него нужно добавить записи об установленных на диске Windows .
Создайте в хранилище BCD новую запись для Windows 10:
bcdedit.exe /create /d "Windows 10" /application osloader

Команда должна вернуть уникальный идентификатор (GUID) данной записи загрузчика:

The entry {8a7f03d0-5338-11e7-b495-c7fffbb9ccfs} was successfully created.

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

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 и т.д.)

diskpart список разделов на диске

В этом примере нужно сделать активным раздел 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
).

diskpart сделать раздел активным active:yes

Теперь вы можете перезагрузить компьютер и убедится, что Windows загружается в штатном режиме.

  • Home
  • News
  • How to Rebuild Boot Configuration Data Windows 10/11?

By Aurelie | Follow |
Last Updated

Boot Configuration Data file is very important to Windows startup. If it is deleted or corrupted, your computer may fail to boot up. In this post on MiniTool Website, we will show you how to rebuild BCD for you. If you are curious, scroll down to get more details.

What Is BCD?

BCD or Boot Configuration Data is a firmware-independent database file that contains boot-time configuration data. It is usually used by Microsoft’s new Windows Boot Manager and it stores many important startup information to start Windows. 

How to Rebuild BCD Windows 10/11?

Since the Boot Configuration Data file is closely related to computer startup, rebuilding BCD might be an effective solution when you fail to boot your computer. Here’s how to do it:

Move 1: Enter WinRE

Step 1. Press the power button. When the Windows blue logo appears on the screen, press the power icon again to shut down your computer.

Step 2. Repeat the step two or more times until you see the Automatic Repair screen. Click on Advanced options to enter Windows Recovery Environment.

hit Advanced options

Move 2: Rebuild BCD

Step 1. Go to Troubleshoot > Advanced options > Command Prompt.

hit Command Prompt

Step 2. Type the following command in the black console and hit Enter. Then, it will scan for other operating systems and you can choose the OS you want to add to BCD.

bootrec /rebuildbcd

Step 3. If this doesn’t help, you can set the boot path manually. In the command window of WinRE, type bcdboot c:\windows /s c: and hit Enter.

Tips:

Here c: refers to the system drive. You can only use this method when you know the exact drive where Windows is installed.

How to Back up & Restore BCD Registry File in Windows 10?

Boot Configuration Data is so important that any corruption or deletion in it will lead to Windows boot issues. Therefore, any operation about BCD file must be executed with caution. It is important to create a backup of the original BCD registry file in case something goes wrong. Here’s how to back up BCD registry file and how to restore it.

Step 1. Launch Command Prompt as an administrator.

Step 2. In the command line interface, type the following command and hit Enter to create a backup of your BCD file named as 0.1bcd on the F drive. After the process is done, you will receive the notice of successful completion.

bcdedit /export f:\01.bcd

Step 3. The restoration process is pretty easy, just run the following command in the elevated Command Prompt.

bcdedit /import f:\01.bcd

It is common to encounter system issues on Windows 10/11, and you are easy to make some mistakes when executing the commands in CMD. Things will be easier if you have created a system image. With a system image in hand, you can restore your system easily. When it comes to creating a system image, the PC backup software – MiniTool ShadowMaker is known for offering a one-click system backup solution. Let’s see how to use this tool to back up your Windows within just a few steps.

Step 1. Double-click on the shortcut of MiniTool ShadowMaker to launch it.

MiniTool ShadowMaker TrialClick to Download100%Clean & Safe

Step 2. In the Backup page, you can see the system is selected by default in SOURCE. As for choosing a storage path for the system image, go to DESTINATION.

choose a destination path

Step 3. Click on Back Up Now to start the process right now.

Final Words

In Summary, this post shows you how to rebuild Boot Configuration Data, how to back up BCD registry file, and how to restore registry BCD file step by step. Last but not in least, you had better back up your Windows so that you can restore your system quickly when running into system issues.

About The Author

Position: Columnist

Aurelie is a passionate soul who always enjoys researching & writing articles and solutions to help others. Her posts mainly cover topics related to games, data backup & recovery, file sync and so on. Apart from writing, her primary interests include reading novels and poems, travelling and listening to country music.

Windows не сможет правильно загрузиться, если файл данных конфигурации загрузки (BCD) поврежден или удален случайно. Таким образом, любая задача, связанная с изменением или модификацией в настройках загрузчика, должна выполняться с особой осторожностью. В качестве меры безопасности всегда можно создать резервную копию для восстановления исходного файла BCD. Существует два способа резервного копирования и восстановления BCD в Windows 10.

Пользователи могут управлять современным загрузчиком с помощью встроенной консоли  bcedit. Этот же инструмент также можно использовать для создания резервной копии конфигурации загрузки и последующего восстановления. Это руководство покажет вам, как сделать резервную копию и восстановить хранилище BCD конфигурации загрузки Windows 10 в файл.

Коротко: BCD- представляет собой специальный двоичный файл с именем BCD, находящимся в каталоге BOOT активного раздела. Менеджер загрузки предназначен для загрузки системы в соответствии с существующей конфигурацией, расположенной в специальном хранилище, называемом Boot Configuration Data или BCD. Менеджер загрузки bootmgr загружает ядро ​​ОС Windows, установленное на компьютере, в соответствии с загрузкой в ​​хранилище BCD.

Резервное копирование и восстановление BCD-файла в Windows 10 с помощью PowerShell.

Данный метод использует PowerShell  от имени Администратора

  1. Нажмите сочетание клавиш Win + X или кликните правой кнопкой мыши на меню «Пуск» и выберите PowerShell (администратор).
  2. Введите следующую команду:
bcdedit /export D:\01.bcd

Это создаст резервную копию вашего файла BCD с именем 01.bcd на вашем диске D:\. Вы можете выбрать букву диска и имя для вашего файла BCD. После завершения команды, пользователь будет уведомлен об успешном завершении процесса.

Выполните эти простые шаги, прежде чем изменять что-либо в загрузчике, и вы всегда сможете восстановить его. Теперь давайте посмотрим, как восстановить вышеуказанную резервную копию.

Восстановление хранилища конфигурации загрузки BCD в Windows 10

Процесс восстановления файла BCD очень похож. Все, что вам нужно сделать, это использовать команду с параметром / import

  1. Откройте PowerShell или командную строку при загрузке системы.
  2. Введите следующую команду и нажмите Enter:
bcdedit /import D:\01.bcd

Вот и все. Рекомендуем: Как восстановить основную загрузочную запись MBR в Windows 10

How to Backup and Restore Boot Configuration BCD Store in Windows 10

With Windows 8, Microsoft made changes to the boot experience. The simple text-based boot loader is now disabled by default and in its place, there is a touch-friendly graphical user interface with icons and text. Windows 10 has this as well. Users can manage the modern boot loader using the built-in console bcedit tool. The same tool can also be used to create a backup copy of the boot configuration, and later restore it.

In a dual boot configuration, the modern boot loader shows a list of all installed operating systems. After the specified timeout, if the user has not touched the keyboard, the default operating system will be started.

Windows re-arranges the boot entries, placing the last OS installed at the first place in the boot menu. You can change the boot loader entry order according to your preferences or delete some entries.

Boot Configuration Data is written to a data file of the Windows Registry hive format. It is mounted at registry key [HKEY_LOCAL_MACHINE\BCD00000] (with restricted permissions). For UEFI boot, the file is located at /EFI/Microsoft/Boot/BCD on the EFI System Partition. For legacy BIOS boot, the file is at /boot/BCD on the active partition.

You may want to create a backup of the BCD Store before making a change to the BCD. It is a good idea, as you will be able to restore the original BCD if something goes wrong.

This post will show you how to backup and restore the Boot Configuration BCD Store to a file in Windows 10.

In fact, the procedure is identical for Windows 8 and Windows 7. You must be signed in with an administrative account to continue.

Bcdedit Output Windows 10

BCD Store listed by the bcdedit command
  1. Open an elevated command prompt, or a command prompt at boot.
  2. Type the following command, and press Enter. bcdedit /export "<full path to your file>.bcd". For example, bcdedit /export "c:\data\winaero\my-bcd-11-25-2020.bcd".
    BCD Export Boot Configuration Data Store

  3. Correct the file path to match your system.
  4. You have created a backup copy of your BCD Store. Now you can close the command prompt

Now, let’s see how to restore the above backup.

To Restore Boot Configuration BCD Store in Windows 10

  1. Open an elevated command prompt, or a command prompt at boot.
  2. Type the following command, and press Enter. bcdedit /import "<full path to your file>.bcd". For example, bcdedit /import "c:\data\winaero\my-bcd-11-25-2020.bcd".
    BCD Import Boot Configuration Store

  3. Change the file path to match your system.
  4. You are done.

As you can see, it is easy to create a copy of the boot loader configuration in Windows 10, Windows 8 and Windows 7. Use these simple steps before changing anything in the bootloader, and you will always be able to recover it.

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won’t take a lot from you, but it will help us grow. Thanks for your support!

The BCD Store file is usually located in the Boot folder of a Windows 7/8.1/10 OS’s System Reserved partition;
which in many cases will not even have a drive letter assigned to it. So if you really want to see where these system files are located, you’ll first need
to go into Disk Management and give that partition a drive letter. (Note: Some OS distributions, such as the ‘Embedded Standard’ editions, do not have a
separate System Reserved partition.) Apart from possibly needing to add a drive letter, all system files are by default hidden from view, so you’ll also
need to change the Folder Settings to show hidden system files. But, since the BCD file is kept open by the OS, you wouldn’t be able to open
it to look at it anyway! However, you can use the BCDEDIT program to make a backup copy of the BCD file which you
can then open with a hex editor (to see everything) or even NOTEPAD (to see all the readable characters). [Contents of a real BCD file are linked below.]

Because you need Administrator privileges to access the BCD file with BCDEDIT. So, be sure to run the Command Prompt using a RIGHT-CLICK and selecting: («Run as administrator»).

The following is what you
would typically see when entering the command bcdedit all by itself:

C:\>bcdedit

Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=\Device\HarddiskVolume1
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {current}
resumeobject            {ad68f292-2870-11e3-9c80-856fbacd7f33}
displayorder            {current}
toolsdisplayorder       {memdiag}
timeout                 30

Windows Boot Loader
-------------------
identifier              {current}
device                  partition=C:
path                    \Windows\system32\winload.exe
description             Windows 7
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {ad68f294-2870-11e3-9c80-856fbacd7f33}
recoveryenabled         Yes
osdevice                partition=C:
systemroot              \Windows
resumeobject            {ad68f292-2870-11e3-9c80-856fbacd7f33}
nx                      OptIn

Note that the Boot Manager program (bootmgr) is often located in a volume without a drive letter, such as in this example, but it could
have one. If there were only one partition on the drive, then it would appear in the C: partition.

The following is a dump of a Windows™ 7/8 (or Vista) Administrator console (Command Prompt window) after entering «help bcdedit» («bcdedit /?» will give the same):

BCDEDIT - Boot Configuration Data Store Editor

The Bcdedit.exe command-line tool modifies the boot configuration data store.
The boot configuration data store contains boot configuration parameters and
controls how the operating system is booted. These parameters were previously
in the Boot.ini file (in BIOS-based operating systems) or in the nonvolatile
RAM entries (in Extensible Firmware Interface-based operating systems). You can
use Bcdedit.exe to add, delete, edit, and append entries in the boot
configuration data store.

For detailed command and option information, type bcdedit.exe /? <command>. For
example, to display detailed information about the /createstore command, type:

     bcdedit.exe /? /createstore

For an alphabetical list of topics in this help file, run "bcdedit /? TOPICS".

Commands that operate on a store
================================
/createstore    Creates a new and empty boot configuration data store.
/export         Exports the contents of the system store to a file. This file
                can be used later to restore the state of the system store.
/import         Restores the state of the system store using a backup file
                created with the /export command.

Commands that operate on entries in a store
===========================================
/copy           Makes copies of entries in the store.
/create         Creates new entries in the store.
/delete         Deletes entries from the store.

Run bcdedit /? ID for information about identifiers used by these commands.

Commands that operate on entry options
======================================
/deletevalue    Deletes entry options from the store.
/set            Sets entry option values in the store.

Run bcdedit /? TYPES for a list of datatypes used by these commands.
Run bcdedit /? FORMATS for a list of valid data formats.

Commands that control output
============================
/enum           Lists entries in the store.
/v              Command-line option that displays entry identifiers in full,
                rather than using names for well-known identifiers.
                Use /v by itself as a command to display entry identifiers
                in full for the ACTIVE type.

Running "bcdedit" by itself is equivalent to running "bcdedit /enum ACTIVE".

Commands that control the boot manager
======================================
/bootsequence   Sets the one-time boot sequence for the boot manager.
/default        Sets the default entry that the boot manager will use.
/displayorder   Sets the order in which the boot manager displays the
                multiboot menu.
/timeout        Sets the boot manager time-out value.
/toolsdisplayorder  Sets the order in which the boot manager displays
                    the tools menu.

Commands that control Emergency Management Services for a boot application
==========================================================================
/bootems        Enables or disables Emergency Management Services
                for a boot application.
/ems            Enables or disables Emergency Management Services for an
                operating system entry.
/emssettings    Sets the global Emergency Management Services parameters.

Command that control debugging
==============================
/bootdebug      Enables or disables boot debugging for a boot application.
/dbgsettings    Sets the global debugger parameters.
/debug          Enables or disables kernel debugging for an operating system
                entry.

Note: What you see above is exactly how a Vista/Win7/8 display appears; and, yes, the word «Command» in the last heading was spelled wrong by
Microsoft, it should be plural (Commands) just like all the others. And if there really was only one, then the word «control» should have
had an ‘s’ after it! This was still true for a Windows 7 SP1 install we examined, and even Windows 8.1. Is this a case of «If it ain’t
broke, don’t fix it!»? Apparently, the cost of qualifying a revised program outweighs this grammatical error.

And even though Windows™ 10 added six new commands (shown in white below), they
doubled the same grammatical error (shown in red). Now it’s incorrect for both of the last two command types:

BCDEDIT - Boot Configuration Data Store Editor

The Bcdedit.exe command-line tool modifies the boot configuration data store.
The boot configuration data store contains boot configuration parameters and
controls how the operating system is booted. These parameters were previously
in the Boot.ini file (in BIOS-based operating systems) or in the nonvolatile
RAM entries (in Extensible Firmware Interface-based operating systems). You can
use Bcdedit.exe to add, delete, edit, and append entries in the boot
configuration data store.

For detailed command and option information, type bcdedit.exe /? <command>. For
example, to display detailed information about the /createstore command, type:

     bcdedit.exe /? /createstore

For an alphabetical list of topics in this help file, run "bcdedit /? TOPICS".

Commands that operate on a store
================================
/store          Used to specify a BCD store other than the current system default.
/createstore    Creates a new and empty boot configuration data store.
/export         Exports the contents of the system store to a file. This file
                can be used later to restore the state of the system store.
/import         Restores the state of the system store using a backup file
                created with the /export command.
/sysstore       Sets the system store device (only affects EFI systems, does
                not persist across reboots, and is only used in cases where
                the system store device is ambiguous).

Commands that operate on entries in a store
===========================================
/copy           Makes copies of entries in the store.
/create         Creates new entries in the store.
/delete         Deletes entries from the store.
/mirror         Creates mirror of entries in the store.

Run bcdedit /? ID for information about identifiers used by these commands.

Commands that operate on entry options
======================================
/deletevalue    Deletes entry options from the store.
/set            Sets entry option values in the store.

Run bcdedit /? TYPES for a list of datatypes used by these commands.
Run bcdedit /? FORMATS for a list of valid data formats.

Commands that control output
============================
/enum           Lists entries in the store.
/v              Command-line option that displays entry identifiers in full,
                rather than using names for well-known identifiers.
                Use /v by itself as a command to display entry identifiers
                in full for the ACTIVE type.

Running "bcdedit" by itself is equivalent to running "bcdedit /enum ACTIVE".

Commands that control the boot manager
======================================
/bootsequence   Sets the one-time boot sequence for the boot manager.
/default        Sets the default entry that the boot manager will use.
/displayorder   Sets the order in which the boot manager displays the
                multiboot menu.
/timeout        Sets the boot manager time-out value.
/toolsdisplayorder  Sets the order in which the boot manager displays
                    the tools menu.

Commands that control Emergency Management Services for a boot application
==========================================================================
/bootems        Enables or disables Emergency Management Services
                for a boot application.
/ems            Enables or disables Emergency Management Services for an
                operating system entry.
/emssettings    Sets the global Emergency Management Services parameters.

Command that control debugging
==============================
/bootdebug      Enables or disables boot debugging for a boot application.
/dbgsettings    Sets the global debugger parameters.
/debug          Enables or disables kernel debugging for an operating system
                entry.
/hypervisorsettings  Sets the hypervisor parameters.

Command that control remote event logging
=========================================
/eventsettings  Sets the global remote event logging parameters.
/event          Enables or disables remote event logging for an operating
                system entry.

BCD Editor EXAMPLES:

If you ask for help on the «/export» switch, you’ll see:

C:\>bcdedit /export /?

bcdedit /export <filename>

This command exports the contents of the system store into a file.  This file
can be used later to restore the state of the system store.  This command is
only valid for the system store.

<filename>          The filename to be used as the destination for the export.
                    If the filename contains spaces, it must be enclosed in
                    quotation marks ("").

Example:

The following command exports the system store to the specified file:

    bcdedit /export "C:\Data\BCD Backup"

So we tried the following and saw it was successful:

C:\>bcdedit /export "C:\Users\<your user name>\Documents\bcdtemp.bin"
The operation completed successfully.

After examining this backup file in our Documents folder (using HxD), our first reaction was: «Man,
this thing appears to be full of all kinds of needless ‘gunk’!»

It even saves the path and filename to this backup file

,

inside the file
itself

!

Then we compared it to the original BCD file by making a copy of that file while the OS was offline (connected as a slave drive to a
different OS), and found there were MANY differences! So, the ‘backup copy’ is not really a true copy. And the differences go well beyond simply
changing the path name of its location.

So why is this file so ‘cluttered’ compared to the Windows XP boot.ini file? Its first 4 bytes
are a big clue: «regf«. Reason: The BCD file has the same format as a Windows Registry hive! (For example, the NTUSER.DAT
file begins with the same 4 bytes.) And in fact, once a Windows Vista/7/8 OS has actually started booting-up, it loads the BCD file into the Windows Registry
at: HKEY_LOCAL_MACHINE\BCD00000000.

BOOTMGR Experiments:

What happens if we change the NT Disk Signature on a Windows 7 disk drive?

To test this, we used a disk editor to alter the bytes at offsets 0x1B8 through 0x1BB in the MBR (first sector of the disk drive) by simply
adding 1 to each byte. If you attempt to boot a PC after doing that, you’ll see the following BLACK error screen:

In previous Windows versions, the OS would still boot up this way; even though there was the
possibility some program that used the Disk Signature could then have problems. Note: The same error message, with Status: code of 0xc000000e,
will also be displayed if we change those NT Sig. bytes to all zeros! Only if you edit these bytes back to their original values will the PC boot-up again.

It’s also possible to see such an error if your PC is somehow directed to start booting from a drive other than the normal boot drive, and the BCD
Store on that drive points to the first drive, which will obviously contain a different Disk Sig. than what is stored in that drive’s BCD. Most PC BIOS have
a ‘Boot Menu’ (often accessible using the F12 key at boot-up) which temporarily makes whatever drive you select, be the first drive on the PC, so a
Windows 7, 8.1 or 10 OS on that drive will not have this error! (Note: Unless you plan on always keeping an original Windows OS drive
and a new Windows OS drive

both connected

to your PC, you should never do a new OS install with any other drives connected
to the PC!) Why? Because new Windows OS installs often make changes to a primary disk drive, even when installed to a secondary drive! Disconnect all
but the disk drive you intend to install a new Win OS on, and in the future you will be able to boot-up the new drive all by itself (or using a Boot Menu key)
without it depending upon some primary disk drive you decided to remove, or that has failed.

NOTE: The error shown above is a function of the bootmgr program! We know this, because the same error message will be displayed after
altering the NT Disk Signature on a drive that has had its entire C: Volume (where the actual Windows OS resides) removed! So, the Boot
Manager must check the NT Disk Signature before it even looks for the presence of the C: Volume.

But how does bootmgr know what those hex
bytes should be?

Answer: After examining both our copy and the original BCD file, we found the NT Disk Signature there, in the same
order as found in the MBR Sector, no less than 9 times. For our small test install of a new Windows 7 OS, this shows
where those bytes occurred (highlighted with a pink background color); along with all the other data contained in a BCD Store file.
Note: The \Boot folder of your System Reserved partition will also contain a few LOG files: BCD.LOG, BCD.LOG1 and BCD.LOG2, but the numbered files are often empty. This LOG file is a copy of the BCD file, having the same location
written inside it and all the general indications of a BCD Registry file, but about half its bytes may be different.

Have fun examining your own backup BCD copy.

Why is it so difficult to move the C: Volume under Windows 7 or later?

To clarify: Under most previous Windows installs, such as Windows 98, people who performed multi-booting or simply had many different partitions on their
PCs often used a program called Partition Magic to shrink or even completely rearrange the layout of partitions on their disk drives. But attempting
to change where the C: Volume begins under Windows 7 results in a similar BLACK screen error as above; including the same exact message: «Info: The boot selection failed because a required device is inaccessible.» But with a different code: «Status: 0xc0000225.«

[Note: This is true whether the correct location
is specified in the Partition Table or not; same Status code will be shown in either case. In fact, we doubt that bootmgr even looks at the
Partition Table, provided it can find the C: volume where it is supposed to be!]

This problem is similar to the one above (concerning the NT
Disk Signature), but involves the exact sector location of the C: drive’s partition.

So where in the BCD file, is the sector location of the
Windows Boot Sector stored?

The reason for the question being: Although we can find our drive’s NT Disk Signature in the BCD Store, we can
not find a sector location for the C: drive! Before searching, we had thought only the
BCD file would need to be updated if we moved the C: Volume. We knew how partitions are referenced in a Windows REGISTRY (see NTFS Disk Signature), but could not find any similar bytes; other than the 4 bytes of the NT Disk Sig., in our BCD file! So how
does bootmgr know where the sector offset location of a C: drive should be, and prevent booting from an OS volume we simply moved and did
not resize; even though the data in both the Partition Table and its Boot Sector (Hidden Sectors which give us sector offset to Boot Sector) have
already been updated?

NOTE: All of the following is still under construction . . .
mainly because we have yet to find a solution that allows one to effectively move where a Windows 7 OS’s C: drive partition begins! After using a Microsoft
install DVD to REPAIR such a drive, although it did allow us to boot-up that drive and use it, the repair did not change anything permanently! After
attempting to boot-up the drive again, the same error message is displayed, no matter how many times we used the DVD to ‘repair’ the drive!!.

So what prevents a Windows 7 OS from booting-up if we change where its partition begins; even though we make sure the data in the partition table, as well as that volume’s Boot Sector, have had the size and location of the
partition changed correctly? Those were the only changes needed in any previous Windows version, yet doing so for a Windows 7 OS, results in a ‘blue
screen’ (actually a ‘BLACK-screen’), stating the OS cannot be located!

Could it be as simple as the OS already having accessed the REGISTRY; with much of the system already running in Memory, it then finds the offset stored
there does not match the values in the Partition Table and/or Boot Sector, so it gives us essentially a false message, stating: «The boot selection
failed because a required device is inaccessible.»? Yet, the bootmgr program could only know that if it did find and
access the Registry.

Other Experiments:

2. We next carried out the following steps on a copy of our Windows 7 OS install in order to verify our theory about why Windows 7 does this:

    A) Copy the hidden file bootmgr and various folders (including «Boot\enUS» and «Boot\Fonts») from the
«System Reserved» partition to the root directory of the C:\ drive. Note: Five or six files must be ‘skipped’ when doing this, because the
BCD Store (and associated files) will remain in use by the OS (preventing them from being copied)!
    B) Create a copy of the BCD file
in C:\Boot by using this command (as Administrator): bcdedit /export C:\Boot\BCD
    C) Change the
MBR Sector, so the main OS partition is the ‘Active’ partition.

After that we were able to boot-up the OS from only the C: drive. In order to prove
this is true, we used HxD to zero-out the entry in the Partition Table for the System Reserved partition. (Note: The reason we did not
use Windows to ‘delete’ the partition, is because that could have ruined being able to access it again in the future. By saving those hex bytes elsewhere
and zero-filling the entry, we can simply enter those bytes in the table again, in order to restore and access the partition!) Upon rebooting and opening
the Disk Management utility, one can graphically see this is true:

   

D) We shrank the size of this Volume (C:) to only 8 GB in order to run the next test below.

What about BOOTSTAT.DAT and BOOTSECT.BAK files?

    E) shift the beginning of the C: drive to where the System Reserved partition had been, by correcting the data in both the
Boot Sector (VBR) and the Partition Table; not to mention, actually moving the Boot Sector and its following Volume Boot Record sectors as well

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Интерфейс windows как в ubuntu
  • Windows 10 домашняя для одного языка x64 iso
  • Пишет что компьютер не соответствует минимальным требованиям windows 11
  • Windows cmd формат вывода
  • Soft raid windows server 2019