Skip to content

6. Packaging

fabnicol edited this page Mar 16, 2021 · 6 revisions

To package a Gentoo installer using MKG for distribution or tests, you may want to reduce its size to a minimum, e.g. to keep bandwidth as low as possible.
MKG provides two options for packaging:

  • compact
    This option zeroes the virtual disk free space then requests VBoxManage to compact the resulting disk. This may cut down the VDI disk size by a factor of 2.5 to 3. A side effect is that after xz-compression by CloneZilla, the resulting ISO file of the installer is about 10 % smaller than without this option.
    Use this option with care: it is not advised in combination with hot_install ext_device=... to directly install the distribution to a mass storage device (although this has worked in tests).

  • minimal_size
    This options unmerges gentoo-sources from the VM portage tree and cleans up /usr/src. This is ill-advised if you want to be able to use your distribution out-of-the-box, as many ebuilds rely on kernel sources to install. However this cuts down the size of the package noticeably, so it may come in handy provided that you warn users about emerging gentoo-sources as a post-install step, followed by kernel selection (eselect kernel set N) and the minimal make steps (make syncconfig, make modules_prepare), which are occasionally necessary for a few ebuilds. As of v2.4, this option is activated by default and does not need to be invoked. It can be deactivated by adding minimal_size=false to command line.
    Note that if you do this, xorriso may likely fail to create the ISO output (if requested) as its size will for most configurations be higher than the limit size of 4GB. So minimal_size=false should be reserved for debugging, or when directly installing the OS to an external partition, without the intermediary ISO file output, using ext_device=sdX hot_install