path: root/config
diff options
authorintrigeri <>2019-03-13 08:02:35 +0000
committerintrigeri <>2019-03-13 08:02:35 +0000
commit0dbc3c2a805d7d7f8c44efcd0124b90ff8c9e08a (patch)
treebdfac98e944395b90c2761a49aca0e74e25c7484 /config
parentc3e4e2caf1b81d879857d6425a938abbcb82e4ed (diff)
Drop useless manual initramfs update (refs: #16452)
live-build will do that itself later on. This saves ~2 minutes (~3%) on the total build time.
Diffstat (limited to 'config')
1 files changed, 5 insertions, 7 deletions
diff --git a/config/chroot_local-hooks/99-initramfs-compress b/config/chroot_local-hooks/99-initramfs-compress
index c7f9885..ee97430 100755
--- a/config/chroot_local-hooks/99-initramfs-compress
+++ b/config/chroot_local-hooks/99-initramfs-compress
@@ -10,16 +10,14 @@ echo "Configuring compression of the initramfs"
ensure_hook_dependency_is_installed initramfs-tools xz-utils fatresize
# Compress the initramfs using a more size-wise efficient algorithm.
+# We do this late in the build process because compressing with XZ
+# takes much longer than compressing with the default algorithm
+# and earlier stages of the build generate the initramfs quite a few times.
+# live-build will regenerate it later on anyway, which will apply
+# the settings we configure here.
[ -f "${OPTS_FILE}" ] || exit 11
sed -i'' 's,^COMPRESS=.*,COMPRESS=xz,' "${OPTS_FILE}"
-# Force an initramfs update to apply our new compression settings.
-# We're relying on the fact that 1 XZ compression takes less time than
-# 6 * (XZ compression time - default compression time), so that making
-# faster the 6 initramfs updates that we currently go through during
-# the build is worth updating the initramfs a 7th time.
-update-initramfs -u