GNOME Software received a brand new systemd-sysupdate plugin. That was one of the last pieces needed to complete the migration of GNOME OS from OSTree to systemd-sysupdate.
https://adrienplazas.com/blog/2024/12/20/a-systemd-sysupdate-plugin-for-gnome-software.html
> While OSTree ..., it has a significant drawback: it can’t support SecureBoot because it can’t support Unified Kernel Images, ...
That's not true. We demonstrated that in https://media.ccc.de/v/all-systems-go-2024-309-the-road-to-a-trusted-and-measured-boot-chain-in-bootable-containers.
You can say that it's not fully integrated, it's not ready or it's not what you want to do, but please don't say that it's not possible when we showed that it is.
I'm really glad that GNOME OS development is taking off so please don't justify technical decisions with misconceptions.
To make it very explicit as I got limited in size for the previous toot:
- I'm really glad GNOME OS development is taking off. The success of any Image Based Linux system will be a success for all of the others (mindshare for Flatpak, etc.). Taking different approaches is also good as it may fit some use cases better.
- I fully agree that support for UKI in ostree is not in a great state right now. We are working on it as part of the Bootable Containers work.
@siosm Oh great to know! Given I use OSTree-based OSes with much pleasure since 2017, I'm glad to learn that! I'll likely update the article to fix that misinformation, thanks!
@KekunPlazas Great! Thanks!
@siosm @KekunPlazas unless I'm mistaken, @EndlessOS has always supported secure boot (it’s required for our optional PAYG stuff), and is the original OSTree-based distro. I don’t know the specifics but I’m sure @wjt could nerd out about it more than I can.
@cassidy @siosm @EndlessOS @wjt Unless I'm mistaken Linux distros typically support SecureBoot… up to a certain point. We typically supported the first steps of the chain of trust, allowing to run on SecureBoot systems, but not the last ones. Frankly, I barely understand any of this as I never studied it in depth. I should have added "Confidence of a white guy who knows nothing about a topic but will nonetheless talk about it" as a content warning.
@KekunPlazas @cassidy @EndlessOS @wjt The difficult part is to have a Secure Boot signed UKI. Most distributions have a Secure Boot signed kernel only, leaving the initramfs and kernel command line unsigned.
It's easier right now to set up a system with S.B. signed UKI with disk images and systemd tools compared to ostree or bootable containers.
We are working on making it easier for bootable containers.
@siosm @KekunPlazas @cassidy on regular Endless OS, I'm pretty sure the initramfs is signed as well as the kernel (though I could be wrong) though they're not a UKI and kernel command line parameters are accepted. On our Pay As You Go edition we use a UKI, I think since before that acronym was invented, with a big EFI blob containing kernel & initramfs which is booted from sd-boot which is signed by our own CA (which the firmware is configured to require). Both are ostree systems.
@wjt @KekunPlazas @cassidy Interesting! I wasn't aware! Can you link me (when you have some time) to the code? Thanks!
@siosm @KekunPlazas @cassidy The UKI is built in our ostree builder which for historical & time reasons is closed-source. But the command fits in a toot so I'll reply with that... We then send it to an internal signing service. We don't have any measurement or signing of the root filesystem.
vmlinuz_match=(vmlinuz*)
vmlinuz_file=${vmlinuz_match[0]}
KVER=${vmlinuz_match#vmlinuz-}
dracut /usr/lib/modules/${KVER}/payg-image.efi ${KVER} \
-k /usr/lib/modules/${KVER} --uefi \
--uefi-stub=/usr/lib/systemd/boot/efi/linuxx64.efi.stub \
--kernel-image=${vmlinuz_file} \
--kernel-cmdline "eospayg efi_no_storage_paranoia rd.shell=0" \
--force-drivers "endlessdog" \
--add "eos-payg eos-payg-nonfree"
@siosm The other weird thing we have is a patch for ostree (and possibly sd-boot? can't remember) to fake symlinks with text files on the FAT ESP, which we could probably replace now that the Linux FAT implementation supports atomically swapping two directories. I don't think there's anything else particularly magic.
@siosm @KekunPlazas it also undeniability has a bigger attack surface because the fs containing the ostree/composefs has to get mounted before authentication can happen
@swick @KekunPlazas In theory yes, but in practice it generally does not matter as you will always open another untrusted (dm-crypt protected) filesystem at some point that could compromise your kernel. This is explicitly addressed in the talk I linked.