[PATCH v2 0/5] Spectrum-installer

Johannes Süllner
2026-02-04T17:57:05Z

A custom graphical installer for Spectrum, written in Rust. It runs
within the live system and uses 'systemd-repart'. The user selects a
destination disk and confirms this selection. Then, 'systemd-repart'
first creates a partition table on the destination disk and then
copies the individual partitions of the live system to the destination
disk, what means they are kind of resized in the process. This allows
for having large A/B slots for Spectrum after the installation, while
keeping the live image at the minimum size.

The reason for writing a custom installer is that there are no
image-based distributions using an installer that does not require
an interpreter; something we want to avoid on the Spectrum host.
There is a promising new installer in development for Gnome OS
(https://gitlab.gnome.org/Teams/STF/setup), but it is still in an
early stage and the actual installation is not implemented yet.

Besides the boot partition and the A/B slots, the installer also
creates a Btrfs home partition, taking up the remaining disk space.
I included this for making it easier to test the update feature.

There are a few things I still want to add to the installer at some
future point. One thing is a check whether a possible destination
device is suitable for a Spectrum installation, or e.g. too small. I
currently plan to do so by running 'systemd-repart' in dry run mode on
all possible devices on launch of the installer, what would need to be
done asynchronously in a separate thread I think.

Also, running 'systemd-repart' in an embedded terminal, as it's done
right now, is something I'd like to change, as it feels somewhat hacky
to me.

v2:
• Updated to iced v0.14
• Replaced the error log on the 'completion' page with a QR code
containing the log.
• Added the full discuss mailing list address to the error help
message on the 'completion' page.
• Added '-o pipefail' to shell call for 'systemd-repart' invocation.
• Replaced 'lsblk' crate with 'blockdev' crate.
• Wrapped usage of 'drives' crate in 'DestinationDevice'.
• Replaced usage of 'libcosmicAppHook' in
tools/spectrum-installer/default.nix
• Updated tools/spectrum-installer/shell.nix
• Updated cargo dependencies.
• Removed fixed size of verity partition in release/live/Makefile
• Added commit reverting the addition of the partition size parameter
to make-gpt.sh

v1:
https://spectrum-os.org/lists/archives/spectrum-devel/20260104140102.106960-5-johannes.suellner@mailbox.org/

Signed-off-by: Johannes Süllner <johannes.suellner@mailbox.org>

---

Johannes Süllner (5):
tools: add spectrum-installer
host/rootfs: integrate spectrum-installer
release: drop combined and installer image
release/live: remove B slot from live image and reduce
Revert "scripts/make-gpt.sh: allow setting partition

Documentation/development/uuid-reference.adoc | 22 -
host/rootfs/default.nix | 4 +-
host/rootfs/file-list.mk | 3 +
.../spectrum-installer-as-root/notification-fd | 1 +
.../notification-fd.license | 2 +
.../service/spectrum-installer-as-root/run | 17 +
host/rootfs/image/etc/s6-rc/weston/run | 1 +
host/rootfs/image/etc/xdg/weston/weston.ini | 5 +
.../image/usr/bin/spectrum-installer-as-root | 5 +
pkgs/default.nix | 3 +
release/checks/default.nix | 2 -
release/checks/installer.nix | 16 -
release/combined/default.nix | 123 -
release/combined/eosimages.nix | 21 -
release/combined/grub.cfg.in | 22 -
release/combined/run-vm.nix | 31 -
...-disable-gpt-partition-attribute-55-check.patch | 37 -
...002-gpt-disable-partition-table-CRC-check.patch | 36 -
.../app/0003-install-remove-Endless-OS-ad.patch | 99 -
.../0004-finished-don-t-run-eos-diagnostics.patch | 44 -
...ed-promote-spectrum-not-the-Endless-forum.patch | 32 -
release/installer/app/default.nix | 26 -
release/installer/app/vendor-customer-support.ini | 5 -
release/installer/configuration.nix | 69 -
release/installer/default.nix | 22 -
release/installer/run-vm.nix | 47 -
release/installer/seat.rules | 9 -
release/live/Makefile | 6 +-
scripts/make-gpt.sh | 31 +-
scripts/sfdisk-field.awk | 22 +-
tools/spectrum-installer/Cargo.lock | 5182 ++++++++++++++++++++
tools/spectrum-installer/Cargo.lock.license | 2 +
tools/spectrum-installer/Cargo.toml | 14 +
tools/spectrum-installer/default.nix | 55 +
.../spectrum-installer/res/installer_logo_mesh.svg | 85 +
tools/spectrum-installer/res/repart.d/10-esp.conf | 8 +
.../res/repart.d/20-verity-A.conf | 9 +
.../res/repart.d/21-rootfs-A.conf | 9 +
.../res/repart.d/30-verity-B.conf | 8 +
.../res/repart.d/31-rootfs-B.conf | 8 +
tools/spectrum-installer/res/repart.d/40-home.conf | 7 +
tools/spectrum-installer/shell.nix | 28 +
tools/spectrum-installer/src/destination_device.rs | 53 +
tools/spectrum-installer/src/main.rs | 53 +
tools/spectrum-installer/src/pages/completion.rs | 138 +
tools/spectrum-installer/src/pages/confirmation.rs | 108 +
.../spectrum-installer/src/pages/disk_selection.rs | 123 +
tools/spectrum-installer/src/pages/installation.rs | 186 +
tools/spectrum-installer/src/pages/layout.rs | 89 +
tools/spectrum-installer/src/pages/mod.rs | 43 +
tools/spectrum-installer/src/pages/welcome.rs | 62 +
51 files changed, 6328 insertions(+), 705 deletions(-)
create mode 100644 host/rootfs/image/etc/s6-linux-init/run-image/service/spectrum-installer-as-root/notification-fd
create mode 100644 host/rootfs/image/etc/s6-linux-init/run-image/service/spectrum-installer-as-root/notification-fd.license
create mode 100755 host/rootfs/image/etc/s6-linux-init/run-image/service/spectrum-installer-as-root/run
create mode 100755 host/rootfs/image/usr/bin/spectrum-installer-as-root
delete mode 100644 release/checks/installer.nix
delete mode 100644 release/combined/default.nix
delete mode 100644 release/combined/eosimages.nix
delete mode 100644 release/combined/grub.cfg.in
delete mode 100644 release/combined/run-vm.nix
delete mode 100644 release/installer/app/0001-gpt-disable-gpt-partition-attribute-55-check.patch
delete mode 100644 release/installer/app/0002-gpt-disable-partition-table-CRC-check.patch
delete mode 100644 release/installer/app/0003-install-remove-Endless-OS-ad.patch
delete mode 100644 release/installer/app/0004-finished-don-t-run-eos-diagnostics.patch
delete mode 100644 release/installer/app/0005-finished-promote-spectrum-not-the-Endless-forum.patch
delete mode 100644 release/installer/app/default.nix
delete mode 100644 release/installer/app/vendor-customer-support.ini
delete mode 100644 release/installer/configuration.nix
delete mode 100644 release/installer/default.nix
delete mode 100644 release/installer/run-vm.nix
delete mode 100644 release/installer/seat.rules
create mode 100644 tools/spectrum-installer/Cargo.lock
create mode 100644 tools/spectrum-installer/Cargo.lock.license
create mode 100644 tools/spectrum-installer/Cargo.toml
create mode 100644 tools/spectrum-installer/default.nix
create mode 100644 tools/spectrum-installer/res/installer_logo_mesh.svg
create mode 100644 tools/spectrum-installer/res/repart.d/10-esp.conf
create mode 100644 tools/spectrum-installer/res/repart.d/20-verity-A.conf
create mode 100644 tools/spectrum-installer/res/repart.d/21-rootfs-A.conf
create mode 100644 tools/spectrum-installer/res/repart.d/30-verity-B.conf
create mode 100644 tools/spectrum-installer/res/repart.d/31-rootfs-B.conf
create mode 100644 tools/spectrum-installer/res/repart.d/40-home.conf
create mode 100644 tools/spectrum-installer/shell.nix
create mode 100644 tools/spectrum-installer/src/destination_device.rs
create mode 100644 tools/spectrum-installer/src/main.rs
create mode 100644 tools/spectrum-installer/src/pages/completion.rs
create mode 100644 tools/spectrum-installer/src/pages/confirmation.rs
create mode 100644 tools/spectrum-installer/src/pages/disk_selection.rs
create mode 100644 tools/spectrum-installer/src/pages/installation.rs
create mode 100644 tools/spectrum-installer/src/pages/layout.rs
create mode 100644 tools/spectrum-installer/src/pages/mod.rs
create mode 100644 tools/spectrum-installer/src/pages/welcome.rs