summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmkinitcpio3
-rw-r--r--mkinitcpio.conf8
2 files changed, 10 insertions, 1 deletions
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"