- In use
- AI-assisted
OpenWrt extroot and server services on the router
Automated setup for the GL-MT6000 on OpenWrt – USB extroot, swap, storage and services such as Docker, WireGuard, Samba and AdGuard Home. Multi-phase, idempotent and survives firmware upgrades.
My idea, my hardware, my testing – code implemented with AI assistance, reviewed and improved.
The problem
A router’s internal flash is too small for extra services. The usual answer – “extroot”, extending the system onto USB – is tedious to set up by hand and is lost after every firmware upgrade.
The solution
One script with automatic phase detection:
- Phase 1: partitioning (GPT), extroot on USB, reboot
- Phase 2: swap, storage and selected services – Samba, Docker + Portainer, AdGuard Home, WireGuard, Transmission
- Phase 3: recovery after a firmware upgrade without reformatting
Idempotent (safe to re-run), mounts by UUID via uci, Docker data on its own partition, uninstaller that keeps data intact.
My part
The idea and concept are mine, as are the tests on my router and the improvements from daily use. Implemented with AI assistance, reviewed and developed further. In daily use.
What I learned
Partitioning and file systems, the OpenWrt boot process with its overlay file system – and how to write a script that can run any number of times without breaking anything. Also: running Docker and other services sensibly on embedded Linux with little memory.