this post was submitted on 02 May 2024
187 points (99.0% liked)

Linux

48090 readers
897 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

For those of you who don't know, Linux From Scratch is a project that teaches you how to compile your own custom distro, with everything compiled from source code.

What was your experience like? Was it easier or harder than you expected? Do you run it as a daily driver or did you just do it for fun?

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 6 months ago

Before the ArchLinux wiki became as good as it is, people like me used the Gentoo and LFS wikis as documentation for Linux.

There isn't quite enough time in the world for me to be able to use LFS in anger as much I would wish. We make do with source distros with source managers like Gentoo (surprise!), Funtoo and others which give the source distros users just enough helping hands of dependency management.

Real tears would be shed were for LFS to disappear.

[–] [email protected] 4 points 6 months ago

New machine arrives next week. LFS is on my TODO list for it.

[–] [email protected] 6 points 6 months ago

I have never done Linux From Scratch but I have been using Linux long enough that I remember that is how things were. Compiling the kernel was pretty routine. Getting XFree86 up and running could be true black magic though. You were literally controlling how the electron beam moved across the screen.

One of my systems is running Red Hat 5.2 ( not RHEL - the pre-Fedora Red Hat ). I think it has GCC 2.7.2 on it.

For some reason, I want to get a recent kernel and X11 running on the Red Hat 5.2 box. It would be cool to get Distrobox running on it while leaving everything else vintage. I had been thinking that LFS might be the right resource to consult. This article will hopefully kick me into gear.

[–] [email protected] 7 points 6 months ago (1 children)

TIL this is a thing. I started doing that over 30 years ago with SLS and Slackware when that was the only choice.

This was pre-PnP (also pre-JPEG!), so you had to know all the addresses, IRQs, DMA info, etc, of your hardware or you'd get... unexpected results. make it and they will come...

After countless distros and flavours over the years, I still use Debian for servers and now use EndeavourOS for desktop/laptops.

[–] [email protected] 1 points 6 months ago* (last edited 6 months ago)

This was pre-PnP (also pre-JPEG!), so you had to know all the addresses, IRQs, DMA info, etc, of your hardware

Thanks for that flashback.

[–] [email protected] 7 points 6 months ago (1 children)

NCommander did it for a Christmas charity stream a few years back: https://www.youtube.com/live/tCh0XjyIAKU

[–] [email protected] 4 points 6 months ago

Here is an alternative Piped link(s):

https://www.piped.video/live/tCh0XjyIAKU

Piped is a privacy-respecting open-source alternative frontend to YouTube.

I'm open-source; check me out at GitHub.

[–] [email protected] -2 points 6 months ago (3 children)

imo, that is like learning a new language you'll never use -- who on earth would search for new employees that can compile their own distro? It's fun at first, but definitely not useful.

[–] [email protected] 2 points 6 months ago

that is like learning a new language you'll never use

That sounds great, I always wanted to learn Latin and even French, or really every language if I had the time.

new employees

You must be fun at parties. There are reasons to do things besides pleasing the man y'know.

[–] [email protected] 4 points 6 months ago (1 children)

It’s fun at first,

You answered your own question.

[–] [email protected] -2 points 6 months ago (1 children)

Being fun does not make (thing) a necessity let alone useful -- there are a lot of useless things that are fun.

[–] [email protected] 1 points 6 months ago

Do you really need me to teach you that people do fun things as well as useful things?

[–] [email protected] 6 points 6 months ago

The xz backdoor hidden in precooked blobs would like a word with you.

[–] [email protected] 10 points 6 months ago (1 children)

It was a lot of fun for me. I did it without a virtual machine (would not generally recommend) on a older laptop I wasn't using anyway. I wasn't very successful in the end however. My own built kernel couldn't produce any vga output. I tried to fix it for a handful of nights, but in the end gave up and called it good enough :P So I might comeback to it later to fully complete an installation.

But it was good learning oppertunity. It showed that just compiling a version of the Linux kernel isn't very complicated. It even comes with a very nice TUI to select your build options!

[–] [email protected] 1 points 6 months ago

The kernel is what about did me in with a Gentoo install forever and a half ago, that part alone I think I fought with for a week before I got everything working

Great learning experience though, I agree

[–] [email protected] 3 points 6 months ago

Didn't know about this, might give it a try later on, thanks for sharing 🌻

[–] [email protected] 24 points 6 months ago

I've done it before. It's not particularly difficult, just very time consuming. And at the end, you're left with a distribution that's not really that useful without repackaging everything you did into a package manager so you can do updates without borking it.

Great as a learning tool to see how the whole GNU/Linux stack works, but not something you'd use practically.

[–] [email protected] 15 points 6 months ago (1 children)

Its on my bucket list. Maybe a fun project after I retire

[–] [email protected] 7 points 6 months ago

“Welcome to the first day of the rest of your life”

[–] [email protected] 11 points 6 months ago

Did it about 10 years ago. Didn't really understand half of what I was doing at the time but it was a fun way to spend a weekend 😁

[–] [email protected] 28 points 6 months ago (2 children)

I did it, learned a lot. But it's not really a system that can be maintained very easily. You don't even have a package manager. :)

[–] [email protected] 6 points 6 months ago (1 children)

Back when I did LFS I dealt with this by giving each package an /opt prefix, symlinking their respective bin/, sbin/, lib/, man/ and so on dirs under a common place, and adding those places to the relevant system integrations (PATH, /etc/ld.so.conf etc.)

I put together a bash script that could manage the sumlinks and pack/unpack tarballs, and also wrote metadata file and a configure/make "recipe" to each package dir. It worked surprisingly well.

A handful of packages turned out to be hardcoding system paths so they couldn't be prefixed into /opt (without patching) but most things could.

[–] [email protected] 8 points 6 months ago

You were on your way to reinventing Gentoo

[–] [email protected] 2 points 6 months ago (1 children)

Do you even have binary packages?

[–] [email protected] 9 points 6 months ago* (last edited 6 months ago)

There's no level of package management, binary or source. There's no practical way to uninstall or upgrade. It's a toy for learning about Linux, which is great, but don't expect it to have anything else.

Edit: I seem to remember some third party package managers, but then you're going beyond the base level documentation. And at a certain point, then you might as well just use a distro. If you want to have a very minimal package manager so you can learn about package managers, sure, it's a learning tool.

[–] [email protected] 2 points 6 months ago

I did it for an old K6-2, optimizing everything possible. It was fun.

[–] [email protected] 3 points 6 months ago

It’s a good time. I built it for a little laptop that was too small for anything else. Cross compiled the binaries on a normal computer.

[–] [email protected] 5 points 6 months ago

Yes, back in the early 00s. We toyed with making a net-bootable image with it for our computer labs, but it was really not practical. It definitely taught me a ton about systems, though.

[–] [email protected] 14 points 6 months ago* (last edited 6 months ago) (1 children)

I did it during the gcc 3 transition. I used a very new gcc 3 (maybe even pre-release), which wasn't at all recommended. A couple of (most?) C++ packages didn't compile (some change having to do with namespace scope), which meant I had to fix the source of some packages (generally pretty trivial changes, usually having to prepend namespace:: to identifiers). Overall this problem was pretty rare, like it affected less than 1% of C++ files, but with things like Qt or Phoenix (or whatever Firefox was called back then), with thousands of files, I had to fix dozens of things. I guess running into problems made it more interesting and fun actually.

Did I learn anything? The main thing I learned is about all the different basic packages and what sort of binaries and libraries are included in them and why you need them. Also about some important config files in /etc. And a bit of shell experience, but I dare say I knew most of that stuff already. How much you learn depends a lot on how much you already know.

Overall what I learned was not very deep knowledge, nor was it a very time-efficient way to learn. But it was a chill learning experience, goal-oriented and motivating. And it made me more comfortable and confident in my ability to figure out and fix stuff.

Also it's obviously not practical to keep that up to date, so I switched back to a distro after a couple of months of this.

[–] [email protected] 3 points 6 months ago

I found it was useful for learning bits and pieces of the extra knowledge around working on a Linux system. Yeah, you're not going to learn how a kernel works or how anything about data structures. But you will learn how to apply a patch, be exposed to a lot of work with the shell, and come to appreciate the work that goes into a modern distro.

[–] [email protected] -2 points 6 months ago (1 children)

Has anyone here ever tried punching themselves in the dick repeatedly?

[–] [email protected] 4 points 6 months ago (1 children)

Yes, I tried installing arch before.

[–] [email protected] 1 points 6 months ago

you masarchist

[–] [email protected] 14 points 6 months ago

That is just the gateway drug to bootstrapping.

Check out https://github.com/fosslinux/live-bootstrap

if you want the real hard stuff.

[–] [email protected] 6 points 6 months ago

Did it to learn. Mostly because I had no wifi / internet at home during the time, but did have a burned CD and a book. Was useful, but when I started using Linux as a daily driver I went straight to Ubuntu, and later Fedora

Do recommend for learning and tinkering though.

[–] [email protected] 7 points 6 months ago (1 children)

I did a long LONG time ago. I don't even remember so I'd say 20 years ago. It was very interesting. I do recommend doing it at least once... well maybe only once actually. If possible do it on a real computer, not a VM, so that you don't get distracted and feel just a bit of risk. Obviously do NOT do it on your main computer where you have important data, just in case.

[–] [email protected] 5 points 6 months ago

PS: I do build some things from scratch, including "big" ones like Firefox. I do it because I can prototype with them by modifying just the bits I need. I do like learning how things are made. That being said I don't think it's valuable as an entire system, only on a need to do basis. The true benefit IMHO is the learning, not the running system, so no, not at as a daily driver.

[–] [email protected] 6 points 6 months ago (1 children)

The consensus seems to be: go for it for the learning experience.

[–] [email protected] 7 points 6 months ago (1 children)

I would agree. It's useful to know all the parts of a GNU/Linux system fit together. But the maintenance can be quite heavy in terms of security updates. So I'd advise to do it as a project, but not to actually make real use of unless you want to dedicate time going forwards to it.

For a compiled useful experience gentoo handles updates and doing all the work for you.

[–] [email protected] 6 points 6 months ago

Gentoo's USE flags are fuckin' amazing.

load more comments
view more: next ›