Skip to content

Commit 25226d9

Browse files
authored
fix(build): Use native xorriso compliance command for ISO level 3
1 parent bee3d35 commit 25226d9

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

build.sh

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -e
33

4-
echo "====== LUMINOS MASTER BUILD SCRIPT (v6.3 - Large File Support) ======"
4+
echo "====== LUMINOS MASTER BUILD SCRIPT (v6.4 - Native Xorriso Fix) ======"
55
if [ "$(id -u)" -ne 0 ]; then echo "ERROR: This script must be run as root."; exit 1; fi
66

77
# --- 1. Define Directories & Vars ---
@@ -75,7 +75,7 @@ if [ "$MODEL_FOUND" = false ]; then
7575
curl -fL "https://github.com/ollama/ollama/releases/download/v0.1.32/ollama-linux-amd64" -o "${AI_BUILD_DIR}/ollama"
7676
chmod +x "${AI_BUILD_DIR}/ollama"
7777

78-
# Force HOME to our temp dir to control where models go
78+
# Force HOME to our temp dir
7979
export HOME="${AI_BUILD_DIR}"
8080

8181
echo "--> Starting temporary Ollama server..."
@@ -90,13 +90,12 @@ if [ "$MODEL_FOUND" = false ]; then
9090
echo "--> Stopping server..."
9191
kill ${OLLAMA_PID} || true
9292

93-
# Move from the temp HOME structure to our target
9493
if [ -d "${AI_BUILD_DIR}/.ollama/models" ]; then
9594
cp -r "${AI_BUILD_DIR}/.ollama/models/." "${TARGET_MODEL_DIR}/"
9695
fi
9796
fi
9897

99-
# Final Verification
98+
# Verification
10099
SIZE_CHECK=$(du -s "${TARGET_MODEL_DIR}" | cut -f1)
101100
if [ "$SIZE_CHECK" -lt 1000000 ]; then
102101
echo "ERROR: Model preparation failed. Target directory is too small ($SIZE_CHECK KB)."
@@ -135,14 +134,11 @@ mkdir -p "${CHROOT_DIR}/usr/share/wallpapers/luminos"
135134
cp "${BASE_DIR}/assets/"* "${CHROOT_DIR}/usr/share/wallpapers/luminos/"
136135

137136
echo "--> Injecting AI files into system..."
138-
# Ensure binary exists
139137
if [ ! -f "${AI_BUILD_DIR}/ollama" ]; then
140138
curl -fL "https://github.com/ollama/ollama/releases/download/v0.1.32/ollama-linux-amd64" -o "${AI_BUILD_DIR}/ollama"
141139
chmod +x "${AI_BUILD_DIR}/ollama"
142140
fi
143141
cp "${AI_BUILD_DIR}/ollama" "${CHROOT_DIR}/usr/local/bin/"
144-
145-
# Copy models
146142
mkdir -p "${CHROOT_DIR}/usr/share/ollama/.ollama"
147143
cp -r "${TARGET_MODEL_DIR}" "${CHROOT_DIR}/usr/share/ollama/.ollama/"
148144
echo "--> AI Injection Complete."
@@ -198,9 +194,9 @@ menuentry "LuminOS v0.2.1 Live" {
198194
}
199195
EOF
200196

201-
echo "--> Generating ISO image (Level 3 for Large Files)..."
202-
# Added -- -iso-level 3 to allow files > 4GB
203-
grub-mkrescue -o "${BASE_DIR}/${ISO_NAME}" "${ISO_DIR}" -- -iso-level 3
197+
echo "--> Generating ISO image (Native Xorriso Mode)..."
198+
# Correct syntax for native xorriso command to allow large files
199+
grub-mkrescue -o "${BASE_DIR}/${ISO_NAME}" "${ISO_DIR}" -- -compliance iso_9660_level=3
204200

205201
echo "--> Cleaning up work directory..."
206202
sudo rm -rf "${WORK_DIR}"

0 commit comments

Comments
 (0)