frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Linux from Scratch

https://www.linuxfromscratch.org/lfs/view/stable/
188•Alupis•1h ago

Comments

steve1977•1h ago
It's been years since I went through this, but whenever someone asks me what they should read to get a deeper understanding of what a Linux distribution is, I point them to this.
cogman10•1h ago
Yup, it's where I got a lot of my linux knowledge.

I think that Gentoo or even Arch would provide pretty close to the same education level, though, with a lot less time to install.

Chilinot•1h ago
Having installed Arch myself a couple of times, i think i would disagree. Not really much in that process that teaches you how linux actually works. It's more just about managing disk partitions and moving files around than anything else.

LFS is just on a whole different level, and is on my bucket list to complete the entire process one day.

jdc0589•59m ago
agreed. I haven't done LFS, but ive done arch and plently of other distros for a good while and I definitely wouldn't say I have a rock solid understanding of the fundamentals.
necovek•53m ago
Agreed!

As an addendum, you have to do it for your actual working computer, otherwise, doing it on a VM or a machine you don't use, you won't be learning nearly as much as there is no pressure to make it truly work for you (this is where learning happens, when the thing you wanted to configure, and LFS docs or web docs are out of date on, so you have to dig deeper).

cogman10•30m ago
I've completed it along with BLFS and I just don't really agree.

Like, yes you get pretty familiar with autotools, sed, and patch. However, a lot of LFS is in fact just managing disk partitions and moving files around.

LFS also glosses over a lot of pretty important parts like kernel configuration.

The docs from both Gentoo and Arch, on the other hand, are much more complete and practical in explaining things and also troubleshooting problems. And at the end of the process you're left with a system that can be easily maintained.

LFS is harder, but that doesn't really mean you end up learning more. Especially since it's pretty easy to lose focus and just rely on copy/pasting the next command to run.

Edit: Just an example of what I mean.

Here is the LFS discussion of filesystems.

https://www.linuxfromscratch.org/lfs/view/stable/chapter02/c...

And here is the same Gentoo discussion.

https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Dis...

ilvez•57m ago
Other point is long time maintainability as well.. Like unistalling stuff you don't need etc. Or LFS solves it?
cogman10•26m ago
Yeah, that was a real lesson for me when I did LFS.

It was super neat when I got it running for a while, but young me that did it really didn't understand the concept of "Ok, but now you need to upgrade things". That was some of my first experiences with the pain of a glibc update and going "ohhh, that's why people don't run these sorts of systems".

edu_do_cerrado•1h ago
Had to go through it 4 times to reach a stable distro, I learned so much doing it
GuinansEyebrows•1h ago
for as long as i've been running and tinkering with linux, i really need to run this marathon before i get much older. i don't think it'll happen til i quit my job and have more time to actually enjoy using my computer :(
webdevver•1h ago
Making bespoke linux distros should be quite a good fit for LLM agents, especially given the recent results with the LLM-authored web browser.
jdc0589•58m ago
disgusting
bigfishrunning•52m ago
Why? If you really care that little about the properties of the Linux distribution, just run one of the many that already exist.

Linux From Scratch was never really about running the system anyway -- Most people go through it as a learning exercise and then run a maintained distribution anyway; I would think it's a tiny minority that maintains an LFS system for a long time.

lfsss•42m ago
Creating is easy, maintaining is difficult.
Alupis•28m ago
LFS is a teaching/learning tool. Asking an LLM to generate one for you would be fairly pointless. Just read the book and follow along...
charliebwrites•1h ago
Every time I see this, I upvote it

I’m sure it’s different than it was when I was a teenager but building Linux from scratch was the thing that got me into computers as a kid

It shows that computers can be accessible _and modifiable_ at the lowest levels

necovek•57m ago
Having done it as a teenager as well when it showed up in 1999 myself, that's probably the sweet point when we are smart (and persistent) enough to figure problems out, but also have enough time to see it through! :D
necovek•58m ago
This was probably the best thing I've done to learn the ins and outs of a running Linux system: I think it would be amazing to re-do it with a modern Linux stack (systemd + Wayland), but it can really remove all the "magic" from the full OS implementation for you.

However, I've done it in 1999 and ran that system until 2001 when it became too much of a trouble to recompile everything and battle dependencies manually — note that LFS was not as detailed then either, so many dependencies you had to track yourself, and some were very obscure!

Yes, the time investment was high, but I was a high school student starting college with too much interest in something like this and obviously enough time on my hands (after which I was so "smart" to switch to Slackware, a one-man show where I also ended up having manually compiled versions of "small packages" like XFree86 and GNOME, which I was contributing to: when "GARNOME" showed up, that was a revelation! etc)

So if you can afford it, do it: using Linux will never be the same again!

coldpie•46m ago
Agreed, I also did it in high school, circa 2005, and it was a fantastic experience. Learning how to build dozens of different projects and see how they all fit together really set me up for my career doing systems programming. I never actually used the system I built (I'm not even sure I got to a graphical desktop) but it was still a fantastic use of a handful of evenings.
Alupis•44m ago
They do offer a systemd version[1], along with a variety of other versions, including Gaming Linux From Scratch (X11 and Wayland), and Automated Linux From Scratch (with a build system)[2]

[1] https://www.linuxfromscratch.org/lfs/view/stable-systemd/

[2] https://www.linuxfromscratch.org/index.html

petcat•55m ago
I bought the dead tree version of this book back in ~2006 or so.

I used to work in a business park in Seattle and the company next door to us operated a PC recycling warehouse. There were piles of old 386/486-era PCs in various states of disrepair just piled up behind their building. I'd go out there once in awhile and pick-through their piles looking for Intel CPUs, sticks of RAM, and hard drives. Find a good chassis with intact motherboard.

I loved putting that stuff together and installing Linux on those machines. I cut my teeth on Linux and LFS building computers out of those Frankensteins.

self_awareness•45m ago
Years ago, installing Gentoo from an early stage was also a good experiment.

Nowadays they've deprecated all stages but stage3. It's still fun, but bootstrapping Gentoo from stage1 was a Linux-from-scratch-like experience (not quite, but similar).

cbdevidal•44m ago
I did this in 2001 on a 200MHz Pentium with 128MB RAM. Took about eight hours. Great experience.

I understand it still takes about eight hours. Faster CPUs but busier software cancelled each other out.

Some things never change.

Rauchg•40m ago
This was a pivotal project for me as a young lad learning Linux and software engineering back in the day. Can't recommend it enough. So many little frustrations and painpoints to overcome, wasn't easy , and shows you the ropes of what's to come.
theideaofcoffee•39m ago
So many good memories I had running through this way back when and it gave such a good and deep look into how a fully functioning system worked. It removed a lot of the mystery of this distro vs that distro and how all the pieces fit together. I still use some of the knowledge I gained from this in my day-to-day work, some of which is sorely lacking by others doing seemingly the same job as me.

I remember going through this and there was a point where you were running a stock, generic kernel before having built a specialized kernel with modules and options you wanted. I apparently ran up against thermal limits on this laptop because power management was one of the options for you to configure. I had to zoom through that section with a box fan pointed at that laptop so I could get power management and throttling to work so it wouldn't randomly shut down. Good times.

I used the same laptop I went through the first time with the same LFS install for a number of years after that until my day job killed my interest in doing this stuff in my free time. I switched to Debian after that and never looked back.

Like others are saying, I always recommend going through this for those that want a deeper understanding of linux, the kernel, and all its accoutrements.

Raed667•37m ago
we had this as an actual subject in class
lfsss•36m ago
One of the most incredible computer experiences.
macrocosmos•35m ago
Is it educational to do this on a VM or should I break out my old thinkpad?
Alupis•26m ago
Both. Whatever works for you I'd say. I targeted the Raspberry Pi (Cross-Linux From Scratch variant), and a fake root (via chroot) and qemu. This was circa 2014 though.

These days the ARM64 processor on the Raspberry Pi 5 is probably fast enough to just build natively on it, no cross-compilation necessary. Cross-compiling adds a metric ton of complexity.

VTimofeenko•22m ago
Having done this way back when on both: go with a VM first.

Targeting a known set of virtual devices makes a lot of things much easier when building LFS. Dev ux is also much nicer:, you get faster restarts, a socket and optional snapshots to go back to a known less broken state.

Alupis•35m ago
I completed my Cross-Linux From Scratch distro in 2014, targeting the original Raspberry Pi since I was frustrated with the lack of (at the time) minimalist distros.

It was extra-hard, due to the cross-compiling nature of targeting the ARMv6 cpu family - but I learned a massive amount along the way.

Even though CentOS-minimal was released for Raspberry Pi by time I completed the project, I had so much fun it didn't matter. I ended up making a custom build system, consisting of a hodgepodge of bash scripts all wrapped together with a Makefile. My self-hosted Jenkins build server (old mini computer shoved on my book case) would run builds and produce the image artifact - those were the days...

The final distro image was ~40MB, which was impressive to me on it's own.

lfsss•32m ago
In the next part, I hope I can write a kernel from scratch, haha.
awesome_dude•23m ago
Grab Tannenbaum's "Operating Systems, Design and Implementation" - aka "The Minix book" - you will LOVE the book, and walk away having an genuine understanding of what's going on under the hood in a kernel, and be able to write your own

Amazon link https://www.amazon.com/Operating-Systems-Design-Implementati...

awesome_dude•27m ago
I too did this, around 2003/4

It was during my great "Try all the Linux" period, and I had trouble with it compiling on my slackware system, but it compiled just fine on my red hat system (before RHEL)

It was a toy for me, I built it just to see if I could, built it a few times, but was running red hat or slackware as my daily driver.

During that period I also tried the BSDs, Free, Dragonfly, Net, and Open

It was so much fun getting the hang of how each OS differed, the nuances, the ins and outs.

(FTR, I switched to Ubuntu late 2005, and haven't moved since - apt is/was the best thing since recycled electrons)

pizlonator•23m ago
This is such an awesome project.

I had a lot of fun doing LFS plus a bit of BLFS and then I adapted it to my memory safe linux project https://fil-c.org/pizlix

nickjj•19m ago
I haven't gone through this but now I really want to.

Moved to native Linux on the desktop a few weeks ago after 15+ years of using Linux on the server and spending a majority of my time in WSL in Windows for the last decade.

I've learned so many new things in this short period of time. Tracing down memory leaks with GPU processes, misbehaving GPU drivers, power saving modes, etc..

dang•15m ago
Related. Others?

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)

drnick1•8m ago
This and "Ray tracing in one week-end" are HN classics that I wish I had completed long ago.

Show HN: Free AI trip planner that handles allergies,budgets and group consensus

https://www.rondinello.com
1•yetkinsal•2m ago•0 comments

Buckminsterfullerene

https://en.wikipedia.org/wiki/Buckminsterfullerene
1•owenpalmer•3m ago•0 comments

Kids Get Good at Math in America

https://www.theintrinsicperspective.com/p/how-kids-actually-get-good-at-math
1•paulpauper•4m ago•0 comments

L∃AN together – live stream schedule

https://leanprover-community.github.io/lt2026/schedule.html
2•tzury•4m ago•0 comments

Turbopuffer: Fast Search on Object Storage

https://turbopuffer.com/blog/turbopuffer
1•gk1•4m ago•0 comments

Flexible use of a multi-purpose tool by a cow

https://doi.org/10.1016/j.cub.2025.11.059
1•PlaceboGazebo•5m ago•1 comments

ChatGPT Self Portrait

https://thezvi.substack.com/p/chatgpt-self-portrait
1•paulpauper•5m ago•0 comments

Judge blocks government from searching data seized from Washington Post reporter

https://www.washingtonpost.com/national-security/2026/01/21/washington-post-hannah-natanson-searc...
3•perihelions•5m ago•0 comments

Show HN: Local Unique Identifier – (LocalUID)

https://github.com/timtjoe/localuid
1•liberian•6m ago•0 comments

A Broken System Fueling Botnets

https://synthient.com/blog/a-broken-system-fueling-botnets
1•jonkratz•7m ago•0 comments

Software That Debugs Itself While I Sleep

https://tomtunguz.com/implicit-feedback-loops/
1•speckx•9m ago•0 comments

Becoming a Rockstar Engineer

https://yusufaytas.com/becoming-a-rockstar-engineer/
5•kakerane•10m ago•0 comments

Seven Lesser-Known Facts About Hispano-Suiza

https://magazine.derivaz-ives.com/seven-lesser-known-facts-about-hispano-suiza/
1•jruohonen•11m ago•0 comments

Identifying Business Logic Vulnerabilities via Annotation-Based Sanitization

https://arxiv.org/abs/2512.20705
1•PaulHoule•12m ago•0 comments

FIGlet Playground with Collor Support

https://lsferreira42.github.io/figlet-go/
2•lsferreira42•12m ago•0 comments

DOGE Employees Shared Social Security Data, Court Filing Shows

https://www.nytimes.com/2026/01/20/us/politics/doge-employees-social-security-data.html
3•donkey_brains•12m ago•3 comments

Show HN: I built an AI coach for introverted leaders

https://www.leadquiet.com/landing
1•chux52•13m ago•0 comments

25 Years of Wikipedia

https://wikipedia25.org/en
2•gaws•13m ago•1 comments

Tepco restarts reactor at largest nuclear plant

https://www.japantimes.co.jp/news/2026/01/21/japan/science-health/kashiwazaki-kariwa-restart/
4•anigbrowl•13m ago•0 comments

Grains of sand prove people – not glaciers – transported Stonehenge rocks

https://theconversation.com/grains-of-sand-prove-people-not-glaciers-transported-stonehenge-rocks...
3•billybuckwheat•14m ago•0 comments

Oban Comes to Python

https://oban.pro/articles/introducing-oban-python
1•_virtu•14m ago•0 comments

Show HN: Sornic – Turn any article into a podcast in 10 seconds

https://sornic.com
1•digi_wares•16m ago•0 comments

Departing the Python Software Foundation (Staff)

https://pyfound.blogspot.com/2026/01/ee-departing-the-psf-staff.html
3•di•16m ago•0 comments

TempGit

https://tempgit.pikapod.net
1•forkiehackersss•17m ago•0 comments

Parallel encoding of speech in human frontal and temporal lobes

https://www.nature.com/articles/s41467-025-67517-7
1•the_decider•19m ago•0 comments

What's New in Pandas 3.0.0

https://pandas.pydata.org/docs/dev/whatsnew/v3.0.0.html
2•eisa01•20m ago•0 comments

Trump Mixes Up Iceland and Greenland in Incoherent Davos Speech

https://newrepublic.com/post/205475/donald-trump-mixes-iceland-greenland-davos-speech
9•mraniki•20m ago•2 comments

AI and Developer Productivity: Insights from a 100k-Developer Stanford Study

https://www.youtube.com/watch?v=4KLuvAa_lrk
1•tonkkatonka•20m ago•1 comments

My new fave thing to go to is algoraves

https://interconnected.org/home/2025/12/11/live
1•surprisetalk•21m ago•0 comments

Zoomquilt 2

https://zzz.zoomquilt2.com/
2•surprisetalk•21m ago•0 comments