/r/linuxfromscratch
A Subreddit discussing Linux From Scratch and how to build it.
Post anything related to Linux From Scratch or any opinions that you would like to share.
Join the LFS IRC channel!
#lfs on freenode.net
A Few Rules on this Subreddit:
Don't Spam
Show common courtesy to fellow members
Only post things related to Linux From Scratch
Links
Related Reddits
Platforms
DEs and WMs:
Distributions:
Sister subreddits:
/r/linuxfromscratch
As said in title I want to guide like where to download ISO files or Best Linux distro for LFS and best tutorials to follow and can you tell me if there is any good community to join about LFS
Hi, sorry to intrude and disturb everyone with this post, but I'm having some issues with compiling Glibc 2.40 in Chapter 5.5 Book is Linux From Scratch - Version 12.2-systemd The following error appears:
x86_64-lfs-linux-gnu-gcc -Wl,-rpath-link=/mnt/lfs/sources/glibc/build:/mnt/
lfs/sources/glibc/build/math:/mnt/lfs/sources/glibc/build/elf:/mnt/lfs/
sources/glibc/build/dlfcn:/mnt/lfs/sources/glibc/build/nss:/mnt/lfs/sources/
glibc/build/nis:/mnt/lfs/sources/glibc/build/rt:/mnt/lfs/sources/glibc/build/
resolv:/mnt/lfs/sources/glibc/build/mathvec:/mnt/lfs/sources/glibc/build/
support:/mnt/lfs/sources/glibc/build/nptl -o /mnt/lfs/sources/glibc/build/
support/links-dso-program -pie -Wl,-z,pack-relative-relocs -Wl,-O1 -nostdlib -
nostartfiles -Wl,-z,mark-plt -Wl,-z,relro /mnt/lfs/sources/glibc/build/csu/
Scrt1.o /mnt/lfs/sources/glibc/build/csu/crti.o `x86_64-lfs-linux-gnu-gcc -
Wl,-z,mark-plt --print-file-name=crtbeginS.o` /mnt/lfs/sources/glibc/build/
support/links-dso-program.o -lstdc++ -lgcc -lgcc_s -Wl,-dynamic-linker=/usr/
lib/ld-linux-x86-64.so.2 /mnt/lfs/sources/glibc/build/libc.so.6 /mnt/lfs/
sources/glibc/build/libc_nonshared.a -Wl,--as-needed /mnt/lfs/sources/glibc/
build/elf/ld.so -Wl,--no-as-needed -lgcc `x86_64-lfs-linux-gnu-gcc -Wl,-
z,mark-plt --print-file-name=crtendS.o` /mnt/lfs/sources/glibc/build/csu/
crtn.o
/mnt/lfs/tools/lib/gcc/x86_64-lfs-linux-gnu/14.2.0/../../../../x86_64-lfs-
linux-gnu/bin/ld: cannot find -lgcc_s: No such file or directory
collect2: error: ld returned 1 exit status
make[2]: *** [../Rules:229: /mnt/lfs/sources/glibc/build/support/links-dso-
program] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/mnt/lfs/sources/glibc/support'
make[1]: *** [Makefile:484: support/others] Error 2
make[1]: Leaving directory '/mnt/lfs/sources/glibc'
make: *** [Makefile:9: all] Error 2
I have installed Binutils, GCC and Linux API headers according to guide,
Can anyone help me please? I genuinely don't know if there's a small detail I
skipped in the guide.
The host system passes the version check and all of the md5sums are correct
for the downloaded packages
Thanks
I have BLFS 12.2 running, and it annoys me that the screen blanks when I'm away for a short time. Where is this configured? I looked in /etc/X11 config files but could not find anything there.
Im making a LFS script but i cant seem to do the firmware and microcode in
https://www.linuxfromscratch.org/blfs/view/12.2/postlfs/firmware.html
heres my repo: https://github.com/LazyBev/LazyOS
Using this new and improved bash script, I have managed to build linux in 3 hours from scratch on my poor ryzen 3 2200g.
This script is not perfect though, since I have little to no experience on bash, the feature set here is limited and may not reliable.
As of now, LFS 12.2 and will compile in one sitting aswell, BLFS can be compiled, but will need manual intervention from you.
https://github.com/TheKingKerellos/MyLFS
Thank you for the read!
I try to compile Nautilus and the meson setup
command fails with "dependency tracker-testutils-3.0" not found. Which package is this? All the required dependencies per the BLFS book are there. What am I doing wrong?
Update: per Bruce's suggestion on the mailing list I used the newer BLFS 12.2-450 where tracker is no longer used in favour of other libraries like tinysparql. It compiles fine now. I noticed that smb bookmarks (from my F40 installation) don't work yet so I guesss I need gvfs
too.
i'm starting lfs and i wanna use it in VM , i have a laptop with dual boot (windows 11 , debian), soo , can any one tell what i have to do to start ?
Hi, I am totally new to LFS. I have a Mac M2 and I was wondering if I could build LFS in a VM on my M2 and then create an LFS ISO that I could use/instal on another machine or I must do it with a partition. I am thinking of that because I want to instal LFS on less powerful machine and try to speed up the building of LFS on my M2 which should be much faster. Many thanks
I could successfully build LFS 12.2 with GUI, and I got Firefox running. It doesn't completely look like FF on Fedora, some fonts are looking different, but overall I'm glad it works.
One small :-) detail is missing: Firefox does not do sound. After a little bit of research I learned that FF requires pulseaudio
so I build the "emulator" apulse
. I was happy one time: when I started FF with apulse firefox
I could play YT videos with sound. But: upon the next reboot FF again had no sound. I compared the FF installation with the one on my Fedora partition and I noticed there's no apulse
so obviously there's some other way to make FF loud again.
What am I doing wrong?
I really admire every customization Linux from scratch (idk why but I really like it lol). And if you want, you can post a screenshot of your LFS here!
Chapter 8.52
Test results came back fine== Tests result: SUCCESS ==
28 tests skipped:
test.test_asyncio.test_windows_events
test.test_asyncio.test_windows_utils test.test_gdb.test_backtrace
test.test_gdb.test_cfunction test.test_gdb.test_cfunction_full
test.test_gdb.test_misc test.test_gdb.test_pretty_print
test_ctypes test_devpoll test_idle test_ioctl test_kqueue
test_launcher test_msilib test_nis test_sqlite3
test_stable_abi_ctypes test_startfile test_tcl test_tix
test_tkinter test_ttk test_ttk_textonly test_turtle test_winapi
test_winconsoleio test_winreg test_wmi
3 tests skipped (resource denied):
test_ossaudiodev test_winsound test_zipfile64
458 tests OK.
Total duration: 4 min 1 sec
Total tests: run=41,083 skipped=1,245
Total test files: run=486/489 skipped=28 resource_denied=3
Result: SUCCESS
After the "make install" and creation of the /etc/pip.conf file, I moved on to the next package Flit-Core and the first command is pip3 wheel.....
That's when I received the pip3 command not found message.
I would like to build a LFS system in a VM, without partitioning on the host and stuff like that. But I want to build the stuff on the host OS and put it in a image that can boot from the VM. Is this possible? I mean theoretically you could mount a VM image and use it like that but would there be any shortcomings from having to boot on different and virtual hardware from the one on build time.
EDIT: Following u/Witty_Advantage_137's advice I decided to make a raw image file using truncate
and then formated it with mkfs. I am planning to convert it to a qcow2 image later and then put that into my VM.
Someone pls guide me how do we make disk partitions the book language is crazy or maybe I m just too dumb. I m not getting even a single thing.. Yes I m experienced with linux
EDIT 1: I have figured out how to do it - number one, made some errors and thought I properly followed instructions... I did not. Beyond that, the main three things - both the Intel and NVIDIA drivers need to be installed and working, this includes both kernel and userland (make sure i915 can find the firmware), second is that Bash startup files should really be made according to BLFS, and third is that for Xorg, generate the config via nvidia-xconfig --prime
which should generate a suitable X11 config set for PRIME. Note that you should follow the instructions it tells you once you start Xorg. Put the instructions in a script, and launch it via .xinitrc when you start X. When it comes to Hyprland, just have a config meant for NVIDIA, make sure the monitor is right, then you should be good.
I have just done LFS very recently, as in a day ago and followed my own book (GLFS) and some of BLFS (development, not stable). I did this on a laptop that has an Intel iGPU and a nVidia dGPU. Getting a desktop up and running has been frustrating and I still haven't gotten one up and running. I usually install LFS on systems with only one GPU and it hasn't been too hard as a result.
That brings me to my question: have any of you installed LFS on bare metal, on a system that has an iGPU and dGPU, and got a desktop (graphical environment such as X11 or Wayland) up and running? Was the iGPU Intel and dGPU nVidia? Lastly, if you remember at all, how did you achieve this? What are the requirements, as it were?
This conundrum bothers me enough to make a Reddit post out of pure curiosity but I won't beat myself up for not knowing how the sausage is made, really. It isn't too distressing. After all, I still have my gaming rig, it's just not as viable to install LFS on it as I'd like due to a lack of an extra drive which would make things much better and viable. This makes my laptop a good candidate for LFS but I haven't got a desktop working on it to this day after a year.
Thanks in advanced! In the meantime, I will test one more thing on it before I either learn the secrets or toss in the towel for a month or two before doing LFS again on my gaming rig (yes I really do install LFS often, I need help).
Long time very experienced Linux user. Built LFS to command line many years ago. This time I'll be installing a desktop and many goodies. Intel i7 processor, plenty of memory, etc...
So, about LFS I still read multiple takes stating it's a great tool to learn how Linux works (I already understand this) but not a "daily driver."
The ultra control doing the "make && configs" myself is really appealing.
I've got a dual boot win/Linux i7 system i'll put a distro on it.
I've built debians from stable to sides; I've also used redhat derivatives and am currently using Arch.
So, is anyone using LFS as a daily use distro, and aside from the package management limitations, do you enjoy it? Do you enjoy it enough to recommend it to an experienced user?
Actually booted LFS