| SCROTWMOS-DOM0(7) | Miscellaneous Information Manual | SCROTWMOS-DOM0(7) |
NAME
scrotwmos-dom0 —
the scrotwmos appliance
DESCRIPTION
The appliance is scrotwmos as the whole operating system of a box. Its host, dom0, runs the compositor and nothing else. Everything you use runs in a session of a world. swmtool(8) installs it from the install stick.
The boot
The firmware starts swmstub(8) from the boot partition. It asks for a username and the password. The username picks the world and its slot; there is no boot menu. After three wrong tries, the loader halts until a power cycle. It then checks the boot image against the release key and starts the dom0 kernel with swm-wl(1) as its first process. The world opens on workspace 1.
An A/B world has two usernames, one for each slot. Both open the same world; only the boot image differs. An update puts the new release in slot A and the previous one in slot B. The rescue world and a decoy world have one username each. Nothing at the prompt tells a decoy's username from another.
TOTP codes are optional: two entries on a phone, enrolled at
install or with swmtool totp on from the install
stick. swmtool totp off there turns them off. With
codes on, the loader shows a loader code first. If it is not the code on the
phone, the loader is not ours. Then it asks for a login code, before the
username. The TPM seals the two secrets to the loader. The codes are the
box's, the same for every world, the decoy too.
swmtool(8) has the details.
What dom0 runs
dom0 holds three programs:
swm-wl(1),
swm-vmm(8), and
vmm-gfx(8). Its build refuses a fourth.
There are no daemons, no shell, and no login.
swm-wl(1) forks the root monitor, which
stays root, and the compositor, which runs as _swm.
A seccomp filter refuses the compositor every exec. What it can write is
mounted noexec. The root monitor starts the sessions, opens the disks, and
serves the seat. swm-vmm(8) runs each
VM. vmm-gfx(8) runs a VM's GPU commands
on the host GPU. A crash of the compositor restarts the box.
Worlds and sessions
A world is an encrypted desktop with its own master key. Worlds never talk to one another. A box holds up to eight worlds, of three kinds, and eight usernames in all. An A/B world is the everyday one. The rescue world is root in a container with the repair tools, alone on the box. A decoy world always runs as a VM, reaches the internet only, and takes no points.
Each world has its default session; an A/B world has up to four
more, on workspaces of their own. Sessions work as
scrotwmos(7) says. The sessions of a
world can share one directory, /share. The bar shows
the username, the session, and the workspace, such as
‘alice:default:1’.
scrotwmos.conf(5) describes the
sessions; swmtool session and
swmtool world change them.
The network
dom0 has no network card driver, PCI or USB. The net VM takes the
cards whole, by their IOMMU group. It runs DHCP, Wi-Fi, the router, NAT, the
firewall, and swm-ntp(8). dom0 takes
only the time from it. Each session reaches what its
session_net allows: the internet, the LAN, both, or
nothing. F5 shows the uplink and joins Wi-Fi. F9 approves a card or measures
one that the release did not. The rescue world has no net VM, and so no
network.
The disk
The disk holds the boot partition, labeled
ESP; an optional encrypted swap partition;
swmdata; and last, the ESP's twin, which every
change to the ESP is copied to. The ESP holds the loader,
keys.wrap, and sealed files with hashed names: each
slot's boot image and configuration, each world's keys, and the firmware.
keys.wrap has one entry for each username. An entry
opens its world's master key with that username's password. swmdata is LUKS2
with XFS. It holds each world's images: roots, homes, the share, and the VM
kernels. Each image is encrypted again under a key that only its world's
master key opens. dom0 opens only the swmdata on the disk it booted
from.
Points and backups
Each hour the home changed, the root monitor takes a point: the home as it was at that hour. It keeps every point of the last day, one a day for a week, and one a week for two years. It takes none under 5% free and deletes them all under 1%. A VM's disk is frozen while its point is taken, when its guest answers. F11 turns points on or off, mounts any of them read-only at /points/hour in the session, and browses one.
A backup place is a USB disk, an NFS export, or an SMB share. The
world copies each new point there while it can reach the place. The copies
are encrypted. ttvm, which runs
swm-tt(8), holds no key to them. F11
makes a place on a USB disk. In rescue, swmtool
points lists the points, swmtool open --point
opens one, and swmtool place lists and opens the
copies at a place.
The place also keeps the world's file, sealed under the place's
key and under the world's recovery phrase, swmtool place
phrase. On a new box, swmtool place world
makes a new install's world the dead box's again, by its password or the
phrase, and swmtool place restore puts each copy
back. swmtool esp restore makes a dead ESP again
from its twin.
Updates
Updates run from the rescue world or from the stick.
swmtool update-boot writes a new release: slot A
gets it, and slot B gets what A had. It refuses an older release.
swmtool update-root updates the packages of the
world's roots and its VM kernels. On the stick, the task
update does both. swmtool firmware
refresh fetches the firmware for new hardware. Update every world,
the decoy too. A change takes effect at the world's next boot.
The lock
MOD+Shift+Delete locks the screen, and so
does F10. On a keyboard with no Delete key, Delete is Fn+Backspace. Sleep
and a closed lid lock first. The lock shows the hostname, how many alerts
wait, and the world's mark. The mark is
‘WORLD:’ and two words in one color.
It comes from the world's key, so no program knows it. Learn it. A prompt
that does not show your world's mark is not dom0's. Press
MOD+Shift+Delete: the real lock comes up over it.
The root monitor checks the password. If the compositor loses its link to
the root monitor, the lock says “MONITOR LOST: UNLOCK
UNAVAILABLE”; power off and on. After a wrong password, the next try
waits 1 second. The wait doubles up to 60 seconds. Under the lock, only F10
opens.
The tabs
dom0 has no shell, so the compositor draws tabs over the focused
output. MOD+F1 to MOD+F12
open them, and Esc closes them.
- F1 help
- the bindings, a tutorial, and the release
- F2 top
- each session's CPU, GPU, memory, and tasks; end a session
- F3 log
- this boot's log, and earlier boots'
- F4 alerts
- the alerts waiting and seen, each taken apart
- F5 network
- the uplink, Wi-Fi, and the net VM
- F6 disks
- the disks, the mounts, and each session's images
- F7 usb
- the input and USB devices and the outputs; let a new device in
- F8 machine
- CPU, memory, battery, sensors, and power
- F9 iommu
- the IOMMU, each device by group; approve a card or a ROM
- F10 power
- lock, sleep, reboot, and power off
- F11 backups
- points and the backup place
- F12 settings
- the pointer and the keyboard
Another MOD+Fn switches tabs. A tab that a
real keyboard opened belongs to that keyboard: a program cannot close it,
switch it, or press its keys. These take a real keyboard: the end of a
session, every key of F5 and F7, an approval on F9, Enter on F10, and the
actions of F11 and F12. doc/tabs.md has each tab's
keys.
When something breaks
An alert is a band across the top of every output, with a code. scrotwmos(7) lists every code and what to do.
If slot A does not boot, boot slot B's username. If a world does not open, boot the rescue world and use swmtool(8). The rescue world still asks for a world's password before it opens that world.
If the rescue world does not boot either, boot the install stick.
Its task update writes the release and the loader
again and updates the roots. Ctrl-C at a question leaves a shell.
swmtool unlock then opens swmdata for the other
commands. If the ESP is dead, swmtool esp restore on
the stick makes it again from its twin.
A lost password cannot be recovered on the box: nothing else opens
its world there. A dead box needs the world's backup place and the password.
A lost password needs the backup place and the recovery phrase.
swmtool place world brings the world back on a new
install, as swmtool(8) shows.
FILES
- /etc/scrotwmos/dom0.conf
- the world's configuration, sealed on the ESP
- /swmdata
- the encrypted data partition, mounted by the root monitor
- /share
- the world's shared directory, in each session that joins it
- /points/hour
- each point that F11 mounted, in the session, by its UTC hour
SEE ALSO
swm-wl(1), scrotwmos.conf(5), swmtool-answer(5), scrotwmos(7), scrotwmos-byol(7), scrotwmd(8), swm-ntp(8), swm-tt(8), swm-vmm(8), swmstub(8), swmtool(8), vmm-gfx(8)
AUTHORS
Marco Peereboom <marco@peereboom.us>
| November 13, 2026 | Void Linux |