create partition msrcreate partition msr

适用于: Windows Server (半年通道) ,Windows Server 2019,Windows Server 2016,Windows Server 2012 R2,Windows Server 2012Applies to: Windows Server (Semi-Annual Channel), Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

在 GUID 分区表 (gpt) 磁盘上创建 Microsoft 保留 (MSR) 分区。Creates a Microsoft Reserved (MSR) partition on a GUID partition table (gpt) disk. 每个 gpt 磁盘上都需要 Microsoft 保留分区。A Microsoft Reserved partition is required on every gpt disk. 此分区的大小取决于 gpt 磁盘的总大小。The size of this partition depends on the total size of the gpt disk. Gpt 磁盘的大小必须至少为 32 MB 才能创建 Microsoft 保留分区。The size of the gpt disk must be at least 32 MB to create a Microsoft Reserved partition.

重要

使用此命令时要非常小心。Be very careful when using this command. 因为 gpt 磁盘需要特定分区布局,所以创建 Microsoft 保留分区可能会导致磁盘不可读。Because gpt disks require a specific partition layout, creating Microsoft Reserved partitions can cause the disk to become unreadable.

若要成功执行此操作,必须选择一个基本 gpt 磁盘。A basic gpt disk must be selected for this operation to succeed. 必须使用 " 选择磁盘 " 命令选择基本 gpt 磁盘,并将焦点移动到该磁盘。You must use the select disk command to select a basic gpt disk and shift the focus to it.

语法Syntax

create partition msr [size=<n>] [offset=<n>] [noerr]

参数Parameters

参数Parameter 说明Description
大小 =<n>size=<n> 分区大小以 mb (MB) 为单位。The size of the partition in megabytes (MB). 分区的字节数至少与指定的数字相同 <n>The partition is at least as long in bytes as the number specified by <n>. 如果未给出分区大小,则分区会一直继续,直至当前区域中没有可用空间为止。If no size is given, the partition continues until there is no more free space in the current region.
offset =<n>offset=<n> 指定在其中创建分区 (KB) 的偏移量(kb)。Specifies the offset in kilobytes (KB), at which the partition is created. 偏移量向上舍入,以完全填充所使用的任何扇区大小。The offset rounds up to completely fill whatever sector size is used. 如果未给出偏移量,则将分区放置在能容纳它的第一个磁盘区域中。If no offset is given, the partition is placed in the first disk extent that is large enough to hold it.
noerrnoerr 仅用于脚本。For scripting only. 出现错误时,DiskPart 继续处理命令,就像未发生错误一样。When an error is encountered, DiskPart continues to process commands as if the error did not occur. 如果没有此参数,则错误会导致 DiskPart 退出并出现错误代码。Without this parameter, an error causes DiskPart to exit with an error code.

备注Remarks

  • 在用于启动 Windows 操作系统的 gpt 磁盘上,可扩展固件接口 (EFI) 系统分区是磁盘上的第一个分区,后跟 Microsoft 保留分区。On gpt disks that are used to boot the Windows operating system, the Extensible Firmware Interface (EFI) system partition is the first partition on the disk, followed by the Microsoft Reserved partition. 仅用于数据存储的 gpt 磁盘没有 EFI 系统分区,在这种情况下,Microsoft 保留分区为第一个分区。gpt disks that are used only for data storage do not have an EFI system partition, in which case the Microsoft Reserved partition is the first partition.

  • Windows 不会装载 Microsoft 保留分区。Windows doesn't mount Microsoft Reserved partitions. 不能在其中存储数据,也不能将其删除。You cannot store data on them and you cannot delete them.

示例Examples

若要创建大小为 1000 mb 的 Microsoft 保留分区,请键入:To create a Microsoft Reserved partition of 1000 megabytes in size, type:

create partition msr size=1000

其他参考Additional References