fix: revert partition 2 to msftdata type (matches Ventoy)
Byte-by-byte comparison of Ventoy vs hiperiso USB showed the only significant difference: Ventoy uses Microsoft basic data type GUID (EBD0A0A2-...) with attribute 0x8000000000000000, while our ESP-type attempt used (C12A7328-...). The user's UEFI firmware only recognizes the msftdata+hidden attribute combination as bootable. Reverted all 3 source paths back to msftdata: - hiperiso_util.c: Table[1].PartType = WindowsDataPartType - hiperiso_lib.sh: set 2 msftdata on (parted flag) - partresize.c: g_WindowsDataPartGuid for partition resize update
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
@@ -383,7 +383,6 @@ int hiperiso_fill_gpt(uint64_t size, uint64_t reserve, int align4k, HISO_GPT_INF
|
||||
HISO_GPT_HDR *Head = &gpt->Head;
|
||||
HISO_GPT_PART_TBL *Table = gpt->PartTbl;
|
||||
hiperiso_guid WindowsDataPartType = { 0xebd0a0a2, 0xb9e5, 0x4433, { 0x87, 0xc0, 0x68, 0xb6, 0xb7, 0x26, 0x99, 0xc7 } };
|
||||
hiperiso_guid EfiSystemPartType = { 0xc12a7328, 0xf81f, 0x11d2, { 0xba, 0x4b, 0x00, 0xa0, 0xc9, 0x3e, 0xc9, 0x3b } };
|
||||
|
||||
HiperisoFillProtectMBR(size, &gpt->MBR);
|
||||
|
||||
@@ -435,8 +434,7 @@ int hiperiso_fill_gpt(uint64_t size, uint64_t reserve, int align4k, HISO_GPT_INF
|
||||
Table[0].Attr = 0;
|
||||
hiperiso_fill_gpt_partname(Table[0].Name, "Hiperiso");
|
||||
|
||||
// Use ESP type for partition 2 (required for UEFI firmware to find BOOTX64.EFI)
|
||||
memcpy(&(Table[1].PartType), &EfiSystemPartType, sizeof(hiperiso_guid));
|
||||
memcpy(&(Table[1].PartType), &WindowsDataPartType, sizeof(hiperiso_guid));
|
||||
hiperiso_gen_preudo_uuid(&(Table[1].PartGuid));
|
||||
Table[1].StartLBA = Table[0].LastLBA + 1;
|
||||
Table[1].LastLBA = Table[1].StartLBA + HISOEFI_PART_BYTES / 512 - 1;
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
static int g_disk_fd = 0;
|
||||
static UINT64 g_disk_offset = 0;
|
||||
static GUID g_ZeroGuid = {0};
|
||||
static GUID g_EfiSystemPartGuid = { 0xc12a7328, 0xf81f, 0x11d2, { 0xba, 0x4b, 0x00, 0xa0, 0xc9, 0x3e, 0xc9, 0x3b } };
|
||||
static GUID g_WindowsDataPartGuid = { 0xebd0a0a2, 0xb9e5, 0x4433, { 0x87, 0xc0, 0x68, 0xb6, 0xb7, 0x26, 0x99, 0xc7 } };
|
||||
|
||||
static int hiso_disk_read(uint32 sector, uint8 *buffer, uint32 sector_count)
|
||||
{
|
||||
@@ -591,7 +591,7 @@ static int update_part_table(char *disk, UINT64 part2start)
|
||||
}
|
||||
|
||||
memset(PartTbl + 1, 0, sizeof(HISO_GPT_PART_TBL));
|
||||
memcpy(&(PartTbl[1].PartType), &g_EfiSystemPartGuid, sizeof(GUID));
|
||||
memcpy(&(PartTbl[1].PartType), &g_WindowsDataPartGuid, sizeof(GUID));
|
||||
hiperiso_gen_preudo_uuid(&(PartTbl[1].PartGuid));
|
||||
|
||||
PartTbl[0].LastLBA = part2start - 1;
|
||||
|
||||
@@ -444,7 +444,7 @@ format_hiperiso_disk_gpt() {
|
||||
hisodebug "format disk by parted ..."
|
||||
|
||||
if [ "$TOOLDIR" != "aarch64" ]; then
|
||||
vt_set_efi_type="set 2 esp on"
|
||||
vt_set_efi_type="set 2 msftdata on"
|
||||
fi
|
||||
|
||||
parted -a none --script $DISK \
|
||||
|
||||
Reference in New Issue
Block a user