WIP : Cuntoo Installer

Filed under: Gentoo, TMSR~ — trinque @ 6:31 p.m.

Linked is (nearly) everything you'll need to build your own self-replicating Cuntoo. Unpack the archive, which contains all distfiles necessary to build the required packages, and then run:

./ $kconfig $blockdev

$kconfig is the path to the kernel config you will use. Note that the build process expects that external kernel modules are *not* used, neither is an initramfs used. If your kernel requires firmware, build the blobs into the kernel image. There is a kernel config provided for the apu2 at "config/4.14.8-apu2". The given $blockdev shall be obliterated and replaced with a shiny new Cuntoo build. Proceed carefully!

This is a WIP for the following reasons, among others:

  1. The only device supported by the packaged kernel config is the apu2. New kernel configs for chosen hardware are needed.
  2. The build relies upon the musl Portage overlay, hosted in git, which is *not* in the tarball. When repossession is complete, the Gentoo ports tree and the musl shall be merged into a single tree in /cuntoo/ports and a genesis vpatch produced.
  3. The thing does not check to see if the host build system has all the tools necessary to build. That said, stopping and restarting is harmless; it will simply reformat the drive and try again.

When complete, the installer will copy the entire "cuntoo" directory (including package distfiles) into the build drive at "/cuntoo". Once the build drive is removed from the build host and installed in the target machine, the installer can be run again from "/cuntoo", and so on ad infinitum. Thinking in this manner, one might imagine ways far superior to play the game of "Linux distribution" than centralized mirror servers and other soft targets.

Testers would be greatly appreciated; critics doubly so.




  1. Oh nice. No idea how I missed this post, but I'll definitely be leveraging this on my next gentoo attempt (I utterly failed my first quest last year).

    I'll be sure to report my results once I do.

    Comment by lobbes — 2018/03/09 @ 7:37 p.m.

  2. I attempted this on a machine booted with a gentoo linux minimal installation cd: I unpacked cuntoo.tar.gz, provided my kernel configuration and then ran ./install myconf /dev/sda - it seemed to work ok until it ended with "emerge: there are no ebuilds to satisfy "=gcc-5.4.0-r3::musl"

    I gather that gcc-5.4.0-r3::musl is in enter_chroot so basically it didn't really get to finish - so it's not surprising that it won't boot, of course.

    Any idea what went wrong there (or what I messed up)?

    Comment by Diana Coman — 2018/03/12 @ 6:10 p.m.

  3. Well, that's annoying. It appears that the Gentoo musl overlay has already retired the "gcc-5.4.0-r3" ebuild in favor of an "r4", removing the previous item entirely. I wager that changing the reference to "r4" will make the build complete properly.

    I will circle back to this and confiscate the necessary "musl overlay" items so that this doesn't recur.

    Comment by trinque — 2018/03/12 @ 6:21 p.m.

  4. [...] article's instructions. I lost the file. I can probably make it again, but you probably want to try trinque’s thing anyway. [...]

    Pingback by Shitgnomes « Daniel P. Barron — 2018/04/30 @ 2:02 p.m.

  5. Are the links broken? I am just getting a "page not found" for the files?

    Comment by PeterL — 2018/06/16 @ 5:44 p.m.

RSS feed for comments on this post. TrackBack URL

Leave a comment