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

Re: Control Debian image size



Hi Johannes,

On 3/3/19, Johannes Schauer <josch@debian.org> wrote:
> it is possible to produce a Debian rootfs well below 128 MB in size if you
> choose not to install locales, man pages and docs using the --path-exclude
> dpkg
> option:
>
> https://raphaelhertzog.com/2010/11/15/save-disk-space-by-excluding-useless-files-with-dpkg/
>
> An easy way to create a chroot tarball with this option already set is by
> using
> mmdebstrap (shameless plug: I'm the author) like so:
>
> mmdebstrap --variant=apt \
>     --dpkgopt='path-exclude=/usr/share/man/*' \
>     --dpkgopt='path-include=/usr/share/man/man[1-9]/*' \
>     --dpkgopt='path-exclude=/usr/share/locale/*' \
>     --dpkgopt='path-include=/usr/share/locale/locale.alias' \
>     --dpkgopt='path-exclude=/usr/share/doc/*' \
>     --dpkgopt='path-include=/usr/share/doc/*/copyright' \
>     --dpkgopt='path-include=/usr/share/doc/*/changelog.Debian.*' \
>     unstable > debian-unstable.tar
>
> The resulting tarball debian-unstable.tar is 69M in size. You can find a
> very
> similar example in the mmdebstrap man page. You can go even smaller if you
> omit
> the path-include parts of above command (64M) and even smaller by not
> installing apt (49M). You can go even more extreme with the custom variant
> which lets you pick exactly the package set you want, ignoring
> Essential:yes
> packages.
>

That is encouraging, I'll remove the /var/cache as well.

But the chroot rootfs in tar ball only works to install a device where
the kernel is already available, correct?

What can I do to build Debian image with kernel for imx6? Using Isar
or something?

Thank you very much.

- jh


Reply to: