Export (0) Print
Expand All
27 out of 43 rated this helpful - Rate this topic

Bootsect Command-Line Options

Published: October 22, 2009

Updated: October 22, 2009

Applies To: Windows 7

noteNote
This content applies to Windows 7. For Windows 8 content, see Windows Deployment with the Windows ADK.

Bootsect.exe updates the master boot code for hard disk partitions to switch between Bootmgr and NT Loader (NTLDR). You can use this tool to restore the boot sector on your computer. This tool replaces FixFAT and FixNTFS.

Bootsect Commands

Bootsect uses the following command-line options:

bootsect.exe {/help | /nt52 | /nt60} {SYS | ALL | <DriveLetter:>} [/force] /mbr

For example, to apply the master boot code that is compatible with NTLDR to the volume labeled E, use the following command:

bootsect.exe /nt52 E:

 

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 Windows® XP.

/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 Vista®.

SYS

Updates the master boot code on the system partition 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:

  • <DriveLetter> is not associated with a volume

  • <DriveLetter> is associated with a volume not connected to an underlying disk partition.

/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 attempted 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 result in 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® 7, Windows Vista, Windows Server® 2008 or Windows Server® 2008 R2.

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.