Linux · ext4 · Chia

Storage that
understands plots

xchOS extends the 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 keeps your vault filled when headroom allows — Chia plotting by default, with optional dd mode for testing.

scripts/xchos
$ ./scripts/xchos
xchos: starting CHIAPLOTS_DIR=/.chiaplots THRESHOLD_MB=409600 ...
xchos: chia plotters chiapos -k32 ...
# On first run with chia installed:
chia init → keys → node.xchos.com → farmer-only harvester
  • Chia-first Default k32 chiapos when PLOTPOLL_CHIA=1
  • Smart threshold Plots only when metric > 400 GiB headroom (configurable)
  • Bootstrap Auto-init wallet, peer to node.xchos.com
  • ISO-ready Staged via prepare-chiaplots-cubic.sh for custom Ubuntu images
  • Rewards with purpose Farmer payouts go to the Marmot Recovery Foundation by default
Vancouver Island marmot — Canada's most endangered mammal
Vancouver Island marmot

Farming rewards support marmot recovery

When xchos sets up Chia for the first time, farmer rewards are configured 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 https://github.com/wjblanke/linux.git
cd linux && cp /boot/config-$(uname -r) .config
make olddefconfig && 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

Custom Ubuntu ISO

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

Read the 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 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