/r/linuxfromscratch

Photograph via snooOG

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

Official LFS Page

Related Reddits

Platforms

DEs and WMs:

Distributions:

Sister subreddits:

/r/linuxfromscratch

6,803 Subscribers

4

Suckless From Scratch

1 Comment
2024/11/20
14:30 UTC

7

Can someone guide me in LFS

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

6 Comments
2024/11/10
15:19 UTC

17

First thing done with my M4 macbook, install LFS in Parallels

1 Comment
2024/11/09
20:35 UTC

3

Glibc build fail

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

5 Comments
2024/11/07
19:28 UTC

2

How to switch off screen blanking in X?

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.

1 Comment
2024/11/07
15:47 UTC

7

Making a LFS script

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

6 Comments
2024/10/31
23:03 UTC

28

[OpenBox] LFS 12.2 is really Fun

0 Comments
2024/10/31
00:23 UTC

7

JHALFS is outdated, no worries!

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!

https://preview.redd.it/gn6oyz1tfoxd1.png?width=720&format=png&auto=webp&s=312549a544fb803754c837e7f6a7819255385e6a

14 Comments
2024/10/28
16:17 UTC

2

Compiling Nautilus on BLFS 12.2 svn

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.

1 Comment
2024/10/25
08:18 UTC

26

Building Xfce4 was surprisingly easy!

2 Comments
2024/10/24
22:14 UTC

47

[i3] LFS Completed 😼

11 Comments
2024/10/23
11:24 UTC

7

New in LFS

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 ?

15 Comments
2024/10/23
07:10 UTC

6

LFS in VM then making ISO

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

12 Comments
2024/10/21
13:06 UTC

6

Sound for Firefox?

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?

3 Comments
2024/10/16
06:29 UTC

45

completely rebuilt from the book, build everything from source, with dwm as the window manager and a minimal web browser, all under 300MB. Any improvements?

5 Comments
2024/10/14
22:09 UTC

10

Post your LFS rice here

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!

5 Comments
2024/10/10
20:06 UTC

25

After some time (and tries), i did it

5 Comments
2024/10/09
00:49 UTC

1

LFS 12.2 "pip3 command not found" after Python-3.12.5 installation

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.

0 Comments
2024/10/08
15:53 UTC

80

LFS finally build on MacBook

9 Comments
2024/10/07
20:54 UTC

3

Would it be possible to use the host to build LFS but a VM to run it.

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.

8 Comments
2024/10/07
09:10 UTC

0

I m having way too many problems doing this

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

7 Comments
2024/10/04
16:08 UTC

1

Experiences of using hybrid graphics on LFS?

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).

0 Comments
2024/10/03
12:54 UTC

7

Talk me into installing LFS!

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?

4 Comments
2024/09/27
16:51 UTC

16

LFS Done, firmware and kernel config ripped from Debian (Curl, Git, Wget, Cmake & Fastfetch added)

4 Comments
2024/09/25
03:11 UTC

9

Jus wanna report a mission success that's all

Actually booted LFS

7 Comments
2024/09/25
00:26 UTC

39

Successfully installed LFS on my Thinkpad T400

2 Comments
2024/09/23
16:27 UTC

Back To Top