initramfs-tools: use xz with -8 and --check=crc32.
authorMichael Prokop <mika@grml.org>
Wed, 11 May 2011 12:08:07 +0000 (14:08 +0200)
committerMichael Prokop <mika@grml.org>
Wed, 11 May 2011 13:25:20 +0000 (15:25 +0200)
etc/grml/fai/config/files/etc/initramfs-tools/conf.d/xz-compress/GRMLBASE [new file with mode: 0644]
etc/grml/fai/config/scripts/GRMLBASE/10-build-initramfs

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 (file)
index 0000000..1500f6f
--- /dev/null
@@ -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
index 2d286ea..bf6b7d9 100755 (executable)
@@ -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-}")