FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 02-16-2011, 01:45 PM
 
Default COMPRESS=xz support for mkinitramfs

Hi, now that upstream linux-2.6 kernels support xz-compressed
ramdisks, I would like update-initramfs to support generating them.

This minimal patch WORKS FOR ME:

$ sed '/lzop/ {p; s/lzop/xz/g; }' /usr/sbin/mkinitramfs | diff -pud /usr/sbin/mkinitramfs -
--- /usr/sbin/mkinitramfs 2010-09-27 20:46:10.000000000 +1000
+++ - 2011-02-17 01:41:52.028878435 +1100
@@ -148,6 +148,7 @@ if ! `grep -q -i ^config_rd_${COMPRESS%p
fi

[ "${compress}" = lzop ] && compress="lzop -9"
+[ "${compress}" = xz ] && compress="xz -9"

if [ -d "${outfile}" ]; then
echo "${outfile} is a directory" >&2

At least this far:

$ file -s /var/tmp/cdeboo*/boot/initr*
/var/tmp/cdebootstrap-amd64~/boot/initrd.img-2.6.38-rc5:
gzip compressed data, from Unix, last modified: Thu Feb 17 01:25:54 2011
/var/tmp/cdebootstrap-amd64/boot/initrd.img-2.6.38-rc5:
xz compressed data

I haven't actually tried booting it yet, and obviously updating the
documentation is left as an exercise for the reader.

PS: xz has an -e option for "compress me harder". Given the
compress/decompress ratio for ramdisks (i.e. once vs. every boot), it
might be advisable to do "xz -9e" instead of the "xz -9" above.


--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110216144546.GA20971@dali">http://lists.debian.org/20110216144546.GA20971@dali
 

Thread Tools




All times are GMT. The time now is 05:30 PM.

VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org