Windows 和 GPT 常见问题解答Windows and GPT FAQ

有关 GUID 分区表 (GPT) 的常见问题的解答。Answers to frequently asked questions about the GUID Partition Table (GPT).

此版本的 Windows 和 GPT 常见问题解答适用于 Windows 10 和 Windows Server 2016。This version of the Windows and GPT FAQ applies to Windows 10 and Windows Server 2016. 有关此 FAQ 的早期版本,请参阅 MSDN 上的 Windows 和 GPT 常见问题解答For a previous version of this FAQ, see Windows and GPT FAQ on MSDN.

由于引入了个人计算机,硬盘上的数据存储区域已划分为多个较小的区域。Since the introduction of the personal computer, the data storage area on a hard disk has been divided into smaller areas called sectors. 这些扇区分为多个分区,在磁盘上创建单独的卷或 "驱动器"。These sectors are grouped into partitions creating separate volumes, or 'drives' on a disk. 分区是使用称为 "主启动记录" (MBR) 的方案组织的。The partitions were organized using a scheme called the Master Boot Record (MBR). MBR 是磁盘上存在的每个分区的磁盘位置表,以及每个分区的特定长度。The MBR is a table of disk locations, or addresses, along with a certain length, of each of the partitions present on the disk. MBR 本身占用少量磁盘,并在启动阶段读取,以确定启动进入的操作系统的位置。The MBR itself occupies a small amount of the disk and is read during the boot phase to determine where to locate the operating system to boot into. 操作系统也使用 MBR 信息作为磁盘上的卷的映射。The MBR information is also used by the operating system as a map of the volumes present on the disk.

最终,磁盘的数据密度对于 MBR 方案而言太大,无法用于所有可用数据位置。Eventually, data density for disks became too large for the MBR scheme to account for all the available data locations. 另外,MBR 的布局或格式是为早期计算机设计的,并且不能灵活地适应更高的磁盘配置。Also, the layout, or format, of the MBR was designed for early computers and not flexible enough to accommodate newer disk configurations. 需要一个新的分区方法,以便创建 GUID 分区表 (GPT) 分区方案。A new partitioning method was needed so the GUID Partition Table (GPT) partitioning scheme was created.

GPTGPT

什么是 GPT 磁盘What a GPT disk is

GUID 分区表 (GPT) 作为统一可扩展固件接口 (UEFI) 计划的一部分引入。The GUID Partition Table (GPT) was introduced as part of the Unified Extensible Firmware Interface (UEFI) initiative. GPT 提供了一种更灵活的机制,用于对磁盘进行分区,而不是使用较旧的主启动记录 (MBR) 分区方案。GPT provides a more flexible mechanism for partitioning disks than the older Master Boot Record (MBR) partitioning scheme that was common to PCs.

分区是物理磁盘或逻辑磁盘上的存储的连续空间,其工作方式与物理上独立的磁盘相同。A partition is a contiguous space of storage on a physical or logical disk that functions as if it were a physically separate disk. 分区对于系统固件和已安装的操作系统可见。Partitions are visible to the system firmware and the installed operating systems. 对分区的访问由系统固件控制,系统在系统启动操作系统之前,然后在启动操作系统之后由操作系统进行控制。Access to a partition is controlled by the system firmware before the system boots the operating system, and then by the operating system after it is started.

MBR 分区出错What is wrong with MBR partitioning

MBR 磁盘仅支持四个分区表条目。MBR disks support only four partition table entries. 对于四个以上的分区,需要一个称为扩展分区的辅助结构。For more than four partitions, a secondary structure known as an extended partition is necessary. 然后,可以将扩展分区细分为一个或多个逻辑磁盘。Extended partitions can then be subdivided into one or more logical disks.

Windows 根据报告的几何在柱面边界上创建 MBR 磁盘分区和逻辑驱动器,但此信息不再与硬件 (磁盘驱动程序或 RAID 控制器) 有任何关系。Windows creates MBR disk partitions and logical drives on cylinder boundaries based on the reported geometry, although this information no longer has any relationship to the physical characteristics of the hardware (disk driver or RAID controller). 从 Windows Vista 和 Windows Server 2008 开始,当硬件在真正的缓存或物理对齐方式下提供更好的提示时,将选择更多的逻辑边界。Starting with Windows Vista and Windows Server 2008, more logical boundaries are selected when the hardware provides better hints at the true cache or physical alignment. 由于此分区信息存储在驱动器上,因此操作系统不依赖于对齐方式。Because this partition information is stored on the drive itself, the operating system is not dependent on the alignment.

MBR 分区规则非常复杂且未指定。MBR partitioning rules are complex and poorly specified. 例如,柱面对齐是否意味着每个分区必须至少是一个柱面?For example, does cylinder alignment mean that each partition must be at least one cylinder in length? MBR 分区由两字节字段标识,需要协调才能避免冲突。An MBR partition is identified by a two-byte field, and coordination is necessary to avoid collision. IBM 最初提供此协调,但目前没有单个权威列表的分区标识符。IBM originally provided that coordination, but today there is no single authoritative list of partition identifiers.

另一种常见做法是使用分区或 "隐藏" 扇区来保存特定的信息,方法是使用未记录的进程,并导致难以调试的问题。Another common practice is using partitioned or "hidden" sectors to hold specific information by using undocumented processes and results in problems that are difficult to debug. 过去,特定于供应商的实现和工具已发布到公共,这使得支持工作变得困难。In the past, vendor-specific implementations and tools were released to the public, which made support difficult.

为什么需要 GPTWhy we need GPT

GPT 磁盘允许增长。GPT disks allow for growth. GPT 磁盘上的分区数不受诸如 MBR 扩展启动记录定义的容器分区( (EBR) )的临时方案的限制。The number of partitions on a GPT disk isn't constrained by temporary schemes such as container partitions as defined by the MBR Extended Boot Record (EBR). GPT 磁盘分区格式定义正确,并且完全自我标识。The GPT disk partition format is well defined and fully self-identifying. 对平台操作至关重要的数据位于分区中,而不是位于未分区或 "隐藏" 扇区中。Data critical to platform operation is located in partitions and not in unpartitioned or "hidden" sectors. GPT 磁盘使用主分区表和备份分区表来实现冗余和 CRC32 字段,以改进分区数据结构完整性。GPT disks use primary and backup partition tables for redundancy and CRC32 fields for improved partition data structure integrity. GPT 分区格式使用 "版本号" 和 "大小" 字段进行未来扩展。The GPT partition format uses version number and size fields for future expansion.

每个 GPT 分区都具有唯一的标识 GUID 和分区内容类型,因此,无需协调即可防止分区标识符发生冲突。Each GPT partition has a unique identification GUID and a partition content type, so no coordination is necessary to prevent partition identifier collision. 每个 GPT 分区都有一个36字符的 Unicode 名称。Each GPT partition has a 36-character Unicode name. 这意味着,任何软件都可以为该分区提供用户可读的名称,而无需对分区进行任何其他了解。This means that any software can present a human-readable name for the partition without any additional understanding of the partition.

在何处查找 GPT 磁盘分区的规范Where to find the specification for GPT disk partitioning

统一可扩展固件接口 (UEFI) 规范的第5章 (版本 2.3) 定义 GPT 格式。Chapter 5 of the Unified Extensible Firmware Interface (UEFI) specification (version 2.3) defines the GPT format. 此规范可在中找到 https://www.uefi.org/specificationsThis specification is available at https://www.uefi.org/specifications.

基本磁盘的 GPT 格式The GPT format for basic disks

基本磁盘是 Windows 最常使用的存储类型。Basic disks are the most commonly used storage types with Windows. "基本磁盘" 指的是包含分区(如主分区和逻辑驱动器)的磁盘,通常使用文件系统进行格式化,以便成为文件存储的卷。"Basic disk" refers to a disk that contains partitions, such as primary partitions and logical drives, usually formatted with a file system to become a volume for file storage.

存在 GPT 分区表的保护 MBR 区域是为了与在 MBR 上操作的磁盘管理实用工具向后兼容。The protective MBR area on a GPT partition table exists for backward compatibility with disk management utilities that operate on MBR. GPT 标头定义分区条目可用的逻辑块地址范围。The GPT header defines the range of logical block addresses that are usable by partition entries. GPT 标头还定义了其在磁盘上的位置、其 GUID 和32位循环冗余检查 (CRC32) 校验和,用于验证 GPT 标头的完整性。The GPT header also defines its location on the disk, its GUID, and a 32-bit cyclic redundancy check (CRC32) checksum that is used to verify the integrity of the GPT header. GUID 分区表中的每个条目都以分区类型 GUID 开头。Each entry in the GUID partition table begins with a partition type GUID. 16字节的分区类型 GUID,它类似于 MBR 磁盘分区表中的系统 ID,标识分区包含的数据类型并标识分区的使用方式,例如,是基本磁盘还是动态磁盘。The 16-byte partition type GUID, which is similar to a System ID in the partition table of an MBR disk, identifies the type of data that the partition contains and identifies how the partition is used, for example, whether it is a basic disk or a dynamic disk. 请注意,每个 GUID 分区条目都有一个备份副本。Note that each GUID partition entry has a backup copy.

有关基本磁盘的详细信息,请参阅 基本磁盘和动态磁盘For more information about basic disks, see Basic and Dynamic Disks.

动态磁盘的 GPT 格式The GPT format for dynamic disks

动态磁盘首次随 Windows 2000 一起引入,并提供基本磁盘不支持的功能,例如,能够创建跨多个磁盘的卷 (跨区卷和带区卷) 并且能够创建容错卷 (镜像卷和 RAID-5 卷) 。Dynamic disks were first introduced with Windows 2000 and provide features that basic disks don't, such as the ability to create volumes that span multiple disks (spanned and striped volumes) and the ability to create fault-tolerant volumes (mirrored and RAID-5 volumes). 动态磁盘可以在支持这二者的系统上使用 MBR 或 GPT 分区形式。Dynamic disks can use the MBR or GPT partition styles on systems that support both. 有关动态磁盘的详细信息,请参阅 基本磁盘和动态磁盘For more information about dynamic disks, see Basic and Dynamic Disks.

GPT 磁盘的 UEFI 要求UEFI requirements for a GPT disk

GPT 磁盘是自我识别的。GPT disks are self-identifying. 解释 GPT 磁盘分区方案所需的所有信息完全包含在物理媒体上指定位置的结构中。All the information needed to interpret the partitioning scheme of a GPT disk is completely contained in structures in specified locations on the physical media.

GPT 磁盘可为多大How big can a GPT disk be

理论上,GPT 磁盘最多可以有 2 ^ 64 个逻辑块。In theory, a GPT disk can be up to 2^64 logical blocks in length. 逻辑块的大小通常为512字节。Logical blocks are commonly 512 bytes in size.

最大分区 (和磁盘) 大小取决于操作系统版本。The maximum partition (and disk) size depends on the operating system version. Windows XP 和 Windows Server 2003 的原始版本的每个物理磁盘(包括所有分区)的限制为2TB。Windows XP and the original release of Windows Server 2003 have a limit of 2TB per physical disk, including all partitions. 对于 Windows Server 2003 SP1、Windows XP x64 edition 及更高版本,可以支持最大原始分区为 18 eb。For Windows Server 2003 SP1, Windows XP x64 edition, and later versions, the maximum raw partition of 18 exabytes can be supported. (的 Windows 文件系统当前限制为 256 tb。 ) (Windows file systems currently are limited to 256 terabytes each.)

GPT 磁盘可以有多少分区How many partitions a GPT disk can have

此规范允许的分区数几乎不受限制。The specification allows an almost unlimited number of partitions. 但是,Windows 实现将此限制为128个分区。However, the Windows implementation restricts this to 128 partitions. 分区数受 GPT 中分区条目的保留空间量的限制。The number of partitions is limited by the amount of space reserved for partition entries in the GPT.

磁盘是 GPT 还是 MBRWhether a disk can be both GPT and MBR

不能。No. 但是,所有 GPT 磁盘都包含保护 MBR。However, all GPT disks contain a Protective MBR.

保护性 MBRProtective MBR

从扇区0开始,位于磁盘的 GPT 分区表之前的保护 MBR。The Protective MBR, beginning in sector 0, precedes the GPT partition table on the disk. 该 MBR 包含一个跨磁盘的类型0xEE 分区。The MBR contains one type 0xEE partition that spans the disk.

为什么 GPT 具有保护 MBRWhy the GPT has a Protective MBR

保护 MBR 可保护 GPT 磁盘,使其不受以前发布的 MBR 磁盘工具,如 Microsoft MS-DOS FDISK 或 Microsoft Windows NT Disk Administrator。The Protective MBR protects GPT disks from previously released MBR disk tools such as Microsoft MS-DOS FDISK or Microsoft Windows NT Disk Administrator. 这些工具不知道 GPT,而且不知道如何正确访问 GPT 磁盘。These tools are not aware of GPT and don't know how to properly access a GPT disk. 不知道 GPT 的旧版软件在访问 GPT 磁盘时只会解释受保护的 MBR。Legacy software that does not know about GPT interprets only the Protected MBR when it accesses a GPT disk. 这些工具会通过解释受保护的 MBR,将 GPT 磁盘视为包含一个包含 (可能无法识别的) 分区,而不是误认为未分区的磁盘。These tools will view a GPT disk as having a single encompassing (possibly unrecognized) partition by interpreting the Protected MBR, rather than mistaking the disk for one that is unpartitioned.

GPT 分区磁盘在其上出现的原因Why a GPT-partitioned disk would appear to have an MBR on it

当使用仅支持 MBR 的磁盘工具访问 GPT 磁盘时,会发生这种情况。This occurs when you use an MBR-only-aware disk tool to access the GPT disk. 有关详细信息,请参阅以下各节:For more information, see the following sections:

  • 磁盘可以是 GPT 和 MBR 的方式How a disk can be both GPT and MBR
  • 保护性 MBRProtective MBR
  • 为什么 GPT 具有保护 MBRWhy the GPT has a Protective MBR

Windows 磁盘支持Windows disk support

Windows XP x64 是否可以读取、写入和启动 GPT 磁盘Whether Windows XP x64 can read, write, and boot from GPT disks

Windows XP x64 Edition 只能将 GPT 磁盘用于数据。Windows XP x64 Edition can use GPT disks for data only.

Windows XP 的32位版本是否从 GPT 磁盘读取、写入和启动Whether the 32-bit version of Windows XP read, write, and boot from GPT disks

不能。No. 32位版本将只会看到保护 MBR。The 32-bit version will see only the Protective MBR. EE 分区将不会装载或公开给应用程序软件。The EE partition will not be mounted or otherwise exposed to application software.

32和64位版本的 Windows Server 是否2003从 GPT 磁盘读取、写入和启动Whether the 32- and 64-bit versions of Windows Server 2003 read, write, and boot from GPT disks

从 Windows Server 2003 Service Pack 1 开始,所有版本的 Windows Server 都可以使用 GPT 分区磁盘来获取数据。Starting with Windows Server 2003 Service Pack 1, all versions of Windows Server can use GPT partitioned disks for data. 仅支持对基于 Itanium 的系统上的64位版本进行引导。Booting is only supported for 64-bit editions on Itanium-based systems.

Windows Vista、Windows Server 2008 和更高版本可从 GPT 磁盘读取、写入和启动Can Windows Vista, Windows Server 2008, and later read, write, and boot from GPT disks

是的,所有版本都可以使用 GPT 分区磁盘进行数据。Yes, all versions can use GPT partitioned disks for data. 仅在基于 UEFI 的系统上,64位版本支持启动。Booting is only supported for 64-bit editions on UEFI-based systems.

Windows 2000、Windows NT 4 或 Windows 95/98 是否可从 GPT 读取、写入和启动Can Windows 2000, Windows NT 4, or Windows 95/98 read, write, and boot from GPT

不能。No. 同样,旧版软件将仅显示保护 MBR。Again, legacy software will see only the Protective MBR.

将 GPT 磁盘移到另一台计算机Moving a GPT disk to another computer

你可以将仅限数据的 GPT 磁盘移到或迁移到运行 Windows XP (64 位版本的其他系统,) 或更高版本的操作系统 (32 或64位版本) 。You can move, or migrate, data-only GPT disks to other systems that are running Windows XP (64-bit edition only) or later versions of the operating system (32- or 64-bit editions). 可以在系统关闭后或在安全删除磁盘后迁移仅限数据的 GPT 磁盘。You can migrate data-only GPT disks after the system has been shutdown or after the safe removal of the disk.

在同一系统上混合并匹配 GPT 和 MBR 磁盘Mixing and matching GPT and MBR disks on the same system

如前文所述,GPT 和 MBR 磁盘可以在支持 GPT 的系统上混合。GPT and MBR disks can be mixed on systems that support GPT, as described earlier. 但是,必须注意下列限制:However, you must be aware of the following restrictions:

  • 支持 UEFI 的系统要求启动分区必须位于 GPT 磁盘上。Systems that support UEFI require that boot partition must reside on a GPT disk. 其他硬盘可以是 MBR 或 GPT。Other hard disks can be either MBR or GPT.
  • MBR 和 GPT 磁盘可位于单个动态磁盘组中。Both MBR and GPT disks can be present in a single dynamic disk group. 卷集可以同时跨越 MBR 和 GPT 磁盘。Volume sets can span both MBR and GPT disks.

可移动媒体Removable media

可移动媒体必须是 MBR、GPT 或 "superfloppy"。Removable media must be MBR, GPT, or "superfloppy."

SuperfloppySuperfloppy

不带 GPT 或 MBR 格式的可移动媒体被视为 "superfloppy"。Removable media without either GPT or MBR formatting is considered a "superfloppy". 整个媒体被视为单个分区。The entire media is treated as a single partition.

媒体制造商对可移动媒体执行任何 MBR 分区。The media manufacturer performs any MBR partitioning of removable media. 如果媒体具有 MBR,则仅支持一个分区。If the media has an MBR, only one partition is supported. MBR 分区媒体和 superfloppies 之间的差别很小。There is little user-discernible difference between MBR-partitioned media and superfloppies.

可移动媒体的示例包括软盘驱动器、JAZ 磁盘盒、光盘媒体、DVD-ROM 和 cd-rom。Examples of removable media include floppy disk drives, JAZ disk cartridges, magneto-optical media, DVD-ROM, and CD-ROM. 外部总线(如 SCSI 或 IEEE 1394)上的硬盘驱动器不被视为可移动设备。Hard disk drives on external buses such as SCSI or IEEE 1394 are not considered removable.

对媒体进行分区时,Windows XP 64 位版本2003的默认行为是什么?What is the default behavior of Windows XP 64-Bit Edition Version 2003 when partitioning media?

对于 Windows XP 64 版版本2003( (仅适用于基于 Itanium 的系统) ),通过使用 GPT 分区对固定磁盘进行分区。For Windows XP 64-Bit Edition Version 2003 only (for Itanium-based systems), fixed disks are partitioned by using GPT partitioning. 只有在第一次删除所有现有分区时,才会将 GPT 磁盘转换为 MBR 磁盘,并会丢失数据。GPT disks can be converted to MBR disks only if all existing partitioning is first deleted, with associated loss of data.

对媒体进行分区时,32位版本的 Windows XP、Windows Server 2003 和 Windows XP x64 的默认行为The default behavior of the 32-bit version of Windows XP, Windows Server 2003 and Windows XP x64 when partitioning media

只能使用 MBR 磁盘。Only MBR disks can be used.

将操作系统中的驱动器号映射到 UEFI 固件中的分区Mapping a drive letter in the operating system to a partition in UEFI firmware

驱动器号和分区之间没有可用于确定另一个的固有映射。There is no inherent mapping between drive letter and partition that can be used to determine one from the other. 基本数据分区必须由其分区 GUID 标识。A basic data partition must be identified by its partition GUID.

创建 ESP 分区Creating an ESP partition

可以使用 UEFI 固件实用程序 Diskpart 或 Windows 命令行实用程序 Diskpart.exe 来创建 ESP 分区。ESP partitions can be created by using the UEFI firmware utility Diskpart.efi or the Windows command line utility Diskpart.exe.

对分区所做的更改Changes on a partition

不应直接更改任何分区标头条目。You shouldn't directly change any partition header entry. 不要使用磁盘工具或实用程序进行更改或更改。Don't use disk tools or utilities to make alterations or changes.

可分离磁盘上支持的分区Supported partitioning on detachable disks

可分离磁盘通常应在计算机之间迁移,或仅在计算机上可供操作系统使用。Detachable disks are typically expected to migrate between computers or simply to be unavailable to the operating system at times. 可分离磁盘的示例有 USB 磁盘,最终用户可以轻松地断开连接。Examples of detachable disks are USB disks, which can be easily disconnected by the end-user. Windows XP 仅支持可分离磁盘上的 MBR 分区。Windows XP supports only MBR partitioning on detachable disks. Windows 的更高版本支持可分离磁盘上的 GPT 分区。Later versions of Windows support GPT partitions on detachable disks.

有关可移动媒体的详细信息,请参阅以下问题:For more about removable media, see the following questions:

  • 可移动媒体Removable media
  • SuperfloppySuperfloppy

Windows GPT 所需分区: EFI 系统分区Windows GPT required partitions: EFI System Partition

可扩展固件接口系统分区 (ESP) The Extensible Firmware Interface System Partition (ESP)

ESP 包含用于启动系统所需的 NTLDR、HAL、Boot.txt 和其他文件,如驱动程序。The ESP contains the NTLDR, HAL, Boot.txt, and other files that are needed to boot the system, such as drivers. 分区 GUID 定义 ESP:The Partition GUID defines the ESP:

DEFINE_GUID (PARTITION_SYSTEM_GUID, 0xC12A7328L, 0xF81F, 0x11D2, 0xBA, 0x4B, 0x00, 0xA0, 0xC9, 0x3E, 0xC9, 0x3B)

GPT 磁盘和 ESPsGPT Disks and ESPs

不可以。 MBR 磁盘也有 ESPs。No, MBR disks can also have ESPs. UEFI 指定从 GPT 或 MBR 启动。UEFI specifies booting from either GPT or MBR. MBR 磁盘上的 ESP 由分区类型0xEF 标识。The ESP on an MBR disk is identified by partition type 0xEF. 但是,Windows 不支持从 MBR 磁盘或0xEF 分区启动 UEFI。However, Windows does not support booting UEFI from MBR disks or 0xEF partitions.

ESP 的大小The size of the ESP

ESP 约为100MBs。The ESP is approximately 100MBs.

单个磁盘上有两个 ESPsTwo ESPs on a single disk

不应创建此类配置,Windows 不支持此配置。Such a configuration shouldn't be created, and is not supported in Windows.

两个 ESPs 在两个不同的磁盘上Two ESPs on two different disks

可以复制 ESP 分区以实现高可用性配置。ESP partitions can be replicated for high-availability configurations. 必须手动完成复制,使用软件卷时必须手动同步内容。Replication must be done manually and the contents must be synchronized manually when using software volumes. 硬件供应商可能会提供更多的高可用性解决方案。Hardware vendors may provide additional solutions for high availability. 无法镜像 ESP 分区。ESP partitions cannot be mirrored.

ESP 中的 Microsoft 位置What Microsoft places in the ESP

Microsoft 在 ESP 中放置启动操作系统所需的 HAL、加载程序和其他文件。Microsoft places the HAL, loader, and other files that are needed to boot the operating system in the ESP.

磁盘上的 ESP 位置ESP placement on the disk

ESP 应该首先位于磁盘上。The ESP should be first on the disk. 首先放置 ESP 的主要优点是,当 ESP 逻辑上要跨越的两个数据分区之间逻辑之间的情况下,不可能跨越卷。The primary benefit to placing the ESP first, is that it is impossible to span volumes when the ESP is logically between the two data partitions that you are attempting to span.

系统或设备制造商添加到 ESPSystem or device manufacturer additions to the ESP

ESP 应该只包含启动操作系统所需的文件、操作系统启动前运行的平台工具或在操作系统启动之前必须访问的文件。The ESP should only include files that are required for booting an operating system, platform tools that run before operating system boot, or files that must be accessed before operating system boot. 例如,必须将执行预启动系统维护所需的文件置于 ESP 中。For example, files that are required for performing pre-boot system maintenance must be placed in the ESP.

在操作系统运行时使用的其他值添加文件或诊断不应置于 ESP 中。Other value-add files or diagnostics used while the operating system is running should not be placed in the ESP. 请务必注意,ESP 中的空间是有限的系统资源;其主要目的是为启动操作系统所需的文件提供存储。It is important to note that the space in the ESP is a limited system resource; its primary purpose is to provide storage for the files that are needed to boot the operating system.

平台诊断或其他增值文件等文件的系统制造商布局System manufacturer placement for files such as platform diagnostics or other value-added files

首选选项适用于系统制造商将增值内容置于特定于 OEM 的分区中。The preferred option is for system manufacturers to place value-add contents in an OEM-specific partition. 与 MBR OEM 分区一样,GPT OEM (或其他无法识别的) 分区的内容不 (给定的驱动器号公开,也不会在卷列表) 中返回。Just like MBR OEM partitions, the contents of GPT OEM (or other unrecognized) partitions are not exposed (given drive letters or returned in volume lists). 警告用户删除分区可能会导致系统无法运行。Users are warned that deleting the partition can cause the system to fail to operate. 特定于 OEM 的分区应置于 MSR 之前和磁盘上的任何 ESP 之后。An OEM-specific partition should be placed before the MSR and after any ESP on the disk. 尽管此位置不是体系结构,但它的优点与首先放置 ESP 的优点相同。Although not architectural, this placement has the same benefits as placing the ESP first. 例如,当特定于 OEM 的分区在您尝试跨的两个数据分区之间逻辑上时,也无法跨越卷。For example, it is also impossible to span volumes when an OEM-specific partition is logically between the two data partitions that you are attempting to span.

ESP 中的位置是在预操作系统引导环境中执行的应用程序或文件的选项。Placement in the ESP is an option for applications or files that execute in the pre-operating system boot environment. 但是,ESP 是在结构上共享空间,表示资源有限。However, the ESP is architecturally shared space and represents a limited resource. 应仔细考虑 ESP 中的占用空间。Consuming space in the ESP should be considered carefully. 不应将与预操作系统引导环境无关的文件置于 ESP 中。Files that are not relevant to the pre-operating system boot environment should not be placed in the ESP.

Microsoft 保留分区 (MSR)Microsoft Reserved Partition (MSR)

Microsoft 保留分区 (MSR) 保留每个磁盘驱动器上的空间,以供操作系统软件以后使用。The Microsoft Reserved Partition (MSR) reserves space on each disk drive for subsequent use by operating system software. GPT 磁盘不允许隐藏扇区。GPT disks do not allow hidden sectors. 以前使用隐藏扇区的软件组件现在为特定于组件的分区分配 MSR 部分。Software components that formerly used hidden sectors now allocate portions of the MSR for component-specific partitions. 例如,将基本磁盘转换为动态磁盘将导致该磁盘上的 MSR 大小减小,而新创建的分区将包含动态磁盘数据库。For example, converting a basic disk to a dynamic disk causes the MSR on that disk to be reduced in size and a newly created partition holds the dynamic disk database. MSR 的分区 GUID 为:The MSR has the Partition GUID:

DEFINE_GUID (PARTITION_MSFT_RESERVED_GUID, 0xE3C9E316L, 0x0B5C, 0x4DB8, 0x81, 0x7D, 0xF9, 0x2D, 0xF0, 0x02, 0x15, 0xAE)

需要 MSR 的磁盘Disks that require an MSR

每个 GPT 磁盘都必须包含 MSR。Every GPT disk must contain an MSR. 如果任何) ,OEM (如果任何) 和 MSR 后跟主数据分区 () ,则磁盘上分区的顺序应为 ESP (。The order of partitions on the disk should be ESP (if any), OEM (if any) and MSR followed by primary data partition(s). 尤其重要的是,在其他主数据分区之前创建 MSR。It is particularly important that the MSR be created before other primary data partitions.

MSR 的创建责任Creation responsibilities for MSR

首次向驱动器写入磁盘分区信息时,必须创建 MSR。The MSR must be created when disk-partitioning information is first written to the drive. 如果制造商将磁盘分区,则制造商必须同时创建 MSR。If the manufacturer partitions the disk, the manufacturer must create the MSR at the same time. 如果在安装过程中 Windows 对磁盘分区,Windows 将创建 MSR。If Windows partitions the disk during setup, Windows creates the MSR.

为什么首次分区磁盘时必须创建 MSRWhy MSR must be created when the disk is first partitioned

对磁盘进行分区后,没有剩余可用空间来创建 MSR。After the disk is partitioned, there will be no free space left to create an MSR.

MSR 的大小The size of the MSR

最初创建时,MSR 的大小取决于磁盘驱动器的大小:When initially created, the size of the MSR depends on the size of the disk drive:

  • 在小于大小16的驱动器上,MSR 为32MB。On drives less than 16GB in size, the MSR is 32MB.
  • 在大于或等于 16 GB 的驱动器上,MSR 为 128 MB。On drives greater than or equal to 16GB, the MSR is 128 MB.

因为 MSR 分为其他分区,所以它会变得更小。As the MSR is divided into other partitions, it becomes smaller.

Windows GPT ESP 实现Windows GPT ESP implementation

Windows 所需的分区Partitions required by Windows

对于 UEFI 系统,启动驱动器必须包含 ESP、MSR 和至少一个包含操作系统的基本数据分区。For UEFI systems, the boot drive must contain an ESP, an MSR, and at least one basic data partition that contains the operating system. 即使系统上安装了多个操作系统,系统上也应该只存在一个 ESP。Only one ESP should exist on a system even if multiple operating systems are installed on that system. 在镜像启动配置中,实际上可能有两个带有 ESP 的驱动器,但它们被视为同一 ESP 的冗余副本。In a mirrored boot configuration there may actually be two drives with an ESP but they are considered to be a redundant copy of the same ESP. 每个数据驱动器必须至少包含一个 MSR 和一个基本数据分区。Each data drive must contain at least an MSR and one basic data partition.

驱动器上的所有基本数据分区都应该是连续的。All basic data partitions on the drive should be contiguous. 如上所述,在数据分区之间放置特定于 OEM 或其他无法识别的分区会在以后的卷跨越施加限制。As noted above, placing an OEM-specific or other unrecognized partition between data partitions imposes limitations on later volume spanning.

基本数据分区Basic data partition

基本数据分区对应于主 MBR 分区 0x6 (FAT) 、0x7 (NTFS) 或 0xB (FAT32) 。Basic data partitions correspond to primary MBR partitions 0x6 (FAT), 0x7 (NTFS), or 0xB (FAT32). 可以使用驱动器号或装入点和/或装入点和/或装入点来装入每个基本分区。Each basic partition can be mounted using a drive letter or mount point, other volume device object, or both. 每个基本数据分区都在 Windows 中表示为卷设备对象,并可选择作为装入点或驱动器号。Each basic data partition is represented in Windows as a volume device object, and optionally as a mount point or a drive letter.

标识基本数据分区Identifying a basic data partition

它具有以下分区类型 GUIDIt has the following partition type GUID

DEFINE_GUID (PARTITION_BASIC_DATA_GUID、0xEBD0A0A2L、0xB9E5、0x4433、0x87、0xC0、0x68、0xB6、0xB7、0x26、0x99、0xC7) ;DEFINE_GUID (PARTITION_BASIC_DATA_GUID, 0xEBD0A0A2L, 0xB9E5, 0x4433, 0x87, 0xC0, 0x68, 0xB6, 0xB7, 0x26, 0x99, 0xC7);

ESP 分区对最终用户的可见性ESP partition visibility to end users

ESP 分区未隐藏,但也没有分配的驱动器号。The ESP partition isn't hidden, but also doesn't have an assigned drive letter. 它不会在资源管理器中显示,除非向其分配了驱动器号,但某些工具将能够列出该驱动器号。It will not appear in Explorer unless a drive letter gets assigned to it, but some tools will be able to list it.

对最终用户可见的 MSR 和 OEM 特定分区MSR and OEM-specific partitions visibility to end users

用户不会看到在 Windows 资源管理器中公开的这些分区,也不会向继承的任何文件系统公开上下文索引等。Users will not see these partitions exposed in Windows Explorer, nor is any recognized file system exposed to legacy programs such as Context Indexing. 仅在 "磁盘管理" MMC 管理单元中显示特定于 OEM 的和其他无法识别的分区,因为它们没有可识别的文件系统。The OEM-specific and other unrecognized partitions will be visible only in the Disk Management MMC snap-in since they will not have a recognizable file system.

Windows 默认装入的分区Partitions mounted by default by Windows

Windows 只公开基本数据分区。Windows exposes only basic data partitions. 具有 FAT 文件系统的其他分区可能已装载,但不只以编程方式公开。Other partitions with FAT file systems may be mounted, but not exposed only programmatically. 仅为基本数据分区分配驱动器号或装入点。Only basic data partitions are assigned drive letters or mount points.

ESP FAT 文件系统已装载,但未公开。The ESP FAT file system is mounted, but not exposed. 这允许在 Windows 下运行的程序更新 ESP 的内容。This allows programs running under Windows to update the contents of the ESP. 使用将驱动器号分配给 ESP mountvol /s 会允许访问分区。Assigning a drive letter to the ESP using mountvol /s will allow access to the partition. 对 ESP 的访问需要管理员权限。Access to the ESP requires admin privilege. 尽管 MSR 和使用 MSR 创建的任何分区都可能具有可识别的文件系统,但没有公开任何内容。Although the MSR, and any partitions created from the MSR, could have recognizable file systems, none are exposed.

Windows 不会识别任何与其他操作系统关联的 OEM 特定分区或分区。Any OEM-specific partitions or partitions associated with other operating systems are not recognized by Windows. 无法识别的分区具有可识别的文件系统,如 ESP。Unrecognized partitions with recognizable file systems are treated like the ESP. 它们将被装载,但不会公开。They will be mounted, but not exposed. 与 MBR 磁盘不同,OEM 特定的分区与其他操作系统分区之间没有任何实际差别;全部为 "无法识别"。Unlike MBR disks, there is no practical difference between OEM-specific partitions and other operating system partitions; all are "unrecognized."

用户如何查看 ESP、OEM 和其他无法识别的分区How the user can see the ESP, OEM, and other unrecognized partitions

用户可以使用磁盘管理工具(如磁盘管理实用工具或 diskpart.exe Windows 命令行)。The user can use disk management tools such as the Disk Management utility or the diskpart.exe Windows command line. MSR 和从 MSR 创建的任何分区仅在命令行中可见。The MSR and any partitions created from the MSR are only visible from the command line.

动态磁盘Dynamic disks

动态磁盘使用两个不同的 GPT 分区Dynamic disks use two different GPT partitions

  • 与 MBR 分区0x42 相对应的数据容器分区,GUID 如下: DEFINE_GUID (PARTITION_LDM_DATA_GUID, 0xAF9B60A0L, 0x1431, 0x4F62, 0xBC, 0x68, 0x33, 0x11, 0x71, 0x4A, 0x69, 0xAD) ;A data container partition that corresponds to the MBR partition 0x42, with the following GUID: DEFINE_GUID (PARTITION_LDM_DATA_GUID, 0xAF9B60A0L, 0x1431, 0x4F62, 0xBC, 0x68, 0x33, 0x11, 0x71, 0x4A, 0x69, 0xAD);

  • 包含动态配置数据库的分区,GUID 如下: DEFINE_GUID(PARTITION_LDM_METADATA_GUID, 0x5808C8AAL, 0x7E8F, 0x42E0, 0x85, 0xD2, 0xE1, 0xE9, 0x04, 0x34, 0xCF, 0xB3) ;A partition to contain the dynamic configuration database, with the following GUID: DEFINE_GUID(PARTITION_LDM_METADATA_GUID, 0x5808C8AAL, 0x7E8F, 0x42E0, 0x85, 0xD2, 0xE1, 0xE9, 0x04, 0x34, 0xCF, 0xB3);

卷在数据容器中创建并默认装入。Volumes are created in the data container and mounted by default. 同样,这与 0x42 MBR 分区的内容完全相同。Again, this is exactly the same as the contents of 0x42 MBR partitions.

将基本磁盘转换为动态磁盘Converting a basic disk to dynamic

对于要转换为动态的驱动器,该驱动器上的所有基本数据分区都必须是连续的。For a drive to be eligible for conversion to dynamic, all basic data partitions on the drive must be contiguous. 如果其他无法识别的分区具有不同的基本数据分区,则无法转换该磁盘。If other unrecognized partitions separate basic data partitions, the disk can't be converted. 这是在任何基本数据分区之前必须创建 MSR 的原因之一。This is one of the reasons that the MSR must be created before any basic data partitions. 转换的第一步是分离一个部分 MSR,以创建配置数据库分区。The first step in conversion is to separate a portion of the MSR to create the configuration database partition. 然后,所有不可引导的基本分区合并为一个数据容器分区。All non-bootable basic partitions are then combined into a single data container partition. 启动分区将保留为单独的数据容器分区。Boot partitions are retained as separate data container partitions. 这类似于转换主分区。This is analogous to conversion of primary partitions.

Windows XP 和更高版本的 Windows 与 Windows 2000 的不同之处在于,基本分区和扩展分区优先转换为单个0x42 分区,而不是作为多个不同的0x42 分区保留在 Windows 2000 上。Windows XP and later versions of Windows differ from Windows 2000 in that basic and extended partitions are preferentially converted to a single 0x42 partition, rather than being retained as multiple distinct 0x42 partitions as on Windows 2000.

包含 GPT 和 MBR 动态磁盘混合的系统A system containing a mix of GPT and MBR dynamic disks

是的。Yes. 有关详细信息,请参阅如何在同一系统上混合和匹配 GPT 和 MBR 磁盘?For more information, see What about mixing and matching GPT and MBR disks on the same system?

装载特定分区Mounting a specific partition

您可以使用下表中列出的工具访问不同类型的 GPT 磁盘分区。You can access the GPT disk partitions of different types using the tools that are listed in the following table.

工具Tool WindowsWindows 固件Firmware
Diskpart efi 磁盘分区工具Diskpart.efi Disk Partition Tool ESP MSR 数据ESP MSR Data
Diskpart.exe 磁盘分区工具Diskpart.exe Disk Partition Tool ESP MSR 数据ESP MSR Data
Diskmgmt.msc 逻辑磁盘管理器Diskmgmt.msc Logical Disk Manager ESP 数据ESP Data
Explorer.exe 文件资源管理器Explorer.exe File Explorer 数据Data

通过使用 Microsoft Platform SDK Api,你还可以开发自己的工具来访问其基元级别的 GPT 磁盘分区。By using the Microsoft Platform SDK APIs, you can also develop your own tools to access the GPT disk partitions at their primitive levels.

如何在 Windows 中管理 GPT 磁盘How GPT disks are managed in Windows

GPT 和 MBR 磁盘的管理方式相同。GPT and MBR disks are managed the same way. 可以通过使用 Diskpart.exe 命令提示实用工具或使用 "磁盘管理器" 管理单元,将磁盘格式化为 GPT 或 MBR。Disks can be formatted as GPT or MBR by using the Diskpart.exe command prompt utility or by using the Disk Administrator snap-in. 可在 GPT 磁盘和 MBR 磁盘上创建卷,这两种类型的磁盘可以在同一动态磁盘组中混合。Volumes can be created on both GPT and MBR disks, and both kinds of disks can be mixed in the same dynamic disk group.

FTdisk 集FTdisk sets

从 Windows XP 开始,MBR 或 GPT 磁盘的 Windows 上不支持 FTdisk set。Starting with Windows XP, there is no FTdisk set support on Windows for MBR or GPT disks. 对逻辑卷的唯一支持是通过动态磁盘。The only support for logical volumes is through dynamic disks.

将磁盘从 GPT 转换为 MBR,反之亦然Converted a disk from GPT to MBR, and vice versa

Microsoft 提供 MBR2GPT.exe 将磁盘从 MBR 转换为 GPT。Microsoft offers MBR2GPT.exe which converts disks from MBR to GPT.

GPT 磁盘上支持的文件系统File systems supported on GPT disks

建议在所有基本数据分区和所有动态卷上使用 NTFS。NTFS is recommended on all basic data partitions and all dynamic volumes. Windows 安装程序和磁盘管理管理单元仅提供 NTFS。Windows Setup and the Disk Management snap-in offer only NTFS. 若要避免这种情况,必须通过格式命令行工具显式格式化分区或卷。To circumvent that, the partition or volume must be formatted explicitly via the Format command-line tool.

操作 GPT 磁盘及其内容Manipulating GPT disks and their contents

创建 GPT 磁盘Creating a GPT disk

只能在未分区的空磁盘 (原始磁盘或空 MBR 磁盘) 上创建 GPT 磁盘。You can create a GPT disk only on an empty, unpartitioned disk (raw disk or empty MBR disk). 有关创建 GPT 磁盘的详细信息,请参阅 使用 Gpt 驱动器For more information about creating GPT disks, see Using GPT Drives.

转换 MBR 或 GPT 磁盘Converting an MBR or GPT disk

可以将现有的分区格式转换为另一种格式。You can convert an existing partition format to another format. 有关详细信息,请参阅以下 TechNet 文章:For more information, see the following TechNet articles:

不创建 GPT 磁盘的逐扇区副本Do not make a sector-by-sector copy of a GPT disk

磁盘和分区 Guid 将不再唯一。The Disk and Partition GUIDs will no longer be unique. 永远不会发生这种情况。This must never happen. 你可以创建 ESP 或基本数据分区内容的逐个扇区副本。You can make a sector-by-sector copy of the contents of ESP or basic data partitions.

使用 OPK 映像工具复制整个 GPT 磁盘Copying a whole GPT disk using the OPK imaging tools

您可以使用 OPK 映像工具复制整个 GPT 磁盘;但是,有一些重要的注意事项。You can copy a whole GPT disk using the OPK imaging tools; however, there are some key caveats. OEM 预安装工具包 (OPK) 将磁盘和分区 Guid 初始化为零。The OEM Preinstallation Kit (OPK) initializes the Disk and Partition GUIDs to zero. 首次启动 Windows 时,操作系统将生成唯一 Guid。On first boot of Windows, the operating system generates unique GUIDs. OPK 仅支持生成 ESP、MSR 和基本数据分区。The OPK only supports generation of ESP, MSR, and basic data partitions.

如果应用程序记录了它可能会中断的任何磁盘或分区 Guid。If an application has recorded any Disk or Partition GUIDs it may break. 系统制造商或依赖于 Guid 的应用程序供应商提供的任何应用程序、驱动程序、实用工具或固件都应该能够处理从 OPK 初始化值更改为操作系统生成的 Guid。Any applications, drivers, utilities, or firmware implementations supplied by system manufacturers or application vendors that rely on GUIDs should be capable of handling GUIDs that change from the OPK initialization values to those generated by the operating system.

Diskpart MAKE 命令The Diskpart.efi MAKE command

通过使用 Diskpart MAKE 命令,Oem 可以简化操作系统预安装和系统恢复。The Diskpart.efi MAKE command is a way for OEMs to simplify operating system preinstallation and system recovery. 可以轻松扩展此命令以创建平台的 "默认" 磁盘配置。This command can easily be extended to create a "default" disk configuration for the platform. 例如,系统制造商可以扩展 MAKE 命令,自动将启动驱动器分区为 ESP、MSR、OEM 特定分区和一个基本数据分区。For example, the system manufacturer could extend the MAKE command to automatically partition the boot drive with an ESP, MSR, an OEM-specific partition, and one basic data partition.

例如,假设有一个名为 BOOT_DISK 的可能的磁盘配置。For example, consider a possible disk configuration called BOOT_DISK. 如果发生业务故障恢复,BOOT_DISK 允许客户将启动盘完全重新分区为原始出厂默认值。In the event of business failure recovery, MAKE BOOT_DISK would allow the customer to completely repartition a boot disk to the original factory defaults.

检测重复的磁盘或分区 GUIDDetecting a duplicate Disk or Partition GUID

如果 Windows 检测到重复的磁盘或分区 GUID,Windows 将在检测时为任何重复的磁盘 GUID、MSR 分区 GUID 或 MSR 基本数据 GUID 生成新的 Guid。If Windows detects a duplicate Disk or Partition GUID, Windows will generate new GUIDs for any duplicate Disk GUID, MSR Partition GUID, or MSR basic data GUID upon detection. 这类似于 Windows 2000 中的重复 MBR 签名处理。This is similar to the duplicate MBR signature handling in Windows 2000. 动态容器或数据库分区上的重复 Guid 将导致不可预知的结果。Duplicate GUIDs on a dynamic container or database partition cause unpredictable results.