技术经验分享: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:

相关文章
|
Linux
Linux下安装中文输入法总结
Linux下安装中文输入法总结
6515 0
|
网络协议 关系型数据库 MySQL
如何在Android Termux上安装MySQL并实现公网远程访问?
如何在Android Termux上安装MySQL并实现公网远程访问?
1133 0
|
8月前
|
机器学习/深度学习 人工智能 弹性计算
阿里云学生专属算力包|AI 时代大学生上云、练手、做毕设一站式方案
阿里云推出学生专属算力包,19元起享云端ECS算力,支持编程学习、毕设部署、AI模型训练等全场景需求。按小时灵活抵扣、自然语言一键建站、0门槛上手,已联动清华、浙大等高校提供课程与竞赛支持。(239字)
|
8月前
|
缓存 算法 安全
如何稳定加密敏感文件:透明加密产品从密码算法到终端文件保护的实现路径
Ping64并非仅实现AES/SM4加密的工具,而是融合密码学、文件I/O接管、分层密钥管理、终端与进程可信判定的企业级透明加密系统,确保敏感文档在授权环境明文可用、非授权环境密态不可读,并支持外发控制与全链路审计。(239字)
430 0
|
11月前
|
人工智能 自然语言处理 机器人
2026年AI客服产品推荐深度评测
AI客服已成企业服务核心,2026年市场规模达285亿元。本文聚焦瓴羊Quick Service等主流产品,从场景适配、技术亮点、合规资质三大维度解析,结合实测数据与收费模式,为企业提供选型指南,助力提升客户体验与运营效率。
|
设计模式 前端开发 数据库
深入理解MVC设计模式:构建高效Web应用程序的基石
【7月更文挑战第4天】在软件工程领域,设计模式是解决常见问题的一系列经过验证的方法。其中,Model-View-Controller(MVC)设计模式自诞生以来,便成为了构建用户界面,特别是Web应用程序的黄金标准。MVC通过将应用程序逻辑分离为三个核心组件,提高了代码的可维护性、可扩展性和重用性。本文将深入探讨MVC设计模式的原理,并通过一个简单的代码示例展示其应用。
716 0
|
JSON 开发框架 网络安全
[网络安全] Dirsearch 工具的安装、使用详细教程
[网络安全] Dirsearch 工具的安装、使用详细教程
13325 3
|
Web App开发 监控 网络协议
QUIC 简介及 NodeJs 简单示例
QUIC协议是一个新的通讯协议,基于 UDP 的传输协议并希望最终取代所有基于TCP的HTTP请求。熟悉 UDP 的人都应该清楚为什么要使用 QUIC。UDP 是的特点是不可靠、数据包经常丢失、重新排序、重复等等。UDP 不包括任何更高级别协议(如 HTTP)严格要求的 TCP 的可靠性和顺序保证,这就是 QUIC 的用武之地。
1171 0
QUIC 简介及 NodeJs 简单示例
|
缓存
正在等待缓存锁:无法获得锁 /var/lib/dpkg/lock-frontend。锁正由进程 12836(unattended-upgr)持有
正在等待缓存锁:无法获得锁 /var/lib/dpkg/lock-frontend。锁正由进程 12836(unattended-upgr)持有
9123 0
正在等待缓存锁:无法获得锁 /var/lib/dpkg/lock-frontend。锁正由进程 12836(unattended-upgr)持有
|
存储 Linux
linux echo 写入文件
通过这些技巧和示例,你可以灵活运用 `echo`命令,无论是进行简单的文本输出还是复杂的文件操作,都能在Linux环境中游刃有余。
2115 1