Tanda tangan EFI PART
( 0x45 0x46 0x49 0x20 0x50 0x41 0x52 0x54
) hanya mengatakan "Ini adalah Tabel Partisi GUID". Begitulah cara perangkat lunak tahu bahwa perangkat blok diformat dalam tata letak GPT.
Anda dapat melihatnya dari cuplikan hexdump ini:
*
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 |................|
*
Tanda tangan tidak unik untuk GPT. File juga memiliki tanda tangan yang dapat digunakan perangkat lunak untuk mengidentifikasi apa file tersebut. Ini adalah mekanisme operasi file
perintah. ( Contoh darifile
)
Jadi, jika tanda tangan ini kosong, maka tabel partisi GPT tidak akan dikenali?
Setidaknya, gdisk
tidak akan lagi mengenalinya. Lihat demo ini:
Buat file (bertindak sebagai perangkat blok) untuk demo:
root@demo [/tmp]# truncate -s 1M gpt-demo
Format file dengan 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.
Periksa data biner dari tabel partisi:
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
Periksa bagaimana gdisk
membaca tabel partisi:
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
Ubah tanda tangan GPT:
root@demo [/tmp]# sed -i 's/EFI PART/IGNOREME/g' gpt-demo
Verifikasi bahwa tanda tangan nuked:
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
Perhatikan bahwa Tabel Partisi GUID (GPT) tidak lagi dikenali oleh 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
Saat ini saya sedang memeriksa Chrome OS GPT, di mana tanda tangan tampaknya telah diatur ke 'IGNOREME'. Apakah Anda tahu efek apa yang akan terjadi?
Sejauh yang saya tahu dari demo di atas, jika tanda tangannya berbeda dari EFI PART
, GPT tidak dikenali.
The IGNOREME
"tanda tangan" adalah tanda tangan khusus yang dibuat oleh Chromium. Ini adalah dokumentasi yang saya temukan untukIGNOREME
:
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]>
Apakah Anda memeriksa GPT sekunder di akhir perangkat disk / blok?
Apakah ada tanda tangan GPT lain yang valid tersedia?
Tidak, tidak ada tanda tangan selain EFI PART
karena itu adalah satu-satunya tanda tangan dalam Spesifikasi UEFI (lihat halaman 123). ( Salinan arsip UEFI Spesifikasi Versi 2.7 (Errata A) )
IGNOREME
.