Live data from Hacker News

Linux from Scratch

linuxfromscratch.org

31–40 of 83 posts

Re: Linux from Scratch

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

Re: Linux from Scratch

#32
post #4

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.

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.

Re: Linux from Scratch

#34

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…

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'.

Re: Linux from Scratch

#36

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…

> LFS takes the wrong approach in my opinion. Shameless plug: I started a series of blog posts exactly because this. https://serversfor.dev/linux-inside-out/ Unfortunately due to some cervical spine issues and a surgery I wasn't able to finish it, but I am planning to pick it up and continue.

Thanks for posting this, I hope you will continue

Re: Linux from Scratch

#37

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…

I used CLFS (Cross-Linux From Scratch) once to bootstrap Linux on my SGI Indy, and I learned quite a lot from this. That was back in 2008 or so, so way before AI and extensive online guides for almost everything. It taught me how cross compilers work, what dependencies exist in the GNU toolchain, how the SGI boots, and much more.

Too bad Cross-LFS is no longer a thing. Then again, with all these microcontrollers and ARM and RISC-V systems today, cross-compiling is no longer as magic (and tricky) as it was back then...

Re: Linux from Scratch

#38

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…

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)

Re: Linux from Scratch

#39
post #9

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.

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)

Re: Linux from Scratch

#40

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…

> 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.

Post reply on HN