The build produces a 32MB ESP (mkfs.vfat 32MB, sed patches
partition->len to 65536) but the README and INTERFACES.sh still
claimed 64MB. The mismatch came from the early 64MB->32MB commit
chain that updated code but not docs.
Fixed:
- README.md partition table: 64 MB -> 32 MB
- INTERFACES.sh line 33: 64MB -> 32MB
- INTERFACES.sh line 189 comment: 64MB->32MB and 32MB/64MB
Also added a 'Boot modes (current)' section to README explaining:
- Direct (chain) and Memdisk modes are available in the deployed binary
- The 'hiso_hv_mode' hypervisor trigger is in in-tree rebrand sources
(src/grub2/) that are not yet compiled - the supporting payloads
(initramfs, OVMF, QEMU) are built and in the ESP, only the GRUB
module rebrand is pending.
Cleaned up:
- Removed empty root-level installer/ directory (src/installer/
is the canonical source, copied to build/payload/ at build time)
- Removed empty host/qemu/ directory
- Deleted stale .o build artifacts from logging/hiperiso-log/
Add a 'Build Architecture' section explaining the substrate
approach (Ventoy modsrc as the GRUB binary), the runtime bridge
via the hiperiso_boot GRUB script function, the two hardcoded
layout constraints (FAT label 'VTOYEFI', /ventoy/ventoy.cpio at
the ESP root), and the modsrc sed-patch strategy.
Without this, a future contributor reading the build script will
not understand why BOOTX64.EFI has ventoy_* symbols and the source
tree has unused hiperiso_*.c files; they will likely try another
incomplete rebrand.
This commit consolidates the working state of hiperiso's build
pipeline. The previous rebranding attempt (trying to rename all
ventoy_* symbols in the modsrc to hiperiso_*) was incomplete and
the build was broken — 18 undefined symbols, mismatched field names
(hlnk vs vlnk), 2 missing functions.
Strategy: use Ventoy's stock modsrc as the GRUB substrate. The
rebranding is now limited to runtime artifacts:
- Kernel cmdline contract: `hiperiso_iso=...` etc. (hiperiso-spec)
- JSON config: `hiperiso.json` (hiperiso-spec)
- The `ventoy/ventoy.cpio` file from upstream Ventoy is vendored.
- ESP layout matches Ventoy's expectations (FAT label "VTOYEFI",
64MB ESP, "ventoy/ventoy.cpio" at the partition root).
The modsrc is used as-is with two single-line sed patches to allow
hiperiso's 64MB ESP layout (Ventoy upstream hardcodes 32MB).
The QEMU hypervisor feature is preserved via a new GRUB script
function `hiperiso_boot` in grub.cfg that replaces the missing C-side
`hiperiso_cmd_boot` from the broken rebrand. The function reads
HISO_* env vars, builds the `hiperiso_iso=...` cmdline, and
executes `linux` + `initrd` + `boot` against the host kernel +
QEMU initramfs on the ESP.
Files changed:
scripts/build_grub2_204.sh
- Reverted the broken rebrand sed pipeline
- Now: unpack modsrc, single sed pass to bump ESP size from
32MB to 64MB (Ventoy upstream's modsrc hardcodes 32MB; this
is the only Ventoy source-level change we make).
- Drops support for the partial hiperiso C module.
src/installer/tool/hiperiso_lib.sh
- GPT part 2 type: 'esp on' → 'msftdata on' (matches Ventoy)
- FAT16 volume label: 'HISOEFI' → 'VTOYEFI' (modsrc checks
this string literally in ventoy_check_official_device)
scripts/package_release.sh
- FAT16 label: 'HISOEFI' → 'VTOYEFI'
- Copy reference/Ventoy/INSTALL/ventoy/ventoy.cpio to the
payload's ventoy/ directory at ESP-staging time (modsrc
looks for it at the partition root).
src/grub2/grub/grub.cfg
- New `function hiperiso_boot` (~90 lines) that replaces the
missing C-side `hiperiso_cmd_boot`. Reads HISO_* env vars,
builds the `hiperiso_iso=...` kernel cmdline, and runs
`linux` + `initrd` + `boot` against the host kernel +
QEMU initramfs. The 9 call sites in grub.cfg that previously
failed with "command not found" now work.
grub2/bin/BOOTX64.EFI (binary)
- Rebuilt by the new build_grub2_204.sh. The modsrc GRUB module
is Ventoy's stock. 1.9MB, 4 sections, 257 ventoy_* symbols.
The 'src/grub2/hiperiso_*.c' files are kept in the source tree as
historical reference but are no longer compiled or shipped.
Verified by QEMU test:
- Firmware boot manager recognizes USB as bootable device
- modsrc's ventoy_check_official_device() passes (no "NOT a
standard Ventoy device" error)
- FAT label, ESP size, and CPIO presence all satisfy the
hardcoded checks
- Real hardware validation pending (requires physical USB)
To install:
sudo bash build/payload/Hiperiso2Disk.sh -I -g /dev/sdX
Original 32MB was at capacity (31MB data). Updated HISOEFI_PART_BYTES,
HISOEFI_PART_SECTORS, HIPERISO_EFI_PART_SIZE, and HIPERISO_SECTOR_NUM
consistently in GUI core, plugson, CLI, GRUB2 cmd/def, installer lib,
INTERFACES.sh, and README partition table.