summaryrefslogtreecommitdiff
path: root/presets
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-07-02 15:04:10 +0200
committerLennart Poettering <lennart@poettering.net>2021-07-30 17:19:55 +0200
commit71c8bf28378958a5ab2348e9ec586fbe78c71dfd (patch)
treee7c563924afc1baff5ee3be378564ec48ef58436 /presets
parente5a8b4b593e7da1823f3258f7b4e7f2d370a7c3c (diff)
downloadsystemd-71c8bf28378958a5ab2348e9ec586fbe78c71dfd.tar.gz
boot: optionally update sd-boot on boot
Boot loaders are software like any other, and hence muse be updated in regular intervals. Let's add a simple (optional) service that updates sd-boot automatically from the host if it is found installed but out-of-date in the ESP. Note that traditional distros probably should invoke "bootctl update" directly from the package scripts whenver they update the sd-boot package. This new service is primarily intended for image-based update systems, i.e. where the rootfs or /usr are atomically updated in A/B style and where the current boot loader should be synced into the ESP from the currently booted image every now and then. It can also act as safety net if the packaging scripts in classic systems are't doing the bootctl update stuff themselves. Since updating boot loaders mit be a tiny bit risky (even though we try really hard to make them robust, by fsck'ing the ESP and mounting it only on demand, by doing updates mostly as single file updates and by fsync()ing heavily) this is an optional feature, i.e. subject to "systemctl enable". However, since it's the right thing to do I think, it's enabled by default via the preset logic. Note that the updating logic is implemented gracefully: i.e. it's a NOP if the boot loader is already new enough, or was never installed.
Diffstat (limited to 'presets')
-rw-r--r--presets/90-systemd.preset1
1 files changed, 1 insertions, 0 deletions
diff --git a/presets/90-systemd.preset b/presets/90-systemd.preset
index d26087445c..8a1a08210c 100644
--- a/presets/90-systemd.preset
+++ b/presets/90-systemd.preset
@@ -22,6 +22,7 @@ enable systemd-resolved.service
enable systemd-homed.service
enable systemd-userdbd.socket
enable systemd-pstore.service
+enable systemd-boot-update.service
disable console-getty.service
disable debug-shell.service