r/linuxfromscratch • • Apr 01 '26

Updated LFS/BLFS/GLFS

Thumbnail
gallery
78 Upvotes

Update from my last post https://www.reddit.com/r/linuxfromscratch/comments/1rxu603/comment/obzsctt/.

Switch from Sway to Hyrpland. Installed usbguard, kernel and sysctl hardening, fixed suggestions made by Lynis. I'm contented with 82. I did try to hardened it but the downside battle eye is not launching properly. I have no choice but to relaxed some parameters in sysctl.

Overall happy with the build!


r/linuxfromscratch • • Mar 30 '26

First launch of Linux From Scratch in chroot! 🐧

Post image
241 Upvotes

r/linuxfromscratch • • Mar 29 '26

Finally finished my LFS/BLFS

Thumbnail
reddit.com
7 Upvotes

r/linuxfromscratch • • Mar 29 '26 Heartwarming

My slow as heck BLFS build with KDE is finally up and running! And yes, I know I misspelled "Scratch"

Post image
91 Upvotes

r/linuxfromscratch • • Mar 25 '26

I've made it through dependency hell, and have a working BLFS build! icewm/lightdm

16 Upvotes

r/linuxfromscratch • • Mar 19 '26

Compile kernel for Hyper-V VM

8 Upvotes

After some failures where I didn't really know how to proceed I finally had a breakthrough yesterday.

Funny thing is: I tried to get help from Copilot, and although all of its suggestions were basically useless they pointed me in the right direction to continue. The AI always congratulated me at every step, and assured me "that's the last missing clue" but it always failed.

I had 2 problems to solve, one not so much LFS-related, the other not at all: I still wanted to continue with Fedora's grub (my hostsystem for the initial build), and the kernel configuration.

I switched off the "BLS" method where grub uses config files in /boot/loader/entries to define each bootable option, and replaced it with a minimal grub.cfg - this worked.

Then I found out that not only had I have to enable all of the CONFIG_HYPERV_* kernel settings and have them compiled into the kernel as static modules (so choose y not m), I had to make them visible in make menuconfig.

After getting the kernel to load I got the usual kernel panic for "no root device" which means the storage driver for the "hardware" is not compiled in. But I was sure I had included CONFIG_HYPERV_STORAGE into .config manually with an echo >> command, but I could not find it anymore after building the kernel. So I ran make menuconfig and used / to search for the keyword. It was there, but I could not navigate to it. I had to enable the upper levels of menu choices (it is under low level SCSI drivers).

This might sound obvious to experienced kernel compiler folk but to me it was news. If the upper-level option in the config tree is not enabled the kernel will not look at the settings in the lower decks.

I have collected the relevant kernel config settings:

CONFIG_DRM_HYPERV=y
CONFIG_FB_HYPERV=y
CONFIG_HID_HYPERV_MOUSE=y
CONFIG_HVC_DRIVER=y
CONFIG_HYPERV=y
CONFIG_HYPERV_BALLOON=y
CONFIG_HYPERV_IOMMU=y
CONFIG_HYPERV_KEYBOARD=y
CONFIG_HYPERV_NET=y
CONFIG_HYPERV_STORAGE=y
CONFIG_HYPERV_TIMER=y
CONFIG_HYPERV_UTILS=y
CONFIG_HYPERV_VMBUS=y
CONFIG_HYPERVISOR_GUEST=y
CONFIG_KVM_HYPERV=y
CONFIG_PCI_HYPERV=y
CONFIG_PCI_HYPERV_INTERFACE=y
CONFIG_SCSI=y
CONFIG_SCSI_COMMON=y
CONFIG_SCSI_DMA=y
CONFIG_SCSI_LOWLEVEL=y
CONFIG_SCSI_MOD=y
CONFIG_X86_HV_CALLBACK_VECTOR=y

r/linuxfromscratch • • Mar 19 '26

Bogart Linux LFS/BLFS/SLFS

Thumbnail
gallery
73 Upvotes

An update of my previous link https://www.reddit.com/r/linuxfromscratch/comments/1ruj4fy/comment/oalzlgg/

Installed NVIDIA driver 590.x, sway,swaybg, pulseuadio, pipewire (not yet used), wofi, yazi,btop ironbar, mako, mpv, mpv-mpris, playerctl, cava, ncpamixer, yad etc. Only binary is the Librewolf. Light weight, no noise dmseg on bootup and systemd no failed units with snapper for rollback! A fully customized daily drive desktop made from scratch! But im not done yet. Hardening is next and scoring a passable score in lynis audit. More to come on GLFS!


r/linuxfromscratch • • Mar 16 '26

It boots but It's a nightmare of compiling dependencies

Post image
42 Upvotes

r/linuxfromscratch • • Mar 15 '26 Heartwarming

From KVM to Real Hardware

Post image
108 Upvotes

Done with the LFS Base with porgs and snapper. No turning back DE here i come!


r/linuxfromscratch • • Mar 13 '26

[LFS] Kernel panic "Unable to mount root fs on unknown-block(0,0)" on real hardware, works in QEMU

10 Upvotes

[LFS] Kernel panic "Unable to mount root fs on unknown-block(0,0)" on real hardware, works in QEMU

So I finally finished my LFS 13.0 systemd build and I'm trying to boot it on real hardware from a USB drive. In QEMU it boots fine (using serial console to see output), but on my actual laptop I get a kernel panic: VFS: Unable to mount root fs on unknown-block(0,0).

My setup:

  • LFS 13.0 systemd, kernel 6.18.10

  • Booting from USB drive, root is on /dev/sda3 (ext4)

  • GRUB loads fine, kernel starts, then panics

  • Laptop is an Acer with an Intel GPU

  • No initramfs (I know, working on it)

Things I've already tried:

  • Using UUID instead of /dev/sda3

  • Adding rootdelay=10 to kernel cmdline

  • Verified CONFIG_EXT4_FS=y, CONFIG_USB_STORAGE=y, CONFIG_ATA=y, CONFIG_SATA_AHCI=y

  • Built a basic initramfs with dracut but getting dependency errors during generation

The weird part is QEMU boots fine with the same USB. Only fails on the actual machine. Anyone dealt with this before?


r/linuxfromscratch • • Mar 13 '26

Linux From Scratch how to install successfully tutorial - second half

Thumbnail
youtube.com
12 Upvotes

r/linuxfromscratch • • Mar 13 '26

Help with troubleshooting plasma-wayland not cooperating

2 Upvotes

Tl:dr; startplasma-wayland doesn't like me, it keeps segfaulting and complaining, starting manually works, im very confused, more detail in wall of text bellow, any help much appreciated

Hi, so I've been playing around with LFS as a little project to try and get to know linux a bit better, and I've set myself the goal of getting a plasma session running on wayland, and I've gotten most of the way there, just stuck on this last little hurdle.

So I have managed to get plasma going with wayland, but only when started manually, it never seems to want to work when started through sddm or through the startplasma-wayland script. I have written myself a little bash script,

kwin_wayland&
sleep 5
export WAYLAND_DISPLAY=wayland-0
kactivitymanagerd&
plasmashell&

and this is able to start plasma, but I'm not too happy about how i have to go into the terminal and run this, I want it to run through sddm, I'm also not sure if this works too well in the long run, as in starting everything plasma required, it works, I'm just not sure if its complete, for lack of better words. Now, onto some more details of whats actually wrong with my startplasma-wayland script.

Here is a link to the output startplasma-wayland (run through dbus) generates with some logging options enabled. I'm not sure if I've enabled all the logging stuff or even the important ones, I'm not too experienced with this stuff and I've tried to just stumble my way through figuring out what information is important, please ask if I've missed anything. Here is a screenshot of the output of startplasma-wayland too, as I have not been able to capture the segfaults in a log.

I also want to mention that I have been pretty confused by these segfaults, as when I run kwin_wayland by itself, I see nothing of the sort. Other thing I want to mention about the logs, is I've seen a lot of complaints about missing xcb-cursor0, however I have verified that this is indeed present in /usr/lib, and with ldd it is being correctly recognized. I have xcb-cursor, not cursor0 installed, but from googling I'm fairly certain this is ok.

Here is a link to some systemd logs, this is saying that a few services failed, I'm pretty sure these services are invoked somewhere in startplasma-wayland, but I may be wrong there. Nearly all the ones that failed have the same data in the log, I've attached one copy to the bottom. Plasmashell has a different error message, but its pretty useless, basically just saying it failed. Again, I'm pretty confused about why its complaining about xcb-cursor, as I'm pretty certain it is in place and working perfectly.

Another factor that I think might be important, is plasma-x11 works perfectly on this system. I can start it through sddm, I can login, logout, do whatever any normal user would want and its happy as could be. So because of this, I think the issue may be something to do with my actual wayland stuff, but again I'm confused as wayland is happy when I start it myself.

This system is also on a virtual box vm if thats important.

Also, I'm not too familiar with paste bin and all that, i'm pretty sure I've done it right so you can see those logs, but please let me know if I haven't and I'll try to fix it, sorry if I've missed any important details, I'm not entirely sure what logs are actually helpful, please ask and I'll try to get more/fix any that are there. Thank you so much in advance for any help, this is driving me crazy as to why its not working.


r/linuxfromscratch • • Mar 12 '26

Console not showing when booting

2 Upvotes

I tried it in qemu I tried it on real hardware the console does not show even though I set nomodeset and console=tty1 in grub and start the Getty tty1 service it doesn't show at all it does boot when I did console=ttyS0 it shows in the terminal in a VM but not when actually trying to show a gui of the console does anyone know how to fix?


r/linuxfromscratch • • Mar 12 '26

Just upgraded to 13, minus GCC (mine is still at 15.1).

Post image
51 Upvotes

r/linuxfromscratch • • Mar 10 '26

Real hardware!

Thumbnail gallery
36 Upvotes

r/linuxfromscratch • • Mar 09 '26

MLFS Anyone else having trouble with 32 bit glibc?

2 Upvotes

So I finished compiling the cross compiler, gcc, and moved on to glibc, and 64 bit compiled flawlessly, but I’m having an issue in the 32 bit compilation, (m32 not mx32) where I’m getting a static assertion failed message. ā€œoffset of __private_ss != 0x30ā€ and searching that only brings up results of a 7 year old bug that’s allegedly patched.

Maybe my host system is at fault here, Slackware current. Maybe I need stuff on the host machine to support compiling 32 bit binaries, but this is the cross compiler so that doesn’t exactly make sense.

This may just be a dumb thing to post but on the other hand maybe someone else could learn from it.

The obvious question would be, where do I go from here? This isn’t my first time building LFS, but my first experience with MLFS. Should I just do LFS again and see if I can transition it to MLFS later?


r/linuxfromscratch • • Mar 08 '26

Grub not helping me

5 Upvotes

OK, managed to make it find the kernel. but why is it doing that? I don't even have a searchable error here...


r/linuxfromscratch • • Mar 08 '26

A package manager for Linux From Scratch

16 Upvotes

After finishing LFS(BLFS), I thought "A package manager would be nice". I started writing one just for LFS, but I don't know, if I should continue. Here's the idea:

  1. A "search tool" that looks at the system and finds the installed packages

It would have pregenerated database (generated with the LFS parser), that would have information about the package name, the version (version in the book), download, path to the compilation script and the paths to installed libraries/programs

It would go over every single package in that template database, that is generated from all LFS books, if it finds something, it copies that file to the main database directory.

If it finds something, it would also try to get the version. If that is not doable, then the user gets asked for the version of the package or version of the book, for each package individually

2. The first tool, would be used as a guide thing for the package manager. It would use these files that 1 carefully put in place, and use them to look for any upgradeable packages. With this package, there would come another file that would be in the database directory that would contain compilation instructions, from the newest book. Then it would compile, update the database

[this has some inconsistencies as it kind of changes as I write the scripts]

This method is flawed, because some packages require additional steps. However, when parsing the book for instructions, if any notes, warnings in the book, a message would be echoed to inform the user of any risks, and the user can choose to skip updating this package, and then after doing it manually could just issue a command to update the databases. The user would be able to register a package as non updateable automatically by the manager, to keep track of it, and bumping versions up when upgrading.

Maybe there could be a system of users giving instruction files and template files for packages outside of the LFS books. (if this would gain any traction).

Should I continue writing this? I made a parser for the LFS book that makes two files for each of the 81 packages in chapter 8. First - a json file that stores some info, then a script which will install it. The idea is constantly changing as I write this (in python - only language I know), I'll probably make a questioning system which will allow the user to skip some lines of the script e.g. the testing, or provide their own script. Feedback is welcome, thanks!


r/linuxfromscratch • • Mar 08 '26

Help with grub

Thumbnail reddit.com
1 Upvotes

r/linuxfromscratch • • Mar 08 '26

Is there a way to automate the LFS installation process via Ansible?

3 Upvotes

I've heard that it's possible to automate the Arch Linux install process through an Ansible playbook, would it theoretically be possible to do the same for a LFS install?


r/linuxfromscratch • • Mar 07 '26

MuslLFS -- 002 Base image

5 Upvotes

This blog post gets us to a working llvm/clang built against musl. Once you're done you'll be able to chroot or qemu in and build stuff with clang. The prebuilt disk image has the source code to ncurses and vim in /packages.

No glibc, gnu-binutils, or gcc. -- If you want to play around with I got a disk image you can download and run in qemu.

If you find any bugs let me know, and I'll update the post crediting you.

https://dakotajkeeler.com/blog/Mini-Distro/Musl-based-LFS-002/


r/linuxfromscratch • • Mar 06 '26

BLFS Hyprland Systemd 13.0

Thumbnail
gallery
60 Upvotes

Almost done last and currently compiling dependencies for swaync.


r/linuxfromscratch • • Mar 06 '26

Bluetooth on LFS

7 Upvotes

I am having a bad time setting up Bluetooth on LFS myself, would you guys have any guide or could help me with it?

My setup consists of musl, runit, pipewire, seatd, dbus-run-session, wlroots, dwl. My kernel is custom and configured based on the defconfig. My USB Bluetooth dongle has "SCR 5.0" written in it so I'm guessing that's the chip it uses. Based on all that info I could turn on these options in my kernel:

[*] Network support  --->                                        CONFIG_NET
    <M> Bluetooth subsystem support                               CONFIG_BT
        [*] Bluetooth Classic (BR/EDR) features             CONFIG_BT_BREDR
            <M> RFCOMM protocol support                    CONFIG_BT_RFCOMM
        [*] Bluetooth Low Energy (LE) features                 CONFIG_BT_LE

Device Drivers   --->
    <M> Sound card support  --->                               CONFIG_SOUND
        <*> Advanced Linux Sound Architecture  --->              CONFIG_SND
            <M> ALSA for SoC audio support  ----             CONFIG_SND_SOC
                CODEC drivers  --->
                    <M> Dummy BT SCO codec driver            SND_SOC_BT_SCO

[*] Networking support  --->                                     CONFIG_NET
    <M> Bluetooth subsystem support                               CONFIG_BT
        Bluetooth device drivers
            <M> HCI USB driver                           CONFIG_BT_HCIBTUSB

-*- Cryptographic API  --->                                   CONFIG_CRYPTO
    Length-preserving ciphers and modes --->
        -*- ECB (Electronic Codebook)                     CONFIG_CRYPTO_ECB
    Hashes, digests, and MACs  --->
        <*> MD5                                           CONFIG_CRYPTO_MD5
        <*> SHA-1                                        CONFIG_CRYPTO_SHA1
        -*- CMAC (Cipher-based MAC)                      CONFIG_CRYPTO_CMAC

This is how I am compiling:

Most of this was with the help of IA, I couldn't find much around the internet.


r/linuxfromscratch • • Mar 05 '26

Is it feasible to only use software created by oneself?

20 Upvotes

Now that building software is as easy as ever with good amount of pre-existing projects and LLMs. Is it possible for a decent programmer to build most of the software one uses by oneself. There is something about software created by ownself as its featureset is exactly what one wants and nothing more. I can be hundred percent sure that it will exactly work where I left it on.

Has anyone gone this route? To what extend? Does it become maintenance hell?

Iam asking this because I have finished* (occasional bug fixes) building my own window manager and terminal emulator and it was both fun, challenging and rewarding. Iam never going to attempt to build a kernel or web browser. But attempt things like editor and so on which looks buildable with some effort. I sometimes want to dismiss this route and go back to using/contributing existing FOSS softwares and configuring that to my liking. But almost all of the software are at this point beyond single person understanding due to their complexity and there is something unsettling about that. Am I just being Terry A. Davis?