release · October 17, 2026
unroot 1.0.6: New Sources for Roots, Cleaner Archives
Import OCI container images and prefixed rootfs bundles, keep machine-specific files out of exported archives with exclusions, and pack a root you built yourself with root ownership.
unroot 1.0.6 is now available. I've been using unroot extensively on my own Linux bootstrapping projects, and the fixes in this release came out of that real-world use — the edge cases my smaller tests never reached.
In case you're new here: unroot lets you unpack a Linux environment, enter it, and work inside it without booting another machine, even when its programs were built for a different CPU. It's a more capable chroot, with QEMU integration and tools for packing your work back into an archive. There is no container daemon to manage.
Beyond the fixes, 1.0.6 adds new sources for a root: you can start from a container image, from an archive whose root sits in a subdirectory (#24), or from a filesystem you built yourself as an ordinary user. It also adds exclusions: you decide which files stay on your machine and never make it into the archive you ship.
The sessions below were all run while preparing this release, with prompts shortened for readability and archive progress omitted. To follow along, you'll need unroot's rootless setup, including subordinate user and group IDs, plus a static QEMU user emulator and kernel support for private binfmt registration for the ARM64 example. Use images and archives you trust: unroot is not a sandbox for hostile software.
Where a Root Can Come From
A Container Image, Without the Container Runtime
The most common way to obtain a Linux filesystem these days is a container image, and unroot now imports it without asking you to install a container runtime. OCI images store a filesystem as a series of layers; unroot unpack --flatten verifies those layers and combines them, deletions and all, into a regular Linux filesystem you can enter and modify. We'll use Skopeo to fetch ARM64 Alpine as an OCI archive, on an x86-64 machine:
$ skopeo copy --override-os linux --override-arch arm64 docker://docker.io/library/alpine:3.22 oci-archive:alpine-arm64.oci.tar
$ unroot unpack --flatten --platform linux/arm64 alpine-arm64.oci.tar alpine
We're importing a filesystem, not starting the image's configured container application. Now we can enter it:
$ unroot enter alpine
# cat /etc/alpine-release
3.22.5
# uname -m
aarch64
# id -u
0
# exit
That's ARM64 Alpine on an x86-64 host: QEMU runs the foreign programs, we appear as root inside without becoming root on the host, and it all runs on the host's kernel. The # prompt marks commands inside Alpine; after exit, we're back at our host's $ prompt.
From here, it works like any other unroot root. When we're done, unroot pack writes a normal rootfs archive, with the original OCI layer boundaries not retained.
When the Root Is One Directory Down
Not every distribution puts etc, usr, and var at the top of its tarball, so unroot now lets you name the directory that actually is the root. Arch's bootstrap archive keeps its filesystem under root.x86_64, with bundle metadata alongside it:
$ unroot unpack --root-prefix root.x86_64 archlinux-bootstrap-2026.10.01-x86_64.tar.zst arch
$ unroot enter arch -- /bin/bash --noprofile --norc
# . /etc/os-release
# echo "$NAME"
Arch Linux
# id -u
0
# exit
This uses the bootstrap archive, not the installer ISO, from an Arch Linux mirror. Check the download against Arch's published verification information; the filename above is the version I tested.
unroot remembers the choice, so subsequent commands use arch, not arch/root.x86_64, and architecture detection, injections, and exclusions all operate on the selected root. The surrounding bundle is kept, not stripped, and packing preserves that layout: specify the prefix again when you unpack the exported archive into a new root.
The same approach applies to an LXD unified container archive, which keeps its filesystem under rootfs/ alongside its metadata:
$ unroot unpack --root-prefix rootfs container.tar.xz container
$ unroot enter container
That's LXD's unified container tarballs specifically, not split images or VM disks. unroot uses their filesystem, not LXD's configuration or templates.
A Root You Built Yourself
Early in a bootstrap, you often have a small Linux filesystem built as your ordinary user, and you want to ship it with root ownership. unroot's enter --single mode already makes your user and group root inside the environment while the files remain yours on the host, and you don't need subordinate IDs for it. The new pack --single closes the loop: it exports that work with root ownership, without changing the source files. This is the smallest thing that shows the ownership change, not a real system:
$ mkdir -p minimal/etc
$ cp /etc/os-release minimal/etc/os-release
$ stat -c '%u:%g %n' minimal/etc/os-release
1000:1000 minimal/etc/os-release
$ unroot pack --single minimal minimal.tar.zst
$ tar --zstd --numeric-owner -tvf minimal.tar.zst
drwxrwxr-x 0/0 0 2026-10-17 18:11 ./
drwxrwxr-x 0/0 0 2026-10-17 18:11 ./etc/
-rw-r--r-- 0/0 286 2026-10-17 18:11 ./etc/os-release
Notice the change from 1000:1000 to 0/0: the archive is ready to be unpacked with root ownership represented correctly, while the source files still belong to the ordinary user. Your account IDs and timestamps will differ.
For a real bootstrap, minimal would be your completed filesystem. Register exclusions for temporary build trees first, then pack. If the filesystem carries owners that single mode cannot represent, pack --single refuses to change them rather than doing it silently, and it is not a way to override an existing root's recorded ownership mapping.
What Ships, and What Stays Home
An entered root needs some of your machine's state to work: name resolution, hostnames, a live mount table. That state is yours, and it should never end up in an archive you hand to someone else.
That's what injections are for: on unpack, unroot installs writable copies of your hosts and resolver files and a mount-table symlink, and preserves what was originally there. On pack, the injected files are left out and the originals are restored in the archive.
$ unroot inject list alpine
NAME DESTINATION OWNER MODE ORIGINAL CURRENT
resolv.conf /etc/resolv.conf 0:0 0644 absent present
hosts /etc/hosts 0:0 0644 regular present
mtab /etc/mtab 0:0 0777 symlink symlink
The last two columns show what changed: Alpine originally had no resolver file, and now it has one. Our working copies stay in place for the next session; the archive gets the originals.
Injections handle files the root needs. Exclusions handle the files you want to keep but never ship, and they're the new part of 1.0.6. Every freshly unpacked root starts with one rule:
$ unroot exclude list alpine
/etc/ssh/ssh_host_*
Those are the SSH server host keys, public parts included, not your personal login keys. Copies of a filesystem should not share its server identity. The default rule also catches keys generated later, and it doesn't delete anything from the working root.
You can add rules of your own, and the pattern applies to whatever a working root accumulates:
$ unroot exclude add alpine /build '/tmp/*'
$ unroot exclude list alpine
/etc/ssh/ssh_host_*
/build
/tmp/*
$ unroot pack alpine alpine-rootfs.tar.zst
Paths refer to the rootfs, not the host, so quote wildcard patterns to keep your shell from expanding them. /build and its contents are omitted; /tmp/* omits the contents of /tmp but leaves the directory itself.
What we end up with is a portable Alpine archive: the originals in place of our injections, no SSH host keys, no build clutter, and the working root untouched for the next session. Before you pack, though, exit your sessions and stop any other programs writing to the root. Adjust the rules with exclude remove or exclude clear; they belong to the working root, not the archive, and the default SSH exclusion applies to newly unpacked roots only.
Let Me Know Your Experience
I want unroot to take care of the fiddly parts, so you can get on with the work you entered the filesystem to do. The examples above are a good place to start, but the real test is pointing it at your own rootfs work: try unpacking, entering, and packing an actual root you use. Tell me what you build with it, where it gets in your way, and what breaks — the fixes in this release came from exactly that kind of use, and the next ones will too.
Download unroot 1.0.6, browse the project page, or report what you run into on the issue tracker.