wolfgang kern
2024-01-20 04:16:18 UTC
my attempt to manually create a complete UEFI startup with KESYS hexwork
still encounter many obstacles :)
please tell me what I may have missed and what's different to your settings.
TIA
__
wolfgang
what I have so far:
(almost all is in hex, b/w/q/dq/qq mean 8/16/32/64/128 bit)
[LBA_0] MBR:
0000 ... all zero
01BE xx xx xx EE yy yy yy 01 00 00 00 ss ss ss ss
x = start CHS usually 1
y = end CHS usually FFFFFF
0000_0001 start LBA of GPT image
0000_0004 size of this GPT image LBA_0,1,2,3 (in sectors)
specs want much more to waste
01CE ... all zero
01FE 55 AA
------------------
[LBA_1] GPT header
000 45 46 49 20 50 41 52 54 ;"EFI PART" Signature
008 00 00 01 00 Revision for GPT version 1.0
(through at least UEFI version 2.3.1),
00C 5C 00 00 00 Header size (in bytes)
010 q 0 CRC32 of header (offset +0 up to header size),
with this field zeroed during calculation
014 q 0 Reserved; must be zero
018 dq .... Current LBA (location of this header copy)
020 dq .... Backup LBA (location of the other header copy)
028 dq 4 First usable LBA for partitions (primary last LBA + 1)
specs say minimum 6 for 4K sectors and 34dec for 512 byte sectors
what a waste ...
030 dq .... Last usable LBA (secondary partition first LBA - 1)
038 dq ??? Disk GUID (also referred as UUID on UNIXes)
048 dq 2 Starting LBA of array of partition entries
(always 2 in primary)
050 q 00000004 Number of partition entries in array
054 q 00000080 Size of a single partition entry (usually 128)
058 q 0 CRC32 of partition array
05C..end of sector; all ZERO
(420 bytes for 512 byte sectors; but more with larger sector sizes)
---------------------------
[LBA_2] I'd have only four partition entries assigned
GUID partition entry format [128 byte each]
000 qq Partition type GUID
1. ??? boot part ;FAT32
2. "KESYS 64 ddmm2024" to be declared global unique ;KESYS64
3. 28 73 C1 2A-1F F8 D2 11 BA 4B 00 A0 C9 3E C9 3B ;EFI
4. 16 E3 C9 E3 5C 0B B8 4D 81 7D F9 2D F0 02 15 AE ;M$ reserved
??? ;or NTFS
010 qq ??? Unique partition GUID
020 dq 4/x/x/x First LBA (specs say 6 or 34 for first partition)
028 dq Last LBA (inclusive, usually odd)
030 dq Attribute flags
038 str 72 bytes Partition name (36 UTF-16LE code units)
The 64-bit partition table attributes are shared between 48-bit common
attributes for all partition types, and 16-bit type-specific attributes.
<eof>
still encounter many obstacles :)
please tell me what I may have missed and what's different to your settings.
TIA
__
wolfgang
what I have so far:
(almost all is in hex, b/w/q/dq/qq mean 8/16/32/64/128 bit)
[LBA_0] MBR:
0000 ... all zero
01BE xx xx xx EE yy yy yy 01 00 00 00 ss ss ss ss
x = start CHS usually 1
y = end CHS usually FFFFFF
0000_0001 start LBA of GPT image
0000_0004 size of this GPT image LBA_0,1,2,3 (in sectors)
specs want much more to waste
01CE ... all zero
01FE 55 AA
------------------
[LBA_1] GPT header
000 45 46 49 20 50 41 52 54 ;"EFI PART" Signature
008 00 00 01 00 Revision for GPT version 1.0
(through at least UEFI version 2.3.1),
00C 5C 00 00 00 Header size (in bytes)
010 q 0 CRC32 of header (offset +0 up to header size),
with this field zeroed during calculation
014 q 0 Reserved; must be zero
018 dq .... Current LBA (location of this header copy)
020 dq .... Backup LBA (location of the other header copy)
028 dq 4 First usable LBA for partitions (primary last LBA + 1)
specs say minimum 6 for 4K sectors and 34dec for 512 byte sectors
what a waste ...
030 dq .... Last usable LBA (secondary partition first LBA - 1)
038 dq ??? Disk GUID (also referred as UUID on UNIXes)
048 dq 2 Starting LBA of array of partition entries
(always 2 in primary)
050 q 00000004 Number of partition entries in array
054 q 00000080 Size of a single partition entry (usually 128)
058 q 0 CRC32 of partition array
05C..end of sector; all ZERO
(420 bytes for 512 byte sectors; but more with larger sector sizes)
---------------------------
[LBA_2] I'd have only four partition entries assigned
GUID partition entry format [128 byte each]
000 qq Partition type GUID
1. ??? boot part ;FAT32
2. "KESYS 64 ddmm2024" to be declared global unique ;KESYS64
3. 28 73 C1 2A-1F F8 D2 11 BA 4B 00 A0 C9 3E C9 3B ;EFI
4. 16 E3 C9 E3 5C 0B B8 4D 81 7D F9 2D F0 02 15 AE ;M$ reserved
??? ;or NTFS
010 qq ??? Unique partition GUID
020 dq 4/x/x/x First LBA (specs say 6 or 34 for first partition)
028 dq Last LBA (inclusive, usually odd)
030 dq Attribute flags
038 str 72 bytes Partition name (36 UTF-16LE code units)
The 64-bit partition table attributes are shared between 48-bit common
attributes for all partition types, and 16-bit type-specific attributes.
<eof>