Live data from Hacker News

Linux from Scratch

linuxfromscratch.org

121–130 of 164 posts

Re: Linux from Scratch

#121
post #3

I really like the idea, really tried following the process several times. But each time it just turned into a copy-incomprehensible-commands-into-the-terminal exercise at some point, and I lost motivation. Did anyone experience the same?

It feels to me like you have approached this with a wrong mindset, like you focused too much on finishing the whole process. With LFS you must put substantial amount of value into the journey itself. It's not about copy-pasting commands, it's about trying to actually understand what and, more importantly, why your are doing each step. My recollection is that LFS docs were good in helping with that. Or maybe it was co…

I daily drove it for a few months, back in the early 2000s (like many in this thread, it seems.)

I kept it updated by subscribing to Freshmeat emails for releases, and I'd download and install the tarball.

My review is that I'm glad I did it, it's a terrible idea, and it's debatable (honestly, not facetiously) as to whether the classes I skipped were more valuable.

Re: Linux from Scratch

#122
post #92

Earlier quoted context omitted.

I dunno. I’m a millennial so all sorts of stuff was just ascribed to my generation. As a result, I tend to just assume these differences are overstated. I worked with college students fairly recently. They did often reach reflexively for video. But when the written material was good enough, they used it.

We are probably more or less the same age. And yes, they said it about us as well. And they were right. It's a slow downward trend. And it's still continuing. Do you also see these young mothers on the streets which would just ram you with their baby buggy, because they are deeeeply involved into some toktok swiping ceremony? Addicts. What do we expect from that? > But when the written material was good enough, they…

To be fair, though, people have been complaining about the younger generations for hundreds and thousands of years.

I've read accounts of newspapers and common books rotting people's minds (including the "they aren't talking to each other!" concern,) and ancient Greeks complaining about the next generation.

I can't negate any specific point this way, but I do try to think about history repeating itself whenever I see someone notably younger annoying me.

(Also, the complaints that younger generations have about the older generations are just as ancient.)

Re: Linux from Scratch

#123
post #92

Earlier quoted context omitted.

We are probably more or less the same age. And yes, they said it about us as well. And they were right. It's a slow downward trend. And it's still continuing. Do you also see these young mothers on the streets which would just ram you with their baby buggy, because they are deeeeply involved into some toktok swiping ceremony? Addicts. What do we expect from that? > But when the written material was good enough, they…

To be fair, though, people have been complaining about the younger generations for hundreds and thousands of years. I've read accounts of newspapers and common books rotting people's minds (including the "they aren't talking to each other!" concern,) and ancient Greeks complaining about the next generation. I can't negate any specific point this way, but I do try to think about history repeating itself whenever I see…

Yes, another thing that often happens in those discussions: Someone cites Socrates with very similar complaints. To me this is not a contradiction. E.g. maybe the Socrates era has seen it going downhill as we do today, and between there were times with upward movement (maybe forced by some bigger event or development - things are complex). I don't know.

What I know is, when I talk to e.g. colleagues, the younger there are, the more they feel like materialized YT clips. And that's not a good thing. Of course I try to compensate for their younger age when I do the comparison. And of course I could be wrong, e.g. biased in some way. But I would sat that I really try to be fair, and I must be veeeery off if you say there are no such issues.

Re: Linux from Scratch

#124

I gave LFS a go earlier this year. I learned a lot through the process - but I definitely went outside the guardrails. I use NixOS as my daily driver and found myself curious of whether I could complete LFS using a "Nix" approach. I was only a basic Nix user at that time and that choice made a difficult process much more difficult. However, the declarative nature of Nix meant that I had clear notes of every step of m…

While Nix/NixOS solved RPM dependency hell and side-by-side multiple concurrent version installation issues, it created its own problems. The problem with Nix/NixOS is everything is too isolated to be configurable or usable, and so almost everything is broken because it doesn't work like any other OS. Chasing down all of the oddities and gotcha problems becomes a full-time IT job that slows everything else down, and…

You're basically just saying it's unfamiliar, and not universal yet.

In my experience, using & configuring NixOS is much simpler and easier than most distros...until it's not, at which point, yes, the difficulty curve is very steep.

Even in those cases, though, it's got the nice feature that once it's solved, it's solved. All the config is in one place, and you can apply the same config across all your hosts. You don't get those situations where you get something working after tweaking configs, env vars and systems jobs, and can't remember how to reproduce it.

And though some of the conventions around NixOS are pretty arcane and convoluted (though the language itself is pretty simple), it has the advantage that you only need to learn it once and you can use it all over, instead of switching between bash, python, yaml, toml, systemd units and even more obscure formats (nginx, apache, postfix, etc).

IMHO, the tradeoff is completely worth it.

Re: Linux from Scratch

#125
post #22
post #4

Earlier quoted context omitted.

Yep, basically. At some point you realise you could do it, but do you really want to go through it all... It's a slog. It is a fun experience though!

> It's a slog. It is a fun experience though! Aren't those two opposites?

I have a saying for this: An "adventure" is a bad trip, remembered fondly.

Re: Linux from Scratch

#126

Earlier quoted context omitted.

No. It creates a root filesystem that follows your choices of what should be included and tries to be as minimal and small as possible by default. Very suitable for embedded devices and lightweight virtual machines. You can have it build a kernel as well. I use the ability to create a cpio archive for an initramfs on the Linux boxes.

I use buildroot to make a commercial product. It builds the bootloader, the kernel, initramfs and rootfs, and then my application(s) all installed in the right place and connected to systemd. The output is a set of images that burn into their respective partitions on eMMC. If you're a masochist, there's also Yocto. It'll build your compiler and crosstools as well as the entire system image.

Buildroot will build the cross toolchain too unless you specify BR2_TOOLCHAIN_EXTERNAL, right? And likewise you can configure yocto to use an external toolchain.

A lot of the byproducts are configurable. You could configure the system to not use an initramfs, use only an initramfs/squashfs, etc. It is a really great tool with great documentation.

I agree that Yocto is a bit masochistic by comparison, but vendors like it because its primary purpose is to enable shitty vendor forks.

Re: Linux from Scratch

#127

I gave LFS a go earlier this year. I learned a lot through the process - but I definitely went outside the guardrails. I use NixOS as my daily driver and found myself curious of whether I could complete LFS using a "Nix" approach. I was only a basic Nix user at that time and that choice made a difficult process much more difficult. However, the declarative nature of Nix meant that I had clear notes of every step of m…

While Nix/NixOS solved RPM dependency hell and side-by-side multiple concurrent version installation issues, it created its own problems. The problem with Nix/NixOS is everything is too isolated to be configurable or usable, and so almost everything is broken because it doesn't work like any other OS. Chasing down all of the oddities and gotcha problems becomes a full-time IT job that slows everything else down, and…

Chasing down oddities on predictably isolated environments is much easier though. And since the environment is declarative, one can actually roll back to the previous working state without breaking other things. For that alone the learning curve of the DSL is worth it IMHO, but I am not saying that the language and ecosystem are perfect just the way they are.

Re: Linux from Scratch

#128
post #3

I really like the idea, really tried following the process several times. But each time it just turned into a copy-incomprehensible-commands-into-the-terminal exercise at some point, and I lost motivation. Did anyone experience the same?

I haven't tried this but I have used https://github.com/MichielDerhaeg/build-linux during my trainings and all my students quite enjoyed the experience. It basically builds a Kernel, libc, busybox, init etc. and gets the whole thing running inside qemu. I found it quite educational and worth the little time I spent on it.

I agree! I find systems like OpenEmbedded's Yocto to be super helpful with learning how to build Linux.

Re: Linux from Scratch

#129

Earlier quoted context omitted.

> why you need particular dependencies straight out of initramfs. It came as a shock to me to learn that initramfs is mostly optional. It can be skipped, and you can boot straight into userland.

Yes, but if I understand correctly, you’d need to configure for this specifically. I think standard configurations and installations use them.

Yes, it requires specific configuration. The reason most distributions of Linux use them is it allows you to dynamically discover and load kernel modules at boot time, and provide a fallback for if mounting the disk fails.

Re: Linux from Scratch

#130

Earlier quoted context omitted.

The first thing that pops out on Google search of NixOS is "Declarative builds and deployments." What exactly is NixOS different from other distros, such as Ubuntu?

NixOS separates packages. If the package foo contains a file /usr/bin/foo, NixOS installs it in /nix/store/67c25d7ad7b2b64c67c25d7ad7b2b64c-foo/usr/bin/foo. In order to make this separation work, Nix must sometimes rewrite binaries so that all references in the binary to /usr/bin/foo becomes references to /nix/store/67c25d7ad7b2b64c67c25d7ad7b2b64c-foo/usr/bin/foo. The advantage of this approach is that it gives more…

[dead]
Post reply on HN