| SWMTOOL-ANSWER(5) | File Formats Manual | SWMTOOL-ANSWER(5) |
NAME
swmtool-answer —
scrotwmos install plan
DESCRIPTION
An answer file, or plan, tells
swmtool(8) what to install.
swmtool plan writes one from the install questions,
and swmtool install reads one.
The format is that of
scrotwmos.conf(5): one
key =
value per line, an optional
[name] after the key, and
‘#’ for a comment, at the start of a
line or after a value: a value has no
‘#’ in it. Only
‘=’ is allowed. Each key appears once.
An unknown key is refused. There is no password key. Passwords come from the
terminal or from --passwords when the plan is
installed. A password key is refused by name.
A plan installs one of two things, by
base: dom0, the appliance
with its worlds, or byol, a plain Void Linux with
scrotwmos as its window manager.
THE MACHINE
basedom0(the default) orbyol.keyboard- The keyboard layout, one the install stick carries, compiled in its
release's keymaps/:
us,gb,de,fr,es,it,nl,pt,se,no,dk,fi,be,chorbr. Required. Passwords are typed in it, at the boot too. A password with a character that needs AltGr is refused: the boot may not read AltGr. At the boot, type a password's digits on the main row, not the keypad: where the digits need Shift (fr,be) the keypad types other characters there. Over a serial console, the boot reads the keys as US for a layout other than US: type the keys a US keyboard has for the password. disk- The disk to erase:
/dev/disk, a whole disk by
its serial as
/dev/disk/by-id/name, or
largest,largest-nvme, oronly, which never pick a removable disk.onlyrefuses a box with none or more than one. Required. eraseyesorno: whether a disk that holds data is erased, as--forcedoes. The default isno: such a disk is refused, and nothing is written.unattendedyesorno: whether the install stick installs this plan with no question, when the plan is on the stick as swm/plan. The default isno: the stick shows the disk and asks for its name first.swmtoolitself asks nothing only under--batch.hostname- Letters, digits, dots, and hyphens, 63 at most; the first is a letter or a
digit. The default is
scrotwmos. timezone- A zone under /usr/share/zoneinfo. Required. For
dom0, it isUTC. repo- Where the packages and the firmware come from: an http or https URL, or an absolute path. The default is the Void mirror, https://repo-fastly.voidlinux.org/current.
swap- The swap partition:
auto(the default, the machine's memory plus 10 percent, rounded up to a GiB, 1 GiB at least),none, or a size of 1 to 6 digits andMorG, 256M at least. A disk with no room for it beside the ESP and swmdata (a dom0's) or the root, 4 GiB at least (a byol's), is refused: answer a smaller swap. The swap gets a new key at each boot, a byol's and a dom0's alike. swap_fillyes(the default) to overwrite the swap partition with random data, orno.networkdhcp(the default) orstatic. A plan withstaticis parsed, butswmtool installrefuses it before anything is written.address- With
network=staticonly, and then required: the address and its prefix length, a.b.c.d/n, n from 8 to 30, the address a unicast host on its subnet, neither the network nor the broadcast address. gateway- With
network=staticonly, and then required: another host onaddress's subnet. dns- With
network=staticonly, and then required: one to three name servers, separated by commas.
THE APPLIANCE
These keys are for dom0.
allow_hotplugyesorno(the default): whether the appliance takes input devices plugged in after boot. A byol plan with it is refused: byol's is its own OS's policy.pointsyes(the default) orno: whether the root monitor takes a point of a world's home each hour, read back withswmtoolpointsandopen--point. Points share the disk with the worlds, so the disk fills sooner. A world added later withswmtoolworldtakes the same. A byol plan with it is refused.backup_disk- A USB disk, erased and made the backup place of each A/B world that is a
container, as F11's
pmakes one: /dev/disk/by-id/name only, never /dev/sdX, whose name moves between boots. The install makes it one XFS file system with a directory for each world, by the world's name. The first boot then copies the home there with no question. A disk plugged in after boot waits for F7's accept, as any USB device. Refused when it is the install disk or the install stick, when it is not on USB (the root monitor finds a place on USB alone), not a whole disk or in use, when no A/B world is a container, and for a byol, which has no backup place. A disk that holds data is erased only witheraseor--force, as the install disk. None is the default: no disk is touched, and F11 makes the place later. nic_allow[address]- A network card the release has not measured, allowed at install, a
dom0's: address as sysfs names it (0000:59:00.0), the value its vendor, device, subsystem vendor, and subsystem device, four hex digits each, lowercase (8086:15f3:8086:0000). The install seals each world's approval of it as F5 does. The approval is bound to the card's ids, address, and IOMMU group, to the box's identity, and to the net VM's kernel. The first boot then gives the card to the net VM with no measure. Refused when the card is not at that address with those ids, its release row is notnoneordeferred, its IOMMU group holds another device but a port, or the box has no identity. Refused for a byol. At most 16, one for each address. rom_approve[address]- An option ROM approved at install, a
dom0's: the value the ROM's sha256 as the first boot's probe reads it, 64 lowercase hex digits. The install seals each world's record of it as F9's approval does. Refused when the device at address has no ROM, or another, or is one the wizard does not ask of: its release row not allowed and nonic_allowfor it. Refused for a byol. At most 16, one for each address. Each world's record says “approved at install”, as F9 lists it.
Worlds
A plan for dom0 names one or more worlds.
Each world's keys take its name as the selector. There must be at least one
A/B world, at most one rescue and one decoy world, and at most eight
usernames in all, none used twice.
world[w]- The kind of world w:
ab,rescue, ordecoy. A name starts with a lowercase letter and holds lowercase letters, digits, and hyphens, 16 at most, and is nothostorshare. world_users[w]- The usernames that boot the world, separated by commas: two for
ab, slot A first, and one for the others. A username starts with a lowercase letter and holds lowercase letters, digits, underscores, and hyphens, 32 at most, and is notrootornobody. world_isolation[w]container(the default) orvm. A decoy is always a VM, and a rescue world always a container.world_net[w]- What the world's session reaches:
guest(the default), the internet only;lan, the LAN only;full, both; ornone. On a dom0 with no network,noneonly. Not on a rescue world, which uses the host's network, nor on a decoy, which is alwaysguest. world_lang[w]- The session's
LANG:C.UTF-8,en_US.UTF-8, or a keyboard layout's locale:en_GB.UTF-8,de_DE.UTF-8,fr_FR.UTF-8,es_ES.UTF-8,it_IT.UTF-8,nl_NL.UTF-8,pt_PT.UTF-8,sv_SE.UTF-8,nb_NO.UTF-8,da_DK.UTF-8,fi_FI.UTF-8,fr_BE.UTF-8,de_CH.UTF-8, orpt_BR.UTF-8. For a container; not on a rescue world. When it is not given, thekeyboard's first layout's:usgivesC.UTF-8,gben_GB.UTF-8,befr_BE.UTF-8, and so on; any other layoutC.UTF-8. The wizard asks for the keyboard alone and writes noworld_lang. world_pids_max[w]- The most processes and threads the world's session may run:
4096,8192(the default), or16384. For a container; not on a rescue world. world_packages[w]- Package sets, separated by commas, each once:
shell,firefox,chromium,c-development,go-development,office,nvidia, andrescue.nvidiais what a VM given a whole NVIDIA GPU needs. The wizard adds it to the VM that takes one. The default isshell, andshell,rescuefor a rescue world, which must keeprescue. world_apps[w]- More packages by name, separated by commas, 32 at most.
world_gpu[w]- As
world_session_gpu, for an A/B world's own session when it is a VM. yesorno: whether the world's default session (named after the world) is in the world's share, a directory at /share on an image under the world's key alone. The default isno. The world gets its share only if one of its sessions is in it, and a session not in it has no route to it. Rescue and decoy worlds takeno.
Sessions
An A/B world can have up to four sessions besides its own. Each session's keys take its name as the selector. The name follows the world name's rule and is not a world's name.
world_session[s]- The A/B world the session belongs to.
world_session_ws[s]- The session's workspaces, from 1 to 10, as a range such as
4-6or a list such as4,6. Required. No two sessions share a workspace, and the world keeps at least one. world_session_kind[s]vm(the default) orcontainer.world_session_net[s]- As
world_net:guest(the default),lan,full, ornone. On a dom0 with no network,noneonly. A session belongs to an A/B world, never to a rescue world or a decoy. world_session_gpu[s]none,graphics, orcompute: whether this VM takes the box's held GPU whole, and withcomputefor computing too, assession_gpuin scrotwmos.conf(5). The default isnone. A container cannot.world_session_packages[s]- Package sets, as for a world. The default is the world's.
world_session_apps[s]- More packages, as for a world. The default is the world's.
yesorno: whether the session is in its world's share. The default isno.
BYOL
These keys are for byol.
user- The login user, a username by the rule of
world_users. Optional:swmtool planwrites none, and install asks for it beside its password, at the end. password_hash- The login password as a crypt(3) hash:
SHA512crypt,
$6$rounds=n$salt$hash, with n at least 1000000. A cheaper hash is refused: it is of the disk's password too. Make one withOptional:openssl passwd -6 -salt 'rounds=1000000$<salt>'swmtool planwrites none, and install asks for the password, twice, as a dom0's, and makes the hash. A plan that holds one is a secret: the hash can be attacked offline. byol is always encrypted, by this one password: the login's, the boot's, and the disk's. The password itself never comes from the plan. Install takes it as--passphrase-filein swmtool(8) says. It refuses one that is not the one the hash is of. There is noencryptkey: a plan that has one is refused. packages- Package sets, as for a world. The default is
shell. darkyes(the default) for a dark desktop: Firefox, GTK (gvim, menus), and Chromium, set at each start of the compositor; orno. A dom0 plan with it is refused.serial_console- A serial console, such as
ttyS0,115200: a serial port, not a VT, then optionally a comma and the speed, with the kernel's parity, bits, and flow after it. The kernel's console goes to the port, and the runit serviceswm-getty-port asks for a login there at the speed, 9600 when none is given. A dom0 plan with it is refused. tpmno(the default), the password opens the disk;yes, the TPM opens it, the password the fallback; orpassword, the TPM and the password together open it, the recovery phrase the fallback. The install adds the TPM's slots and its key and seals nothing. The first boot asks for the password and then seals; withpassword, that seal takes the password's own slots out. Withpassword, the first boot shows the recovery phrase, 12 words, after the password, and waits for a key; it does so until the seal. On a box with no TPM 2.0, install refuses the plan before the disk is touched. A dom0 plan with it is refused.restore- The place a restore takes the root from: an absolute path to a directory
that the user mounted before the install, the directory that
swmtool tt placenamed on the old box. It can be on a USB disk, an NFS export, an SMB share, or any other file system. The install then lays the new disk out, pulls the root from the place, and fills nothing: the root holds its packages, its user, and its settings. The place's password comes from--place-passwordsor is asked; see swmtool(8). The path is checked whole before the disk is touched. The answer'susermust be an account of the restored root. It needsrestore_hour. A dom0 plan with it is refused. restore_hour- The hour of the copy to restore,
YYYYMMDD
THHZ, asswmtool tt statusshows the place's newest copy. It needsrestore.
byol's sessions
byol takes no world keys, and a dom0 takes none of these. A byol
can have up to nine sessions besides host, the byol
itself, which keeps every workspace that no session takes and at least one.
Each session's keys take its name as the selector; the name follows the
world name's rule.
session[s]containerorvm: the session and its kind. A container's root is /srv/s, and its home is /var/lib/scrotwmos/home/s, bound at /home/s. A VM's disk is /var/lib/scrotwmos/vm/s.img, an xfs on a thin 32G file. Session i, in the order of the plan, runs as uid 500001 + i.session_ws[s]- The session's workspaces, as
world_session_ws. Required. No two sessions share a workspace. session_net[s]- As
world_net:guest(the default),lan,full, ornone. A container with a network is routed by the net VM when one runs with a network card. Otherwise, the host routes it as a VM. session_packages[s]- Package sets, as for a world, but not
rescue. The default isshell. session_apps[s]- More packages, as for a world.
yesorno(the default): whether the session is in the share, /share, which is made when a session joins it: owned by root, group 510000, mode 3770.
EXAMPLES
An appliance with an everyday world, a VM for development on workspaces 4 to 6, and a rescue world:
base = dom0 keyboard = us disk = /dev/nvme0n1 timezone = UTC hostname = orchard allow_hotplug = yes world[ab] = ab world_users[ab] = alice,aliceb world_packages[ab] = shell,firefox world_session[development] = ab world_session_ws[development] = 4-6 world_session_packages[development] = shell,go-development world[rescue] = rescue world_users[rescue] = rescue
A byol with two containers for agents, sharing /share, and a VM on workspace 5:
base = byol keyboard = us disk = /dev/nvme0n1 timezone = UTC user = alice password_hash = $6$... session[agent-a] = container session_ws[agent-a] = 3 session_share[agent-a] = yes session[agent-b] = container session_ws[agent-b] = 4 session_share[agent-b] = yes session[sandbox] = vm session_ws[sandbox] = 5
SEE ALSO
AUTHORS
Marco Peereboom <marco@peereboom.us>
| November 5, 2026 | Void Linux |