Between August and September I built a Linux From Scratch system on my ThinkPad, scripted end to end, and took it from an empty partition to a KDE Plasma desktop that I now do my work on. Along the way I wrote up the problems one at a time, as separate articles. This is the map: the build in the order it happened, a sentence or two on each problem, and a link to the full story. Nothing here is retold in detail.
1. The toolchain and the base system
The first two weeks went into the book's chapters 5 to 8: a cross toolchain, the temporary tools, entering the chroot, and building the base system, all driven by scripts and make so any step could be rerun.
One problem from that stage stands out. Coreutils' internationalisation patch took four rounds of fixes, ending in the realisation that automake had to regenerate files the patch changed, not be tricked out of it: "automake-1.18 is missing" after patching coreutils.
2. A kernel, a bootloader and a console
Getting the system to boot meant building a kernel, and the kernel config was copied from the Ubuntu install already running on the same machine, because an earlier attempt had failed at wifi. That fixed the wifi driver and nearly broke the boot: a kernel config copied from a working install almost broke the boot anyway. The same inherited config also brought along a huge set of modules, and the build filled the partition: the kernel build that ran out of disk before it ran out of time.
The wifi chip needed firmware, and instead of cloning the multi-gigabyte firmware repository, the build copied the one chip's files it needed: copying firmware instead of building it.
Then the bootloader. The machine already boots two other systems from one shared EFI partition, so adding a third had to leave them untouched: wiring GRUB into a system that already triple-boots. Booting it then hit a kernel panic, because the root=UUID= line that nearly every guide uses is wrong for a kernel without an initramfs: root=UUID= worked in every guide, and still panicked this kernel. Once it booted, the console font changed three times before it was readable on this screen: three console fonts, two rejections.
3. Networking
Wifi first worked through a set of manual steps. When the desktop later brought its own network applet, there were two complete ways to manage the same interface, and they fight each other if both run: two wifi setup paths that fight each other if you don't pick one.
4. The KDE Plasma desktop
The desktop was by far the largest part, around 150 package scripts, and most of its problems had the same shape: something that compiled fine and didn't work.
Three unrelated packages, systemd, shadow and NetworkManager, had been built before Linux-PAM existed and each silently lacked the feature: one missing dependency broke three unrelated packages. The flag everyone adds to turn off X11 support turned out not to control it in most packages: the one flag everyone assumes disables X11. Twenty files in one package needed the same fix, and the upstream switch that looked like a shortcut couldn't provide it: the shortcut that almost fixed twenty files at once. Two Vulkan helpers couldn't compile at all because Qt6 had been built without the feature they need: a Vulkan helper that can't exist. One package of pure data, a hardware ID database, was added only because another package's configure step checks for its file: one data file added because a fallback path doesn't exist. And one package's default build configuration quietly assumed internet access inside a chroot that deliberately has none: a build step that needs the internet, inside a chroot that doesn't have it.
When Plasma first started, every piece of text was a small square, which traced back to a configure flag set months earlier: the font bug that traced back to a configure flag. The desktop has no display manager; it starts from a console login, with a script that exists because the first manual start failed silently: a graphical desktop with no display manager.
The last big one came after everything worked. A setup step rewrote /etc/passwd and removed system users other packages had added, which broke polkit, and with it wifi scanning, power management and login sessions at once: a setup step that rewrote /etc/passwd.
What ties them together
Reading the list back, few of these were failures that stopped the build. Most were things that built, installed and looked fine, and were missing a feature, pointed at a file that didn't exist, or depended on an order nobody had written down. Linux From Scratch makes you do every step yourself, which means it also makes you discover every assumption a distribution normally makes for you. These articles are the assumptions I found.
Leave a comment
Comments are reviewed before they appear.