On Wed, Nov 30, 2011 at 8:23 PM, David W Noon <dwn...@ntlworld.com> wrote:
> On Wed, 30 Nov 2011 19:39:11 -0500, Michael Mol wrote about "Re:
> [gentoo-user] Re: Full disk encryption":
>
> [snip]
>>Stupid question...Would using LZMA and a tarball reduce the size of
>>your initeamfs?
>
> Not really.  I am already using gzip -9, and binaries don't compress
> especially well.  Moreover, the archiver *must* be cpio, not tar.

I don't understand initrd that well, but I understand you run an
init-type script inside it.

My thought was:
1) Include enough in your cpio blob to extract a .tar.xz file. Even
better if you can use a self-extracting, statically-linked LZMAball.
2) launch a second-stage init sequence from the subsequently-extracted data.

Large groups of binaries can compress pretty well, but, obviously, it
depends greatly on the data in question.

Also, wasn't there an ELF-specific compressor making the rounds a few
months ago? And I take it there are no existing tools to take a
dynamically-linked binary, pack in all the pulled-in files, rewrite
symbol tables to include only the symbols used, pull the thing all
into a single now-statically-linked binary, and perform something like
COMDAT folding to remove duplicate functions? It would seem possible,
at least.

-- 
:wq

Reply via email to