Live data from Hacker News

Linux from Scratch

linuxfromscratch.org

61–70 of 86 posts

Re: Linux from Scratch

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

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.

>Learning how to compile packages manually it was a common skill long before Linux came to be

Right. I used to compile many open source packages from source on many flavors of Unix back in the day, for years. Perl, Python, MySQL, many others. Miscellaneous utilities. Esoteric languages. Even Oracle, once, on a Unix server, right at a large manufacturing company site. Even building Unix kernels from source was common on some Unix versions. And not just for a regular install. Many times, (re)building Unix kernels from source, was the only way to get some software packages or hardware devices or peripherals, like printers or terminal controllers or even hard disk controllers, to work on the system. Typically you would edit some config files or settings files manually, change values of params, or in some cases use a TUI to do that, and then rebuild via a makefile. You had to save the old kernel in case the new one didn't work, and if so, lather, rinse, repeat, till everything did work.

And that practice was nothing special. A lot if people did it routinely. Most, in fact, I'd say. Talking about devs and sysadmins here, not end users, although some of the latter probably did it too.

Many apps, tools and utilities came as source code, often in a .tar or .tar.gz file. You would untar or gunzip it into a new directory, and do your stuff, running makefiles, other shell commands, setting env. vars., etc.

Re: Linux from Scratch

#64
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…

Agreed, it's near the end of the Gentoo installation as well. If you forget to install GRUB, just chroot back into it and continue.

If I installed the bootloader first, I'd have to remember to run dracut after the system was installed. Or I install it last, create the init at the same time and make a habit of it.

Re: Linux from Scratch

#65
I m very happy I started years ago with Gentoo which is also from scratch but with a package manager ones your system is up ( couple of days). You learn so much just starting from zero and understand choices you can make on that journey. In the end I stopped using it though, way later when the Gentoo hype was over though. Getting stuck into dependency loops wasn't productive anymore.

Re: Linux from Scratch

#67
I remember using LFS’ predecessors to build 1.44MB “rescue” floppy disks with Linux 2.0 in the 1990s. Tweak the config so it could fit on there along with a small userland. I don’t even remember if busybox was around back then.

It used to be a teenager’s rite of passage to build your kernel config, figure out LILO (remember that, pre-grub!), ipchains.. talk about feeling old!

Re: Linux from Scratch

#68

Earlier quoted context omitted.

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

"works" is a loaded term. LFS is how the rubber meets the road, you want how the rubber is made, for that you need something like https://www.baeldung.com/linux/processes-guide or https://linux-kernel-labs.github.io/refs/heads/master/lectur...

Re: Linux from Scratch

#70

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

Exactly my experience. Back in the day when all I knew was Windows and a couple of BSDs I wanted to get into Linux, because it seemed like it was going to become very relevant in the next decades. After years of slacking I thought LFS would probably be the ideal choice. Turned out it wasn't, at least for me. I ended up "learning Linux" with distros like Gentoo, Arch and later even Ubuntu, and by just replacing my production systems with Linux, which were still running on OpenBSD mostly. I have revisited LFS a couple of years ago and honestly didn't take much from it. I get the appeal, but it's not for everyone.

Post reply on HN