GPT分区
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
GPT分区
1、概述
GPT,即GUID Partition Table(GUID分区表)的简写形式,它是windows server 2003的一种新型磁盘架构,是一种基于Itanium计算机中的可扩展固件接口(EFI*)使用的磁盘分区架构。
这种64位的Itanium版windows系统采用的磁盘布局架构,与传统的32位磁盘完全不同。
与主启动记录(MBR)分区方法相比,GPT具有更多的有点:
◊它允许每个磁盘中有多达128分区(MBR磁盘最多只有4个主分区,或者3个主分区加一个扩展分区和无限制的逻辑驱动器)。
◊支持高达18千兆兆字节(EB,exabytes)的卷大小(MBR磁盘支持的最大卷为2TB)。
◊允许将主磁盘分区表和备份磁盘分区表用于冗余。
◊支持唯一的磁盘和分区ID(GUID)。
◊性能更加稳定。
在“磁盘管理”中的磁盘属性对话框终端“卷”选项卡上,使用GPT分区的磁盘显示为GUID分区(GPT)磁盘,而使用MBR分区的磁盘则显示为主启动记录(MBR)磁盘。
使用GPT磁盘需要注意以下问题。
◊在基于X86的计算机和基于X64的计算机上运行带有Service Pack1(SP1-服务包用于修复漏洞)的windows server 2003,操作系统必须驻留在MBR 磁盘上。
其他的硬盘可以是MBR或GPT。
◊在基于Itanium(安腾处理器64bit)的计算机上,操作系统加载程序和启动分区必须驻留在GPT磁盘上,其他的硬盘可以使MBR或GPT。
◊不能将GPT移至运行windows NT 4.0、windows 2000、windows xp或windows server2003的X86的计算机上(他们无法正确识别GPT磁盘)。
但是,可以将GPT磁盘从运行带有SP1的windows server 2003的基于X86的计算机或基于X64的计算机移至运行windows server 2003或windows xp的基于Itanium 的计算机上,反之亦然。
◊不能使用基于Itanium的windows 版本,将GPT磁盘从基于Itanium 的计算机移至运行带有SP1的windows server 2003的基于X86的计算机或
基于X64的计算机,然后启动该操作系统。
在非基于Itanium的计算机上使用GPT磁盘必须仅用于数据存储。
◊在单个动态磁盘数组中既可以有MBR磁盘,也可以由GPT磁盘。
也可以将基于GPT和MBR磁盘混合使用,但他们不能使磁盘数组的一部分。
可以同时使用MBR和GPT磁盘来创建镜像卷、带区卷、跨区卷和RAID-5卷,但是MBR的柱面对齐的限制可以会使创建镜像产生困难。
通常可以将MBR的磁盘镜像到GPT磁盘上,从而避免柱面对齐的问题。
◊可以将MBR磁盘转换为GPT磁盘,并且只有在磁盘为空的情况下,才可以将GPT磁盘转换为MBR磁盘。
◊不支持EFI系统分区的镜像。
必须使用boottcfg命令克隆EFI系统分区。
◊不能在可移动媒体,或者在群集服务使用的共享SCSI或Fiber Channel 总线连接的群集磁盘上使用GPR分区。
注意:EFI——Extensible Firmware Interface(可扩展固件接口),是Intel 为全新类型的PC固件的体系结构、接口和服务提出的建议标准,它是计算机固件、硬件和操作系统质检单一种新型接口。
采用Intel Itanium 家族处理器的计算机使用EFI启动和加载windows xp 64—bit edition(Itanium)以及基于Itanium 的windows server 2003版本。
EFI对于基于Itanium的计算机的用途与基于x86的计算机中的BIOS相同,但是EFI已扩展为具有下列功能:
◊以一致的方式启动任何兼容的操作系统。
◊一种简易的方式为新的可启动设备添加EFI驱动程序,而不需要更新计算机固件。
使用EFI,基于Itanium的计算机可具有GUID磁盘分区表(GPT)分区类型和主启动记录(MBR)分区类型的硬盘。
不过,要使EFI能启动和加载windows xp 64bit edition(Itanium)或基于Itanium的windows server 2003 版本,操作系统必须位于GPT磁盘上。
在混合的GPT和MBR磁盘环境下,单独使用MBR磁盘存储数据。
每一台基于Itanium的计算机必须有EFI系统分区的GPT磁盘。
与基于X86的计算机的系统卷相同,EFI系统分区包含操作系统、启动程序和启动
windows xp64 edition (Itanium)或基于Itanium的windows server 2003版本需要的其他文件,在仅包含单个GPT磁盘的计算机上,EFI系统分区是磁盘上的第一个分区。
EFI系统分区格式化为FAT,且在根目录包含EFI目录。
Windows xp 64bit edition(Itanium)和基于Itanium的windows server 2003版本创建名为\EFI\Microsoft\Winnt50的子目录。
\Msutil子目录包含由EFI固件和操作系统使用的实用程序。
实用固件启动管理器可访问这些使用程序和EFI系统分区内容。
只有授权的技术支持人员可以访问\Microsoft\Winnt50子目录的内容。
2 GPT磁盘总体布局
GPT总体布局:
EFI部分
GPT分区部分
0 1 2~33
分区表Microsoft
保留分区
基本数
据分区
基本数
据分区
…
…
基本数
据分区
剩余
扇区
32个
扇区
保护MBR EFI信息(GPT头)(2~33扇区的备份)EFI信息备份
我们可以看到,一个GPT磁盘可以分为两大部分:保护MBR部分和EFI部分。
(1)第一部分只由0号扇区组成,在这个扇区中包含一个DOS分区表,分区表内只有一个表项,这个表项描述了一个类型值为0xEE的分区,大小为整个磁盘,如图所示)。
这个分区的存在可以使计算机认为这个磁盘是合法的,并且已被使用,从而不再试图对其进行格式化等操作,所以该扇区又被称为“保护MBR”。
实际上,EFI根本不使用这个分区表。
0扇区
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 C4 47 BE 27 00 00 00 00
02 00 EE FF FF FF 01 00 00 00 FF FF FF FF 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA
(2)另一部分为EFI部分又可以分为4个区域:EFI信息区(又称为GPT 头)部分,分区表部分,GPT分区部分和备份区域。
◊EFI信息区,也称为GPT头,起始于磁盘的1号扇区,通常只占用这一个扇区。
GPT磁盘创建后,由GPT头定义分区表的位置和大小。
Windows限定分区表项为128个。
GPT头还包括头和分区表的校验和,这样就可以及时发现错误或者改变。
◊分区表区域,包含分区表项,这个区域由GPT头定义,一般占用磁盘2~33号扇区。
分区表中的每个表项由起始和结束地址、类型值、名字、属性标志和GUID值组成。
分区表建立后,128位的GUID对系统来说是唯一的。
◊分区部分,最大的区域,由分配给分区的扇区组成。
这个区域的起始和结束地址由GPT头定义。
◊备份区域位于磁盘的尾部,包含GPT头和分区表的备份。
它占用GPT结束扇区和EFI结束扇区之间的33个扇区。
其中最后一个扇区用来备份1号扇区
的EFI信息,其余的2~33号扇区的分区表。
3 数据结构
.1、EFI信息扇区数据结构
EFI信息扇区位于磁盘的1号扇区,也称为GPT头。
GPT磁盘创建后,由GPT头定义分区表的位置和大小,windows限定分区表项为128个。
GPT头还包含头和分区表的校验和。
EFI信息扇区及备份EFI信息扇区的结构略有差别所示,它们的结构如表所示。
EFI信息扇区结构
相对字节偏移字节数说明
00~07 8 签名(ASCII码“EFI PART”)
08~0B 4 版本
0C~0F 4 EFI信息大小字节数
10~13 4 EFI信息(对于备份则为备份EFI信息)CRC校验和
14~17 4 保留
18~1F 8 当前EFI信息(对于备份则为备份EFI信息)的LBA扇区号20~27 8 备份EFI信息(对于备份则为原始EFI信息)的LBA扇区号28~2F 8 GPT分区区域起始LBA
30~37 8 GPT分区区域结束LBA
37~47 16 磁盘GUID
48~4F 8 GPT分区表起始LBA
50~53 4 分区表项
54~57 4 每分区表项占用字节数
58~5B 4 分区表项CRC校验和
5C~1FF366 保留
通过这些结构中的描述值,我们可以确定GPT头、分区表、GPT分区区域、分区表的备份位置等结构布局。
图显示了一个GPT头的实例。
1扇区
45 46 49 20 50 41 52 5400 00 01 005C 00 00 00
9A 9E 28 41 00 00 00 00 01 00 00 00 00 00 00 00
AF 6D 70 74 00 00 00 0022 00 00 00 00 00 00 00
8E 6D 70 74 00 00 00 009F 3E 03 39 98 03 50 4B
A2 1F DA 10 02 B8 74 12 02 00 00 00 00 00 00 00
80 00 00 00 80 00 00 00 6F 7D 73 EE 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
具体分析如下:
(1)0x00~0x07:8个字节,GPT头签名“45 46 49 20 50 41 52 54”,ASCII 码为“EFI PART”。
(2)0x08~0x0B:4个字节,版本号。
(3)0x0C~0x0F:4个字节,GPT头大小字节数,此处的值为0x5C,即92个字节
(4)0x10~0x13:4个字节,GPT头校验和。
(5)0x14~0x17:4个字节,保留。
(6)0x18~0x1F:8个字节,当前GPT扇区号,即EFI区域起始扇区号,通常为1。
(7)0x20~0x27:8个字节,GPT头备份位置的LBA扇区号,即EFI区域结束扇区号,此处值为(0x41289E)。
(8)0x28~0x2F:8个字节,GPT分区区域起始LBA扇区号,此处值为34(0x22)。
(9)0x30~0x37:8个字节,GPT分区区域结束LBA扇区号。
(10)0x38~0x47:16个字节,磁盘GUID。
(11)0x48~0x4F:8个字节,GPT分区表起始LBA扇区号,此处值为2(0x02),通常起始于2号扇区。
(12)0x50~0x53:4个字节,分区表项数,限定为128(0X80)。
(13)0x54~0x57::4个字节,每分区表项占用字节数,固定为128(0X80)。
(14)0x58~0x5B:4个字节,分区表CRC校验和。
(15)0x5C~0x1FF:420个字节,保留。
2 GPT分区表项数据结构
GPT磁盘的2~33号扇区系统保留用做存放GPT磁盘的分区表,以描述GPT 区域内的各个分区。
分区表占用32个扇区,每个分区表项占用128个字节,32个扇区共可以存放128个分区表项。
分区表项的数据结构见表。
GPT分区表项数据结构
字节偏移字节数含义
00~0F 16 分区类型GUID
10~1F 16 分区唯一GUID
20~27 8 分区起始LBA
28~2F 8 分区结束LBA
30~37 8 分区属性
38~7F 72 分区名的Unicode码
具体分析如下:
(1)0x00~0x0F处的16个字节共128个bit用于确定分区的类型。
对于一个GPT磁盘,分区既可以用来存储系统信息也用于存储文件系统。
例如,任何使用EFI的计算机,必须有一个由启动硬件和软件所需要的文件组成的EFI系统分区。
(本表格数据不全,请参考后面表格的数据描述)相关操作
系统
分区类型GUID
(None)未使用00000000-0000-0000-0000-000000000000 MBR分区表024DEE41-33E7-11D3-9D69-0008C781F39F EFI系统分区C12A7328-F81F-11D2-BA4B-00A0C93EC93B BIOS引导分区21686148-6449-6E6F-744E-656564454649
Windows 微软保留分区E3C9E316-0B5C-4DB8-817D-F92DF00215AE 基本数据分区EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 逻辑软盘管理工具
元数据分区
5808C8AA-7E8F-42E0-85D2-E1E90434CFB3
逻辑软盘管理工具
数据分区
AF9B60A0-1431-4F62-BC68-3311714A69AD Windows恢复环境DE94BBA4-06D1-4D40-A16A-BFD50179D6AC
IBM通用并行文件
系统(GPFS)分区
37AFFC90-EF7D-4e96-91C3-2D7AE055B174 HP-UX数据分区75894C1E-3AEB-11D3-B7C1-7B03A0000000 服务分区E2A1E728-32E3-11D6-A682-7B03A0000000
Linux 数据分区EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 RAID分区A19D880F-05FC-4D3B-A006-743F0F84911E 交换分区0657FD6D-A4AB-43C4-84E5-0933C84B4F4F 逻辑卷管理器
(LVM)分区
E6D6D379-F507-44C2-A23C-238F2A3DF928 保留8DA63339-0007-60C0-C436-083AC8230908
FreeBSD 启动分区83BD6B9D-7F41-11DC-BE0B-001560B84F0F 数据分区516E7CB4-6ECF-11D6-8FF8-00022D09712B 交换分区516E7CB5-6ECF-11D6-8FF8-00022D09712B UFS分区516E7CB6-6ECF-11D6-8FF8-00022D09712B en:Vinum volume
manager分区
516E7CB8-6ECF-11D6-8FF8-00022D09712B ZFS分区516E7CBA-6ECF-11D6-8FF8-00022D09712B
Mac OS X HFS(HFS+)分区48465300-0000-11AA-AA11-00306543ECAC 苹果公司UFS55465300-0000-11AA-AA11-00306543ECAC ZFS6A898CC3-1DD2-11B2-99A6-080020736631 苹果RAID分区52414944-0000-11AA-AA11-00306543ECAC 苹果RAID分区,下
线
52414944-5F4F-11AA-AA11-00306543ECAC 苹果启动分区426F6F74-0000-11AA-AA11-00306543ECAC Apple Label 4C616265-6C00-11AA-AA11-00306543ECAC Apple TV 恢复分区5265636F-7665-11AA-AA11-00306543ECAC
Solaris 启动分区6A82CB45-1DD2-11B2-99A6-080020736631 根分区6A85CF4D-1DD2-11B2-99A6-080020736631 交换分区6A87C46F-1DD2-11B2-99A6-080020736631 备份分区6A8B642B-1DD2-11B2-99A6-080020736631 /usr 分区6A898CC3-1DD2-11B2-99A6-080020736631 /var 分区6A8EF2E9-1DD2-11B2-99A6-080020736631 /home 分区6A90BA39-1DD2-11B2-99A6-080020736631 备用扇区6A9283A5-1DD2-11B2-99A6-080020736631
保留分区
6A945A3B-1DD2-11B2-99A6-080020736631
6A9630D1-1DD2-11B2-99A6-080020736631
6A980767-1DD2-11B2-99A6-080020736631
6A96237F-1DD2-11B2-99A6-080020736631
6A8D2AC7-1DD2-11B2-99A6-080020736631 交换分区49F48D32-B10E-11DC-B99B-0019D1879648
NetBSD FFS分区49F48D5A-B10E-11DC-B99B-0019D1879648 LFS分区49F48D82-B10E-11DC-B99B-0019D1879648 RAID分区49F48DAA-B10E-11DC-B99B-0019D1879648 concatenated分区2DB519C4-B10F-11DC-B99B-0019D1879648 加密分区2DB519EC-B10F-11DC-B99B-0019D1879648
Microsoft定义的GPT分区类型值含义如下:
◊ windows使用“保留分区”来存放临时文件和数据。
◊“主分区”是包含有文件系统的基本分区,类似于DOS分区的主分区。
◊“LDM元数据分区”和“LDM数据分区”用于Microsoft动态磁盘。
(2)0x30~0x37 高位4个字节与分区类型有关属性,低位4个字节与分区类型无关的属性
bit 描述
0 系统分区(磁盘分区工具必须将此分区保持原样,不得做任何修改)
1 EFI隐藏分区(不可见分区)
2 传统的BIOS可引导分区标志
60 只读
62 隐藏
63 不自动挂载,不自动分配盘符
将磁盘转换为GPT磁盘而未进行分区前,系统已使用了一个分区表项,这个分区表项用来描述一个被称为“Microsoft reserved partition”的保留分区,创建分区后,各分区的描述信息依次存放在“Microsoft 保留区”的分区表项之后。
4 操作系统支持
对于不标准的MBR/GPT混合硬盘,不同的系统中的实现有些不一致。
[5]除非另加说明,操作系统在处理混合硬盘时优先读取GPT分区表
以下表格中的―不支持‖应该理解成:不能识别GPT分区的硬盘,[6]系统只能识别保护分区。
GPT硬盘的数据可以通过第三方管理工具进行操作。
类Unix操作系统
操作系统版本平台
自BIOS/GPT
启动
自EFI/GPT启
动
备注
FreeBSD 7.0以后x86、
x86-64
是是
在MBR/GPT混合硬盘
中,可以同时使用GPT
和MBR分区标识。
Linux 大多数x86架构的
Linux发行版
x86-64、
IA-64、x86
是是
一些分区工具,如
fdisk,不支持GPT。
Fedora 8+、Ubuntu 8.04+[7]而gdisk、grub2之类的新工具[8]支持GPT。
Mac OS X 10.4.0以后(一些
功能要到10.4.6
以后)[9]
x86、
x86-64
否是
Solaris Solaris 10 以后x86、
x86-64、
SPARC
No (Work in
Progress)
No (Work in
Progress)
32位Windows
操作系统版本平
台
自
BIOS/GPT
启动
自
EFI/GPT
启动
支持
GPT磁
盘读取
写入
备注
Windows XP (2001-10-25) x86否否否不支持Windows
Server
2003
(2003-04-24) x86否否否不支持
Windows Server 2003Service Pack 1
(2005-03-30)
x86否否是
仅支持作为数据盘使
用,[6]在MBR/GPT混
合硬盘中优先使用
MBR。
Windows Vista (2005-07-22) x86否否是
在MBR/GPT混合硬盘中
优先使用MBR。
Windows
Server 2008(2008-02-27) x86否否是
在MBR/GPT混合硬盘中
优先使用MBR。
Windows 7(2009-10-22) x86否否是在MBR/GPT混合硬盘中优先使用MBR。
[5]
64位Windows
下表列出了支持GPT的64位版Windows。
既包括IA-64架构的服务器版本,也包括x86-64和EM64T架构。
操作系统版本平台
自
BIOS/GPT
启动
自
EFI/GPT
启动
支持
GPT
磁盘
备注
读取写入
Windows XP 64-bit
(2001-10-25)
IA-64否是是
在MBR/GPT混合硬盘中
优先使用MBR。
可拆卸
磁盘仅支持MBR分区
表。
Windows XP 64-bit, Version
2003 (2003-03-28)
(Workstation
variant of
Windows Server
2003 64-bit)
IA-64否是是
在MBR/GPT混合硬盘中
优先使用MBR。
可拆卸
磁盘仅支持MBR分区
表。
Windows Server 200364-bit
(2003-04-24)
IA-64否是是
在MBR/GPT混合硬盘中
优先使用MBR。
默认使
用GPT。
IA-64架构的启
动盘必须是GPT硬盘,
其余硬盘可以使用MBR
也可以使用GPT。
[10]
Windows Server 2003x64, Service Pack
1 (2005-03-30)
x86-64否否是
仅支持作为数据盘使
用,[6]在MBR/GPT混合
硬盘中优先使用MBR。
Windows XP Professional x64
(2005-04-25)
(Workstation
variant of
Windows Server
2003 x64)
x86-64否否是
仅支持作为数据盘使
用,[6]在MBR/GPT混合
硬盘中优先使用MBR。
可拆卸磁盘仅支持MBR
分区表。
Windows Vista (2005-07-22) x86-64否是是
在MBR/GPT混合硬盘中
优先使用MBR。
Windows
Server 2008(2008-02-27)
x86-64
,IA-64
否是是
在MBR/GPT混合硬盘中
优先使用MBR。
Windows 7 (2009-10-22) x86-64否是是在MBR/GPT混合硬盘中优先使用MBR。
[5]
Windows Server 2008 R2(2009-10-22)
(Server variant
of Windows 7)
x86-64
,IA-64
否是是
在MBR/GPT混合硬盘中
优先使用MBR。
5 实例分析
(1)MBR
0扇区
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 C4 47 BE 27 00 00 00 00
02 00 EE FF FF FF 01 00 00 00 FF FF FF FF 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA
(2)GPT头
1扇区
45 46 49 20 50 41 52 54 00 00 01 00 5C 00 00 00
9A 9E 28 41 00 00 00 00 01 00 00 00 00 00 00 00
AF 6D 70 74 00 00 00 00 22 00 00 00 00 00 00 00
8E 6D 70 74 00 00 00 00 9F 3E 03 39 98 03 50 4B
22
74706DAF
74706D8F
A2 1F DA 10 02 B8 74 12 02 00 00 00 00 00 00 00 80 00 00 00 80 00 00 00 6F 7D 73 EE 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
十六进制
保护MBR
GPT 头
分区表
GPT 分区表备份 GPT 头备份
(3)分区表
2扇区
A4 BB 94 DE D1 06 40 4D A1 6A BF D5 01 79 D6 AC D4 66 CE C0 BA 0A 13 41 B5 6E 39 6C FB 32 34 11
1
2
01 00 00 00 00 00 00 80 42 00 61 00 73 00 69 00
63 00 20 00 64 00 61 00 74 00 61 00 20 00 70 00 61 00 72 00 74 00 69 00 74 00 69 00 6F 00 6E 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 28 73 2A C1 1F F8 D2 11 BA 4B 00 A0 C9 3E C9 3B F4 8B 16 D4 2A 5E 2F 4E 8A C9 8E FB 34 D0 6C 3E
00 48 1F 00 00 00 00 00 FF 67 27 00 00 00 00 00
01 00 00 00 00 00 00 80 45 00 46 00 49 00 20 00 73 00 79 00 73 00 74 00 65 00 6D 00 20 00 70 00 61 00 72 00 74 00 69 00 74 00 69 00 6F 00 6E 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
E7 AF BF BF 4F A3 8A 44 9A 5B 62 13 EB 73 6C 22 CE 27 FD 09 BC 1B CD 4A 90 40 3A A2 39 25 2B 81
00 68 27 00 00 00 00 00 FF A7 46 00 00 00 00 00
01 00 00 00 00 00 00 80 42 00 61 00 73 00 69 00
63 00 20 00 64 00 61 00 74 00 61 00 20 00 70 00 61 00 72 00 74 00 69 00 74 00 69 00 6F 00 6E 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 E3 C9 E3 5C 0B B8 4D 81 7D F9 2D F0 02 15 AE C5 13 4E 7E 20 3F A5 42 A9 2A 76 D3 CC D5 10 71 00 A8 46 00 00 00 00 00 FF A7 4A 00 00 00 00 00 00 00 00 00 00 00 00 80 4D 00 69 00 63 00 72 00 6F 00 73 00 6F 00 66 00 74 00 20 00 72 00 65 00
73 00 65 00 72 00 76 00 65 00 64 00 20 00 70 00 61 00 72 00 74 00 69 00 74 00 69 00 6F 00 6E 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
3扇区
A2 A0 D0 EB E5 B9 33 44 87 C0 68 B6 B7 26 99 C7 AC A0 47 45 52 EC 88 4A BB 8A 59 A9 0A 3A 19 1D 00 A8 4A 00 00 00 00 00 FF AF CA 0C 00 00 00 00
00 00 00 00 00 00 00 00 42 00 61 00 73 00 69 00
63 00 20 00 64 00 61 00 74 00 61 00 20 00 70 00 61 00 72 00 74 00 69 00 74 00 69 00 6F 00 6E 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
A2 A0 D0 EB E5 B9 33 44 87 C0 68 B6 B7 26 99 C7 DD A3 F9 FC 7C 25 C4 47 8C 31 16 60 C5 6B F0 5B 00 B0 CA 0C 00 00 00 00 FF 17 BC 1E 00 00 00 00
63 00 20 00 64 00 61 00 74 00 61 00 20 00 70 00
61 00 72 00 74 00 69 00 74 00 69 00 6F 00 6E 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
A2 A0 D0 EB E5 B9 33 44 87 C0 68 B6 B7 26 99 C7 A6 68 2B 35 7A E3 CB 4C B9 05 5D 68 4F 48 04 87 00 18 BC 1E 00 00 00 00 FF 97 0B 31 00 00 00 00
00 00 00 00 00 00 00 00 42 00 61 00 73 00 69 00
63 00 20 00 64 00 61 00 74 00 61 00 20 00 70 00
61 00 72 00 74 00 69 00 74 00 69 00 6F 00 6E 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
A2 A0 D0 EB E5 B9 33 44 87 C0 68 B6 B7 26 99 C7 7C 7F 00 D0 2C 3C 2D 43 89 28 80 DB 38 27 57 86
00 A0 0B 31 00 00 00 00 FF 17 01 52 00 00 00 00
00 00 00 00 00 00 00 00 42 00 61 00 73 00 69 00
63 00 20 00 64 00 61 00 74 00 61 00 20 00 70 00
61 00 72 00 74 00 69 00 74 00 69 00 6F 00 6E 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
4 扇区
A2 A0 D0 EB E5 B9 33 44 87 C0 68 B6 B7 26 99 C7 A0 F9 59 58 61 94 59 42 81 ED 8E 84 12 8C 35 55
00 20 01 52 00 00 00 00 FF 9F F6 72 00 00 00 00
00 00 00 00 00 00 00 00 42 00 61 00 73 00 69 00
63 00 20 00 64 00 61 00 74 00 61 00 20 00 70 00
61 00 72 00 74 00 69 00 74 00 69 00 6F 00 6E 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
A4 BB 94 DE D1 06 40 4D A1 6A BF D5 01 79 D6 AC B9 E4 5E 07 22 00 3C 40 84 A5 D2 DA 65 A3 4F 93
00 A8 F6 72 00 00 00 00 FF 67 70 74 00 00 00 00
01 00 00 00 00 00 00 80 42 00 61 00 73 00 69 00
63 00 20 00 64 00 61 00 74 00 61 00 20 00 70 00
61 00 72 00 74 00 69 00 74 00 69 00 6F 00 6E 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
22
800
1F4800
276800
46A800
4AA800
CCAB000
1EBC1800
310BA000
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
十六进制
保护MBR
GPT 头
保留分区
分区1 WINRE_DRV
分区2 SYSTEM_DRV
分区3 LRS_ESP
分区4 FAT32
分区5 C
分区6 D
空隙
分区7
H
空隙 分区8 F
1
2
74706DAF
74706D8F 52012000
72F6A800
分区9 G 分区10 PBR_DRV 剩余扇区
GPT 头备份
1 WINRE_DRV
2 SYSTEM_DRV
3 LRS_ESP
4 FAT32
5 PBR_DRV
6 总结
GPT磁盘的0号扇区保留分区表和“55AA”标志,但只使用一个分区表项,描述一个大小为整个磁盘、分区类型为0xEE的分区。
虽然GPT磁盘在EFI部分的结尾处备份了有关磁盘和分区的重要信息,但由于这个备份扇区并不是简单地保存一份原始EFI信息扇区的副本,所以如果C磁盘前部的EFI信息和分区表遭到破坏,无法通过用备份覆盖方法进行覆盖,虽然原始分区表与备份分区表相同,但原始EFI信息扇区与备份EFI扇区并不是完全相同的,它们的GPT头检验值不同。
这时,如果所有分区大小都在2TB以内,可以考虑手工将磁盘转换为MBR磁盘进行数据的恢复。
具体方法如下。
步骤1:复制一正常MBR磁盘的MBR信息,写入GPT磁盘的0号扇区。
步骤2:利用55AA标志搜索各个分区的DBR,记录其起始扇区号和分区大小,注意,GPT磁盘分区并不与MBR磁盘分区一样严格遵循整数柱面规则,因此在搜索DBR时不能设置只搜素整数柱面位置的信息,而应该在每个扇区进行搜索。
步骤3:将各个分区的参数填入MBR的分区表,如果分区数超过四个,可以每次填入四个分区信息,将数据导出至其他数据盘后再继续进行其他分区的操作。
参考文件:
[1] 马林. 数据重现 [M]. 北京:清华大学出版社, 2009.
[2]
file:///D:/%E9%A1%B9%E7%9B%AE/FAT32%E6%96%87%E4%BB%B6%E5%88%86%E6%9E%90/GPT %E8%B5%84%E6%96%99/GPT%E5%88%86%E5%8C%BA.htm
Partition type
This is a list of known Master Boot Record partition types on IBM PC compatible computers:
Partiti on ID Occurre
nce
Acce
ss
Boota
ble
Type Origin Supported Description
00h MBR,
EBR
N/A No Free IBM All
Empty partition
entry
01h MBR,
EBR
CHS
,
LBA
x86,
68000,
8080/
Z80
Filesystem IBM DOS 2.0+
FAT12 as
primary
partition in first
physical 32 MB
of disk or as
logical drive
anywhere on
disk (else use
06h
instead)[4][5][6
]
02h MBR CHS Microsoft,
SCO
XENIX
XENIX root
(see 03h and
FFh)[4]
03h MBR CHS Microsoft,
SCO
XENIX
XENIX usr (see
02h and
FFh)[4]
04h MBR,
EBR
CHS
,
LBA
x86,
68000,
8080/
Z80
Filesystem Microsoft DOS 3.0+
FAT16 with
less than 65536
sectors
(32 MB). As
primary
partition it must
reside in first
physical 32 MB
of disk, or as
logical drive
anywhere on
disk (else use
06h
instead).[4][5][
6]
05h MBR,
EBR
CHS
,
No,
AAP
Container IBM DOS (3.2) 3.3+
Extended
partition with
(LB A) CHS addressing. It must reside in first physical 8 GB of disk, else use 0Fh instead (see 0Fh, 85h, C5h, D5h)[4][5][6]
MBR CHS Storage
Dimensions
SpeedStor
can occur in
SpeedStor
MBRs
06h MBR,
EBR
CHS
,
LBA
x86 Filesystem Compaq DOS 3.31+
FAT16B with
65536 or more
sectors. It must
reside in first
physical 8 GB
of disk, unless
used for logical
drives in an
0Fh extended
partition (else
use 0Eh
instead). Also
used for FAT12
and FAT16
volumes in
primary
partitions if
they are not
residing in first
physical 32 MB
of disk.[nb
1][4][5][6]
07h MBR,
EBR
CHS
,
LBA
x86 Filesystem
Microsoft,
IBM
OS/2 1.2+ IFS
MBR,
EBR
CHS
,
LBA
286 Filesystem IBM
OS/2 1.2+,
Windows NT
HPFS[4]
MBR,
EBR
CHS
,
386 Filesystem Microsoft Windows NT NTFS[5][6]
LBA
MBR, EBR CHS
,
LBA
Yes Filesystem Microsoft
Windows Embedd
ed CE
exFAT
Advanced Unix
Quantum
Software
Systems
QNX 2
QNX "qnx" (7)
(pre-1988
only)[7][nb 2]
08h MBR CHS x86 Filesystem Commodore
Commodore MS-D
OS 3.x
Logical
sectored FAT12
or FAT16[8][nb
3]
CHS x86 Filesystem IBM OS/2 1.0-1.3 OS/2 (FAT?)
IBM AIX AIX boot/split
SplitDrive
Quantum
Software
Systems
QNX 1.x/2.x
QNX "qny"
(8)[7][nb 2]
Dell
partition
spanning
multiple drives
09h
IBM AIX AIX data/boot
Quantum
Software
Systems
QNX 1.x/2.x
QNX "qnz"
(9)[7][nb 2] MBR CHS 286 Filesystem
Mark
Williams
Company
Coherent
Coherent file
system
MBR Filesystem Microware OS-9 OS-9 RBF
0Ah PowerQuest,
IBM
OS/2
OS/2 Boot
Manager[nb 4] Mark
Williams
Company
Coherent
Coherent swap
partition Unisys OPUS
Open Parallel
Unisys Server
(see
10h)[citation
needed]
0Bh MBR,
EBR
CHS
,
LBA
x86 Filesystem Microsoft DOS 7.1+
FAT32 with
CHS
addressing[5][6
]
0Ch MBR,
EBR
LBA x86 Filesystem Microsoft DOS 7.1+
FAT32X with
LBA[5][6]
0Dh Silicon Safe Reserved[3]
0Eh MBR,
EBR
LBA x86 Filesystem Microsoft DOS 7.0+
FAT16X with
LBA[5][6]
0Fh MBR,
EBR
LBA
No,
AAP
Container Microsoft DOS 7.0+
Extended
partition with
LBA (see 05h
and CFh)[5][6]
10h Unisys OPUS (see 0Ah)
11h MBR CHS x86 Filesystem Leading Edge
Leading Edge
MS-DOS 3.x
Logical
sectored FAT12
or FAT16[8][nb
3]
Hidden,
Filesystem
IBM
OS/2
Boot Manager
Hidden FAT12
(corresponds
with 01h)[nb 4]
12h MBR
CHS
,
LBA
x86
Service,
Filesystem
Compaq
configuration
partition
(bootable
FAT)[9][5][6]
Service EISA
configuration
partition[5][6]
Hibernation Compaq Compaq Contura
hibernation
partition[9] MBR x86
Service,
Filesystem
NCR
diagnostics and
firmware
partition
(bootable
FAT)[9]
MBR x86
Service,
Filesystem
Intel
service
partition
(bootable
FAT)[9] (see
98h)
Service IBM Rescue and
partition[9]
14h
Filesystem AST AST MS-DOS 3.x
Logical
sectored FAT12
or FAT16[8][nb
3] (see AST
MBR) x86,
68000,
8080/
Z80
Hidden,
Filesystem
IBM
OS/2
Boot Manager
Hidden FAT16
(corresponds
with 04h)[nb 4] LBA Filesystem Maverick OS
Omega
filesystem
15h
No,
AAP
Hidden,
Container
IBM
OS/2
Boot Manager
Hidden
extended
partition with
CHS
addressing
(corresponds
with 05h)[nb 4] LBA Maverick OS swap
16h x86,
68000,
8080/
Z80
Hidden,
Filesystem
IBM
OS/2
Boot Manager
Hidden
FAT16B
(corresponds
with 06h)[nb 4]
17h Hidden,
Filesystem
IBM
OS/2
Boot Manager
Hidden IFS
(corresponds
with 07h)[nb 4]
Hidden HPFS
(corresponds
with 07h)[nb 4]
Hidden NTFS
(corresponds
with 07h)[nb 4]
Hidden exFAT
(corresponds
with 07h)[nb 4]
18h No Hibernation AST AST Windows AST Zero Volt Suspend or SmartSleep partition
19h Willow
Schlanger
Willowtech Photon
coS
Photon coS (see
20h)
1Bh Hidden,
Filesystem
IBM
OS/2
Boot Manager
Hidden FAT32
(corresponds
with 0Bh)[nb 4]
1Ch Hidden,
Filesystem
IBM
OS/2
Boot Manager
Hidden
FAT32X with
LBA
(corresponds
with 0Ch)[nb 4]
1Eh Hidden,
Filesystem
IBM
OS/2
Boot Manager
Hidden
FAT16X with
LBA
(corresponds
with 0Eh)[nb 4]
1Fh MBR,
EBR
LBA
Hidden,
Container
IBM
OS/2
Boot Manager
Hidden
extended
partition with
LBA
addressing
(corresponds
with 0Fh)[nb 4]
20h Microsoft Windows Mobile
Windows Mobi
le update XIP
Willow
Schlanger
Willowsoft
Overture File
System (OFS1)
(see 19h)
21h MBR
Hewlett
Packard
HP Volume
Expansion
(SpeedStor)[nb
5]
Filesystem Dave Poirier Oxygen
FSo2 (Oxygen
File System)
(see 22h)
22h Container Dave Poirier Oxygen Oxygen Extended Partition Table (see 21h)
23h Microsoft, Reserved。