[systemd-devel] Using systemd.offline-updates from an ostree based system
lennart at poettering.net
Fri Apr 26 13:16:07 UTC 2019
On Fr, 26.04.19 13:49, Richard Hughes (hughsient at gmail.com) wrote:
> > I'd not make dynamic changes to ESP or /boot I must say (i.e. 2. +
> > 3. from the list above). It should contain static data only I am sure,
> > only updated at system updates.
> I guess /boot works from a logical and mutable point of view. Would
> you be open to a patch to system-update-generator.c that supports
> looking for (and deleting) a /boot/system-update -- I think even if
> /boot is the ESP I think it still works. The other path I could try is
> /sysroot/system-update which might work, although is ostree specific.
Well, /boot and its semantics are hardly standardized either. Nobody
knows what it is , whether it's shared with other OSes on the same host
or not. If you want a generic solution I doubt it's the way out.
I have the suspicion you shouldn't use s-u-g at all for your
stuff. You are not precisely doing an offline update of the OS, but
define your own environment.
I mean, look at the soruces:
It's trivial: all it does is when it sees that "/system-update" exists
it creates one symlink that overrides default.target. I'd probably
suggest you to write your own generator the same way, and include that
in the fwupd package. I.e. a small binary that checks your own flag
file, and redirects boot through symlinking default.target. And then
you could use your own flag file and place it wherever suitable.
But I'd really suggest staying away from /boot unless you code for
one specific distro only.
for details about writing generators.
Lennart Poettering, Berlin
More information about the systemd-devel