diff --git a/grub2/bin/BOOTX64.EFI b/grub2/bin/BOOTX64.EFI index bde4982..b78367f 100644 Binary files a/grub2/bin/BOOTX64.EFI and b/grub2/bin/BOOTX64.EFI differ diff --git a/scripts/build_grub2_204.sh b/scripts/build_grub2_204.sh index b7bbc27..46e2c17 100644 --- a/scripts/build_grub2_204.sh +++ b/scripts/build_grub2_204.sh @@ -33,18 +33,11 @@ mkdir -p "$BUILD_DIR/SRC" "$PXE_DIR" "$RUNTIME_GRUB_DIR" tar -xf "$DL_DIR/grub-2.04.tar.xz" -C "$BUILD_DIR/SRC/" tar -xf "$MODULE_TARBALL" -C "$BUILD_DIR/SRC/" -# Patch Ventoy's modsrc to allow a 64MB ESP. The stock Ventoy ESP -# is 32MB (65536 sectors), and ventoy_check_official_device() -# hard-codes that size in the partition-layout check. hiperiso's -# payload is ~30MB and benefits from the extra 32MB of headroom -# (FAT16 overhead, future growth, larger GRUB modules). Bump the -# expected ESP size to 131072 sectors. This is the only Ventoy -# source-level change we make. find "$BUILD_DIR/SRC/grub-2.04/grub-core/ventoy" -type f \ \( -name '*.c' -o -name '*.h' \) -exec sed -i \ - -e 's/(PartTbl\[1\]\.LastLBA + 1 - PartTbl\[1\]\.StartLBA) != 65536/(PartTbl[1].LastLBA + 1 - PartTbl[1].StartLBA) != 131072/g' \ - -e 's/PartTbl\[1\]\.SectorCount != 65536/PartTbl[1].SectorCount != 131072/g' \ - -e 's/(partition->len != 65536)/(partition->len != 131072)/g' \ + -e 's/(partition->len != 131072)/(partition->len != 65536)/g' \ + -e 's/(PartTbl\[1\]\.LastLBA + 1 - PartTbl\[1\]\.StartLBA) != 131072/(PartTbl[1].LastLBA + 1 - PartTbl[1].StartLBA) != 65536/g' \ + -e 's/PartTbl\[1\]\.SectorCount != 131072/PartTbl[1].SectorCount != 65536/g' \ {} + cp "$HIPERISO_ROOT/src/grub2/grub/grub.cfg" "$SRC_DIR/"