summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-12-08 20:06:39 +0000
committerAlyssa Ross <hi@alyssa.is>2021-12-12 00:37:05 +0000
commite4add51bc949841c85edd45a8d7ae7a22825a8aa (patch)
tree32ce262fc5d5f26ee392f5ce9350c431c80636b5 /Makefile
parent23da945052085a9f3f4829c68adb49edb5be9582 (diff)
downloadspectrum-e4add51bc949841c85edd45a8d7ae7a22825a8aa.tar
spectrum-e4add51bc949841c85edd45a8d7ae7a22825a8aa.tar.gz
spectrum-e4add51bc949841c85edd45a8d7ae7a22825a8aa.tar.bz2
spectrum-e4add51bc949841c85edd45a8d7ae7a22825a8aa.tar.lz
spectrum-e4add51bc949841c85edd45a8d7ae7a22825a8aa.tar.xz
spectrum-e4add51bc949841c85edd45a8d7ae7a22825a8aa.tar.zst
spectrum-e4add51bc949841c85edd45a8d7ae7a22825a8aa.zip
Discover partitions by UUID
The Spectrum installer is essentially a NixOS system, with a partition
containing a Spectrum live image.  The installer's bootloader also
supports trying out Spectrum by loopback mounting the live image, and
chainloading its bootloader.  But in this case, LoaderDevicePartUUID
is still set to the installer's bootloader, so discovering the rootfs
by looking on the same disk won't work.

Since we're using dm-verity, and know the contents of the filesystem
upfront thanks to the verity hash, we can take advantage of the
Discoverable Partitions Specification[1]'s recommendation to just use
the head of the verity hash as the root partition UUID, and the tail
as the verity partition UUID, and discover them based on that.

In addition to making it possible to try out Spectrum from the
installer, this gives us a nice reduction in complexity.

[1]: https://systemd.io/DISCOVERABLE_PARTITIONS/
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 05369df..1d32af9 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ build/initramfs: build/local.cpio $(PACKAGES_CPIO)
 
 # etc/init isn't included in ETC_FILES, because it gets installed to
 # the root.
-ETC_FILES = etc/checkesp etc/fstab etc/mdev.conf
+ETC_FILES = etc/getuuids etc/probe etc/fstab etc/mdev.conf
 MOUNTPOINTS = dev mnt proc sys tmp
 
 build/local.cpio: $(ETC_FILES) etc/init build/mountpoints