r/linuxfromscratch

First global system update

First global system update

Well, I'd like to share my experience building and maintaining my LFS/myOS. A few years ago, I tried building it the traditional way, following the book, and with inexperience and an eagerness to get it done quickly, I had no problems building the LFS strictly following the book. But when I got to BLFS, I encountered the tedious and dreaded (dependency hell). After a short distance, I got bored and gave up. Finally, I decided to study more and delve deeper. Since then, after a good period of learning, testing, failures, and more study, I faced it again, but this time I developed my program manager based on my successes, problems, errors, needs, experience, and study. I managed to build my myOS system, which is now my main and only OS. After 5 attempts, overcoming the many and varied errors and problems along the way, and understanding many things that I didn't find relevant references on in a quick search, I decided to share some knowledge and not scare away anyone thinking of following this path. Creating your distro isn't difficult or complicated; it's actually tedious (it took me months to get where myOS is today). But it's been worth it; everything exceeded my expectations (and I used to be a Slackware and Gentoo user). One expectation was the learning curve, and another was the lightness, simplicity, and stability (which was my main goal). I achieved a complete system (for my use) with only 349 packages – quite an accomplishment! I trimmed it down as much as possible to achieve a balance between stability, functionality, and minimalism. I'm an old Linux user; I come from the KISS (Keep Your Hands Off) philosophy where we trimmed bits out of necessity, and today I don't have much RAM to spare. Anyway, I built my distro, and it's functional and stable. Now what? Now comes the other part of the learning process that isn't mentioned or taught: updates. How to do it? There were updates for practically more than 200 packages, including the toolchain. I thought, "I'll do it in parts." I updated the tools and libraries, everything was fine until I got to OpenSSL. I didn't have the knowledge. Regarding what would happen with ABI, I updated OpenSSL normally and suddenly, boom, curl and some programs stopped working, sudo broke, and now what? No snapshots. I used a live ISO I created of MySQL and fixed the damage. I updated the kernel (for some surreal reason), which broke GRUB (for no obvious reason). After debugging with a live ISO, I fixed it. Then I saw the need to create auxiliary programs (scripts) to debug, find the problems in ABI and .so files, and make the necessary corrections (rebuilding all the programs that depend on that ABI, which ultimately requires you to rebuild the dependencies of the dependencies to be linked correctly). So far, so good, but then what about the orphaned .so files from previous versions? Anyway, I just want to show that building an OS is easy; maintaining it is complicated, but not difficult (if you plan with automations (scripts/programs) that do the tedious part for you, and I recommend a program to take a snapshot of the entire system before updating so you don't go through the trouble I went through). I almost couldn't fix it (due to a lack of in-depth knowledge), but I'll say one thing: (the feeling of using a complete OS made and maintained by you is something few can surpass). I'm very happy with the result; everything is the way I planned, and it's functional and stable in a way I didn't imagine would be possible, haha. I just haven't updated the toolchain yet because I don't see the need for it right now. My distro is stable and a rolling release. I implemented online update support, but it's not yet functional because I need to find a way to make it work, but for now I don't see the need; a local repository is sufficient. Well, it got a bit long, and I don't want to bore you.

https://preview.redd.it/fjlq1deory1h1.png?width=1920&format=png&auto=webp&s=f4292a5aee896fafb9deac22809b2ce56e1ce6eb

The learning curve when updating the entire system was enormous and rewarding.

reddit.com
u/Due-Celery4326 — 4 days ago

Linux from scratch

Hello linux users !

I have a question i would like to ask all linux using devloper.

So, i am trying to create my own OS as my personal project using the linux vanilla kernel and i have completed the basic steps. Let me write it in an understandable format.

--- The Foundation ---

· Vanilla Linux LTS Kernel (6.6.40): Configured and compiled from source for both x86_64 (Desktop) and ARM64 (Mobile).

· Architecture-Specific BusyBox: Built two separate statically-linked BusyBox userspaces (one for x86, one for ARM64) to avoid the exec format error.

· Initramfs Boot: Successfully booted a minimal "Hello World" OS on both architectures in QEMU using a simple /init script.

----- Networking & Storage. ------

· Networking: Configured both kernels with VirtIO drivers. Successfully used DHCP (udhcpc) and manual IP configuration to ping the QEMU host gateway from both architectures.

· Persistent Root Filesystem: Moved beyond initramfs to a proper ext4 root filesystem on a virtual disk image. Files like proof.txt survive reboots.

Now, the problem i am facing is THE GUI BATTLE

(⁠╥⁠﹏⁠╥⁠)

For the gui i tried everything,

· Buildroot Setup: Downloaded and ran Buildroot, learning how to configure an embedded Linux build system.

· X11 Libraries & Apps: Successfully built the X11 library stack, twm (window manager), xterm, and xclock from source.

But here is my problem !!!!!!!!!

The Dependency War: Spent significant time trying to get the Xorg server binary working. I discovered that Buildroot's modular Xorg and KDrive server conflict, and using Ubuntu's pre-compiled Xorg requires a massive chain of dependent libraries.

At this point, i am stuck in a loop of check-reinstall-boot-repeat (⁠╯⁠︵⁠╰⁠,⁠)

SOMEONE PLS SOMEONE!!! pls help me how do I get mu initial gui ready ? I mean i don't want big gui like gnome or ... I forgot the other one but I want to atleast get started with x11 library!! How can I get it done ?

This is the common error i see

"Xorg: error while loading shared libraries: libpciaccess.so.0: cannot open shared object file:y"

And the error of shared libraries never finishes.. keeps popping at every next qemu boot.

Can you guys check me out ? I'll take your advice seriously.

u/Zander9x — 5 days ago
▲ 31 r/linuxfromscratch+1 crossposts

User lfs has All $LFS Permissions, but Make Install Fails b/c Permission Denied

TL;DR Folks here knew that although lfs had ownership of the directories listed, lfs did not have permissions to their subdirectories. Several pointed to the missing recursive flag in the chown command. Adding -R did the trick.

I was hoping it would be a small tweak like this. Thanks, all, for the lesson.

========================================

First try in LFS, permitted operation not permitted.

I'm following step-by-careful-step the process described in the LFS Handbook from the March 5, 2026 for stable systemd. Booting with the April Gentoo CD.

I have repeated the instructions many times, trying to learn along the way, for weeks. Naturally, I have to shut off down my system and resume later. As stated in the handbook, I have to remount the $LFS filesystems, recreate the lfs group and user and reconfig bash each time.

My $LFS/sources directory contains nothing but tarballs and patches. No error-created files, hidden or otherwise, have been left behind to contaminate the build.

My next step would be to zap all partitions and start from scratch, but before I do that I'm checking in here with those who have made this journey before me. Any ideas?

u/boomershot67 — 7 days ago
▲ 10 r/linuxfromscratch+1 crossposts

Need help finding a distro for a super old laptop

So I have a really old Lenovo Thinkpad T61 and its specs are :

  • Intel Core 2 Duo processor
  • NVIDIA Quadro NVS 140M / Intel graphics (idk fs but one of them)
  • 2Gb DDR2 RAM
  • SATA hard drive

I am using windows 7 on it rn and its basically super slow and i cant even use it for basic web browsing, i would like to know if using linux will help make it faster , if yes which distro do i use ? Btw it has a cd reader and writer, it wld be nice if the distro supported it as well.

reddit.com
u/Naughty_fucker1407 — 10 days ago

about /lib64 and /lib

Why /usr/lib64 is separate dir from /usr/lib? Like, if it was a symlink to it then it will be no problem at all to install libs in /usr/lib, just, for example, pkgconfig files would be pointing to ${prefix}/lib64 instead. Are there any drawbacks from doing this?

reddit.com
u/DriftCheburek — 9 days ago
▲ 16 r/linuxfromscratch+1 crossposts

I'm kind of new in Linux (I think) and need advice

All my short life (23 YO) sinve I got reasoning I was using computers, I started from pentium 2, 3, 4, AMD Athlon, I3, I5, 7, Now Ryzen 2500u and Ryzen 5 5600x, I tried a lot of thing but in windows ecosystem (completely shi) and I never change to other system cause the internet availability (I'm from latam, downloaded PVZ in Ares in that time was an achievement ) , once I tried Arch Linux (was fk awesome and frustrating) I learned a lot of things but i didnt have enough time to learn properly.

The point is: right now I wanna learn how to develop in a low level scale, how to build a kernel, how to performance a system and how to develop, but, my problem is: I'm fast learner, yet, I need some guide to learn, it was similar with english as my second lenguage when i learned the base it was so easy (I'm still learning btw).

Just I need advice and tips in how to become into a capable person in this environment.

(Rn I mount a multi boot system with Fedora, Ubuntu and Windows 11 LTSC and im preparing a VM to try LFS)

Thanks in advice

reddit.com
u/Overall-World-4254 — 11 days ago
▲ 41 r/linuxfromscratch+1 crossposts

I finally finished my LFS/BLFS, which actually turned into myOS with a custom program manager called mypkg And I'm very happy with the result.

I finally finished my LFS/BLFS, which actually turned into myOS with a custom program manager called mypkg (written in bash). After studying three LFS builds following the book, I understood the need and importance of a program manager and wrote mypkg based on the successes, errors, and problems encountered along the way. Following the book didn't give me any problems, but automating with mypkg presented several varied issues. However, in the end, it was worth it. I'm very happy with the expected result of my system with Hyprland, Waybar, Awww, Firefox... in short, a complete system for my daily use.

https://preview.redd.it/xon9fl4k1j0h1.png?width=1915&format=png&auto=webp&s=17bd7e98dfccc95cc3b01d37332dcd2582f547ba

reddit.com
u/Due-Celery4326 — 11 days ago

LFS and gcc 16.0

Hello. I'm trying to start a new LFS installation, and had trouble compiling gcc for the cross compilation toolchain, in section 5.3 of the Book (while I succeeded a few weeks ago) . I now believe the problem is an upgrade to gcc 16.0 pushed by Arch (that I use as a host) a few days ago. Compiling the version 16.0 instead of 15.2 seems to work, but I'm not very far in the book yet to be sure there are no further problems.

reddit.com
u/Cheap-Opportunity338 — 11 days ago

Any interest in creating a special-purpose embedded distro?

Hey folks, sorry if this isn't the place to ask but I figured if anybody would be interested in this it would be y'all.

Starting this summer, another dev and I are planning to start a free and open source voxel game that attempts to balance deep simulation with approachable gameplay- and we're gonna need some help.

For most people, it's just going to be a fun game. But my real goal, 'secretly,' is to lead as many normies over to FOSS as possible.

Now, seeing as how this game takes place on a spaceship, I've been thinking for some time that it ought to have an LCARS-inspired in-game computer system, which for a while I figured we should just worry about later.

But the other day, it hit me: 'what if the-in game operating system was actually a *real* linux distro? I realize that sounds like an over-the-top amount of work, but it would nicely create the perfect breadcrumb trail for us:
gamer gets the game on steam --> plays game ---> starts using in-game computer system ----> 'holy smokes there's a real version of this?? Gimme gimme! --> Boom, new FOSS-head.

There will be some significant challenges though- for starters, I have a .txt doc with about 80 novel/seminovel UX ideas sitting on my desktop, lol.
Additionally, the embedded OS has to be as performance friendly as can reasonably be achieved, since the base game will likely be pretty performance intensive.

Oh, and did I mention that I have plans to try and re-unite the long estranged TUI and GUI frameworks? Yea again, I know it sounds over the top- but I think that particular split is actually one of the main barriers that trips people up on their journey to full-stack development.

The neat thing about it being a real distro though, is that we can actually create a version of the game that players can boot directly into, allowing them to really juice their machines for maximum performance.

I'm going to be completely honest with you guys, I'm still Minty-fresh on linux, and I've actually shipped any production grade code- but this other dev? She's the real deal. I actually think if we can get just a few more serious devs to help get this off the ground, we might have something really special. (I'm open to commissions/hiring down the line, by the way.)

My next steps, personally, are to do a little git practice, and then make the aquarium on late.sh as a warmup to TUI development. Ideally, at that point, I'd like to get started on the OS, and develop it in parallel with the simulation kernel. (We'll be using Luanti as the rendering engine, btw, at least for now.)

u/Wranglyph — 12 days ago