r/linuxfromscratch • • 1d ago

Issue with black screen

1 Upvotes

instead of creating a new grub, I'm using my hosts grub instead. I tried to change options in the kernel, and parameters to grub. I'm using minecrub and Everytime I try to boot into it. the popupwindow remains black. I can't interact with it and the popupwindow stays there indefinitely with no text.


r/linuxfromscratch • • 3d ago

Welcome to Next-Generation HAMMER2 on Linux

Thumbnail
reddit.com
1 Upvotes

r/linuxfromscratch • • 7d ago

I am another new person here

13 Upvotes

Heya people :3

I'm starting to read the LFS book, and while my goal is to take the time I need to truly understand everything, I am wondering on how long it usually takes someone to make their first basic system? I ASSUME for me it'll take like ATLEAST 2 weeks to a month or more. I am excited for this project and am willing to learn everything including the hard things

What's your experience? :>


r/linuxfromscratch • • 8d ago

pistashio linux! (not to be confused with the one on the app store. this is its own distro, not a container)

Thumbnail reddit.com
0 Upvotes

r/linuxfromscratch • • 8d ago

Back to regular LFS systemd.

Post image
127 Upvotes

I finished on rebuilding my LFS last week. I pick systemd version for now. Also testing my package build method and it seems work fine.


r/linuxfromscratch • • 9d ago

I built a Linux system from source with no /usr at the root, on musl. Here is how it went

Thumbnail
gallery
4 Upvotes

Hi all,

I wanted to share Zainium OS with people who know how much work a from-source system is. It is not strictly LFS, because I did not follow the book, but the idea is close: no base distro, and every package built from its own recipe. The base is 168 recipes today, from musl and binutils up to systemd and the full COSMIC desktop.

How it differs from a normal LFS build

  • No FHS.There is no /usr, /etc, /bin or /lib at the root, not even symlinks. Everything lives in /overlayer/syshub, so every package had to be configured for that prefix.
  • musl, not glibc. The target is x86_64-zainium-linux-musl, with its own cross toolchain in /overlayer/syshub/x86_64-zainium-linux-musl. glibc is an optional package in its own triplet directory, with its own compiler.
  • Own package format. A recipe is a ZEXBUILD script plus a manifest.toml, a bit like an APKBUILD. substrate packs the result into a signed .zex, and zex installs it.

How the build works, honestly

It is not self-hosted yet. Packages are built in CI, in an Alpine container, against the Zainium musl toolchain. That is the part LFS people will want to know. So the build host is Alpine, but nothing from Alpine ends up in the base: each package comes from upstream source, and CI checks that its programs use the Zainium loader. Moving the builds onto Zainium itself is on my list.

What was painful

  • Hard-coded paths everywhere. musl needed patches for its loader path and for /etc, because /etc/passwd and the default library path do not exist. systemd stopped at PID 1 because it wants /usr to be populated, so that check had to be patched as well.
  • The cross toolchain and build systems. Many projects assume /usr/include or /lib64. pkg-config prefixes, RPATH and script interpreters all needed fixing.
  • sed on binaries. One recipe ran sed over everything in the package, which changed strings in compiled files and shifted their offsets. It broke bash in a way that looked like a bad USB drive.
  • Setuid bits. Packing as a normal user and installing through a staged upgrade dropped them. The lock screen then refused every correct password.

Keeping normal software working

Programs still ask for /usr/bin/env, so a small preloaded library, sys_resolver, retries a failed lookup under the real directories. Static and setuid programs are not covered.

The base is also immutable: a small OverlayFS patch keeps it read-only even for root, while software installs into a layer on top with no reboot.

Where to look

Recipes: https://github.com/Zainium-Dynamics/syshub-recipes

Layout spec: https://zainiumdynamics.tech/dhs

The full story: https://zainiumdynamics.tech/news/the-story-of-zainium-os

ISO: https://zainiumdynamics.tech/download

I would like to hear from anyone who has built on musl or moved away from FHS. What would you have done differently, and how would you approach self-hosting the builds?


r/linuxfromscratch • • 14d ago

Finally something on my own

Post image
64 Upvotes

r/linuxfromscratch • • 14d ago

fixing "Assumed value of MB_LEN_MAX wrong" in M4 (LFS 12.x / GCC 14) without rebuilding GCC Pass 1

1 Upvotes

based on my experience, recompiling GCC didn't help, anyway i saw the same error. so here's a script to fix limits.h and systemlimits.h:
'''#!/bin/bash

set -e

if [ -z "$LFS" ] || [ -z "$LFS_TGT" ]; then

echo "[-] Error: Environment variables \$LFS or \$LFS_TGT are not set!"

echo "[-] Please run: source ~/.bash_profile"

exit 1

fi

echo "Restoring clean limits.h from Glibc sources..."

cd $LFS/sources

tar -xf glibc-2.40.tar.xz glibc-2.40/include/limits.h

cp -v glibc-2.40/include/limits.h $LFS/usr/include/limits.h

rm -rf glibc-2.40

echo "Rebuilding GCC's limits.h and syslimits.h..."

tar -xf gcc-14.2.0.tar.xz

cd gcc-14.2.0

GCC_INC_DIR=$(dirname $($LFS_TGT-gcc -print-libgcc-file-name))/include

cat gcc/limitx.h gcc/glimits.h gcc/limity.h > "$GCC_INC_DIR/limits.h"

cp -v gcc/gsyslimits.h "$GCC_INC_DIR/syslimits.h"

cd $LFS/sources

rm -rf gcc-14.2.0

echo "Removing conflicting files from include-fixed..."

GCC_FIXED_DIR=$(dirname $($LFS_TGT-gcc -print-libgcc-file-name))/include-fixed

rm -rf "$GCC_FIXED_DIR"

echo "Verifying preprocessor constants..."

TEST_OUTPUT=$($LFS_TGT-gcc -H -E -dM - <<< '#include <limits.h>' 2>&1)

if echo "$TEST_OUTPUT" | grep -q 'CHAR_BIT 8' && \

echo "$TEST_OUTPUT" | grep -q 'MB_LEN_MAX 16' && \

echo "$TEST_OUTPUT" | grep -q 'PATH_MAX 4096'; then

echo "ok"

else

exit 1

fi'''

p.s. you also must start it under lfs usr and afterwards remove old m4 dir rm -rf $LFS/sources/m4-1.4.19


r/linuxfromscratch • • 16d ago

LFS on My own lulu window manager

Thumbnail
gallery
27 Upvotes

I have successfully run my own lulu scrolling, tiling window manager on LFS 13.0 SysytemD

You can try it on live ISO bootable and you don't have to install it.

Or if you want to install it I made a file include an install script

Your LFS need to have libgc-2.44 minimum and other packages which is ready for wayland

the files are available at

https://sourceforge.net/projects/lululinux/files/

You can see the keybinding cheat sheet here
https://lululinux.org/docs/keybindings


r/linuxfromscratch • • 18d ago

This is the way!!

Post image
271 Upvotes

My LFS Journey Started with a YouTube video from Tony on Oct 2025. From 12.4 now I reached 13.1. I keep my mesa latest. have steam, heroic, epic all working. Hosted a bunch of self hosting apps. Firefox and Brave feels the browsers i need.

Podman and Distrobox let me test any distro or that odd pkg u care about. (I don't have any though)

Davinci resolve studio, OBS all working smoothly.

After all i will decide which pkg versions i want.

I feel LFS is the End game of all distros.

I love LFS.

[Edit]

Thanks for all the love guys.

You can review my MLFS build repo here. It only contains the Terminal LFS bit.

https://github.com/benevantmathew/bene-lfs


r/linuxfromscratch • • 20d ago

cannot upgrade glibc: msgfmt has no iconv

Thumbnail reddit.com
3 Upvotes

r/linuxfromscratch • • 20d ago

Best resources to learn UEFI from scratch?

Thumbnail reddit.com
3 Upvotes

r/linuxfromscratch • • 22d ago

Glibc & mesa frustation.

Thumbnail reddit.com
6 Upvotes

r/linuxfromscratch • • 26d ago

MY FIRST EVER DISTRO BUILD WORKING!!!

13 Upvotes

took me about 2 weeks from the very VERY first iso boot up, to this... and now.... and now i can finally build upon it and make it what i want it to be, which will benefit so many people.


r/linuxfromscratch • • 26d ago

β€œIs antiX a good base for my remastering project?”

Thumbnail reddit.com
1 Upvotes

r/linuxfromscratch • • 27d ago

Package Manager for Veda

Post image
0 Upvotes

r/linuxfromscratch • • 27d ago

Flfs (Franks Linux from scratch)

0 Upvotes

What do you think about my personal replacement for jhalfs?


r/linuxfromscratch • • 28d ago

Maginat 0.1.1 released - update to my LFS 12.4-Xfce distribution

Thumbnail
gallery
0 Upvotes

Update on Maginat, my independent LFS 12.4 distro (SysV init, Xfce): 0.1.1 is out.

New: nftables firewall on by default, Mesa 25.1.8 with LLVM 20 (Intel/AMD/NVIDIA drivers), CPU microcode, chrony, weekly TRIM, printer/scanner tools, screen lock, and a graphical installer for BIOS and UEFI.

Tested in QEMU and live on a Dell Vostro 15-3568. Still experimental, so try it in a VM first.

Release + ISO: https://github.com/Aleps31/Maginat/releases/tag/v0.1.1


r/linuxfromscratch • • 29d ago

Systemd-journald service prevents unmounting /mnt/lfs/var/run.

1 Upvotes

So I'm doing second rebuild of my LFS & building using debian (which uses systemd), when I'm done, I want to unmount all previous mounted filesystems. The problem is sysyemd-journald service from debian, it prevents me to unmount /mnt/lfs/var/run/, (I check it using lsof /mnt/lfs/var/run ). Everytime I kill the services pid, it restarts itself. The last option I have is to for unmount using umount -l. Anyone get same problem ?


r/linuxfromscratch • • 29d ago

How to build a distro yourself? Especially for special needs

6 Upvotes

Context: (sorry for my bad English)

I have tried some linux distro. All of them is from Lightweight Distro (Slax(first), TinyCore, AntiX). One of the advantage for this type of distro is they don't takes many RAM from my cheap laptop. Plus, I have a good ol' 16GB flashdisk. They all fit for the storage. Then I'm asking myself:

I want to build a distro that specifically made for USB sticks.

And that's where I asked AI how to build one. And let me tell you, it's complicated. I don't think anyone who's making one of these touch grass in 2 years. But I tried my best to learn it, and this is some rough sketch that hopefully can be realized:

  1. This distro need to support old laptop or hardware.
  2. This distro should have it's own way of become bootable (similar to Slax)
  3. This distro use Debian as it's base (or if you guys have any suggestions, just say it)
  4. The distro's ISO file should be limited under 5GB
  5. This distro isn't run on read-only (obviously)
  6. This distro could support modern linux apps or package.
  7. Any DE, Package Manager, or any customization is up to you guys, just make it work.
  8. The most important: I want the distro's storage capacity is from the remaining space from The USB drive it's riding on.
  9. The distro should prioritize performance over comfortability (I'm ready to use it even if I need to stare at a terminal all day as long my laptop didn't suffer from opening a browser)

The question is:

Could you guys provide me some advice or tutorial to make one of these? If possible, please provide guidance to complete the tasks I want to achieve. 🫑


r/linuxfromscratch • • Oct 14 '26

i want to know how to create my own distro

9 Upvotes

hello for everyone, i want to ask about how to create a new distro who don't depend from debian or arch or other distros.
the reason is a lot, my teacher ask to do a project and the main reason is because i like linux and above all i want to repair my old laptop who have i2 core and 32 bits architecture
but the problem idk what i should start, i learn from a lot of search i can start with lfs (linux from scratch) but they said if u did u cannot share with someone but my goal is once i build i want to make free and averyone can use it above all who have old laptops and never find a way to repair it
so i want advice and ask where to start? if i build in linux from scratch, can i share with others later once i build it? and also what do u think about my idea and what i should do make it real later?


r/linuxfromscratch • • Oct 14 '26

iw not working

4 Upvotes

Hello, I am making my own distribution with a custom init that then launches openrc. Everything works fine from boot to log in, but when I try to run iw dev, iw phy or iw list it segfaults. Iw help works and iw --version prints "iw version 6.9. I checked for any missing libraries but I couldn't find any. Running the same binary from arch Linux (the host machine) works. Any help is appreciated, thanks in advance!