Skip to content

Consider dropping call to update-initramfs in config/chroot_local-hooks/99-initramfs-compress

If I read this correctly:

08:18:36 Configuring compression of the initramfs
08:18:36 update-initramfs: Generating /boot/initrd.img-4.19.0-2-amd64
08:18:41 cryptsetup: WARNING: could not determine root device from /etc/fstab
08:18:45 live-boot: core filesystems devices utils memdisk udev wget blockdev dns.
08:20:33 Setting correct file permissions
08:20:33 Removing *.pyc
08:20:33 Setting mtime on large files whose content generally do not change
08:20:33 Checking for .orig files
08:20:34 Checking UIDs and GIDs stability
08:20:34 Truncating log files
08:20:34 Post processing filesystem to make it reproducible
08:20:34 P: Begin executing hooks...
08:20:34 P: Begin executing hacks...
08:20:34 update-initramfs: Generating /boot/initrd.img-4.19.0-2-amd64
08:20:39 cryptsetup: WARNING: could not determine root device from /etc/fstab
08:20:44 live-boot: core filesystems devices utils memdisk udev wget blockdev dns.
08:22:38 P: Begin ensuring chroot contents are reproducible...

… we force an initramfs update ourselves, to apply our compression settings, and this takes ~2 minutes. But then live-build does the same again, which takes ~2 minutes as well.

So it looks like we could remove the update-initramfs -u call from our own hook and save 2 minutes on the build time, i.e. ~3%, which is pretty good for a one line change :)

Bonus points if, to avoid future regressions in case we ever update to a version of live-build that does not update the initramfs anymore, we add a sanity check (probably in binary_local-hooks/) which verifies that the size of the resulting initramfs is within expected bounds.

Feature Branch: bugfix/16452-remove-useless-extra-initramfs-update

Attachments

  • 2019-03-15_08-48

Related issues

Original created by @intrigeri on 16452 (Redmine)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information