La signature EFI PART
( 0x45 0x46 0x49 0x20 0x50 0x41 0x52 0x54
) dit simplement "Ceci est une table de partition GUID". C'est ainsi que les logiciels savent que le périphérique bloc est formaté dans la structure GPT.
Vous pouvez le voir à partir de cet extrait d'hexdump:
*
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000200 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 |EFI PART....\...|
00000210 ea b5 99 a4 00 00 00 00 01 00 00 00 00 00 00 00 |................|
00000220 af 12 9e 3b 00 00 00 00 22 00 00 00 00 00 00 00 |...;....".......|
00000230 8e 12 9e 3b 00 00 00 00 7f 8c d6 05 c8 e8 01 4a |...;...........J|
00000240 b8 74 6b 37 30 7c bf 15 02 00 00 00 00 00 00 00 |.tk70|..........|
00000250 80 00 00 00 80 00 00 00 10 d3 0e 29 00 00 00 00 |...........)....|
00000260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
Les signatures ne sont pas propres à GPT. Les fichiers ont aussi des signatures ce logiciel peut utiliser pour identifier quels sont les fichiers. C’est le mécanisme de fonctionnement du file
commander. ( Exemples de file
)
Donc, si cette signature était vide, la table de partition GPT ne serait pas reconnue?
Au moins, gdisk
ne le reconnaîtrait plus. Découvrez cette démo:
Créez un fichier (faisant office de périphérique bloc) pour la démo:
root@demo [/tmp]# truncate -s 1M gpt-demo
Formatez le fichier avec GPT:
root@demo [/tmp]# sgdisk --clear gpt-demo
Creating new GPT entries.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.
Vérifiez les données binaires de la table de partition:
root@demo [/tmp]# hexdump -C gpt-demo
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000001c0 02 00 ee 20 20 00 01 00 00 00 ff 07 00 00 00 00 |... ...........|
000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000200 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 |EFI PART....\...|
00000210 13 14 6d 6a 00 00 00 00 01 00 00 00 00 00 00 00 |..mj............|
00000220 ff 07 00 00 00 00 00 00 22 00 00 00 00 00 00 00 |........".......|
00000230 de 07 00 00 00 00 00 00 be 2c cb 6e 58 d4 e3 46 |.........,.nX..F|
00000240 84 84 3c 83 52 59 5b 58 02 00 00 00 00 00 00 00 |..<.RY[X........|
00000250 80 00 00 00 80 00 00 00 86 d2 54 ab 00 00 00 00 |..........T.....|
00000260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000ffe00 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 |EFI PART....\...|
000ffe10 18 3a 1f d9 00 00 00 00 ff 07 00 00 00 00 00 00 |.:..............|
000ffe20 01 00 00 00 00 00 00 00 22 00 00 00 00 00 00 00 |........".......|
000ffe30 de 07 00 00 00 00 00 00 be 2c cb 6e 58 d4 e3 46 |.........,.nX..F|
000ffe40 84 84 3c 83 52 59 5b 58 df 07 00 00 00 00 00 00 |..<.RY[X........|
000ffe50 80 00 00 00 80 00 00 00 86 d2 54 ab 00 00 00 00 |..........T.....|
000ffe60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00100000
Examiner comment gdisk
lit la table de partition:
root@demo [/tmp]# gdisk gpt-demo
GPT fdisk (gdisk) version 1.0.3
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Command (? for help): q
Changer la signature GPT:
root@demo [/tmp]# sed -i 's/EFI PART/IGNOREME/g' gpt-demo
Vérifiez que la signature a été numérisée:
root@demo [/tmp]# hexdump -C gpt-demo
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000001c0 02 00 ee 20 20 00 01 00 00 00 ff 07 00 00 00 00 |... ...........|
000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000200 49 47 4e 4f 52 45 4d 45 00 00 01 00 5c 00 00 00 |IGNOREME....\...|
00000210 13 14 6d 6a 00 00 00 00 01 00 00 00 00 00 00 00 |..mj............|
00000220 ff 07 00 00 00 00 00 00 22 00 00 00 00 00 00 00 |........".......|
00000230 de 07 00 00 00 00 00 00 be 2c cb 6e 58 d4 e3 46 |.........,.nX..F|
00000240 84 84 3c 83 52 59 5b 58 02 00 00 00 00 00 00 00 |..<.RY[X........|
00000250 80 00 00 00 80 00 00 00 86 d2 54 ab 00 00 00 00 |..........T.....|
00000260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000ffe00 49 47 4e 4f 52 45 4d 45 00 00 01 00 5c 00 00 00 |IGNOREME....\...|
000ffe10 18 3a 1f d9 00 00 00 00 ff 07 00 00 00 00 00 00 |.:..............|
000ffe20 01 00 00 00 00 00 00 00 22 00 00 00 00 00 00 00 |........".......|
000ffe30 de 07 00 00 00 00 00 00 be 2c cb 6e 58 d4 e3 46 |.........,.nX..F|
000ffe40 84 84 3c 83 52 59 5b 58 df 07 00 00 00 00 00 00 |..<.RY[X........|
000ffe50 80 00 00 00 80 00 00 00 86 d2 54 ab 00 00 00 00 |..........T.....|
000ffe60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00100000
Notez que la table de partition GUID (GPT) n’est plus reconnue par gdisk
:
root@demo [/tmp]# gdisk gpt-demo
GPT fdisk (gdisk) version 1.0.3
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: not present
Creating new GPT entries.
Command (? for help): q
J'inspecte actuellement un GPT Chrome OS, où la signature semble avoir été réglée sur "IGNOREME". Savez-vous quel effet cela aurait?
Pour autant que je puisse dire de la démo ci-dessus, si la signature est différente de EFI PART
, GPT n'est pas reconnu.
le IGNOREME
"signature" est une signature spéciale créée par Chromium. C'est le documentation que j'ai trouvée pour IGNOREME
:
cgptlib: Add support for IGNOREME GPT signature
This patch makes cgpt aware of a special "IGNOREME" GPT header signature
string that may appear in either the primary or the secondary GPT and
cause cgpt (and other cgptlib clients) to completely ignore that GPT. It
will continue to function correctly for all other purposes (using the
data from the non-ignored GPT), but never write any data back to the
ignored GPT.
BRANCH=None
BUG=chrome-os-partner:52595
TEST=unit tests
Change-Id: I7e53542385ae9d8d24dc25b75e91f4ff4917f66f
Signed-off-by: Julius Werner <[email protected]>
Reviewed-on: https://chromium-review.googlesource.com/340072
Reviewed-by: Nam Nguyen <[email protected]>
Avez-vous vérifié le GPT secondaire à la fin du périphérique de disque / bloc?
Existe-t-il d'autres signatures GPT valides?
Non, il n'y a pas de signatures autres que EFI PART
parce que c'est la seule signature dans la Spécification UEFI (voir page 123). ( Copie d'archive de la spécification UEFI version 2.7 (Errata A) )
IGNOREME
.