Live data from Hacker News

Linux from Scratch

linuxfromscratch.org

51–60 of 108 posts

Re: Linux from Scratch

#51
post #41

From "20 Years of Gentoo" ( https://blog.nawaz.org/posts/2023/May/20-years-of-gentoo/ ): "Even more common: “Oh, I’m not going to use Gentoo. I want to go all the way and use LFS!” They never heed my warnings about it. Every one of them either quits in the middle of the install, or soon after, and swears off source based distributions for life. Slackware and LFS are the Haskells of the Linux distribution world. Peopl…

I got a partial burn, in that I realized how a working OS is an alignment of planets and if you fiddle with the physics wrong you get all kinds of magical phenomenon

My network stack was partially working depending on the program which initiated the TCP connection.. never again :)

Re: Linux from Scratch

#52

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.

I'm still thinking that LFS taught me more about sed, gcc CFLAGS and bootstrapping than the underlying OS sadly

Re: Linux from Scratch

#53

As someone who has been using Linux as a daily driver for 25+ years and also used linuxfromscratch.org for building some packages, I would say, don't waste you time building from scratch. There is very little utility unless you are maintaining some arcane system professionally. Stick to RPM based systems as dnf supports transactions. The ability to look at history of package installation and rollback to a known state…

Thank heavens I have you to stop me from trying to step out of my comfort zone.

Re: Linux from Scratch

#54
post #47
post #11

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…

I actually tried this back around 1999 as well. At the time, it felt like I was just being told "type this" and "type that", with very little explanation of what anything meant or why it was done one way instead of another. Maybe after all these years it’s worth giving it another shot? Does it work on a VM?

Yes, you have to supply the curiosity yourself ;)

Re: Linux from Scratch

#55
LFS/BLFS is great. I am not saying all of it is perfect; some parts could and should be more extensive. I am having issues with compiling a new kernel from scratch (so many options ... what do I need) and some options related to video cards and what not. But by and large, this is an example of what makes linux great: knowledge and application of knowledge. You rarely see this in other operating systems - definitely not windows really but also mostly not in other operating systems. Anyone knows the BSD version of LFS? Well ...

Re: Linux from Scratch

#56
post #47
post #11

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…

I actually tried this back around 1999 as well. At the time, it felt like I was just being told "type this" and "type that", with very little explanation of what anything meant or why it was done one way instead of another. Maybe after all these years it’s worth giving it another shot? Does it work on a VM?

Last time I did it in around 2020 the reasoning behind every package, and the meaning of most compilation flags was explained. It was a good experience. Yes it works in a VM. A tip is to create regular clones as checkpoints if you fuck something up along the way.

Re: Linux from Scratch

#57
post #48
post #4

Earlier quoted context omitted.

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.

> I think that Gentoo or even Arch would provide pretty close to the same education level, though, with a lot less time to install. it only takes three commands to install Gentoo cfdisk /dev/hda && mkfs.xfs /dev/hda1 && mount /dev/hda1 /mnt/gentoo/ && chroot /mnt/gentoo/ && env-update && . /etc/profile && emerge sync && cd /usr/portage && scripts/bootsrap.sh && emerge system && emerge vim && vi /etc/fstab && emerge g…

I remember playing with Gentoo back in 2004-2005, going through the installation procedure from "stage 1" all the way through to the working system [1]

It looks like nowadays the handbook says just go from stage 3, which makes sense - compiling everything was kinda stupid :D

[1] https://web.archive.org/web/20041013055338/http://www.gentoo...

Re: Linux from Scratch

#58

As someone who has been using Linux as a daily driver for 25+ years and also used linuxfromscratch.org for building some packages, I would say, don't waste you time building from scratch. There is very little utility unless you are maintaining some arcane system professionally. Stick to RPM based systems as dnf supports transactions. The ability to look at history of package installation and rollback to a known state…

I don't think anyone is suggesting one build Linux from scratch and then use it as their primary OS.

The value of LFS is not in having the system you build, it's in understanding it. After you've read and worked through the book, you've managed to produce a functioning GNU/Linux OS, and presumably you know what all the parts are.

From there, understanding any published distribution is a matter of understanding what makes it unique, maybe a different package manager or init system, or different userland packages. Regardless, the fundamentals still stand, and your ownership of the system is improved by having worked through the book.

Re: Linux from Scratch

#59
post #11

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…

Wayland is quite simple actually. Nowhere near as much to configure compared to systemd.

Even systemd can be kept simple - I did this on manjaro.

Either way the power of LFS/BLFS is to adjust the system to your use case.

> it can really remove all the "magic" from the full OS implementation for you.

To some extent. Many things are missing IMO, in particular if you go to BLFS. But for the most part I agree with you - it is great that we have it.

We should extend it though.

> until 2001 when it became too much of a trouble to recompile everything

I use ruby scripts for that, tracking almost 4000 projects. Once gem-coop offers us an alternative to corporate-controlled rubygems.org, my main ruby projects will be republished (I retired in 2024 when RubyCentral tried to force everyone to cater to the new corporate rules as well as disown gem owners after 100.000 downloads).

Re: Linux from Scratch

#60
post #47
post #11

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…

I actually tried this back around 1999 as well. At the time, it felt like I was just being told "type this" and "type that", with very little explanation of what anything meant or why it was done one way instead of another. Maybe after all these years it’s worth giving it another shot? Does it work on a VM?

> Maybe after all these years it’s worth giving it another shot? Does it work on a VM?

I think it works in a VM just fine. I would recommend having some scripts to aid with compilation though. Even simple python scripts should suffice and probably others already did so. For the most part everything compiles well; if you have a few scripts that automate some parts, you could do this on a single weekend or two. It is quite straightforward, the explanations can be copy/pasted for the most part. One should know the basics of *nix very well though.

Post reply on HN