Re: [lorax] how to decrease squashfs.img size, it increase more than install size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2014-07-22 at 09:36 +0800, 耳东 wrote:
> hi guys, I have refered to the minimal ks config of
> cloud-kickstarts.git:
> 
> 
> https://git.fedorahosted.org/cgit/cloud-kickstarts.git/tree/container/container-small-20.ks
> 
> I have clean unused locales and some file.
> 
> - compress cracklib pw_dict
> - clean unused locale files
> - rm some static pictures and log files
> 
> the different ks config:
> 
>     +gzip -9 /usr/share/cracklib/pw_dict.pwd
>     +localedef --list-archive | grep -v en_US | xargs localedef
> --delete-from-archive
>     +mv
> -f /usr/lib/locale/locale-archive /usr/lib/locale/locale-archive.tmpl
>     +/usr/sbin/build-locale-archive
>     +mv -f /usr/share/locale/en /usr/share/locale/en_US /tmp
>     +rm -rf /usr/share/locale/*
>     +mv /tmp/en /tmp/en_US /usr/share/locale/
>     +mv /usr/share/i18n/locales/en_US /tmp
>     +rm -rf /usr/share/i18n/locales/*
>     +mv /tmp/en_US /usr/share/i18n/locales/
>     +echo '%_install_langs C:en:en_US:en_US.UTF-8'
> >> /etc/rpm/macros.imgcreate
>     +
>     +truncate -c -s 0 /var/log/lastlog
> 
>      rpm -qa|sort > /root/rpm-qa.txt
>      yum clean all
>      rm -f /etc/resolv.conf
>      rm -f /var/lib/rpm/__db*
>     +rm -rf /tmp/*
>     +rm -fr /var/log/anaconda
>      rm -fr /usr/share/doc/*
>     +rm -fr /usr/share/backgrounds/*
>     +rm -fr /usr/share/kde4/*
>     +rm -fr /var/lib/yum/yumdb/*
> 
> I mount the different squashfs.img file:
> 
>     /dev/loop0      312M  312M     0 100% /mnt/1
>     /dev/loop1       21G  806M   20G   4% /media/1          <-- before
> clean
> 
>     /dev/loop2      315M  315M     0 100% /mnt/2
>     /dev/loop3       21G  619M   21G   3% /media/2          <-- after
> clean
> 
> the install size was saved 806M - 619M = 187M, but squashfs.img only
> save 315M - 312M = 3M
> where has the spare space gone ?  
I think this is a question for people around squashfs, but as you can
see the content is highly compressed so if you removed 187 M of data
with high compression ratio (which locales definitely are), the
difference may be such small.

But the original issue with 100 MB bump is really wierd. Did you try
running unsquashfs followed by mksquashfs to see if it stays the same?

-- 
Vratislav Podzimek

Anaconda Rider | RHCE | Red Hat, Inc. | Brno - Czech Republic


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list





[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux