General TC > Programming & Scripting - Unofficial

dreary squashfs-lzma poorman emulation

(1/1)

caminati:
I miss slax modules' outstanding compression ratio given by squashfs-lzma, and for some large personal tczs I don't care about reading speed.

Not being smart enough to patch a kernel to support squashfs-lzma, I experimented a bit with fusecompress, and found that combining "mksquashfs -no{I,D,F,X}" with "fusecompress -o fc_c:lzma,fc_b:256" gives compression ratios just below that of slax's lzm.

So I remastered microcore.gz, just extending tce-load line:

--- Code: ---      [ "$?" == 1 ] || sudo busybox mount "$THISAPP" /tmp/tcloop/"$APPNAME" -t squashfs -o loop,ro,bs=4096 2>&1

--- End code ---
into

--- Code: ---      [ "$?" == 1 ] || sudo busybox mount "$THISAPP" /tmp/tcloop/"$APPNAME" -t squashfs -o loop,ro,bs=4096 2>&1 || \
      { { sudo mkdir /mnt/fu; sudo fusecompress "${FROMWHERE}" /mnt/fu ; true ; } && sudo busybox mount "/mnt/fu/${APPNAME}.tcz" "/tmp/tcloop/${APPNAME}" ; }

--- End code ---

which basically turns the directory containing a fusecompressed tcz into a fusecompress host directory mounted in /mnt/fu, then loop-mounts the virtually uncompressed squashfs tcz resulting in /mnt/fu, and proceeds as for a standard tcz.

Note that you have to specify "-o fc_c:lzma,fc_b:256" just upon creation of extension, not when reading it.

I am currently testing it, seems to work.

Now my questions/doubts:

* I tried to trace the tortuous history of squashfs-lzma inclusion in mainline kernel:

https://lkml.org/lkml/2010/4/21/457
http://linux.derkeiler.com/Mailing-Lists/Kernel/2010-03/msg01462.html

I am still confused: has it been included in latest official kernel? If not, where can I find reliable patches to recompile a custom kernel for tinycore?

* I expect this to be a temporary and inefficient solution. Just how bearably inefficient/expensive? http://code.google.com/p/fusecompress/wiki/Shortcomings basically recommends to avoid fusecompress big files, but how can I profile/estimate if a given big lzma-ed tcz kills my system? Diagnostic/profiling tools suggestion, please? I tried top but noticed nothing strange.

curaga:
XZ compression for squashfs was merged for 2.6.38. XZ is the new LZMA format.

caminati:
Thanks for the good news!
Of course I would like to know when will tinycore adopt 2.6.38, which is still candidate btw, but I realize this is a hard question.

An easier one: do you know why xz won the race with its competitor lzip? It looks like no one adopted the latter, which does have some pros:

http://www.mail-archive.com/lzip-bug@nongnu.org/msg00065.html

Navigation

[0] Message Index

Go to full version