Thanks for your replies Robert. I think I already nuked *man, and *doc, but
will double check. Also going ot go over the while list of things you
mentioned.

*btw, for about a week i was playing with removing even more utils by*
> * using busybox.*
>
> * But kept running into issues:*
>
> * (current list)*
>
> *
> https://github.com/RobertCNelson/omap-image-builder/blob/master/scripts/chroot.sh#L502
> <https://github.com/RobertCNelson/omap-image-builder/blob/master/scripts/chroot.sh#L502>*
>
> * I'm hoping later versions of busybox/toybox could helps us create a*
> * debian image that's even smaller..*

Funny you mentioned that. Was doing some reading on stripping down debian
last night and on their wiki they mention that busybox has to be exempted
from removal from wheezy ( some kind of bug ), so I'm assuming there are
already some aspects of busybox "installed". After that, I was looking at
my /bin directory ( 3.7M or so ), while the BusyBox executable total size
was only 1.7-ish. Not much of a  gain . . . but depending on what someone
is doing I suppose every little bit matters.

On Wed, Jul 8, 2015 at 7:29 PM, Robert Nelson <[email protected]>
wrote:

> On Wed, Jul 8, 2015 at 9:23 PM, Robert Nelson <[email protected]>
> wrote:
> > On Wed, Jul 8, 2015 at 9:12 PM, William Hermans <[email protected]>
> wrote:
> >> So, last night I was bored and got around to toying with debootstrap(
> again,
> >> but first time in a while ). I'm curious how you Robert get such a small
> >> barefs. I have not read your scripts in their entirety, but it stands to
> >> reason with a little bit of help from google I should be able to get
> close.
> >> But this has not been the case so far.
> >
> > Oh, lots of 'little' things.. ;)
> >
> >>
> >> Basically what I did once in the chroot was as follows . . .
> >>
> >> export LANG=C
> >> /debootstrap/debootstrap --second-stage
> >> apt-get purge tasksel info install-info vim-common vim-tiny man-db
> manpages
> >> aptitude
> >> apt-get autoremove
> >> apt-get clean
> >> rm -rf /usr/share/man/??
> >> rm -rf /usr/share/man/??_*
> >> apt-get install localepurge deborphan debfoster
> >> localepurge
> >> rm -rf /usr/share/doc/
> >> rm -rf /usr/share/doc-base/
> >> dpkg --purge man-db manpages
> >> rm -r /var/lib/apt/lists
> >>
> >> Then as a test, just to see if it could be done . . .
> >>
> >> wget --no-check-certificate
> >>
> https://rcn-ee.net/deb/wheezy-armhf/v3.8.13-bone68/linux-image-3.8.13-bone68_1wheezy_armhf.deb
> >> dpkg -i linux-image-3.8.13-bone68_1wheezy_armhf.deb // Cheating ?
> testing if
> >> this works . . .hah!
> >> rm linux-image-3.8.13-bone68_1wheezy_armhf.deb
> >> rm -r /var/lib/apt/lists
> >> deborphan --guess-all
> >> apt-get autoremove --purge
> >> apt-get clean
> >>
> >>
> >> So . . .
> >>
> >> root@darkness:/# du -hsx * | sort -rh | head -10
> >> 58M     usr
> >
> > From /usr/ nuke:
> >
> > /usr/share/locale/*
> > /usr/share/man/*
> > /usr/share/doc/*
> >
> >> 42M     lib
> >> 8.1M    boot
> >> 7.6M    var
> >> 3.6M    sbin
> >> 3.6M    bin
> >> 1.5M    etc
> >> 32K     root
> >> 28K     run
> >> 8.0K    dev
> >>
> >> What am I missing here ? A couple packages, purgelocales deborphan etc,
> but
> >> this seems large for a stripped  down debootstrap rootfs. Including
> modules,
> >> and kernel.
> >
> > apt:
> >
> > (don't store apt cache, this slows things down, but saves lots of space)
> >
> > cat /etc/apt/apt.conf.d/02nocache
> > 02nocache
> > Dir::Cache {
> >   srcpkgcache "";
> >   pkgcache "";
> > }
> >
> > ( similar to apt-get clean, but automatic)
> >
> > cat /etc/apt/apt.conf.d/02apt-get-clean
> > #Custom apt-get clean
> > DPkg::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb
> > /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true";
> > };
> > APT::Update::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb
> > /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true";
> > };
> > Dir::Cache::pkgcache ""; Dir::Cache::srcpkgcache "";
> >
> > (only store compressed indexs)
> >
> > cat /etc/apt/apt.conf.d/02compress-indexes
> > Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";
> >
> > (drop apt translations)
> >
> > cat /etc/apt/apt.conf.d/02-no-languages
> > Acquire::Languages "none";
>
> btw, for about a week i was playing with removing even more utils by
> using busybox.
>
> But kept running into issues:
>
> (current list)
>
>
> https://github.com/RobertCNelson/omap-image-builder/blob/master/scripts/chroot.sh#L502
>
> I'm hoping later versions of busybox/toybox could helps us create a
> debian image that's even smaller..
>
> Regards,
>
> --
> Robert Nelson
> https://rcn-ee.com/
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to