
Toucan Linux Project - 1
A Roll Your Own Distribution
So you’re been a Linux user for some time now or I doubt you’d have decided to even check in on this project. I mean building a Linux system instead of using a nice fancy distro seems daunting task. It hearkens back to the old days when machine booted from strange devices like paper tape or a series of toggle switches. Okay, maybe not that far back. At least we can boot a host system to help us first. Why are you here?
Motivation
There could be many different reasons for building your own system from scratch but if you simply go to distrowatch.com and check out what’s already available, then I assume it is not lack of finding something you like. No, it must be something else. Perhaps you like doing your own work? Or maybe you are simply curious how hard it is? Or maybe, like me, you simply never have found a distro that does exactly what you want with only the components you want. But I would bet the most common reason is, you simply want to learn more about Linux and building a modern Linux system. That is probably the greatest reason of them all.Whatever your motivation the goal of this project is to build a Linux system from scratch that, in the end, will be something you fully understand. If that is your only goal then maybe you should just stick to generic Linux From Scratch (LFS). It will certainly do that, at least as a starting point. While LFS certainly is “Roll Your Own” (RYO) once you get past the initial basic system it is far less helpful in setting up something truly useful. As to why you should choose Toucan Linux over LFS there are primarily two reasons:
1) You want to understand more than great LFS project book explains. The LFS book is an amazing work, but a lot of times you are performing steps to complete a task that maybe you don’t really understand why. If you follow the LFS book properly you’ll end up with a decent system that boots to the console and lets you do some simple things—primarily expand it.
2) You want an ultra-experimental system that is designed to sqeeze out every last bit of performance your hardware can offer. Toucan Linux is a HPE project. HPE stands for High Performance Experimental. Why would you do this? You’re a masochist? You’re a problem solver and you don’t have enough of problems in your life? Or maybe you have ultra-modern gear any every distro seems to be behind in using it.
3) You’re old school and hate newfangled, over engineered, bloated programs that have suffered feature creep for many years. Sure things change for the better but not every thing new is better and when something horribly complicated replaces something simple that does this job, then maybe it’s not even a good idea.
4) You like the idea of RYO but the task of maintaining it seems daunting. Well, LFS has ALFS which provide good tools for automating your system administration tasks. That work has already been done for you. Maybe it’s not simple enough.
For me, as an off-grid solar powered user that works on these things out night when there's no electricity, I use laptops, high-powered developer-based laptops that can consume the power in an hour if every bell and whistle is enabled. If they don’t have proper power management they don’t last long, and they get hot. If the screen isn’t properly sized they can be hard to read. They often have a few different drives such as a super high speed NVMe drive and a good old spinning rust disk drive for data less often used. The have very challenging options like Optimus video configurations where the system has two GPUs, an Intel and another such as nVidia or ATI, and the wrong configuration will power up the discrete GPU which isn’t even being used (except to drain the battery). Solutions for these problems in the mainstream are somewhat kludgy but in experimental code better versions exist. To handle these I often need the latest Linux kernel, patched drivers, and the latest and greatest versions of the graphic goodies that are experimental or not.
Maintainers of distros have to carefully choose their components to make sure they all work together. They also aim to support as much different hardware as they can, and this means they often have to choose “common” over “exotic” or “standard” over “experimental.” Moving to a new kernel often means using a new compiler, linker, utilities, and standard libraries. Once you change the tool chain, the ramifications of what also must change move outward like ripples in a pond disturbed by a rock—a very large one. They have to build a system that works for “all” not a system that works for one: MINE!
Since they choose the options for each program they might bring a slew of dependencies along that just make an install larger and more complicated for a feature that you’ll never use. There’s nothing wrong with their choices, but they must make them in order to create a cohesive distro that has a lot of features (and bloat) in order to best serve as many diverse users as possible.
The Toucan Linux project is the opposite. Simple is king. It doesn’t mean it won’t be fully enabled in any way. It just means it will contain programs and libraries you want in order to best serve you and write code as fast as possible to do it on your hardware. Small. Simple. Speedy.
Goals
Toucan Linux will be a distro that attempts to support only a single computer, the one it is installed on. But it will do absolutely everything possible to tweak every setting to ensure it runs as fast and efficiently on that single computer. This does move some of the workload to the user, especially in the initial setup, but that is normal when bootstrapping something from nothing. The goal, however, is to avoid all that manual work in the future.Here’s the eventual goals of the Toucan Linux Project
Extreme performance
Extreme granularity (that is how to make experimental work)
Extreme Choice – make want you want
Keep it Simple and Stupid – avoid the kitchen sink, always choose simple whenever possible
The only configuration tool needed is an ASCII editor (at least for the system)
Simple but powerful package manager
Support the latest or greatest of everything from the kernel to applications but also the “old stuff” the mainstream distro maintainers feel is no longer useful
Make adding software not in the “official” repository easy to add (maybe ditch the whole idea of an official repository all together)
Choose experimental instead of standard but make it easy to find what works
Keep it old school, don’t fix what ain’t broken.
To match these goals, Toucan Linux will be a distro that is compiled from source code, not distributed in binary. This is a portage-type idea where the source is compiled on the system, like some distros use, notably Gentoo. Slow? Yes, but extremely flexible and the only way to achieve the first three goals. As to the slow, maybe not so much because on a modern system compiling even the kernel is relatively fast. The only really slow compiles are complete office suites and the operating systems we load as applications we call web browsers.
What You’ll Need
1) Better than basic knowledge of Linux (Unix). If you have only installed Linux from a USB drive or DVD, and used it for every day work (browsing, office work, media creation), you’ll find the Toucan Linux Project quite daunting. If you know how to use the command line, how to partition a disk, and how to compile and install a new kernel, then you’re probably fine. LFS assumes you know more than the Toucan Linux Project and since for stage 1 this project uses LFS they are initially the same with more developed explanations here.
2) A USB or SSD to create a host system. We will use a distro to start the process and this will require you to boot from a USB. We will use MX Linux for our host (there are others smaller, but initially it is useful to have a web browser in one window and the terminal to work in in another so a graphical environment is very useful). I recommend you build your Toucan Linux on non-removable drive such as a hard drive, NMVe, or SSD drive. This will make the boot process easier and the kernel simpler. This isn’t entirely necessary but you might need to do a bit of extra work in kernel configuration to get everything working (due to mounting a USB device as the boot device).
3) Time, patience, and the ability to follow directions. The first stage, building the base system from nothing, is a lot of manual work (that could be automated but the point is to learn). Once we get to stage 2 the package manager will do most of the work for us—after we create it, of course.
4) Programming knowledge in Perl and C if you want to be a full tinkerer. Perl is part of the LFS base system so it's a great choice for the package manager. But this is completely unnecessary to build your system. We build the package manager (paccom) in Perl as part of the project, but you can skip this stage entirely if you want.
5) Good habitats. Always check your command before you run it. READ everything before you press ENTER and make sure you haven’t missed anything. Cut and paste as opposed to type whenever possible. If in doubt reread and don’t proceed!
The Approach
We we set several goals in the project as a way to move the project along. These are programs or applications we’d like to install at a given stage in the process. This means we might need dependencies. It means we might also need to reconfigure the system or other packages to accommodate the goal. Several programs will be used as multiple goals each time further enabling more features.Our first goal is a basic LFS (Linux from Scratch) system. Our second goal is a viable network. Our third goal is the game Angband in console mode to give us something to do during long compiles. So climb to the top of the nearest tree and prepare to launch yourself into the jungle (Toucan speak for let’s get started).
Copyright (C) 2019 by Michael R Stute
No comments:
Post a Comment