技术经验分享:bootsect命令

简介: 技术经验分享:bootsect命令

bootsect 是 Vista 系统安装盘里带的一个小工具,位于 boot 文件夹下。它的主要作用是更新硬盘分区的主启动代码,以在 BOOTMGR 和 NTLDR 之间切换。另外还可以使用此工具还原计算机上的启动扇区。次工具会替换 FixFAT 和 FixNTFS 。


Bootsect 命令行选项


Bootsect 使用下列约定:


bootsect.exe {/help | /nt52 | /nt60} {SYS | ALL | }【/force】


例如,如果要将与 NTLDR 兼容的主启动代码应用到标记为 C 的卷,可以使用如下命令:


C:\BOOT

Target volumes will be updated with NTLDR compatible bootcode.


C: (\?\Volume{7bef1dca-fd61-11dd-844f-806d6172696f})


Updated NTFS filesystem bootcode. The update may be unreliable since the


volume could not be locked during the update:


Bootcode was successfully updated on all targeted volumes.


这里的 NT52 代表 NT 内核的版本。


Reference: Bootsect 命令行选项 bootsect.exe使用介绍


C:\BOOTDDDD>BOOTSECT.EXE /help


bootsect {/help|/nt60|/nt52} {SYS|ALL|:} 【/force】 【/mbr】


Boot sector restoration tool


Bootsect.exe updates the master boot code for hard disk partitions in order to


switch between BOOTMGR and NTLDR. You can use this tool to restore the boot


sector on your computer.


/help Displays these usage instructions.


/nt52 Applies the master boot code that is compatible with NTLDR to SYS,


ALL, or . The operating system installed on SYS, ALL, or


must be older than Windows Vista.


/nt60 //代码效果参考:http://www.lyjsj.net.cn/wx/art_23046.html

Applies the master boot code that is compatible with BOOTMGR to SYS,

ALL, or . The operating system installed on SYS, ALL, or


must be Windows Vista or Windows Server 2008.


SYS Updates the master boot code on the system partition used to boot


Windows.


ALL Updates the master boot code on all partitions. ALL does not


necessarily update the boot code for each volume. //代码效果参考:http://www.lyjsj.net.cn/wz/art_23044.html

Instead, this

option updates the boot code on volumes that could 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.


Updates the master boot code on the volume associated with this


drive letter. Boot code will not be updated if either 1)


is not associated with a volume or 2) is


associated with a volume not connected to an underlying disk


partition.


/force Forcibly dismounts the volume(s) during the boot code update. You


should use this option with caution.


If Bootsect.exe cannot gain exclusive volume access then the file


//代码效果参考:http://www.lyjsj.net.cn/wz/art_23042.html

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 target volume are currently opened by other programs.


When successful, a forced dismount allows 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 target volume. This could result in unexpected behavior from


the programs that opened these files. Therefore, you should 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 /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 Vista or Windows Server 2008.


Example:


To apply the master boot code that is compatible with NTLDR to the volume


labeled E:, use the following command:


bootsect /nt52 E:

相关文章
|
6月前
|
程序员 PHP
PHP程序员的成长之路:技术探索与实践
在当今数字化时代,PHP作为一种广泛应用的后端编程语言,对于程序员而言具有重要意义。本文从技术探索和实践的角度出发,探讨了PHP程序员在成长过程中所面临的挑战与机遇,以及如何通过持续学习与实践不断提升自身技能。
|
6月前
|
域名解析 运维 网络协议
Linux命令行全景指南:从入门到实践,掌握命令行的力量
Linux命令行全景指南:从入门到实践,掌握命令行的力量
168 0
|
6月前
|
大数据 Linux 网络安全
大数据开发工程师基本功修炼之史上最全Linux学习笔记(建议)
大数据开发工程师基本功修炼之史上最全Linux学习笔记(建议)
185 0
|
5月前
|
Web App开发 人工智能 Java
技术经验分享:affineCipherandafineHacker
技术经验分享:affineCipherandafineHacker
38 2
|
3月前
|
运维 Linux Shell
从Linux小白到大神的逆袭之路:解锁高级自测秘籍,让你的Linux技能瞬间燃爆,成为运维界的超级英雄!
【8月更文挑战第5天】Linux作为开源世界的基石,凭借其强大功能与高度可定制性,吸引着众多技术爱好者与专业人士。对于希望精进Linux系统管理的学习者来说,“Linux高级自测学习”是一次技术深潜之旅,也是对个人极限的挑战。本学习路径首先回顾基础操作,并进阶至LVM磁盘管理、系统性能优化、复杂网络配置与安全、自动化运维及容器化技术等领域。通过实践与探索,你将逐步解锁Linux潜力,成为高手。技术之路永无止境,保持好奇与求知心至关重要。
55 4
|
4月前
|
机器学习/深度学习 运维 监控
运维自动化的进阶之路:从脚本到智能
本文将深入探讨运维自动化的演变,从早期的脚本编写到现今的智能化实践。文章将通过具体案例和统计数据,展示自动化工具如何提升运维效率,并分析其在现代IT架构中的应用。我们将讨论自动化策略的实施过程,包括选择合适的工具、制定标准化流程、以及评估自动化效果的方法。最后,文章将预测未来运维自动化的趋势,并就如何构建一个高效、可靠的自动化运维系统提供建议。
|
5月前
技术经验分享:comparisonmethodviolates必现
技术经验分享:comparisonmethodviolates必现
25 0
技术经验分享:comparisonmethodviolates必现
|
5月前
|
数据可视化 BI OLAP
技术经验分享:DundasBI简介
技术经验分享:DundasBI简介
44 0
|
5月前
|
存储 缓存 NoSQL
技术经验分享:braum的使用
技术经验分享:braum的使用
27 0
|
5月前
|
应用服务中间件 PHP nginx
技术经验分享:fastcgimain
技术经验分享:fastcgimain
下一篇
无影云桌面