Run windows from boot disk

BCDBoot Command-Line Options

BCDBoot is a command-line tool used to configure the boot files on a PC or device to run the Windows operating system. You can use the tool in the following scenarios:

  • Add boot files to a PC after applying a new Windows image. In a typical image-based Windows deployment, use BCDBoot to set up the firmware and system partition to boot to your image. To learn more, see Capture and Apply Windows, System, and Recovery Partitions.
  • Set up the PC to boot to a virtual hard disk (VHD) file that includes a Windows image. To learn more, see Boot to VHD (Native Boot): Add a Virtual Hard Disk to the Boot Menu.
  • Repair the system partition. If the system partition has been corrupted, you can use BCDBoot to recreate the system partition files by using new copies of these files from the Windows partition.
  • Set up or repair the boot menu on a dual-boot PC. If you’ve installed more than one copy of Windows on a PC, you can use BCDBoot to add or repair the boot menu.

File Locations

In Windows and Windows Preinstallation Environment (WinPE)

In the Windows Assessment and Deployment Kit (WindowsВ ADK):

C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\BCDBoot\BCDBoot.exe

Supported operating systems

BCDBoot can copy boot environment files from images of WindowsВ 10, Windows 8.1, WindowsВ 8, WindowsВ 7, WindowsВ Vista, Windows ServerВ 2016 Technical Preview, WindowsВ Server 2012 R2, Windows ServerВ 2012, Windows ServerВ 2008В R2, or WindowsВ ServerВ 2008.

How It Works

To configure the system partition, BCDBoot copies a small set of boot-environment files from the installed Windows image to the system partition.

BCDBoot can create a Boot Configuration Data (BCD) store on the system partition using the latest version of the Windows files:

  • BCDBoot creates a new BCD store and initialize the BCD boot-environment files on the system partition, including the Windows Boot Manager, using the %WINDIR%\System32\Config\BCD-Template file.
  • New in WindowsВ 10: During an upgrade, BCDBoot preserves any other existing boot entries, such as debugsettings, when creating the new store. Use the /c option to ignore the old settings and start fresh with a new BCD store.
  • If there is already a boot entry for this Windows partition, by default, BCDBoot erases the old boot entry and its values. Use the /m option to retain the values from an existing boot entry when you update the system files.
  • By default, BCDBoot moves the boot entry for the selected Windows partition to the top of the Windows Boot Manager boot order. Use the /d option to preserve the existing boot order.

On UEFI PCs, BCDBoot can update the firmware entries in the device’s NVRAM:

  • BCDBoot adds a firmware entry in the NVRAM to point to the Windows Boot Manager. By default, this entry is placed as the first item in the boot list. Use the /p option to preserve the existing UEFI boot order. Use /addlast to add it to the bottom of the boot order list.
Читайте также:  Blackarch install arch linux

Command-Line Options

The following command-line options are available for BCDBoot.exe.

BCDBOOT [/l ] [/s [/f ]] [/v] [/m [<OS Loader GUID>]] [/addlast or /p] [/d] [/c]

Required. Specifies the location of the Windows directory to use as the source for copying boot-environment files.

The following example initializes the system partition by using BCD files from the C:\Windows folder:

Optional. Specifies the locale. The default is US English ( en-us ).

The following example sets the default BCD locale to Japanese:

Optional. Specifies the volume letter of the system partition. This option should not be used in typical deployment scenarios.

Use this setting to specify a system partition when you are configuring a drive that will be booted on another computer, such as a USB flash drive or a secondary hard drive.

UEFI:

BCDBoot copies the boot files to either the EFI system partition, or the partition specified by the /s option.

BCDBoot creates the BCD store in the same partition.

By default, BCDBoot creates a Windows Boot Manager entry in the NVRAM on the firmware to identify the boot files on the system partition. If the /s option is used, then this entry is not created. Instead, BCDBoot relies on the default firmware settings to identify the boot files on the system partition. By the UEFI 2.3.1 spec, the default firmware settings should open the file: \efi\boot\bootx64.efi in the EFI System Partition (ESP).

BIOS:

BCDBoot copies the boot files to either the active partition on the primary hard drive, or the partition specified by the /s option.

BCDBoot creates the BCD store in the same partition.

The following example copies BCD files from the C:\Windows folder to a system partition on a secondary hard drive that will be booted on another computer. The system partition on the secondary drive was assigned the volume letter S:

The following example creates boot entries on a USB flash drive with the volume letter S, including boot files to support either a UEFI-based or a BIOS-based computer:

Optional. Specifies the firmware type. Valid values include UEFI , BIOS , and ALL .

On BIOS/MBR-based systems, the default value is BIOS . This option creates the \Boot directory on the system partition and copies all required boot-environment files to this directory.

On UEFI/GPT-based systems, the default value is UEFI . This option creates the \Efi\Microsoft\Boot directory and copies all required boot-environment files to this directory.

When you specify the ALL value, BCDBoot creates both the \Boot and the \Efi\Microsoft\Boot directories, and copies all required boot-environment files for BIOS and UEFI to these directories.

If you specify the /f option, you must also specify the /s option to identify the volume letter of the system partition.

The following example copies BCD files that support booting on either a UEFI-based or a BIOS-based computer from the C:\Windows folder to a USB flash drive that was assigned the volume letter S:

Optional. Enables verbose mode. Example:

Optional. Merges the values from an existing boot entry into a new boot entry.

By default, this option merges only global objects. If you specify an OS Loader GUID, this option merges the loader object in the system template to produce a bootable entry.

The following example merges the operating-system loader in the current BCD store that the specified GUID identifies in the new BCD store:

Optional. Specifies that the Windows Boot Manager firmware entry should be added last. The default behavior is to add it first. Cannot be used with /p.

Optional. Specifies that the existing Windows Boot Manager firmware entry position should be preserved in the UEFI boot order. If entry does not exist, a new entry is added in the first position. Cannot be used with /addlast.

By default, during an upgrade BCDBoot moves the Windows Boot Manager to be the first entry in the UEFI boot order.

Optional. Preserves the existing default operating system entry in the object in Windows Boot Manager.

Optional. Specifies that any existing BCD elements should not be migrated.

New for WindowsВ 10: By default, during an upgrade, BCD elements such as debugsettings or flightsigning are preserved.

Repair the system partition

If the system partition has been corrupted, you can use BCDBoot to recreate the system partition files by using new copies of these files from the Windows partition.

Boot your PC to a command line. For example, boot to the Windows installation disk and press Shift+F10, or boot to Windows PE (WinPE: Create USB Bootable drive).

Use Diskpart to determine which drive letter contains your Windows partition and system partition ( diskpart, list vol, exit ).

Optional: Format your system partition: format (drive letter of your system partition) /q

Add a boot entry for your Windows partition: bcdboot D:\Windows

Reboot the PC. Windows should appear.

Set up or repair the boot menu on a dual-boot PC

When setting up a PC to boot more than one operating system, you may sometimes lose the ability to boot into one of the operating systems. The BCDBoot option allows you to quickly add boot options for a Windows-based operating system. To set up a dual-boot PC:

Install a separate hard drive or prepare a separate partition for each operating system.

Install the operating systems. For example, if your PC has WindowsВ 7, install WindowsВ 10 onto the other hard drive or partition.

Reboot the PC. The boot menus should appear with both operating systems listed.

If both operating systems aren’t listed:

Open a command line, either as an administrator from inside Windows, or by booting to a command line using the Windows installation media and pressing Shift+F10, or by booting to Windows PE (WinPE: Create USB Bootable drive).

Add boot options for a Windows operating system.

Reboot the PC. Now, the boot menu will show both menu options.

Troubleshooting

For information about repairing the boot files on a PC with Windows XP and a more recent version of Windows such as WindowsВ 7, see the Microsoft Knowledge Base Article 2277998.

No Bootable Device при включении Windows 10 — Что делать?

При включении ноутбука с Windows, пользователь может столкнуться с ошибкой No Bootable Device, что в переводе означает «нет загрузочного устройства«. Ошибка может звучать по разному в зависимости от производителя ноутбука. К примеру на ноутбуках Acer она появляется в виде логотипа диска с сообщением «No Bootable Device», на ноутбуках Toshiba она звучит как «No Bootable Device Hit any key«, а на DEL как «No Bootable Device — Insert Boot Disk and Press Any Key«.

Виновником ошибки, когда Windows 10 не видит загрузочное устройство может быть неправильно выставленный в BIOS порядок загрузки, режим SATA или Boot Mode. Также, повреждение загрузочной записи MBR может вызывать ошибку No Bootable Device.

В этом руководстве о том, что делать и как исправить ошибку No Bootable Device при включении ноутбука или компьютера с Windows 10.

Как исправить No Bootable Device Insert Boot Disk and Press Any Key

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

1. Порядок загрузки в BIOS

Если выставлен неправильный порядок загрузки, то BIOS не сможет правильно определить, где установлена система Windows 10 и выдаст ошибку «No Bootable Device«.

В этом случае, когда ПК начнет загружаться, нажмите на F1, F10, F12, Esc или DEL, чтобы попасть в параметры BIOS. Выше приведенная таблица должна вам помочь. В BIOS перейдите во вкладку Boot и выставьте в графе device boot options на первое место диск на котором установлена Windows 10, после чего нажмите F10, чтобы сохранить изменения.

Примечание: У каждого производителя ноутбука и материнских плат свой BIOS. Название и нахождение параметров могут отличаться. Рекомендую воспользоваться Googele картинками, написав «Как на ноутбуке Acer поставить на первое место диск через BIOS«.

2. Изменить Boot Mode в БИОС

В BIOS найдите «Boot Mode» и измените в зависимости, что стояло по умолчанию. Т.е, если стоит UEFI, то измените на Legacy, и наоборот. Нажмите F10, чтобы сохранить изменения. Ниже две картинки для BIOS и UEFI.

3. Режим SATA в BIOS

Если у вас старый BIOS и вы установили SSD, после чего начала появляться ошибка «No Bootable Device», то нужно переключить режим SATA с IDE в AHCI. Не забываем нажать F10, чтобы сохранить изменения.

4. Поврежденные системные файлы

Поврежденные установочные системные файлы Windows могут вызывать много проблем, в том числе и «No Bootable Device». Нужно их восстановить при помощи командной строки.

Создайте установочную флешку с Windows 10 и начните установку. Дойдя по пункта установки, нажмите снизу на «Восстановление системы«, после чего вас перекинет в дополнительные параметры.

В дополнительных параметрах первым делом выберите «Восстановление при загрузке«. Если это не помогло устранить ошибку No Bootable Device, то запустите командную строку.

В командной строке задайте следующую команду, чтобы определить нахождение системы Windows, так как WinPE может определять локальные диски по разному.

  1. bcdedit
  2. В пункте «Загрузка Windows» смотрим буквы диска и размещение папки Windows, после чего задаем ниже команду.
  3. sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows

5. Исправить BCD и MBR

Загрузчик BCD и MBR мог повредиться и BIOS не сможет опознать загрузочное устройство. Ведите в командную строку следующие команды по порядку:

  1. Bootrec /fixmbr
  2. Bootrec /fixboot
  3. Bootrec /Scanos
  4. Bootrec /rebuildbcd

Примечание: Если у вас выдаются какие-либо ошибки, то скорее всего у вас таблица разделов GPT. Обратитесь к полному руководству по восстановлению загрузчика .

Читайте также:  Этот графический драйвер не совместим с данной версией windows 10 gt 630
Оцените статью
Option Description