| 6 |
6 |
|
# machine is a way to lose a disk. `alloy.installer` is set only by the
|
| 7 |
7 |
|
# GRUB entries in build/build-iso.sh, so this unit is inert everywhere else.
|
| 8 |
8 |
|
#
|
| 9 |
|
- |
# greetd and getty@tty1 have to be out of the way, because all three want
|
| 10 |
|
- |
# VT1. On the live medium there is no account to log into yet, so the
|
| 11 |
|
- |
# greeter has nothing to offer and would only race the installer for the
|
| 12 |
|
- |
# terminal. They are stopped from ExecStartPre rather than declared in
|
| 13 |
|
- |
# `Conflicts=`, and that is not a style choice:
|
|
9 |
+ |
# Three things want VT1: this, greetd, and getty@tty1. The kernel flag above
|
|
10 |
+ |
# settles it, and each of the three answers for itself.
|
| 14 |
11 |
|
#
|
| 15 |
|
- |
# `Conflicts=` is applied when the start job is ENQUEUED, not when the unit
|
| 16 |
|
- |
# activates. The condition above is checked later, when the job runs. So on
|
| 17 |
|
- |
# an installed machine multi-user.target would pull this unit in, systemd
|
| 18 |
|
- |
# would queue stop jobs for greetd and getty@tty1, and only then would the
|
| 19 |
|
- |
# condition fail and skip the installer. The two units it displaced never
|
| 20 |
|
- |
# start, nothing owns VT1, and the machine boots to a black screen with a
|
| 21 |
|
- |
# cursor and no way to log in. That is what shipped: found 2026-07-21 by
|
| 22 |
|
- |
# installing from the ISO in QEMU and booting the result, where the journal
|
| 23 |
|
- |
# showed graphical.target reached, no failed units, and zero mentions of
|
| 24 |
|
- |
# greetd anywhere. Masking this one unit brought tuigreet straight back.
|
|
12 |
+ |
# greetd stays away by its own condition, the negation of this one, in
|
|
13 |
+ |
# etc/systemd/system/greetd.service.d/10-installer-medium.conf. That file
|
|
14 |
+ |
# carries the history of the two arrangements that did not work, both of
|
|
15 |
+ |
# which were versions of this unit reaching across to stop the greeter.
|
| 25 |
16 |
|
#
|
| 26 |
|
- |
# ExecStartPre runs only after the condition has passed, so an installed
|
| 27 |
|
- |
# machine never touches either unit. The leading `-` keeps a stop of a unit
|
| 28 |
|
- |
# that is not running from failing the install before it starts.
|
|
17 |
+ |
# getty@tty1 is stopped here, from ExecStartPre rather than `Conflicts=`.
|
|
18 |
+ |
# `Conflicts=` is applied when the start job is ENQUEUED, before the
|
|
19 |
+ |
# condition above is checked, so on an installed machine it would displace
|
|
20 |
+ |
# getty even though the installer never runs. ExecStartPre runs only after
|
|
21 |
+ |
# the condition has passed. Unlike greetd, getty@tty1 is not pulled by a
|
|
22 |
+ |
# target that would restart it, so stopping it once is enough. The leading
|
|
23 |
+ |
# `-` keeps stopping a unit that is not running from failing the install
|
|
24 |
+ |
# before it starts.
|
| 29 |
25 |
|
[Unit]
|
| 30 |
26 |
|
Description=Alloy installer
|
| 31 |
27 |
|
Documentation=https://git.sr.ht/~maxmj/alloy
|
| 34 |
30 |
|
Before=getty.target
|
| 35 |
31 |
|
|
| 36 |
32 |
|
[Service]
|
| 37 |
|
- |
ExecStartPre=-/usr/bin/systemctl stop getty@tty1.service greetd.service
|
|
33 |
+ |
ExecStartPre=-/usr/bin/systemctl stop getty@tty1.service
|
| 38 |
34 |
|
# Type=idle so the boot's own console output has finished before a
|
| 39 |
35 |
|
# full-screen TUI takes the terminal; without it the first frame draws
|
| 40 |
36 |
|
# over service status lines and the user sees a torn screen.
|