Fix ARM64 ISO: patch mkarchiso EFI FAT size for large ARM64 kernel
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
5160a30d72
commit
bdfc6008fc
1 file changed
+24
-1
@@ -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"
|
||||
|
||||
|
||||
Reference in new issue
Block a user