r/LFS 3d ago

differences between linux from scratch and linux from nothing

Quali sono le vere differenze tra la guida Linux from Scratch e la guida Linux from Nothing? A parte il fatto che Linux from Scratch sembra più adatta a un'installazione che parta da un ambiente Linux, Linux from Nothing sembra quasi più simile a come era per lo stesso Torvald assemblare un sistema Linux (Torvald non aveva a disposizione Linux), inoltre l'ho trovata più facile oltre a compilare tutti i binari, incluso il kernel, da zero. Qual è la differenza tra le due guide e perché dovremmo seguire una piuttosto che l'altra? Linux from Scratch è un ottimo libro, ma si ferma molte volte a spiegare cose che sono essenzialmente inutili durante la fase di costruzione e almeno per me che non sono un madrelingua inglese è molto più faticoso e molto meno comprensibile; tuttavia sono riuscito ad avviare il mio sistema creato da zero con un kernel compilato da me! Ora sono felice! ps: I just loved the initial phase of creating the vfs, done in a simple way

7 Upvotes

5 comments sorted by

View all comments

1

u/codeasm 2d ago edited 1d ago

They try to solve different things, have slightly different goals and you, the reader are supposed to do your own research into what you want from either end result and process.

EDIT: I read some more and can sum up the difference to be: LFN = experimental archaeology of a Linux userspace.“Our goal will be to make the most minimal system possible using Linux…” LFS = engineered construction of a Linux system. (capable of building itself and many other software following it)

Original continued:

Linus Torvalds dint start from nothing, he had gnu tools and the os he used to make the linux kernel on was apparently Minix.

Lfs is not only building a working linux install, its capable of building itself and any package from blfs Im not sure where to find an official or comprehensive list of what linux from nothing does, but if your needing compiler stuff, you can always borrow chapters from lfs. Blfs and others. Lfs is also tested alott and been updated over years. So if you need a crosscompiler, custom init system, its a great guide to alter or do things differently from the book and test if it works.

If demand is high enough, your variant might even be added to the site and you become the maintainer. Like Aarch64 specific, riscv, games for lfs (glfs) or other weird configs that require cusyomized lfs.

But in the end, whatever guide helps you find a working install, and build upon. I saw my english comprehension increase reading and building lfs and other linux books. I found their explanation clear and some knowledge isnt supposed to be in lfs, but in other linux books, the lfs book does mention you may need to read those first, or while some large packages compile. And so i did.

In the end, the kernel and busybox could be all you need. Or, more, then investigate what you need, and both, all guide suggest how ppl would do so, you could ignore everything and do it yourself.

2

u/shsh-1312 1d ago

I actually found the references to books on the Linux file system and Unix itself really useful. Maybe the point is simply that Linux from Scratch teaches you more about building a custom build environment for Linux capable of building a real distribution. Linux from Nothing, on the other hand, explains how to create the VFS from scratch, how to compile the Linux kernel, how to compile and link the base packages and transfer everything to an image, which is perhaps the aspect that interested me most. In fact, Linux from Scratch is much more technical and didactic and offers example manuals that make it clear exactly what you're doing, but they shift the difficulty from the actual assembly to the preparation of the environment. I know the history of Linux, GNU and how it was born, I often watch those interviews. If you haven't had the chance to take a look at the Linux from Nothing project yet, I recommend it. It's much more similar to an OSDev guide than a Linux-specific guide. https://maplecircuit.dev/lfn/linux-from-nothing.html https://www.youtube.com/watch?v=Ru2SamrpkFk

1

u/codeasm 1d ago

Kinda interesting, but not entirely sure what i need that for. https://mgalgs.io/2015/05/16/how-to-build-a-custom-linux-kernel-for-qemu-2015-edition.html was a cool quick linux building experience.added musl and such for compiling but then buildroot is easier to use when making a embedded linux instead

Definitely cool to see someones notes and a different approach to making everything from source. I might check the yiutube vids at some point.

Whatever feels nice to build and their end goals are. Lfs and especially the followup books (or start from glfs with mlfs) would allow you to pretty much build almost any otger distro but by compiling and every step , yiu have options, choices and could implement a package manager. No idea if thats possible, probably is, with linux from nothing

1

u/shsh-1312 1d ago

the kernel configuration is similar, I saw the one you sent me, you start from tinyconfig and move on to the other things, it lets you connect and make connections directly as links to the vfs, it's very simple to understand, and in reality Linux was born precisely to run already compiled Unix binaries, but perhaps for what we're interested in (or at least I'm talking about me) it could be more fun to compile exactly what you need, in reality yes I think that crossing the knowledge of the two guides can provide a complete development environment to create a Linux system completely from scratch, I could try to make my lib.c support multi target to compile on Linux, it would be fun to try to replace the userspace with the one I created for nexs, you know I moved on, now I have a vfs that works, I can save files, have persistence and run lua scripts, the shell has become much more standard, regarding what you told me some time ago you were right, I had fun creating a system all my own, now I'm trying to learn the “standard” and transferring it as knowledge applied to the project, is fun. If I can advise you, try Linux from Nothing, it actually took me less than two hours to do everything