Live data from Hacker News

Linux from Scratch

linuxfromscratch.org

101–110 of 117 posts

Re: Linux from Scratch

#101

Earlier quoted context omitted.

I can't understand what is the point you are trying to make

until very recently you couldn't even do OS development without a boot loader, so asserting that that would be the last thing you would write is just nonsensical

Let me rephrase.

We already have a bootloader.

"Linux from scratch" involves Linux, not Libreboot, not Grub (just to mention instances of BIOS/UEFI and bootloader).

We already have means to test the new OS.

What I meant with my previous post is "newer" bootloader (which are actually pretty old, like grub), came after OSes passed a certain complexity.

Previously we technically had bootloaders, but they were interactive, mostly.

Am I misremembering?

Re: Linux from Scratch

#102
For me, BSD and Portage was my intro to "you're gonna need to learn how to compile stuff". But Gentoo Stage 1 was my real intro into how to bootstrap Linux. I had been using it for about 6 years at that point. (RedHat/Mandrake/TurboLinux/Caldera/Slackware/Debian-based stuff) Starting at nothing but a partitioned disk felt crazy. But I learned so much that not much in the Linux realm scares me these days. It made installing Arch back in 2011 a walk in the park.

Re: Linux from Scratch

#103

Earlier quoted context omitted.

Except you can write bootloader only if you have something to boot. Bootloaders as we know them came after OSes, because the need of a bootloader is to boot something. Following your logic of building a piece only if needed, a bootloader should come after. I like the recipe analogy and I actually think adding things only if needed will help cutting unuseful features and possibly to have different implementations for…

You probably want to use a working bootloader to see if your ‘hello world’ OS-fragment works at all. No one is writing much OS without running it, surely.

"Linux from scratch" involves Linux, not Libreboot, not Grub (just to mention instances of BIOS/UEFI and bootloader).

We already have means to test the new OS.

There is real point in writing a new one until the OS is complete, is there?

Re: Linux from Scratch

#104

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…

> only adding new things once you’ve discovered a need for them.

Agree! imo this is the guiding principle that makes great tutorials great.

Re: Linux from Scratch

#105
post #71

Earlier quoted context omitted.

Except that if you fail to install the bootloader - which happened to me many times - then you do not have a working system. So really the prior argument makes sense. IMO the guy is right - LFS could be way better. But it has this current structure and does not deviate from it. That's the bad part. > If you do things step by step incrementally, you keep having to go further back in the process. Starting over repeated…

If you're going to run the OS, you have to make sure it compiles and runs the bootloader and its installer. The toolchain could be different enough for that to fail. And you do boot into a reasonably small OS and continue from there. That's what BLFS is all about.

TBH, though, the only lesson you learn from BLFS is that value of package managers.

If you like the idea of everything being purpose built for your computer, then after you do LFS you should switch to gentoo.

Re: Linux from Scratch

#106

Earlier quoted context omitted.

You probably want to use a working bootloader to see if your ‘hello world’ OS-fragment works at all. No one is writing much OS without running it, surely.

"Linux from scratch" involves Linux, not Libreboot, not Grub (just to mention instances of BIOS/UEFI and bootloader). We already have means to test the new OS. There is real point in writing a new one until the OS is complete, is there?

If you’re satisfied using a third party bootloader, and one exists, there’s no point writing one ever.

Re: Linux from Scratch

#107

Earlier quoted context omitted.

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

>LFS is how the rubber meets the road

Again I disagree. Way too much time is spent building software than actual practical OS development.

Re: Linux from Scratch

#108

Earlier quoted context omitted.

> I did it once manually over a couple of days. Sounds like a speedrun of the tutorial. How did you approach packaging then and what system did you use to compile everything? I did the tutorial in the late 2000s I think and it took me 4-6 months if I remember correctly. At the time I wasn't completely new to Linux but setting up things like the boot loader was quite tricky for me. For me the main motivation was getti…

It is possible to do it over a few days really, even with not too much knowledge. Requiring four months seems as if it was a side project, which is of course totally fine, but for any main task it really should not take more than a few days, even on a semi-slow computer (well, depends on how slow).

Well as mentioned it was in the 2000s. Compiling KDE alone took several days. Also there was no automation/script, so you really had to go to ftp.gnu.org and look in which folder the coreutils package is ;) I realize there's now a list of packages with checksums

Re: Linux from Scratch

#109

Earlier quoted context omitted.

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

>LFS is how the rubber meets the road Again I disagree. Way too much time is spent building software than actual practical OS development.

LFS is not OS development. You build a distribution by assembling all the components. If you want to develop an OS from scratch, perhaps you're looking for osdev.org.

Re: Linux from Scratch

#110
post #57

Earlier quoted context omitted.

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.

As someone who started using Linux in 1996 (Slackware, of course), I learnt the hard way about compiling packages. I remember trying to compile the kernel, and doing "make config" and following hundreds of options, and not knowing that I then needed to do "make" or "make zimage" or "make install" after any of the config stuff. Obvious, dumb, rookie errors, but still understandable for a teenager coming from Windows.…

Your experience sounds exactly like mine. I downloaded Linux 2.6 which took 2 days to compile. Then when I installed it on my Slackware system completely hosed it. But learned so much…
Post reply on HN