From 35fea002c27f6c1124a28535e379d7edf34a127e Mon Sep 17 00:00:00 2001 From: Thomas Bächler Date: Sat, 6 Jun 2009 22:31:35 +0200 Subject: Add support for lzma and bzip2 compression for the image --- mkinitcpio | 3 ++- mkinitcpio.conf | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/mkinitcpio b/mkinitcpio index 0503006..0b0beeb 100755 --- a/mkinitcpio +++ b/mkinitcpio @@ -32,6 +32,7 @@ SKIPHOOKS="" PRESETDIR="mkinitcpio.d" QUIET="y" SHOW_AUTOMODS="n" +COMPRESSION="gzip" # Add /{,usr}/sbin to path # works around undetected problems like in #8448 @@ -275,7 +276,7 @@ fi status=0 if [ -n "${GENIMG}" ]; then echo -n ":: Generating image '${GENIMG}'..." - if ! /sbin/gen_init_cpio ${FILELIST} | gzip -9 > "${GENIMG}"; then + if ! /sbin/gen_init_cpio ${FILELIST} | ${COMPRESSION} -9 > "${GENIMG}"; then echo "FAILED" status=1 else diff --git a/mkinitcpio.conf b/mkinitcpio.conf index 808734f..7b2c98c 100644 --- a/mkinitcpio.conf +++ b/mkinitcpio.conf @@ -56,3 +56,11 @@ FILES="" # This setup loads an lvm2 volume group on a usb device. # HOOKS="base udev usb lvm2 filesystems" HOOKS="base udev autodetect pata scsi sata filesystems" + +# COMPRESSION +# Use this to compress the initramfs image. With kernels earlier than +# 2.6.30, only gzip is supported, which is also the default. Newer kernels +# support gzip, bzip2 and lzma. +#COMPRESSION="gzip" +#COMPRESSION="bzip2" +#COMPRESSION="lzma" -- cgit v1.2.3-24-g4f1b