Command-line options | Description |
---|---|
/help | Displays these usage instructions. |
/nt52 | Applies the master boot code that is compatible with NTLDR to SYS, ALL, or <DriveLetter>. The operating system installed on SYS, ALL, or <DriveLetter> must be older than Windows Vista. |
/nt60 | Applies the master boot code that is compatible with Bootmgr to SYS, ALL, or <DriveLetter>. The operating system installed on SYS, ALL, or <DriveLetter> must be Windows 8, Windows® 7, Windows Vista, Windows Server® 2012, Windows Server 2008 R2, or Windows Server 2008. |
SYS | Updates the master boot code on the system partition that is used to boot Windows. |
ALL | Updates the master boot code on all partitions. The ALL option does not necessarily update the boot code for each volume. Instead, this option updates the boot code on volumes that can be used as Windows boot volumes, which excludes any dynamic volumes that are not connected with an underlying disk partition. This restriction is present because boot code must be located at the beginning of a disk partition. |
<DriveLetter> | Updates the master boot code on the volume associated with this drive letter. Boot code will not be updated if either:
|
/force | Forcibly dismounts the volumes during the boot code update. You must use this option with caution. If Bootsect.exe cannot gain exclusive volume access, then the file system may overwrite the boot code before the next reboot. Bootsect.exe always attempts to lock and dismount the volume before each update. When /force is specified, a forced dismount is tried if the initial lock attempt fails. A lock can fail, for example, if files on the destination volume are currently opened by other programs. When successful, a forced dismount enables exclusive volume access and a reliable boot code update even though the initial lock failed. At the same time, a forced dismount invalidates all open handles to files on the destination volume. This can cause unexpected behavior from the programs that opened these files. Therefore, use this option with caution. |
/mbr | Updates the master boot record without changing the partition table on sector 0 of the disk that contains the partition specified by SYS, ALL, or <drive letter>. When used with the /nt52 option, the master boot record is compatible with operating systems older than Windows Vista. When used with the /nt60 option, the master boot record is compatible with Windows 8, Windows 7, Windows Vista, Windows Server 2012, Windows Server 2008 R2, or Windows Server 2008. |
bcdboot
copies the core boot files from a chosen Windows installation on the disk to the system boot partition, and adds that an appropriate entry to the boot configuration data.bcdboot
doesn’t affect the bootsector or the master boot record (MBR), which must be configured separately. It can be used to either reinstall the bootloader files overwriting default boot entry, or optionally to add a single entry to the boot menu instead. bcdboot
is especially useful when setting up multiple operating systems on a single computer, and can be used to fix boot problems such as an operating system not showing up in the boot menu or an out-dated or corrupted bootloader installation.bcdboot
are as follows:source
source
Windows installation to the system (boot) partition, installs a BCD entry for the source installation, and adds that entry to the displayed boot menu. The typical source
format is C:Windows
. On UEFI-based systems, boot environment files and the BCD store are stored on a the reserved UEFI system partition, while on BIOS-based systems these files are stored on the primary (active) partition./i <locale>
locale
value for US English is en-us
/s <volumeLetter>
volumeLetter
and creates a new BCD store on it. As the system partition isn’t labeled, this option is not used in the typical deployment scenarios. The user should use this option when configuring a drive that will be used on another computer i.e. a secondary hard drive, or in case the correct boot partition is not automatically identified. More on the difference of deployment depending on the firmware type can be found in the section regarding the /f
option below./f <firmwareType>
UEFI
, BIOS
and ALL
. Used with the /s
flag. The UEFI
value copies only the UEFI-compatible boot files and initializes a BCD store on a partition specified by the /s flag making it compatible with UEFI-based systems. The BIOS
value does the same for BIOS-
based systems. The ALL
value installs both the BIOS- and UEFI-compatible versions of the bootloader and also configures each of their BCDs accordingly./v
/m <OSloaderGuid>
OSloaderGuid
with the system template to create a bootable entry. By default, this option will merge only global objects./addlast
/p
/addlast
option./d
/c
bcdboot D:Windows
bcdboot C:Windows /s D:
bcdboot c:Windows /s D: /f ALL
/p
, /d
, and /c
flags were introduced in Windows 10.