Standardized portable environment on a bootable USB drive
-
SourceForge β raw ISO
|
Important
|
Flash the ISO directly: |
sudo dd if=magic_stick_0.1.8.iso of=/dev/sdX bs=4M status=progress && syncYouβre a field technician, trainer, or nomadic developer. Every time you sit at a different computer, you lose 30 minutes setting it up. Magic Stick eliminates that problem: a USB drive that boots a complete, identical environment on any PC.
-
Training: every student gets the same drive, ready to work on day one
-
FTTH/Network technician: full network diagnostics regardless of the host machine
-
Nomadic dev: find your full stack (Docker, Java, Ollama) on any computer
-
Tech teams: shared standardized environment, zero time wasted on setup
Magic Stick uses an A/B partition system with persistence:
| Partition | Size | Role |
|---|---|---|
System A |
~8 GB |
Active Xubuntu live system (default boot) |
System B |
~8 GB |
Backup Xubuntu live system (inactive) |
Persistence |
Remaining space |
User data + software config |
-
update-system.shdetects the active partition (A or B) -
It writes the new ISO to the inactive partition
-
It flips the GRUB boot flag
-
On next boot: new version is active
-
Something went wrong? Reboot into the previous partition β instant rollback
-
The Persistence partition is never touched
| Category | Software |
|---|---|
Desktop |
Xubuntu Desktop (XFCE) |
Containerization |
Docker CE + Docker Compose, Podman |
Local AI |
Ollama (on-device LLM) |
Development |
SDKMAN + JDK 25 Temurin, Git, curl, wget, jq, JetBrains Toolbox |
JavaScript/Node |
NVM, Node.js, pnpm |
Python |
Python 3.14.4, uv package manager |
Network/FTTH |
nmap, iperf3, Wireshark, tshark, traceroute, dnsutils |
System diagnostics |
htop, ncdu, tree, lshw, smartmontools |
Search/Navigation |
ripgrep, fd, fzf |
Git tools |
lazygit |
HTTP/REST |
xh |
Task runner |
just |
Package manager |
Flatpak |
Shell |
zsh + oh-my-zsh, starship |
Media |
opencode, graphify, ffmpeg |
SSH/Transfer |
OpenSSH client, rsync, tmux, terminator |
-
SourceForge β raw ISO
|
Note
|
The ISO is built by GitHub Actions on every tag push. No local build needed. |
# Identify the USB drive
lsblk
# Flash (WARNING: erases all data on the target device)
sudo scripts/flash.sh /dev/sdXmagic_stick/
βββ build/ # live-build output (generated ISOs)
βββ config/
β βββ live-build/
β β βββ package-lists/ # Package lists
β β βββ hooks/ # chroot + binary hooks
β β βββ includes.chroot/ # Files included in the system
β β βββ includes.binary/ # Files included in the ISO
β βββ overrides/
β βββ skel/ # Custom /etc/skel (home template)
βββ scripts/
β βββ build.sh # ISO build via Docker (entry point)
β βββ build-inner.sh # ISO build (inside Docker)
β βββ flash.sh # USB flash
β βββ test-boot.sh # QEMU boot test
β βββ update-system.sh # A/B update
β βββ install-software.sh # Software in chroot
β βββ verify.sh # ISO verification
βββ src/
β βββ main/resources/ # Gradle build resources
βββ Dockerfile # Docker image for the build
βββ build.gradle.kts # Gradle build config
βββ .github/workflows/build.yml # CI/CD pipelinePartition |
Size |
Type |
Flag |
1 (System A) |
8 GB |
squashfs |
boot |
2 (System B) |
8 GB |
squashfs |
- |
3 (Persistence) |
~48 GB |
ext4 |
- |
The Persistence partition uses persistence.conf with / union to save data between sessions.
-
No personal data in the ISO β SSH keys and user files go in the Persistence partition
-
Automatic rollback if the new system fails to boot
-
Persistent data is never touched by system updates
-
Atomic updates: if it breaks, revert to the previous version with a single reboot
| EPIC | Status |
|---|---|
EPIC 1: Project initialization |
β Done |
EPIC 2: Xubuntu base ISO build |
β Done β Download v0.1.8 |
EPIC 3: A/B partition + Persistence |
β Done |
EPIC 4: Software (Ollama, Docker, SDKMAN, tools) |
β Done |
EPIC 5: XFCE customization |
β Done |
EPIC 6: A/B update script |
β Done |
EPIC 8: Docker CLI image |
β Done |
A cheroliv/magic-stick-cli Docker image is available on Docker Hub. It mirrors the CLI software stack from the live-build chroot (no GUI) for CI/CD jobs and Ollama Cloud.
services:
magic-stick-cli:
image: cheroliv/magic-stick-cli:latest
stdin_open: true
tty: true
working_dir: /workspace
volumes:
- ./:/workspace
deploy:
resources:
limits:
memory: 4Gjobs:
my-job:
runs-on: ubuntu-latest
container: cheroliv/magic-stick-cli:latest
steps:
- uses: actions/checkout@v4
- run: python3 script.py
- run: uv run --with requests fetch.py
- run: xh GET https://api.example.com/data|
Caution
|
Never store credentials in image layers. |
docker run --rm -e OLLAMA_DEVICE_KEY="$OLLAMA_DEVICE_KEY" cheroliv/magic-stick-cli ollama login