From bdfc6008fcdbf2e7e7891ba90f3262784e1b1396 Mon Sep 17 00:00:00 2001 From: nmemmert <67961292+nmemmert@users.noreply.github.com> Date: Mon, 27 Jul 2026 08:00:17 -0400 Subject: [PATCH] Fix ARM64 ISO: patch mkarchiso EFI FAT size for large ARM64 kernel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ARM64 kernel Image is ~50 MB. mkarchiso calculates the EFI FAT image size as int(total_bytes/MiB)+2, which leaves no room for FAT filesystem overhead → "Disk full" when copying the kernel in. Patch mkarchiso at container startup (before mkarchiso runs) to use +128 MiB buffer instead, giving plenty of headroom. Co-Authored-By: Claude Sonnet 4.6 --- iso/docker/entrypoint-arm64.sh | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) 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"