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.
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
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.