From: Michael Prokop Date: Wed, 11 May 2011 12:08:07 +0000 (+0200) Subject: initramfs-tools: use xz with -8 and --check=crc32. X-Git-Tag: v0.14.0~1 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=6f9a4abe5b6739dc2c8328634f3c0c76a2c62f1b initramfs-tools: use xz with -8 and --check=crc32. --- diff --git a/etc/grml/fai/config/files/etc/initramfs-tools/conf.d/xz-compress/GRMLBASE b/etc/grml/fai/config/files/etc/initramfs-tools/conf.d/xz-compress/GRMLBASE new file mode 100644 index 0000000..1500f6f --- /dev/null +++ b/etc/grml/fai/config/files/etc/initramfs-tools/conf.d/xz-compress/GRMLBASE @@ -0,0 +1,10 @@ +# This file is installed by grml-live in 10-build-initramfs. +# It's purpose is to use XZ compression when building initramfs. + +# this is a workaround to pass custom options to the xz compression +xz() { + command xz -8 --check=crc32 +} + +# enable XZ compression, reducing initramfs size from ~17MB to ~12MB +compress=xz diff --git a/etc/grml/fai/config/scripts/GRMLBASE/10-build-initramfs b/etc/grml/fai/config/scripts/GRMLBASE/10-build-initramfs index 2d286ea..bf6b7d9 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/10-build-initramfs +++ b/etc/grml/fai/config/scripts/GRMLBASE/10-build-initramfs @@ -10,6 +10,7 @@ set -e fcopy /usr/share/initramfs-tools/scripts/init-top/grml fcopy /etc/initramfs-tools/hooks/000-udev-shutup +fcopy /etc/initramfs-tools/conf.d/xz-compress FILE=$(ls -1 $target/boot/vmlinuz-* 2>/dev/null| sort -r | head -1) KERNELVERSION=$(echo "${FILE##$target/boot/vmlinuz-}")