fix: reduce ESP partition size from 64MB to 32MB (match Ventoy)

Bit-by-bit comparison of Ventoy vs hiperiso USB partitions showed one
remaining structural difference: Ventoy uses 32MB ESP partition, we used
64MB. Installer's mkfs.vfat also repeatedly failed with 'too many
clusters' because 64MB/512-byte-cluster exceeds FAT16 max cluster count
(65524).

Reducing to 32MB matches Ventoy exactly:
- src/gui/Core/hiperiso_define.h
- src/plugson/src/Core/hiperiso_define.h
- src/hisocli/hisocli.h (HIPERISO_EFI_PART_SIZE)
- src/installer/tool/hiperiso_lib.sh (HIPERISO_SECTOR_NUM=65536)
- scripts/package_release.sh (ESP image size)

Binaries + payload rebuilt.
This commit is contained in:
2026-07-02 05:51:23 +03:00
parent 1e6f9fd66f
commit 35fef3b9c4
5 changed files with 10 additions and 15 deletions
+2 -2
View File
@@ -194,8 +194,8 @@ if [ -d "$PAYLOAD/hiperiso/ventoy" ]; then
cp -a "$PAYLOAD/hiperiso/ventoy" "$ESP_STAGING/"
fi
_progress 6 "Creating 64MB FAT16 ESP image ($(find "$ESP_STAGING" -type f | wc -l) files, $(du -sh "$ESP_STAGING" | cut -f1))..."
dd if=/dev/zero of="$ESP_IMG" bs=1M count=64 2>/dev/null
_progress 6 "Creating 32MB FAT16 ESP image ($(find "$ESP_STAGING" -type f | wc -l) files, $(du -sh "$ESP_STAGING" | cut -f1))..."
dd if=/dev/zero of="$ESP_IMG" bs=1M count=32 2>/dev/null
# FAT16 volume label MUST be "VTOYEFI" (modsrc's GRUB hardcodes
# this check at ventoy_check_official_device). Using "HISOEFI" here
# would fail with error 10 "Partition name is not VTOYEFI".
+2 -2
View File
@@ -28,8 +28,8 @@
#define HISOIMG_PART_START_BYTES (1024 * 1024)
#define HISOIMG_PART_START_SECTOR 2048
#define HISOEFI_PART_BYTES (64 * 1024 * 1024)
#define HISOEFI_PART_SECTORS 131072
#define HISOEFI_PART_BYTES (32 * 1024 * 1024)
#define HISOEFI_PART_SECTORS 65536
#pragma pack(1)
+1 -1
View File
@@ -24,7 +24,7 @@
#define HIPERISO_EFI_PART_ATTR 0x8000000000000000ULL
#define SIZE_1MB (1024 * 1024)
#define HIPERISO_EFI_PART_SIZE (64 * SIZE_1MB)
#define HIPERISO_EFI_PART_SIZE (32 * SIZE_1MB)
#define check_free(p) if (p) free(p)
#define check_close(fd) if (fd >= 0) close(fd)
+3 -8
View File
@@ -1,14 +1,9 @@
#!/bin/sh
# Hiperiso partition 2 size. We use 64MB to give the payload room to
# grow; scripts/build_grub2_204.sh applies a one-line patch to the
# upstream Ventoy modsrc so its hard-coded 32MB ESP expectation
# (ventoy_check_official_device) accepts our 64MB layout.
HIPERISO_PART_SIZE=67108864
HIPERISO_PART_SIZE_MB=64
HIPERISO_PART_SIZE=512
HIPERISO_PART_SIZE=33554432
HIPERISO_PART_SIZE_MB=32
HIPERISO_SECTOR_SIZE=512
HIPERISO_SECTOR_NUM=131072
HIPERISO_SECTOR_NUM=65536
hiperiso_false() {
[ "1" = "2" ]
+2 -2
View File
@@ -44,8 +44,8 @@
#define HISOIMG_PART_START_BYTES (1024 * 1024)
#define HISOIMG_PART_START_SECTOR 2048
#define HISOEFI_PART_BYTES (64 * 1024 * 1024)
#define HISOEFI_PART_SECTORS 131072
#define HISOEFI_PART_BYTES (32 * 1024 * 1024)
#define HISOEFI_PART_SECTORS 65536
#pragma pack(1)