fix: correct ISO rebuild paths and update GPU detection for USB structure

- Fixed quick-rebuild-iso.sh paths from /hermes/ to /opt/hermes/
- Fixed ISO boot structure (uses GRUB eltorito/efi, not isolinux)
- Added MBR extraction fallback for xorriso
- Updated start-llama-server.bat to reference existing USB paths
  (bin/ollama/, Llama-3.2-1B model, llama-server-vulkan.exe)
- Works with existing USB structure — no restructure needed
- All bat files: ASCII text, CRLF line terminators
This commit is contained in:
2026-07-10 01:41:26 -04:00
parent 4e0ab94ee2
commit 6623d4d1fd
2 changed files with 154 additions and 34 deletions
+7 -6
View File
@@ -7,7 +7,7 @@ PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
BUILD_DIR="$PROJECT_DIR/build"
EXISTING_ISO="$BUILD_DIR/output/hermes-rescue.iso"
OUTPUT_DIR="$BUILD_DIR/output"
WORKDIR="/tmp/hermes-iso-quick"
WORKDIR="${WORKDIR:-/tmp/hermes-iso-quick}"
SOURCE_DIR="$PROJECT_DIR/src"
info() { echo -e "\033[0;34m[INFO]\033[0m $*"; }
@@ -21,7 +21,8 @@ done
[[ -f "$EXISTING_ISO" ]] || die "Existing ISO not found: $EXISTING_ISO"
rm -rf "$WORKDIR"
# Clean workdir contents (handles bind mounts safely)
rm -rf "$WORKDIR" 2>/dev/null || (rm -rf "$WORKDIR"/* 2>/dev/null; true)
mkdir -p "$WORKDIR/iso-contents" "$WORKDIR/squashfs-root"
info "Mounting existing ISO..."
@@ -40,15 +41,15 @@ unsquashfs -d "$WORKDIR/squashfs-root" -f "$WORKDIR/filesystem.squashfs" 2>&1 |
ok "Squashfs extracted ($(du -sh "$WORKDIR/squashfs-root" | cut -f1))"
info "Updating config.yaml..."
cp "$SOURCE_DIR/hermes/config.yaml" "$WORKDIR/squashfs-root/hermes/config.yaml"
cp "$SOURCE_DIR/hermes/config.yaml" "$WORKDIR/squashfs-root/opt/hermes/config.yaml"
ok "config.yaml updated"
info "Updating auth.json..."
cp "$SOURCE_DIR/hermes/auth.json" "$WORKDIR/squashfs-root/hermes/auth.json"
cp "$SOURCE_DIR/hermes/auth.json" "$WORKDIR/squashfs-root/opt/hermes/auth.json"
ok "auth.json updated"
info "Updating autorun.sh..."
cp "$SOURCE_DIR/hermes/autorun.sh" "$WORKDIR/squashfs-root/hermes/autorun.sh"
cp "$SOURCE_DIR/hermes/autorun.sh" "$WORKDIR/squashfs-root/opt/hermes/autorun.sh"
ok "autorun.sh updated"
info "Re-packing squashfs..."
@@ -92,5 +93,5 @@ iso_size=$(du -h "$OUTPUT_ISO" | cut -f1)
ok "ISO generated: $OUTPUT_ISO ($iso_size)"
info "Cleaning up..."
rm -rf "$WORKDIR"
# rm -rf workdir (skip - bind mount)
ok "Done!"