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?
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!
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/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 :-)
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)
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
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
u/Striking-Flower-4115 Apr 14 '26
Any ARM laptops with a fan should be good
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
u/After_Teacher3830 Apr 16 '26
Just learn c if you want to go deep.
0
u/WieldyStone2 Apr 16 '26
I'd say go with CachyOS!
1
u/[deleted] Apr 15 '26
[removed] — view removed comment