问题描述
我早些时候在 SuperUser 上发布了此问题,但我觉得它更适合程序员.
I posted this question earlier on SuperUser but I feel it is more suited for programmers.
如果我正确理解,根据GPT,LBA 2的前16个字节是磁盘上第一个分区的分区类型GUID.在Windows磁盘管理中,第一个分区被指定为EFI系统分区.但是,经过进一步调查,EFI系统分区的GUID为:
If I understand correctly, according to GPT, the first 16 bytes of LBA 2 is the partition type GUID for the first partition on disk. In Windows Disk Management the first partition is designated as an EFI System Partition. However upon further investigation an EFI System Partition's GUID is:
C12A7328-F81F-11D2-BA4B-00A0C93EC93B
但是前16个字节告诉我否则
And yet the first 16 bytes tell me otherwise:
28732AC1-1FF8-D211-BA4B-00A0C93EC93B
有趣的是,前3个部分为小端,而其他2个为大端.
Interestingly the first 3 sections act as little endian while the other 2 are big endian.
为什么会这样?
推荐答案
EFI_GUID数据类型声明如下:
EFI_GUID datatype is declared as follows:
typedef struct {
UINT32 Data1;
UINT16 Data2;
UINT16 Data3;
UINT8 Data4[8];
} EFI_GUID;
因为默认情况下,原始EFI架构(IA64 LE和IA32e)为低位优先级,因此整数也是如此.我还没有真正在big-endian机器上看到UEFI实施,所以我不知道是否会以其他方式存储标准GUID.
Because original EFI architectures (IA64 LE and IA32e) were little-endian by default, so are the integers. I haven't really seen an UEFI implementation on big-endian machine, so I don't know if standard GUIDs will be stored otherwise.
这篇关于数据如何存储在磁盘上? -EFI GUID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!