[gnome-continuous-yocto/gnomeostree-3.28-rocko: 7514/8267] initramfs-live-boot: disable systemd-update-done.service on live images
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 7514/8267] initramfs-live-boot: disable systemd-update-done.service on live images
- Date: Sun, 17 Dec 2017 06:21:18 +0000 (UTC)
commit 0b79f8d8d19be83a81e40b0c078822be6749f607
Author: Carlos Alberto Lopez Perez <clopez igalia com>
Date: Thu Aug 31 14:23:35 2017 +0200
initramfs-live-boot: disable systemd-update-done.service on live images
When systemd is used, it will invoke a service on first boot that triggers
a rebuild of ldconfig caches (rebuild dynamic linker cache).
This is fine on the first boot of a system that has been installed, but it
makes no sense on a live system. The worst part is that rebuilding this
caches is slow and it causes the live system to take longer to boot.
(I measured this in 30 seconds longer on a standard PC system booting
core-image-sato live from an USB memory).
Disable this by touching /etc/.updated and /var/.updated on the live initramfs.
For more details see https://bugzilla.redhat.com/show_bug.cgi?id=1201725 and
https://www.freedesktop.org/software/systemd/man/systemd-update-done.service.html
(From OE-Core rev: d73493e63c506dca0e767ff183ca36bc48c2f03e)
Signed-off-by: Carlos Alberto Lopez Perez <clopez igalia com>
Signed-off-by: Ross Burton <ross burton intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/recipes-core/initrdscripts/files/init-live.sh | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh
b/meta/recipes-core/initrdscripts/files/init-live.sh
index 441b41c..46cab6c 100644
--- a/meta/recipes-core/initrdscripts/files/init-live.sh
+++ b/meta/recipes-core/initrdscripts/files/init-live.sh
@@ -84,6 +84,10 @@ boot_live_root() {
# device node creation events were handled, to avoid unexpected behavior
killall -9 "${_UDEV_DAEMON##*/}" 2>/dev/null
+ # Don't run systemd-update-done on systemd-based live systems
+ # because it triggers a slow rebuild of ldconfig caches.
+ touch ${ROOT_MOUNT}/etc/.updated ${ROOT_MOUNT}/var/.updated
+
# Allow for identification of the real root even after boot
mkdir -p ${ROOT_MOUNT}/media/realroot
mount -n --move "/run/media/${ROOT_DISK}" ${ROOT_MOUNT}/media/realroot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]