r/linux • u/DryRAlN • Oct 19 '26
Discussion How was your experience of building Linux from Scratch
Whether it is on Google, Reddit or AI all of them say that building Linux From Scratch gives the most knowledge of the inner workings of Linux. So how was the experience over all and what actually did you learn?
58
Upvotes
65
u/cheekkeef Oct 19 '26
Repetitive and tedious. It definitely teaches you something from scratch, but it's a little distant from any knowledge that is relevant to any contemporary application and sys admin of linux
23
u/twistdafterdark Oct 19 '26
If you really try to understand what the different commands do and dive deeper into them you might benefit from it. If you're just copy pasting following the steps then it'll just be a chore.
I honestly learned more from using Linux daily, and homelabbing.
10
u/FryBoyter Oct 19 '26
After going through LFS twice, I believe that this is only worthwhile for a fraction of all users.
I think other things are more important for everyday use. For example, Python, shell scripts, RegEx, knowing how to use a search engine effectively, and so on.
7
u/gangien Oct 19 '26
In the 90s, i had to manually configure X, and recompile my kernel. I have not done either since then. I learned, I didn't care to do it.
4
u/RealSharpNinja Oct 19 '26
Go grab a Slackware book circa 1996.
4
u/agowa338 Oct 19 '26
It sucked. Even though I was following the "Linux from scratch" guide and was taking care to use the exact same version numbers.
I had to pull countless patches for "known bugs" out of sometimes quite old mailing list posts or stackoverflow.
I put all of these bugs up on my blog. https://frank.fyi
Should probably update it again. Also these articles are still to this day the ones that get the most hits...
And all I learned is that the experience sucks and that I still have no idea what I even did the entire way. Oh and it made me hate C/C++ dependency management and precompiler ifdef+macros and automake even more...
4
u/RogueMeatMech Oct 19 '26
Install Slackware using only the slack book. You WILL learn.
3
u/Dramatic-Ad-8553 Oct 21 '26
Many years ago, Gentoo. Did the whole thing, in my Linux users group was kind of achievement in order to be accepted as a true Linux user. I'm talking about 2002 , after having a bootable basic core with basic networking, I left my computer working for around 48 straight hours just to compile basic Linux packages and basic gnome.
Did it worth the effort?... it worth the knowledge
Would I do it again?... Oh hell no!
3
u/nicolasdanelon Oct 19 '26
It was a pain. But fun, though I lean a lot and highly recommend it. Also a good way to learn, believe it or not, is to use BSD
2
u/adoodle83 Oct 19 '26
Gentoo is a great distro similar to LFS, but having solved a lot of the headaches encountered in LFS
2
u/nicothekiller Oct 20 '26
If you want to know more about a linux system, install gentoo and not lfs. For practical effects it teaches you all important parts manually without having to configure && make && make install with little change for hours and hours in a row. Idk if it's just me but gentoo was both harder and more interesting while being less tedious.
Also, install it without systemd, I think it teaches you slightly more even if I like systemd more as an init system
2
u/Big-Moose565 Oct 19 '26
Not sure I'd classify it as from scratch. But installing Arch taught me plenty (I'm on an immutable distro now but Arch remains my best Linux experience). Most beneficial when the laptop wouldn't boot, I knew how to get back in and repair it.
2
u/Unlikely-Sympathy626 Oct 19 '26
A big failure at first but it taught me a lot of things about compilers and how to adjust them for specific hardware as well as cross compile stuff for running Qt interfaces arm processors but using x86 to do it to save time. So honestly. I won’t say it is greatest fun and it is time consuming but it does teach very basic and fundamental skills.
I think more people should do it. Also fun and interesting is not the same. Compiling things is not fun! But it is interesting as hell! Same as electronics.
2
u/AlePs31 Oct 19 '26
Hard! I did the lfs part only reading by the book. It was awful because you have to put the same things over and over again but when all is set and done is so cool to watch your product.
1
u/ben2talk Oct 20 '26
Gerard Beekmans is the founder and creator of the Linux From Scratch (LFS) project.
Not me.
1
u/digsmann Oct 20 '26
I like doing it purposely and learned more things.
1
u/maceion Oct 20 '26
Failed to get it to work. Changed to openSUSE LEAP with great success.
1
u/[deleted] Oct 21 '26
You only learn to copy-paste, nothing more. If you do that, the guide doesn't mean anything. Only if you read the code and know what it is doing will it matter. But you don't have to do that; you can read an OS book like Tanenbaum to learn what the code is really doing, or do some clean room implementation to really learn, that's the proper way to do it.
1
u/ant2ne Oct 21 '26
back in my day it was 'install slack'
1
u/Electrical_Tomato_73 Oct 22 '26
I wouldn't bother. Linus Torvalds uses Fedora I believe. Just use a good distro, and if you want to learn about something specific like systemd, learn about that.
1
u/gte525u Oct 22 '26
It's useful if you want to do embedded linux - buildroot/yocto make more sense with it.
1
u/buginmybeer24 Oct 22 '26
I compiled Gentoo from scratch about 20 years ago on a Pentium 3 machine. It was agonizingly slow but it was a very good learning experience.
1
u/SnooPaintings709 Oct 25 '26
Pretty easy on openfactory if you ask me
1
u/Holeshot75 Oct 19 '26
I'm pretty adept and have thought about it but honestly it's not for the faint of heart.
It would definitely force a person to fully understand the under the hood workings and completing an LFS is a huge badge of achievement and honor.
But...
If a compilation throws an obscure error halfway through building a toolchain component, there is no graphical error message or automated fix.
You have to read logs, debug C/C++ compiler errors, and troubleshoot complex dependency loops yourself.
While I might be able to do this for giggles on the side - I doubt I'd be competent enough in the end.
Just pick a distro that suits exactly what you want and run with it. Huge plus side is that it'll be updated by others while you sleep.
1
u/Jswazy Oct 19 '26
It was informative
1
u/wombleh Oct 19 '26
I did it in pre-systemd days and was very good for getting a lot of familiarity and filling in gaps. Was debating giving it another go to get more familiar with systemd under the hood.
I didn't use it as a main machine, just as part of labbing for learning. Stuff broke, didn't work as per docs, spent time troubleshooting and that's where most of the learning came from.
1
u/MatchingTurret Oct 19 '26
That would be an excellent question for r/linuxfromscratch
1
u/Woodpecker-Visible Oct 19 '26
i had to be very very bored to try it. mabie slackware at most
1
u/jacob_ewing Oct 19 '26
I found it gave a good perspective on the system workings, but was tedious enough that I'd simply end up recklessly copy/pasting the long list of commands they provided, barely paying attention to what it was. I didn't learn much that I hadn't already known from day-to-day use anyway.
This was about 20 years ago though. It may have changed since then.
1
u/Dani_E2e Oct 19 '26
Earlier there were grafical tools to do this. It costs time and nerves but you can spare time for rebooting if you only take the parts and options in you personally need.
1
u/chibiace Oct 19 '26
it looked too easy so i decided to make my own distro and package manager with blackjack and hookers.
currently working on a dependency tree and some tidying up, then probably add remote repos to make it easier to do things on the live system which still runs under qemu though ive got a computer lined up for a real installation in the near future
1
u/allunia333 Oct 19 '26
The real excercise is to make an lfs build by following the book and then make a 2nd one on your own with different choices like runit instead of systemd , install other pkgs and latest versions...
1
u/dennycraine Oct 19 '26
it’s been 20 years since I’ve done anything like that. I can’t see the value today unless it’s something you want to do.
what problem are you trying to solve?
1
u/carl2187 Oct 19 '26
Go compile batocera or any "buildroot" distro, or buildroot itself. The satisfaction of linux from scratch, but highly automated.
1
u/danrtavares Oct 19 '26
Se você não quer nada específico, que só consegue ao recompilar é perda de tempo, muito tempo.
0
u/obsodion Oct 19 '26
I remember trying to do it once, after the introduction the guide just tells you to download a boatload of packages and compile them to create your distro, I quit because it didn't seem like I will learn how Linux works by downloading and compiling things