Live data from Hacker News

I Built Linux from Scratch

thesloth.me

41–50 of 105 posts

Re: I Built Linux from Scratch

#42

I built LFS like back in 2005 or something. I remember it took forever. I wonder if it's faster or slower now. My computer is definitely faster, but I also have a creeping suspicion the code has gotten a lot bigger. Then at some point I switched to gentoo. I remember I vacillated between gentoo and slackware. The important thing was that I had an onion on my belt, which was the style at the time.

I did it in the early 2000s and last year. It's a bajillion times faster now.

Re: I Built Linux from Scratch

#43

I did LFS back when I was a pre-teen/teen. So late 90s, early 00s. And while I agree to an extent that it doesn't give you much day-to-day stuff, it really makes you more comfortable with operating systems and linux especially. Nowadays, I am a devops/infrastructure engineer, and I can say LFS is a core foundational experience that has let me be better at my job. I know deeper inner workings of a Linux distro and tha…

I had the same experience around the same time (though I'm a bit older). LFS really helped me understand the relationship between the bootloader, kernel, init system, and all of the various daemons and tools that make up a complete system. From there I moved to Gentoo, and then eventually to Ubuntu and other batteries-included distros. But the knowledge I gained from LFS is still a foundational part of my skillset, e…

Somehow LFS didn't help me understand the various subsystems... all I remember is long sed patches and compilation logs

It did teach me how subtle a running stable OS is underneath though, as, after my first standalone boot, I could enjoy a partially working TCP stack: elinks could browser, curl couldn't, irssi sometimes, all of this with random terminal display codes being inserted.

Re: I Built Linux from Scratch

#44
I spent about two weeks in the early 90s with an unholy collection of DOS, 386BSD and Minix futzing together a bootable linux system on a 386/25 with 1M of memory. A couple months later someone told me about this thing called "SLS." I am definitely a fan of a decent distro.

But yes... building Linux from scratch can be very educational. It's probably a right of passage for jedi geeks: LFS, designing and spinning your own SBC, using wireshark/ethereal to debug a borked Cisco router. Sadly, I still remember much more about LILO than I ever learned about Grub.

Re: I Built Linux from Scratch

#45

For those who've been through LFS, would you say that it's a good first step for someone who wants to roll their own bistro at some point down the road?

> For those who've been through LFS, would you say that it's a good first step for someone who wants to roll their own bistro at some point down the road? Yes definitely! If you want to roll a new distro, I would dare say LFS is an essential step. Now that said, if your new "distro" is just going to be Ubuntu with a couple tweaked settings, you won't get nearly as much from it. But any non-trivial distro rolling you…

Haha, autocorrect strikes again!

Thanks, and yeah if I were to roll a new distro it’d be substantially different from anything currently out there.

Re: I Built Linux from Scratch

#47
post #34

Earlier quoted context omitted.

IMO a secure server is an immutable appliance. I still build Linux from scratch most weeks as a core part of my job. Bare bones hardened kernel + shim init + target application are all you need, and will be your highest security/reliability systems. And yeah, threadrippers are a must.

I assume you compile the source code because you want to be sure you don't use any compromised binaries? But how can you be sure the source code wasn't compromised with some obfuscated C code? (Honest question, I'm just a humble application developer.)

You can never be 100% sure. Even the compiler, firmware, or hardware could be compromised.

Security comes down to reducing attack surface, ideally to an infinitesimal degree.

Re: I Built Linux from Scratch

#48
post #34

Earlier quoted context omitted.

IMO a secure server is an immutable appliance. I still build Linux from scratch most weeks as a core part of my job. Bare bones hardened kernel + shim init + target application are all you need, and will be your highest security/reliability systems. And yeah, threadrippers are a must.

I assume you compile the source code because you want to be sure you don't use any compromised binaries? But how can you be sure the source code wasn't compromised with some obfuscated C code? (Honest question, I'm just a humble application developer.)

While I do not build LFS regularly or for production use, the security improvement typically comes from the fact that the end system is _super_small_ and focused. Less software means less attack surface.

Sure, compromised binaries are nasty but personally I do place quite a lot of trust with the distribution repos.

(PS, if you are reading this and contribute packages to distribution repos: Thank you!)

Re: I Built Linux from Scratch

#49

I built LFS like back in 2005 or something. I remember it took forever. I wonder if it's faster or slower now. My computer is definitely faster, but I also have a creeping suspicion the code has gotten a lot bigger. Then at some point I switched to gentoo. I remember I vacillated between gentoo and slackware. The important thing was that I had an onion on my belt, which was the style at the time.

It's almost certainly faster if your computer is remotely modern. Compilation scales pretty well with multi-core performance.

Re: I Built Linux from Scratch

#50
post #17

If you have children, a much better investment is to have them install LFS and forbid them from using Windows/Mac, compared to going to college. I did not learn a damn thing in college because I'd been using Linux since age 12.

Perhaps you missed the point of college if all you did were things within your comfort zone

Maybe they missed your point, but plenty of people with expertise go to college in order to get a piece of paper that allows them to work. Making it a middle-class spiritual rite of passage isn't the only way to do college right.
Post reply on HN