Join the discussion
Write your take first — we'll ask for email only when you're ready to publish.
- Hacker News
- List of (not all Linux) distributions that can be bootstrapped from source:by lioeters
- Still remember the first time LFS booted. Felt like a true wizard, even if it was just a shell.by Marchant_hq
- That was a weekend project once, absolutely grueling but you learn so much about the OS internals.by tugback
- The last release of the no longer maintained sysvinit version is here (the default is systemd now) https://www.linuxfromscratch.org/lfs/downloads/12.4/by haunter
- From the news page:
> Bruce Dubbs - 2026/09/01
> The Linux From Scratch community announces the release of LFS Version 13.1.
by Celeo - I kept an LFS system going for a few months (on a wretchedly awful by modern standards celeron “net top”) until eventually making a mess I couldn’t figure out how to untangle during a system upgrade. this gave me the sheer force of will necessary to later do things like own the multiplatform build system for an ocaml based distributed system (mina)by cmrx64
- In my experience with Gentoo, the hard stuff is well beyond the base setup: it's getting sound, bluetooth, auto-mounting, etc. setup the way it is in the bigger distros.by timw4mail
- For a long time (probably 2002-2010) I really wanted to do LFS. But I've been on Gentoo since 2004 which, over the last ~22 years, has probably exposed me to almost everything LFS would have, plus a lot more it wouldn't have. I still wish I'd did it way back when. I probably would stumbled through fewer issues had I.by bmenrigh
- LFS prepared me for Gentoo :)by dirkc
- I had the same experience. I think the only thing that LFS would add to that experience would be the package-manager-less experience (building without portage's help)by rntksi
- About 4 years after beating my head against the wall trying to learn all about embedded linux builds and reading through yocto docs, I found a course on Udemy titled, "Embedded Linux Step by Step Using Beaglebone Black" It was perfect for walking me through the kernel, file-systems, boot-loaders, etc... It was a bit dated even then and thus required a little leg work to find the proper source versions of linux for the beagle board but I got it all working and cross-compiled a linux distro from scratch for the beagle board, flashed it, booted it and talked to it via serial port. I highly recommend the course.by phlipski
- You can tell it's written by real Linux users because the landing page UX doesn't make it immediately obvious where to even start reading.by lukeify
- Took me half a second to realize I would probably start with "LFS :: Linux From Scratch is the main book, the base from which all other projects are derived."by boomlinde
- ... At the top? You're expected to read all of it! :)by esseph
- It is indeed glorious.by voxelghost
- it's like their brain is unaware of the concept of a timelineby partyficial
- My journey was: Start off by clicking LFS among the links, and then "Read online" in the sidebar, and then being lost. I see a header, "Current Stable" but I can't see the link to the actual book. I only see the errata, the security advisory and a link labelled... stable LFS systemd? Maybe it's that one? Yes, yes it is.
- Idk what to tell you if the “welcome to Linux from scratch” header wasn’t enough of a hintby austy69
- LFS takes the wrong approach in my opinion. I did it once manually over a couple of days. I suppose I hoped enduring the pain of waiting for the packages to compile would somehow make me smarter. It didn’t. I didn’t learn much. It was like following a baking recipe. I know I need to add eggs and sugar in the ratio it says but I’d be damned if I could tell you why that specific ratio works.
It’s just too much to take in at once. You start by building a cross compilation toolchain but… why? And you add the bootloader dead last, even though it’s the first thing you see when you boot a Linux machine?
I reckon a better approach would be to build it step by step, only adding new things once you’ve discovered a need for them. First you get the bootloader working, then you get it to actually load the initramfs and kernel, etc… you could even create your own extremely simple initramfs first before adding dracut, etc…
This gets you to a system you can boot and play with asap. And then you can slowly start to discover why you actually need all these things through exploration and experimentation.
- > I did it once manually over a couple of days. I suppose I hoped enduring the pain of waiting for the packages to compile would somehow make me smarter. It didn’t. I didn’t learn much.
Exactly my experience. Back in the day when all I knew was Windows and a couple of BSDs I wanted to get into Linux, because it seemed like it was going to become very relevant in the next decades. After years of slacking I thought LFS would probably be the ideal choice. Turned out it wasn't, at least for me. I ended up "learning Linux" with distros like Gentoo, Arch and later even Ubuntu, and by just replacing my production systems with Linux, which were still running on OpenBSD mostly. I have revisited LFS a couple of years ago and honestly didn't take much from it. I get the appeal, but it's not for everyone.
by numlock86 - This should be said more often, and in many other contexts as well.
Most educational resources are what- and how-based, only the best ones are primarily why-based, what Wirth once wrote in the preface to some Pascal book (I paraphrase) 'discussions are motivated, so that the learner gets coverage and understanding, instead of memorization'.
by jan_m_savage - LFS is known but it is really more a cookbook than explanatory principles.
Principles can be studied from “Operating Systems: Three Easy Pieces“ book - https://pages.cs.wisc.edu/~remzi/OSTEP/
Rob Love wrote the book “Linux Kernel Development”. https://rlove.org/
And then continue with reading LFS.
by sixtyj - As pointed out already, LFS is a cookbook, and you learn most by having an idea about how you want to tune your Linux system.
So at points you want to dive deeper, you do — and go off the beaten path.
It requires a desire not just to understand how bits and pieces fit together, but how you can make them work even better for yourself and what is and is not customizable?
Arguably, even if building it today is easier — back when I did it in 2000, you sometimes struggled to find where the canonical source code of the package is, not to mention compilation errors, linking errors, etc. Only then did you get to configuring the init RC system, choosing between them (no systemd yet), etc.
But a requirement is — IMO — that you are strongly opinionated about how a system should serve you, and look for opportunities to tune it.
by necovek - > And you add the bootloader dead last, even though it’s the first thing you see when you boot a Linux machine?
That actually makes perfect sense. If you did the bootloader first, how are you going to build it? How do you know what to boot from which filesystem on what device? By the time you've got your root filesystem complete, it's easy to tell.
If you do things step by step incrementally, you keep having to go further back in the process. Starting over repeatedly gets tedious, boring and frustrating. And it'll take ages to finish the complete OS.
by tosti - I've learned the most from LFS long time ago, when I had no internet. I had a mismatching set of Slackware and redhat source CDs, and LFS itself didn't match the versions on CDs too. Since then I can build anything and anywhere, even if it's not cooperating :)by binarin
- > It was like following a baking recipe. I know I need to add eggs and sugar in the ratio it says but I’d be damned if I could tell you why that specific ratio works.
I know a french cookbook[0] which contains not only recipes for dishes, but also for some of the intermediary ingredients, like stocks, that can now be bought at the supermarket. I feel that I’ve learned a lot by following those recipes, be it simply in the structure of french cuisine. And to me, LFS is a cookbook in a similar sense.
[0]: https://www.ferrandi-paris.com/fr/le-grand-cours-de-cuisine-... in French, sorry!
by wazdra - I'd like to counter your comment.
LFS helped me a lot. It taught me how to compile packages manually, and how GNU/Linux components fit together.
Armed with that knowledge, I could do things others could not do:
- Make applications that bundle/automatically download their dependencies, compile them with custom flags (static linking)
- Diagnose build errors buried in deep dependencies when using vcpkg
- Compile programs for esotheric systems: e.g: Intel MacOS X 10.5, an obsolete system noone else on earth is using except the company I worked at
- Create application targetting obsolete systems but using the latest version of its dependencies
- Compile recent programs on esotheric systems, by bootstraping a newer gcc on the newer system, patching as necessary
- Create my own stripped down distro, tuned to my specifications
- Use that stripped distro as a docker container
- Run recent linux on obsolete hardware no longer supported by mainstream distros
- Reformat a cloud dedicated server without physical access by first bootstraping a minimal distro on a ramdisk, unmounting the main drive, partitioning that drive, and installing the new distro on that drive. Reboot and pray.
- Build a cross-compiler for targetting a freestanding environment
- Build latest KDE/XFCE for debian stable. No more "but debian ships with outdated software!!11"
- Build applications on a distro they were not designed for (Zimbra OSE on debian)
by degaart