scrotwmos
SCROTWMOS-BYOL(7) Miscellaneous Information Manual SCROTWMOS-BYOL(7)

scrotwmos-byol — scrotwmos on your own Linux

byol, bring your own Linux, is a plain Void Linux install with swm-wl(1) as its desktop. It has a login user, an encrypted root, and runit. Workspaces can belong to sessions, each a container or a VM. It also runs VMs of its own, servers with no workspace, on Void's qemu: swmtool vm. There are no worlds. The box is yours to run and to harden. The install stick installs it when the answer to the first question is byol; see swmtool(8).

The firmware starts the byol loader, byolstub.efi (see swmstub(8)), with an amber banner. It asks for a username and the password. The login user's username boots the newest kernel. The username rescue, with the same password, lists the kernels to pick one. After three wrong tries, the loader halts until a power cycle. The password opens a key to the root's LUKS2 volume, which the initramfs uses. If that key does not open the root, the initramfs asks for the password.

byol has one password: the boot's, the disk's, the login's, and the screen lock's. Change it with swmtool preboot passwd user as root, never with passwd(1), which changes the login's alone.

The loader checks nothing it boots. It takes the kernel, the initrd, and the command line from the ESP as they are. A kernel hook copies each new kernel there and keeps the newest three.

With a TPM 2.0, swmtool preboot tpm on lets the box boot with no password. The loader measures the kernel, the initrd, and the command line. The TPM opens the disk only when PCRs 4, 7, and 8 are as sealed. Such a boot starts with the screen locked. The password still works: the loader asks for it on the first boot after an install or an update, after a change the TPM refuses, and when you hold a key while the banner types. A warning on the screen says when the measured boot changed with no update. swmtool preboot tpm off turns it off.

swmtool preboot tpm password makes the boot take the TPM and the password together. A thief who knows the password but has only the disk cannot open it. It shows a recovery phrase of 12 words. When the TPM does not open the disk, the loader halts with ‘TPM gave no key: recover from install stick’, or, when the measured boot changed with no update, ‘boot changed since last seal: tampering suspected; power off’. The loader never asks for the phrase: a loader that asks for it is not ours. Boot the install stick and run swmtool recover: it asks the phrase, the username and a new password, and whether to drop the TOTP codes (a lost phone). It lays the loader, the kernels and the command line again from the disk's own system. The next boot asks the new password once, then seals again: the TPM and the new password from then on. The phrase stays the same. Without the phrase, the disk does not open. An update from the stick asks for the phrase too, and seals the new kernels from the stick; if that fails, or the firmware measured the stick otherwise, the next boot may halt: swmtool recover opens it. swmtool preboot tpm phrase shows it again. swmtool preboot tpm password off goes back to the TPM alone.

swmtool totp on adds two TOTP codes to the TPM and password boot, two entries in a phone's authenticator app. The loader shows the loader code before the prompt: if it shows none, or one that is not the phone's, the boot has been tampered with; type nothing and power off. Then it asks the login code, first, before the username and the password: without the phone, no password is asked. Return on an empty login code shows a fresh loader code. Each secret is shown as letters, as an ‘otpauth://’ URI, and as a QR code by qrencode(1), in byol's packages (on an older box: ‘xbps-install qrencode’); one at a time, the loader's then the login's: shown, its phone code typed back, then the screen and its scrollback cleared, so no QR code scrolls off before it is scanned. It runs on a terminal only. tmux(1) and screen(1) keep their own scrollback, which it cannot clear: run it outside them. The RTC must keep UTC; it refuses an RTC a minute or more off. swmtool totp off removes the codes; both ask the login and its password, and both change the TPM's key, so an old sealed file put back opens nothing. swmtool recover takes no code: it runs when the TPM refuses, and there is none.

The runit service swm-wl starts the compositor at boot on VT 2, as the login user. Its root monitor is the seat: there is no seatd and no logind. Other VTs keep their gettys. sv restart swm-wl restarts the desktop and its sessions. The compositor's log is /var/log/swm-wl.log, and the previous start's is /var/log/swm-wl.log.0. At power off, the compositor stops its sessions first.

MOD+Shift+Delete locks the screen with swaylock, and so do five idle minutes. The box locks before it sleeps.

Workspaces with no session belong to host: programs there run on the box as the login user. Other workspaces can belong to sessions, at most nine. A session is a container or a VM, with its own uid and root. The install asks for them. swmtool session, as root, adds, changes, and removes them later. On the running box, it takes the new root's packages from --release dir. The compositor takes the change at its next start.

A container's root is /srv/name, and its home is /var/lib/scrotwmos/home/name. A VM's disk is /var/lib/scrotwmos/vm/name.img. The sessions that join the share see /share. scrotwmos.conf(5) describes the sessions, in /etc/scrotwmos/swm-wl.conf.

The network is the host's. dhcpcd takes the lease. When the install went out on a wired uplink, that NIC is in the bridge lan0. An update on a box with no lan0 lays it the same way, from the stick's uplink; it takes effect at the next boot. A Wi-Fi uplink cannot be bridged: no lan0. With lan0, dhcpcd runs on lan0 and on each real NIC, such as Wi-Fi, found when dhcpcd starts; not on the NIC in lan0, a VM's tap, or a bridge, tun or wg link of your own. lan0 follows its NIC's carrier: the service lan0-link takes lan0 down when the cable is out, so a VM's tap does not keep its lease and route, and Wi-Fi's route wins. openntpd sets the clock. The host routes a container's or a VM's traffic and drops what its session_net does not reach. Set up anything else, such as Wi-Fi, as on any Void Linux.

A server that is not a session, such as a VM moved over from another box, runs on Void's qemu: swmtool vm. The install adds qemu-system-amd64, qemu-img, qemu-firmware, and the tools the image builds use: curl, gnupg's gpgv, and cdrtools' mkisofs. swmtool vm image build makes a base image of Void, fedora-45, or openbsd-8.0, each checked against its release's signatures. swmtool vm create makes a VM over one: its own disk, a fixed MAC, and a seed. The seed holds the VM's hostname, the login user's ssh keys, and the hash of a password that swmtool vm pass shows. swmtool vm clone copies a stopped VM whole. Each VM is qemu's command line as YAML, /var/lib/scrotwmos/vm/name.yaml, and a runit service, /etc/sv/vm-name, that runs qemu as the VM's own uid, never root: a -vm-name line of /etc/subuid, made by swmtool vm create and clone, or at its first start. A VM has no workspace; its console is swmtool vm console name. A VM on lan0 is a box on the LAN with a fixed MAC: swmtool vm create gives each VM one; give a VM that you write by hand its own MAC in its YAML. scrotwmos filters none of its traffic. swmtool vm start --temp runs a temporary VM, its writes discarded. See swmtool(8).

The root is an image, root.img, in an XFS store on the disk's LUKS2 volume, mounted at /swmdata. The image is LUKS2 of its own, under the disk's key. ttd(8) takes a point of it each hour it changed: a reflink clone beside it, in /swmdata/images/tt/, taken in under a second, the root frozen while it is taken. It keeps every point of the last day, one a day for the week before, then one a week. Time travel starts off. Turn it on with swmtool tt on; off deletes every point.

swmtool tt status lists the points. swmtool tt mount hour mounts one read-only at /points/hour, to take a file back. swmtool tt back hour makes a point the root the next boot boots, with its kernels; swmtool tt back undo goes back to the root before. With ttd stopped, tt(8) does the same commands, each once, with no hourly point.

A place is a directory that you mount, and that holds copies of the root: swmtool tt place dir. Mount there XFS, ext4, btrfs, FAT or exFAT on a disk, an NFS export, or an SMB share, not FUSE; scrotwmos does not mount it. When the directory is not mounted, the place is absent: no copy is made, and the points go on. The first copy is the whole root, the next only what changed; they are ciphertext. ttd(8) and tt(8) make the copies on the box, with no VM: the box's kernel reads the place's file system.

A new box comes back from a place: mount it, then install with a plan whose restore names its directory and restore_hour the copy (swmtool-answer(5)). The new disk boots the old box's root, its packages, its user and its files. Its TPM is sealed anew. Time travel starts off on it, with no place: swmtool tt on, then swmtool tt place on the same place with the same password, takes the place back and keeps its copies. The new box's root stays under the old box's disk key: the old box's password opens it, as the rotation of that key is not done yet. A place takes one writer at a time. So wipe or retire the old box.

Void's packages update with xbps-install(1), as on any Void Linux. The kernel hook puts a new kernel on the ESP. The TPM seals it. scrotwmos itself updates from the install stick: its task update lays the stick's release, then updates each session's root. On a box from before swmtool vm, it also adds lan0, as above. It adds no package to the box, not even qemu: swmtool vm names each package it lacks and the xbps-install(1) line that adds them. The task keeps a config file edited since the install and shows what the release adds to it. It refuses an older release.

  • No worlds, no A/B slots, no rescue world, and no decoy.
  • The loader checks nothing it boots; the appliance's boot image is signed.
  • The network is the host's, with dhcpcd; there is no net VM.
  • ttd(8) or tt(8) takes the root's points and copies on the box. The appliance's copies run in ttvm; byol's run on the box, to a directory that you mount.
  • No F1 to F12 tabs; an alert band names the log.
  • No VM gets a whole GPU.
  • VMs of your own run on Void's qemu; dom0 has no qemu.
  • Daemons run: runit, dhcpcd, openntpd, acpid, lan0-link, and the gettys.

An alert is a band across the top of every output, with a code and the log's name. scrotwmos(7) lists every code and what to do.

If the newest kernel does not boot, boot rescue and pick an older one. If the desktop does not come up, log in on another VT and read /var/log/swm-wl.log. If the box does not boot at all, boot the install stick. Ctrl-C at a question leaves a shell. The stick's task update lays scrotwmos again.

If the LUKS header is damaged, the password does not open the root. Keep a stripped copy of the header on media of your own, as swmtool(8) shows under preboot passwd. byol has no ESP twin. A place (swmtool tt place) holds copies of the root; a plan with restore brings them back onto a new disk.

/etc/scrotwmos/swm-wl.conf
the compositor's configuration
/var/log/swm-wl.log
the compositor's log and its alerts
/usr/lib/scrotwmos
the scrotwmos tree, linked into /usr/local/bin
/srv/
the containers' roots
/var/lib/scrotwmos/home/
the containers' homes
/var/lib/scrotwmos/vm/
the VM sessions' disks, and each swmtool vm VM's YAML, disk, seed, and password
/var/lib/scrotwmos/vm/images/
's base images
/swmdata/images/root.img
the root's image, in the store
/swmdata/images/tt/
the root's points
/points/hour
a point mounted read-only
/boot/efi
the ESP: the loader, its keys, and the kernels

swmtool(8) lists every file of swmtool vm.

Make a first VM from a Void image, named for the day it was built. Then read its password and open its console:

# swmtool vm image build void
# swmtool vm create web void-20261115 small
# swmtool vm start web
# swmtool vm pass web
# swmtool vm console web

swmtool(8) has the rest: Fedora and OpenBSD images, a VM moved over from another box, clones, and temporary VMs.

swm-wl(1), scrotwmos.conf(5), swmtool-answer(5), scrotwmos(7), scrotwmos-dom0(7), scrotwmd(8), swm-vmm(8), swmstub(8), swmtool(8), tt(8), ttd(8), vmm-gfx(8)

Marco Peereboom <marco@peereboom.us>

November 13, 2026 Void Linux