logoalt Hacker News

Linux from Scratch

160 pointsby sippingabonedrytoday at 4:15 AM55 commentsview on HN

Comments

rando103747202today at 5:49 AM

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.

show 15 replies
lukeifytoday at 5:34 AM

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.

show 6 replies
cmrx64today at 8:00 AM

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)

Celeotoday at 5:27 AM

From the news page:

> Bruce Dubbs - 2026/09/01

> The Linux From Scratch community announces the release of LFS Version 13.1.

bmenrightoday at 5:46 AM

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.

show 1 reply
hauntertoday at 6:03 AM

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/

aboardRat4today at 5:39 AM

What's the news? This manual has been with us since forever.

show 2 replies
utopiahtoday at 7:55 AM

Didn't do it for a while, I would benefit from a little refresh.

Is there a Web version running in a VM/container in the browser?

lrvicktoday at 5:35 AM

We did that, but in containers. https://stagex.tools/

lioeterstoday at 6:01 AM

List of (not all Linux) distributions that can be bootstrapped from source:

https://github.com/vasi/bootstrappable-distros

dat999zxtoday at 7:47 AM

Confirmed Linux user with the good ol 2000 web style. Great job!

nandanadileep29today at 7:25 AM

The best way to learn linux !

show 1 reply
shevy-javatoday at 8:32 AM

LFS is great. Unfortunately nowadays I often fail to compile it; most recently with GCC complaining and failing at options.cc. But I also get more issues here.

I kind of need a LFS variant that is more flexible. For instance, the part up to having a working standalone compiler, should ideally become more robust and/or decoupled from the actual LFS build process. Once I have a sane toolchain, the rest is trivial, ruby scripts solve that part for me. But the build up towards that is not so reliable. Things also fluctuate so much in the build process; I still need perl for instance, and python wants to add more and more complexity into the build system as well, even though meson/ninja is a nice combo. For some reason, the build situation on Linux is not very elegant to word this nicely. Then we also "now you need LLVM and glslang and spirv" and so forth, and so on. The complexity always increases. To some extent I can understand why slackware crumbled. How can a single person, even with scripts, keep that all working?

dangtoday at 6:16 AM

Related. Others?

Linux from Scratch - https://news.ycombinator.com/item?id=46709727 - Jan 2026 (103 comments)

Linux from Scratch - https://news.ycombinator.com/item?id=41747966 - Oct 2024 (159 comments)

Beyond Linux from Scratch - https://news.ycombinator.com/item?id=39547118 - Feb 2024 (17 comments)

Linux from Scratch Version 12.0 - https://news.ycombinator.com/item?id=37648808 - Sept 2023 (28 comments)

Linux from Scratch - https://news.ycombinator.com/item?id=33734685 - Nov 2022 (9 comments)

Linux from Scratch - https://news.ycombinator.com/item?id=30496018 - Feb 2022 (96 comments)

Linux from Scratch - https://news.ycombinator.com/item?id=29949311 - Jan 2022 (9 comments)

Linux from Scratch with Training Wheels - https://news.ycombinator.com/item?id=28820602 - Oct 2021 (41 comments)

Linux from Scratch 10.0 - https://news.ycombinator.com/item?id=24350738 - Sept 2020 (49 comments)

Linux from Scratch - https://news.ycombinator.com/item?id=24238015 - Aug 2020 (86 comments)

Major Proposed Changes to Linux From Scratch - https://news.ycombinator.com/item?id=23787526 - July 2020 (93 comments)

Linux from Scratch - https://news.ycombinator.com/item?id=20168343 - June 2019 (15 comments)

Ask HN: Is the Linux From Scratch project still relevant? - https://news.ycombinator.com/item?id=20149111 - June 2019 (7 comments)

Linux from Scratch - https://news.ycombinator.com/item?id=16823110 - April 2018 (1 comment)

Linux from Scratch Version 8.2 released - https://news.ycombinator.com/item?id=16510333 - March 2018 (2 comments)

Linux from Scratch – build your own Linux distro - https://news.ycombinator.com/item?id=11829373 - June 2016 (57 comments)

Linux from Scratch - https://news.ycombinator.com/item?id=8392057 - Sept 2014 (1 comment)

Welcome to Linux From Scratch - https://news.ycombinator.com/item?id=4488162 - Sept 2012 (71 comments)

Linux From Scratch 7.1 Published - 3.2.6 Kernel + GCC 4.6.2 - https://news.ycombinator.com/item?id=3677350 - March 2012 (13 comments)

Linux From Scratch 7 Released - https://news.ycombinator.com/item?id=3171448 - Oct 2011 (27 comments)

Ask HN: Linux from Scratch.. Should I try it? - https://news.ycombinator.com/item?id=1779665 - Oct 2010 (58 comments)

How to build custom Linux from source code - https://news.ycombinator.com/item?id=743843 - Aug 2009 (1 comment)

cientificotoday at 6:24 AM

The fastest way to learn and remember what Linux is about

halyconWaystoday at 5:33 AM

I did LFS once, a long long time ago (days of RedHat 7.3, I'd say, 2002), and it was quite educational! It's a good way to learn the fundamentals of what comprises an actual Linux system

L4XBtoday at 8:09 AM

Very cool; good Job!

charcircuittoday at 6:58 AM

This whole project wastes time that could be spent learning operating system design and it spends it telling users to download files and run ./configure; make; make install 100 times.

bellowsgulchtoday at 6:46 AM

LFS is really, really bad. Also, reading the Linux kernel documentation to understand how to do it right is infuriating because it too is really, really bad.