From e4add51bc949841c85edd45a8d7ae7a22825a8aa Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 8 Dec 2021 20:06:39 +0000 Subject: 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/ --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') 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 -- cgit 1.4.1