hello world
Let's get you from a download to a box you actually use: a browser
on workspace 1, a shell in its own VM on workspace 2, and backups
running. The names below are examples, a world called
main opened by alice. Use your own.
What you need
- An x86_64 box that boots UEFI, with VT-d or AMD-Vi turned on in the firmware. Without the IOMMU the box gets no network.
- A disk you're happy to lose. The install erases it.
- A USB stick, and a USB disk for your backups, formatted ext4, XFS, or btrfs.
- A network cable, or Wi-Fi with WPA2 or WPA3. The install pulls its packages from a Void mirror.
- A pen and paper. You'll see why at the end.
The install stick
You install from a USB stick. Keep it: it also updates the box and fixes it when it won't boot.
- Get it. No release yet, so build
it. You get
install-media.imgand its sum. - Check it. This must say
install-media.img: OK:
Get the sum from somewhere other than the server that gave you the image; download says why.sha256sum -c install-media.img.sha256 - Burn it. Make sure
/dev/sdXis the stick and nothing on it is mounted. Get the letter wrong and you erase the wrong disk. No script does this for you, on purpose.sudo dd if=install-media.img of=/dev/sdX bs=4M conv=fsync oflag=direct sudo cmp -n $(stat -c %s install-media.img) install-media.img /dev/sdXcmpprints nothing on a good stick.
Install
- Boot the stick. Pick it in the firmware's boot menu, in UEFI
mode. The loader types its banner and
LOADING, checks the installer's signature, and starts it. If it stops with an error, write the stick again. If the line under the banner saysTEST KEYorNIGHTLY KEY, the stick is not a release: fine for a test box, not for one you care about. Then the installer's page comes up, and above the first question:CTRL-C: shell (swmtool help, man swmtool)
- Pick the appliance, then the network. Here you install
dom0, the appliance. byol is level 1, and installing.md covers it. Press Enter at each:
the appliance, a cable, and DHCP.
Install (dom0/byol/update) [dom0]: Network (wired/wifi/none) [wired]: address [dhcp]:
For Wi-Fi, typewifi, the network's number from the list, and its passphrase. The installer goes on only when the mirror answers. - The box. The wizard lists the disks, with what is on each.
Enter takes the default in brackets. Check the disk name: this one gets
erased.
Keyboard layout [us]: DISKS: name size bus model contents nvme0n1 476.9 GiB nvme (your disk's model) blank Disk to wipe [nvme0n1]: Hostname [scrotwmos]: Advanced (no/yes) [no]:
Passwords always use the US layout, whatever the keyboard says. - Your world. Name it and give it two usernames. Both open the
same world; the second is slot B, your way back from a bad update. Take
the defaults for the rest: a container that reaches the internet only,
with a shell and Firefox.
-- A/B world -- World name [ab]: main Slot A username: alice Slot B username: aliceb Isolation (container/vm) [container]: Network (guest/lan/full/none) [guest]: Process limit (4096/8192/16384) [8192]: Package sets (firefox/chromium/c-development/go-development/office/rescue/shell/nvidia) [shell,firefox]: Package [none]: Share between sessions (no/yes) [no]:
This is the world's default session. It gets every workspace no other session takes. - A second session, on workspace 2. Call it
devand make it a VM with a shell and no browser. Press Enter at the nextSession for mainto stop adding.Session for main [none]: dev Workspaces (3-5, 4,6): 2 Isolation (container/vm) [vm]: Network (guest/lan/full/none) [guest]: Package sets (firefox/chromium/c-development/go-development/office/rescue/shell/nvidia) [shell,firefox]: shell Package [none]: Session for main [none]:
On a box with a second GPU, the wizard also asks whether the VM takes it. - A rescue world. Do not skip this one. Without it, every
repair starts from the stick.
Next world (rescue/decoy/ab/done) [rescue]: -- rescue world -- World name [rescue]: Username: alicer Package sets (firefox/chromium/c-development/go-development/office/rescue/shell/nvidia) [shell,rescue]: Package [none]: Next world (decoy/ab/done) [done]:
If the wizard then asks to allow a network card, or to approve a GPU or a card ROM, answeryesfor the hardware in this box. - Confirm the disk, then the passwords. Type the disk's name.
Anything else starts over, with nothing written.
ERASES: nvme0n1 (your disk's model, 476 GiB), all data lost CONFIRM: type nvme0n1 to install, else restart: nvme0n1 Password for alice: Again, for alice:
Then the same foralicebandalicer. Nothing echoes. Use 12 characters or more. A world is only as strong as its password, and a lost one is not coming back. Press Enter attotp: codes at loader, for phone [no]:for now; turn them on later. - Wait. The installer fetches the firmware, partitions the disk,
and installs every world from the mirror, one
[i/n]line a step. At the end:INSTALL OK Done (reboot/shell/shutdown) [reboot]:
Pull the stick and press Enter. If it saysINSTALL FAILEDinstead, you are in a shell and nothing boots from the disk: read/run/install.log, and run the command on the screen again.
Your first boot
- Log in. The box's own loader types its banner, then:
READY. USERNAME: alice PASSWORD: ACCESS GRANTED. LOADING
The username picks the world. A wrong pair doubles the wait; after the third, power off and start again. The world opens on workspace 1, and the bar readsalice:default:1. - A browser on workspace 1. MOD+Shift+Return opens a
terminal.
MODis the Super key. In it:
Firefox tiles beside the terminal. It runs in the default session: a container that reaches the internet and nothing else.firefox & - A shell on workspace 2. MOD+2. The bar reads
alice:dev:2. MOD+Shift+Return opens a terminal in thedevVM, in its own border color. It has its own files, processes, and clipboard. Go back with MOD+1 and try to send Firefox over with MOD+Shift+2: the compositor says no. - Let the backup disk in. A USB device plugged in after boot
stays blocked until you say so. MOD+F7, then r: a
30-second scan starts. Plug in the USB disk. It shows as
blocked. Select it with Up and Down, press a, then y. Esc closes the tab. - Start the backups. On workspace 1, MOD+F11 opens backups for the session in focus. Press p, select the USB disk, press Enter, and type your password. From now on the box copies each new point of your home to that disk while it is plugged in. Press n to take the first point now instead of at the next hour.
- Write down the recovery phrase. MOD+F10,
r, y reboots. At
USERNAME:typealicer, the rescue world, and open a root shell with MOD+Shift+Return:
It asks for alice's password, then shows 12 words. Write them on paper. That's the pen and paper. Keep it away from the box and the backup disk. The words and the disk bring the world back without the password, so whoever holds both holds your world. Reboot the same way, and log in asswmtool place phrase alicealice.
Now what
Learn your world's mark: MOD+Shift+Delete locks the
screen, and the lock shows WORLD: and two words. Every real
lock shows them. A password box without them is not ours: press
MOD+Shift+Delete and the real lock comes up over it.
MOD+F1 has every key and a tutorial of its own. How to has the rest, and every question the installer can ask is in installing.md.