Linux · ext4 · Chia

Storage that
understands plots

xchOS extends the Linux kernel with /.chiaplots — a root-level plot vault on ext4. Free space reporting, create restrictions, and proactive eviction work together so your system keeps farming without drowning in plot files.

Get started View on GitHub Explore features
ext4 Filesystem layer
/.chiaplots Mount-root vault
xchos Userland daemon

Three pillars of chiaplots

Special behavior applies only to /.chiaplots at the filesystem root — not nested paths with the same name.

Inflated free space

Blocks used by regular files in /.chiaplots are added back into f_bfree and f_bavail. df reflects logical headroom while plots stay on disk.

No direct creates

create, mkdir, symlink, and similar ops return -EPERM under the vault. Same-filesystem rename / mv is allowed — the path plots take in production.

Proactive eviction

When free clusters fall below demand plus a 1 GiB margin, the kernel deletes the oldest regular file in readdir order — making room before allocation fails.

The plot lifecycle

Plots land in /.chiaplots via rename, not create. The metric userland tools use mirrors kernel semantics:

metric = df avail sum(plot files)

When metric exceeds your threshold, xchos plots more. When the disk starves, the kernel evicts.

01
Plotter writes to temp

Chia chiapos uses -t on a temp dir, -d for final destination.

02
Rename into vault

Same-filesystem mv — allowed where create would fail.

03
statfs adjusts

Plot blocks count as free in df; eviction frees real clusters when needed.

Meet xchos

A bash loop that polls every 5 minutes — Chia plotting by default, with optional dd mode for testing.

scripts/xchos
$ ./scripts/xchos
xchos: starting CHIAPLOTS_DIR=/.chiaplots THRESHOLD_MB=300000 PLOTPOLL_CHIA=1 INTERVAL_SEC=300 ...
xchos: chia plotters chiapos -k32 -b4608 ...
# First run with chia: init, keys, patch config.yaml
farmer.full_node_peers → node.xchos.com:8444
farmer + pool xch_target_address → default payout
chia start farmer-only harvester
  • Chia-first Default k32 chiapos, 4608 MiB buffer (CHIA_PLOT_K, CHIA_BUFFER_MB) when PLOTPOLL_CHIA=1
  • Smart threshold Plots only when metric > 300 GiB headroom (THRESHOLD_MB=300000)
  • 5-minute polls Sleeps INTERVAL_SEC=300 between checks (override for faster testing)
  • Bootstrap Auto-init wallet; sets one full node peer node.xchos.com:8444 (CHIA_FULL_NODE_HOST / CHIA_FULL_NODE_PORT)
  • ISO-ready Staged via scripts/prepare-chiaplots-cubic.sh for custom Ubuntu images
  • Rewards with purpose farmer.xch_target_address and pool.xch_target_address default to the Marmot Recovery Foundation (CHIA_XCH_TARGET_ADDRESS)
Vancouver Island marmot working at a PC
Vancouver Island marmot

Farming rewards support marmot recovery

When xchos sets up Chia for the first time, both farmer.xch_target_address and pool.xch_target_address in config.yaml are set to benefit the Marmot Recovery Foundation by default — helping save the Vancouver Island marmot, one of Canada’s most endangered mammals.

The foundation breeds and releases marmots, restores habitat, and monitors wild populations. There were once fewer than 30 left in the wild; recovery efforts are bringing them back.

Learn about marmots.org

Build, boot, plot

1

Build the kernel

git clone --depth 1 https://github.com/wjblanke/linux.git
cd linux && cp /boot/config-$(uname -r) .config
make olddefconfig
scripts/config --set-str SYSTEM_TRUSTED_KEYS ""
scripts/config --set-str SYSTEM_REVOCATION_KEYS ""
make -j$(nproc)
sudo make modules_install && sudo make install
2

Create the vault

sudo mkdir /.chiaplots
sudo chmod 777 /.chiaplots
sudo reboot
3

Run xchos

./scripts/xchos
# or install to /usr/local/bin/xchos from a Cubic ISO build

xchOS ISOs

Pre-built Ubuntu 24.04.4 live images with the xchOS kernel, /.chiaplots, Chia CLI, and xchos. Pick the architecture that matches your hardware. Install the ISO. Log in, type nohup xchos &, and you will automagically farm the entirety of your over provisioned boot drive while your Ubuntu box still functions for everyday use.

Build your own ISO

Remix an official Ubuntu image with Cubic — drop in your kernel .deb, Chia CLI, and xchos using scripts/prepare-chiaplots-cubic.sh.

Cubic build guide

GitHub repository

xchOS is developed in public at github.com/wjblanke/linux — a Linux kernel fork with ext4 chiaplots, userland tooling, and build docs.

wjblanke / linux

Kernel fork · ext4 /.chiaplots · scripts/xchos · Cubic ISO staging

git clone --depth 1 https://github.com/wjblanke/linux.git

What’s in the tree

  • README.md — full xchOS documentation (chiaplots, build, Cubic)
  • fs/ext4/chiaplots.c — kernel implementation
  • scripts/xchos — plot polling and Chia farmer helper
  • scripts/prepare-chiaplots-cubic.sh — stage files for custom Ubuntu ISOs
  • html/ — this website