No description
  • Go 89.5%
  • Shell 10.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Lantern e53b14224c
Some checks failed
commit / docker (push) Failing after 6s
commit / check (push) Successful in 12s
shield /.overlay with tmpfs before Go binary runs
The /.overlay directory must be a tmpfs mountpoint BEFORE res-os-overlay
creates the btrfs mount under it. Otherwise the upperdir path traverses
through / (the lowerdir), causing overlayfs self-reference and breaking
file execution (can't execute /bin/login).
2026-10-11 20:44:46 -07:00
.forgejo/workflows ci: split commit workflow - Go on ubuntu-latest, Docker on docker-builder 2026-10-09 18:54:49 -07:00
.opencode chore: update agent harness configs 2026-09-21 06:15:32 -07:00
cmd rework res-os-overlay for btrfs subvolumes 2026-10-11 19:41:13 -07:00
internal shield /.overlay with tmpfs before Go binary runs 2026-10-11 20:44:46 -07:00
overlay/etc persistence groundwork: metadata capture, Go overlay locator, root layout 2026-10-11 16:36:26 -07:00
.editorconfig inital rip of https://gitlab.alpinelinux.org/alpine/aports/ 2026-07-04 00:19:09 +00:00
.gitattributes inital rip of https://gitlab.alpinelinux.org/alpine/aports/ 2026-07-04 00:19:09 +00:00
.gitignore fix: Hyper-V keyboard support, Limine VM entry, and build CLI improvements 2026-10-11 12:54:06 -07:00
Dockerfile.ResOS fix missing backslash in dockerfile 2026-10-11 19:45:49 -07:00
go.mod res-os-builder: Alpine POC pipeline (rootfs, initramfs, GPT image) 2026-10-09 12:43:15 -07:00
README.md rename residual-overlay to res-os-overlay 2026-10-11 19:34:26 -07:00
residual-overview.md fix: harness review findings (residual/os#4) 2026-10-10 07:51:17 -07:00

residual/os

Build tooling for the residual OS. Currently hosts res-os-builder, a container-native tool that turns OCI/container rootfs images into bootable artifacts — fully unprivileged, runnable on standard CI runners.

Layout

  • Dockerfile.ResOS — the default OS image (build context is the repo root).
  • overlay/ — rootfs overwrite files COPYed onto the image.
  • cmd/res-os-builder/ — the Go CLI. See its README for pipeline docs, usage, and size goals.
  • cmd/res-os-overlay/ + internal/overlay/ — the persistence overlay locator baked into the image (no host Go toolchain needed to build it).
  • internal/ — Go internals (build pipeline, exec helpers).

Quick start

# Build the tool
go build -o res-os-builder ./cmd/res-os-builder

# Build the OS image (repo root is the context)
docker build -f Dockerfile.ResOS -t residual:alpine .

# Full pipeline: Dockerfile → rootfs → initramfs → bootable image
./res-os-builder build --from-dockerfile Dockerfile.ResOS --output residual.img

# Boot test (QEMU)
qemu-system-x86_64 -kernel ~/res-rootfs/boot/vmlinuz-lts \
  -initrd ~/res-initramfs.gz -m 1024 -nographic -no-reboot \
  -append "console=ttyS0,115200" 2>&1 | grep RESIDUAL-POC

See residual/.agent#27 for the design.