[arch-general] mkinitcpio compression

Dimitrios Apostolou jimis at gmx.net
Sat Feb 26 21:12:56 EST 2011


Hello list,

I'm using arch on an old laptop with only 128MB RAM. I had problems 
compressing the initcpio image with lzma, it always failed allocating 
memory. The following one-line patch allowed me to set my own compression 
level in mkinitcpio.conf, with COMPRESSION="lzma -4"


--- /sbin/mkinitcpio.orig       2010-10-06 03:23:00.966415649 +0300
+++ /sbin/mkinitcpio    2011-02-26 19:11:36.309682053 +0200
@@ -277,7 +277,7 @@
  status=0
  if [ -n "${GENIMG}" ]; then
      echo -n ":: Generating image '${GENIMG}'..."
-    if ! /sbin/gen_init_cpio ${FILELIST} | ${COMPRESSION} -9 > "${GENIMG}"; then
+    if ! /sbin/gen_init_cpio ${FILELIST} | ${COMPRESSION} > "${GENIMG}"; then
          echo "FAILED"
          status=1
      else


What do you think? Should this make it to the distro? Also I actually 
think that *not* forcing -9 compression level, and letting the tool use 
its default is a good thing.


Thanks,
Dimitris



More information about the arch-general mailing list