Live data from Hacker News

Linux from Scratch

linuxfromscratch.org

51–60 of 79 posts

Re: Linux from Scratch

#51
post #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 program…

None of that requires LFS; I compiled KDE via scripts many years ago. Why would LFS be needed for that? That makes no sense. Debian being slow is their problem, other distributions aren't snail-like like that. The default compiler used in LFS is also hardly a real cross-compiler, it is more a bare-minimum compiler for C/C++. This annoys me because e. g. I need fortran for R, so a bare-minimum compiler isn't as useful as a more feature-complete GCC. And GCC also causes some issues, e. g. like my problem with options.cc.

I think you missed the main argument though - LFS isn't quite as good as it could be. That is a correct statement that was made.

Re: Linux from Scratch

#52
post #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 fu…

Except that if you fail to install the bootloader - which happened to me many times - then you do not have a working system. So really the prior argument makes sense.

IMO the guy is right - LFS could be way better. But it has this current structure and does not deviate from it. That's the bad part.

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

Pray tell how that is necessary for the bootloader? The chain used in LFS isn't the only one that makes sense or is required. IMO it would indeed be better to have a system you boot into as quickly as possible, on real hardware, then continue from there.

Re: Linux from Scratch

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

LFS prepared me for Gentoo :)

Re: Linux from Scratch

#54

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 did it once manually over a couple of days. Sounds like a speedrun of the tutorial. How did you approach packaging then and what system did you use to compile everything? I did the tutorial in the late 2000s I think and it took me 4-6 months if I remember correctly. At the time I wasn't completely new to Linux but setting up things like the boot loader was quite tricky for me. For me the main motivation was getti…

It is possible to do it over a few days really, even with not too much knowledge.

Requiring four months seems as if it was a side project, which is of course totally fine, but for any main task it really should not take more than a few days, even on a semi-slow computer (well, depends on how slow).

Re: Linux from Scratch

#55

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…

well, if you happen to be in a 'rm -Rf /' situation (which with agentic AI seems to be more often the case) to know how to operate in a chroot environment could be helpful

Re: Linux from Scratch

#56
post #38

Earlier quoted context omitted.

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 program…

None of that requires LFS; I compiled KDE via scripts many years ago. Why would LFS be needed for that? That makes no sense. Debian being slow is their problem, other distributions aren't snail-like like that. The default compiler used in LFS is also hardly a real cross-compiler, it is more a bare-minimum compiler for C/C++. This annoys me because e. g. I need fortran for R, so a bare-minimum compiler isn't as useful…

"Requires"/"needed".

LFS is about the muscle memory; the documentation; the cohesiveness.

I always recommend it to people and consider it foundational to my understanding of How Stuff Works.

Whether that amounts to a hill of beans in the AI world remains to be seen.

Re: Linux from Scratch

#57
post #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 program…

Learning how to compile packages manually it was a common skill long before Linux came to be, and how GNU/Linux fits together could also easily be learnt with Slackware or Yggdrasil.

Re: Linux from Scratch

#59

Earlier quoted context omitted.

None of that requires LFS; I compiled KDE via scripts many years ago. Why would LFS be needed for that? That makes no sense. Debian being slow is their problem, other distributions aren't snail-like like that. The default compiler used in LFS is also hardly a real cross-compiler, it is more a bare-minimum compiler for C/C++. This annoys me because e. g. I need fortran for R, so a bare-minimum compiler isn't as useful…

"Requires"/"needed". LFS is about the muscle memory; the documentation; the cohesiveness. I always recommend it to people and consider it foundational to my understanding of How Stuff Works. Whether that amounts to a hill of beans in the AI world remains to be seen.

It is more how stuff is compiled than how stuff works.

Fundamental things like how processes are scheduled are not explained by LFS.

Re: Linux from Scratch

#60
post #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 fu…

You build it on your non-lfs computer. What is the other option?

And you dont need to boot anything, just a busy loop after a log "Hello World" is enough, if you feel fancy, maybe make a simple shell ?

Post reply on HN