Live data from Hacker News

Linux from Scratch

linuxfromscratch.org

141–150 of 164 posts

Re: Linux from Scratch

#141
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 grabbed a random page from the manual: https://www.linuxfromscratch.org/lfs/view/stable-systemd/cha... Every step is explained and every used parameter is documented.

> Every step is explained and every used parameter is documented.

That’s almost the exact opposite of the truth, and your example demonstrates his point. Almost none of the commands—let alone their parameters—are explained, beyond a high level summary of what the goal of the step is.

Is this phenomenon the explanation for why almost all documentation sucks? Experienced developers delude themselves into imagining that their docs have a level of detail and explanation that they simply just don’t have?

Re: Linux from Scratch

#143

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…

oh, fun, I was planning to do the same thing!

Re: Linux from Scratch

#144
post #89

Earlier quoted context omitted.

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…

Extremely noob here, I was trying nixos and got real confused about how to install python packages as pip was not allowed at system level.

The correct answer, whatever distro, is to either use the system package manager or use python's venvs. Mixing multiple package managers in a given area of the filesystem is a recipe for breakage.

Re: Linux from Scratch

#146
post #63

Between LFS and Stage 1 and 2 Gentoo installs back in the early 2000s during High School, this gave me a big leg up in my journey of learning about computers and Linux. I can't thank those project maintainers enough for helping me get my footing at such a young age and peaking my interest in computing. I ended up printing out the LFS book in segments on one of the printers in High School and brought it home in pieces…

Same here, the amount of times I did gentoo stages from knopix live cd's is too much.

Re: Linux from Scratch

#147

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.

It doesn't really need specific configuration. Most linux kernels will boot if not given an initramfs and just a root= command line. The main thing is whether enough kernel modules are compiled in to find and read the disk and filesystem.

Re: Linux from Scratch

#148

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…

Why did you need to chmod every ~2,600 files? man pages, docs, includes. Why not chmod -R or something?

https://github.com/cloudripper/NixLFS/blob/64e333f60cca4bec5...

Re: Linux from Scratch

#149
post #33

Earlier quoted context omitted.

You would start with LFS to build a base and then add your own package manager to make a “true” distro. If you want to just build an existing distro from scratch then they all have ways of doing that as they need to rebuild packages regularly. Eg: It’s a lot simpler to build a fedora image from scratch by using Koji/OSBuild vs LFS as Koji/OSBuild basically automate the whole LFS process. Additionally in order to have…

I wonder if some sort of “BSD from scratch” would be a more fruitful exercise. Since they include more of the overall system, you’d end up with something approximating a regular BSD install pretty well at the end.

I think the cool part about kernel + busybox type sandbox is that you can get a working system with only 2 binaries and doesn’t even need a cross-compiler.

when I was playing with this stuff the hardest part for me was getting my head around:

1. why do I need a cross-compiler if my system has a compiler already??? 2. why do I need to compile the compiler twice??

And well it turns out you don’t really need these steps but they’re required as part of the bootstrap process for GCC/glibc itself.

Re: Linux from Scratch

#150

Earlier quoted context omitted.

I wonder if some sort of “BSD from scratch” would be a more fruitful exercise. Since they include more of the overall system, you’d end up with something approximating a regular BSD install pretty well at the end.

I think the cool part about kernel + busybox type sandbox is that you can get a working system with only 2 binaries and doesn’t even need a cross-compiler. when I was playing with this stuff the hardest part for me was getting my head around: 1. why do I need a cross-compiler if my system has a compiler already??? 2. why do I need to compile the compiler twice?? And well it turns out you don’t really need these steps…

How is Busybox security and bugginess-wise? I’m always worried about going off the beaten path, but I guess the busybox path is pretty beaten by cloud folks and those sorts… who are actually operating in a much more hostile environment than my desktop.
Post reply on HN