[arch-releng] reduce image size

Christian Hesse list at eworm.de
Fri Oct 2 09:02:27 UTC 2015


Christian Hesse <list at eworm.de> on Thu, 2015/10/01 16:53:
> Hello everybody,
> 
> now that we support root filesystem on squashfs/overlayfs... Do we want to
> reduce image size some more?
> 
> Currently we generate a squashfs for each architecture, one for x86_64 and
> one for i686. How about merging these into one filesystem? Only extra thing
> to do is a bind mount for the subdirectory to /new_root.

That's not true... We do not have to bind mount but add the arch to
path overlay mount options.

> The benefit is the deduplication support in squashfs, identical files are
> added to the filesystem just once. I did not yet test with the official
> media, but I'd expect the size to shrink about 120MB...

I've build my own media and reduced size from 892M to 738M.

> This has a drawback, though: Copy-to-RAM would copy the files for both
> architectures, not just the needed one.

To compare... To split airootfs.sfs image were about 400MB each... The single
one with both archs is 641MB.

> Any comments?

Did some quick and dirty hacks:

https://github.com/eworm-de/archiso/commits/single-squashfs

This needs some polishing... Would be great to have a single switch to decide
whether or not the build a single airootfs.

Comments are still welcome. ;)
-- 
main(a){char*c=/*    Schoene Gruesse                         */"B?IJj;MEH"
"CX:;",b;for(a/*    Chris           get my mail address:    */=0;b=c[a++];)
putchar(b-1/(/*               gcc -o sig sig.c && ./sig    */b/42*2-3)*42);}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/arch-releng/attachments/20151002/913cdb77/attachment.asc>


More information about the arch-releng mailing list