Linux – Looking for tools to build minimal linux desktop

compilingdesktopdistribution-choicelinuxsmall-distribution

Increasingly I am dissatisfied by the fact, that configuring my linux desktop usually means removing bloat instead of adding and tweaking features. I have come to the conclusion that I would rather begin with something very minimal and then add packages I learn about that provide additional functionality.

So I am looking for either a very minimal desktop distribution or even better a tool to build such a distribution. Or in other words I want to replace the package manager with a pre-runtime build tool.

A package manager won't hurt but I am looking for a distribution that focuses on advanced upfront configuration instead of a huge package repository

I have looked at various minimal desktop distributions but they all appear to solve different problems, e.g. are designed to run on older hardware or run from cd/stick/ramfs. But I don't want a minimal distribution because my I have old hardware but because I want to know what purpose the various parts play. Running from main memory doesn't help there either, I want something minimal and simple.

Since it appears there are no distributions that are designed for the kind of minimalism I have in mind an obvious choice would be to build Linux From Scratch. However while I want the build process to be highly customization it also has to be automated because I will have to run it quite a few times until I have a system I am satisfied with.

While a tool for lfs exists that can automate the build process it's not really integral part. Basically it extracts the steps required to build the system from the documentation and then does it automatically. I am looking for something a little more robust and advanced and also don't feel like editing xml.

After a bit of searching I found Buildroot which is intended to build embedded distributions but also allows the installation of X11. Before building a toolchain and then a rootfs the build can be configured using make menuconfig just like Linux. This looks exacly like what I had in mind, except that it is intended for cross compiling for embedded systems.

What I currently have in mind is using buildroot but first ripping out all the embedded specific part replacing them with the respective parts from lfs. Lot's of work.

Also there are some problems with buildroot most importantly (as it appears from my limiting testing) just enabling an additional package results in the hole thing being rebuild from scratch, but for trivial changes I would like to avoid that.

Before I make that time investment I will continue my search for a desktop distribution with a pre-installation build tool like buildroot, are an alternative to/fork of buildroot intended for building desktop distributions.

Edit: The answers so far point me to distributions like e.g. Gentoo, which is what I am currently using. But I am looking for an alternative to distributions like Gentoo, Arch, Debian etc. as these distributions are not minimal enough. Also one has to customize these distributions after installation. I want something that can be customized before installation.

While all of the mentioned distributions are fine distribution they are not what I am looking for. What I am looking for is "buildroot for desktop". If you do not know what buildroot is then you probably won't be able to provide an answer which satisfies me.

Also I don't think that this question is subjective. I simply can not find anything that comes close to my needs and am therefor asking you to point me to projects that might provide at least parts of what I need.

Best Answer

You could use something like Kickstart, which is a feature of the anaconda installer of Fedora, CentOS, RHEL, and derived distributions that lets you completely customize an installation to your liking. You can choose which packages you want to install, the partition layout, network configuration, package repositories, root password, and much more. You can also create pre and post-installation scripts that do whatever else you might want. You can run the install fully automated, or pick and choose what you'd like it to prompt for. All settings are defined in one simple (not XML) text file, which you can make by hand or with the graphical system-config-kickstart tool.

Once you've got that put together, you can roll your own custom CD if you like, or set a network location in your kickstart file, which can be a local or Internet mirror, via FTP, HTTP, or NFS. Your kickstart file can also be on the network, so you can just burn one stub install disc to bootstrap the installation (or use vanilla install media) and have it use as many different configurations as you can stand. You can even network boot it, eliminating removable media altogether.

The network options or custom spun media eliminate you from needing the "huge package repository", yet it will still be there if you decide you want to add something. But, if you want to go whole hog, you can build your own repository, cherry-picking RPMS from upstream, customizing SRPMS to your liking, rolling your own, or even hacking a make && make install or tar -jxf into the post-install script.

Many distributions have similar functionality, some of which also understand Kickstart files even if they don't implement their entire feature set (like Debian).