Preferences

You would start with LFS to build a base and then add your own package manager to make a “true” distro.

If you want to just build an existing distro from scratch then they all have ways of doing that as they need to rebuild packages regularly. Eg: It’s a lot simpler to build a fedora image from scratch by using Koji/OSBuild vs LFS as Koji/OSBuild basically automate the whole LFS process.

Additionally in order to have fun with LFS you don’t really need to do the whole book. You can make your own little Linux “distro” from scratch with the kernel and statically linked busybox. Busybox comes with all the minimal utilities so you can pick and choose what you want to write and what you want to reuse.


I wonder if some sort of “BSD from scratch” would be a more fruitful exercise. Since they include more of the overall system, you’d end up with something approximating a regular BSD install pretty well at the end.
I think the cool part about kernel + busybox type sandbox is that you can get a working system with only 2 binaries and doesn’t even need a cross-compiler.

when I was playing with this stuff the hardest part for me was getting my head around:

1. why do I need a cross-compiler if my system has a compiler already??? 2. why do I need to compile the compiler twice??

And well it turns out you don’t really need these steps but they’re required as part of the bootstrap process for GCC/glibc itself.

How is Busybox security and bugginess-wise? I’m always worried about going off the beaten path, but I guess the busybox path is pretty beaten by cloud folks and those sorts… who are actually operating in a much more hostile environment than my desktop.
A "BSD from scratch" project would end up closer to something along the lines of "Debian from scratch" or "Redhat from scratch". You would be performing an exercise in bootstrapping, and little else.

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal