diff --git a/iso/docker/entrypoint-arm64.sh b/iso/docker/entrypoint-arm64.sh index 8f6e2eb..0cfb094 100755 --- a/iso/docker/entrypoint-arm64.sh +++ b/iso/docker/entrypoint-arm64.sh @@ -729,7 +729,30 @@ echo "OrionOS ARM64 customization complete." CUSTOMIZE chmod 755 "$PROFILE/airootfs/root/customize_airootfs.sh" -# ── 13. Build the ISO ───────────────────────────────────────────────── +# ── 13. Patch mkarchiso EFI FAT image size ─────────────────────────── +# The ARM64 kernel (Image) is ~50 MB. mkarchiso's default size formula is +# int(total_bytes/1024/1024)+2 MiB, which leaves no room for FAT overhead +# and causes "Disk full". Bump the buffer to +128 MiB. +python3 - <<'PYEOF' +import re, sys +with open('/usr/bin/mkarchiso') as f: + txt = f.read() +orig = txt +# Match: int($1 / 1024 / 1024) + N (with any spacing or small N) +txt = re.sub( + r'int\(\$1\s*/\s*1024\s*/\s*1024\s*\)\s*\+\s*\d+', + r'int($1 / 1024 / 1024) + 128', + txt +) +if txt == orig: + print('mkarchiso: FAT size pattern not found — build may fail with Disk full', file=sys.stderr) +else: + with open('/usr/bin/mkarchiso', 'w') as f: + f.write(txt) + print('mkarchiso: patched EFI FAT size buffer to +128 MiB') +PYEOF + +# ── 14. Build the ISO ───────────────────────────────────────────────── echo ">>> Building ARM64 ISO (this takes 5-15 minutes)..." mkdir -p "$DIST" "$WORK"