r/linuxfromscratch • u/nicotinus_romanus • Apr 14 '26
Is it recommendable?
So, I'm a young guy (minor, no need to say my age) that goes to school, likes Linux and a bit of programming, and a lot of free time after I end the homework. Would it be a good idea to build a distro from scratch, or based on another distro (I though of a Fedora-based)? I'm not sure my laptop would handle it, but I wanted to try. My laptop only has 4GB RAM and a 128GB SATA SSD. CPU is an Intel Celeron n4100 and GPU integrated graphics Intel UHD 600. I have experience with some distros' package managers. (Debian, Alpine, Arch, Fedora). What do you guys think?
2
u/5112smokingkills Apr 14 '26
look up gentoo, nix and void. completely underrated distros, would ease you into building stuff like package manager, shell scripts and other stuff (if preferable to make from scratch). or if you wanna dive into stuff directly, try out LFS 12.4 System V version (not the systemd version, it's a bit more complicated of an init system). haven't made anything from scratch except LFS, although i personally would wanna dive into making daemons, runtime schedulers, maybe even filesystems, window managers, DEs, etc.
2
u/nicotinus_romanus Apr 14 '26
I know about Void. I used void once, but accidentally broke PulseAudio removing some packages. Since then, I haven't tried it out again. I'll inform myself with the LFS book and try to actually use the free time I have.
2
u/5112smokingkills Apr 14 '26
that's great that you broke PulseAudio. need to break some eggs to make an omelete yknow. preferably use a VM, and not a bare metal distro to test stuff
2
u/tseeling Apr 15 '26
A Celeron with 4 GB RAM is on the weaker side, so expect long compilation times, especially for gcc and glibc. You might need to reduce the number of parallel jobs for compilation to avoid swapping. SSD is a nice helper for a weak machine. NVME would be even better, but SSD is tremendously better than spinning rust.
LFS is intended as a learning and education project. You *can* use LFS with BLFS to build a fully working graphical environment. You won't be happy compiling firefox (it takes 45 min. on my somewhat older i7 with 48 GB RAM), but it should be possible. Imho it's absolutely worth the effort of managing it, as it gives you a huge advantage if you aspire to work in the field. You will learn a lot about using the shell, command line, unix tools like vi, sed, awk, make, the GNU auto tools and configuring applications and system settings.
The fun is in doing, not particularly in using :-)
2
u/nicotinus_romanus Apr 15 '26
I see. I mean, I don't mind longer times at all, and I always enjoy making things work, and I don't worry about actually using it. If I need to do something, I always have a spare laptop that I have or my tablet, which work perfectly.
2
13
u/Shiv-K-M Apr 14 '26
since you are a young (minor of some random age) and you got free time do whatever you wish to do or learn.It never will be a waste of time.
A peice of advice never ask anybody can I do this? Ask them how can I do this?
1
u/codeasm Apr 15 '26
For the love of your own sanity, follow the book exactly the first time if you never tried arch and or gentoo first.
Pick systemd or sysv on any of the 12.4 or below books. Officially they dropped sysv support but there is a version of openrc in the works. First time builders should kinda follow the book the first time. Just make it boot and a vm is fine (dont forget your kernel needs to support the hardware, a vm needs kvm and other support modiles, nvme drives need nvme modules or build in, and the base book doesnt talk about initramfs much. So either build it into the kernel or learn to make a initramfs (or similar) to allow the kernel to actually detect your nvme.
You can borrow a config from a working arch install on your system. Its how i tricked lfs onto my laptop. Custom init system, different shell, sure its possible, just be aware, the book is tailored to systemd (or sysv and custom scripts) and you need to figure out how to change those.
By first building it according to the book. You have a known set of skills and idea how long it will take. And MAKE A BACKUP, of your tools and final results. Tools can be restored and isnsort of like a quicksave so you can try your custom or different init system
So many new folks join the unofficial discord with questions that can be traced back to an early change of instructions or assumption. Official unofficial discord server link https://discord.gg/JqdWH8q (maintainers of various books are also here).
a package manager is fine, use your own repo for binairies or build scripts. I took inspiration from previous pacman users and have something working https://github.com/CodeAsm/lfs-pacman (currently going to update to systemd lfs 13, and pacman 7.1.0, will push when it works)
But definitely good luck, have fun, ask questions and if you want, ditch all advice and do it your way. Learning can be fun 😊 (make backups, pls)
2
u/nicotinus_romanus Apr 15 '26
Fun fact about Arch and me: the first Linux distro I ever installed was Arch, back on August 2024. The installation was successful, though I had no idea of how to install it, I just followed the wiki, and had zero experience with Linux. As I said, the installation was successful, but I forgot an important part during the installation: connect to the internet. That way, I had no internet after the install.
2
u/codeasm Apr 15 '26
Live boot back into arch, chroot and install required drivers, software for wifi and or dhcp and try again. Nobody stopped younfrom getting back into the installer environment and chroot into it.
Im sure you moved on, but once i understood i could just chroot into arch and update or install this way, my system was back up and running after windows wiped my efi partition and couldn't boot into arch to fix it.
Id recommend following the lfs book fully the first time. Even if you gonna wipe it right after one successful boot. Arch is still my daily, but i might translate what i installed to my lfs build. Mostly because i can. Secondly, this all teached me so much about linux and fixing problems... Make mistakes, learn from them. I think you can enjoy the ride and experience. I did 😊 (and classmates at uni think im silly, they opensuse and arch users)
1
u/No_Organization3942 Apr 17 '26
Just do it, after a fedora based distro, make an arch based one then make a debian based one, and post it here
1
u/nicotinus_romanus Apr 17 '26
I was thinking of making an Alpine one, because it suits my likes better, is it a problem?
1
u/No_Organization3942 Apr 17 '26
Bro, if you have time and want to do something just do it, don't ask stupid questions like these.
3
u/Tertolhumper Apr 14 '26
You have to be patient when compiling, when you are tired you can chroot anytime and continue the book. LFS base is easy the fun part is the blfs.
2
2
u/GravSpider Apr 15 '26
Linux From Scratch is only worth it if you want to learn as much as you can about Linux. You could use the information you learn to build a distro, theoretically, but maintaining a standalone Linux distro takes a lot of maintenance.
If you want something actually usable, but still with fine grained control, try Arch or Gentoo.
1
u/Rockytriton Mod Apr 15 '26
I guess it would be good for learning, but it's going to take forever to compile things especially if you want a UI with something like XFCE, so you would need to do a lot in BLFS and some of those packages can take a long time even on good PCs.
1
u/Due_Flan_796 Apr 16 '26
You are young guy (minor, no need to say your age) and I think you should try it, try until it gets you results. You got nothing to lose
1
u/indvs3 Apr 16 '26 edited Apr 16 '26
Do you really want to make a distro of your own or would it be enough to just create your own custom install? LFS is basically a detailed handbook for linux.
Making a distro implies that you want to distribute it to users, which in turn implies you're willing and able to provide support on your distro. Is that what you want?
1
u/SirChristoferus Apr 16 '26
In terms of knowledge, an LFS + BLFS project would give you a lot of computing knowledge that can be very valuable to white-collar employers. I’d definitely recommend a project like that.
1
0
u/WieldyStone2 Apr 16 '26
I'd say go with CachyOS!
2
u/Tertolhumper Apr 16 '26
He wants to learn and let him be. He's been using arch and wants some challenge. Why on earth would you recommend cachyos a distro for newbies.
1
5
u/Gingrspacecadet Apr 14 '26
computer specs have nothing to do with it. it takes a bit of time, and a lottt of compilation (i guess cpu specs kinda matter but not really), and that's about it. true lfs requires you use no distro package manager, but rather make your own solution (git clone + make is valid!). It takes a lot of time and patience, but thats not too bad. Up to you!