
Welcome to Linux From Scratch - donnut
http://www.linuxfromscratch.org/
======
olliesaunders
I’m being cynical but my experience of building from source even with
automated tools is one where things going wrong and being very difficult to
resolve: there’s a cyclic dependency here; this things compiles but won’t
link; this thing just segfaults; you need a new version of X to build Y but Z,
which is a part of X, needs an old version of Y; I know you wanted to run the
latest version of X but author of Y didn’t update it to work with that new
version of X so you can’t but that was the whole point of doing this thing in
the first place; etc.

Nowadays I avoid building anything from source if there is a binary I can
download and everytime I have to build from source I cringe in apprehension as
to whether it will work or not. Too often, if something fails, I just give up.

OK, I’m not really this aiming this criticism at the LFS project. I’m really
just griping about shitty this aspect of software development in general.
People should be working on solutions to these problems. Or maybe this is a
problem with me. I’d be interested other’s opinions.

~~~
eckyptang
It's easier than building something _without dependencies_ from scratch with
Visual C++ :-)

I built an LFS system when it came out years ago and it was a good learning
exercise. That's the cool thing here. I wouldn't consider using the system
from day to day though.

I agree with your sentiment though. A recent attempt to get sstp-client and
NetworkManager-sstp working on CentOS 6.3 resulted in a long stompy walk when
I couldn't get it to build without breaking the distribution due to dependency
hell. I just chucked Ubuntu on the box in the end and used the vendor provided
deb packages. Was much easier :-)

------
agumonkey
Does anyone feels LFS leans a bit outside its own point ? I felt like I was
learning more about gcc/make/autoconf more than the OS itself. The
relationship between packages, how the OS interacts with hardware was still
obscure. After a successful first reboot I tried to build elinks and while it
ran, it was broken in many strange ways (tty rendering, dns lookups failing
sometime).

It's a inspiring project, but IMHO it could be split into two goals,
toolchain/compilation and operating system assembly.

~~~
njharman
Linux is at least half about learning how to compile from source. Look at
number of people who don't know how, think it's "hard", etc.

If you don't know how to compile, solve dependencies/minor issues, etc. You
don't know Linux.

~~~
agumonkey
I started writing that I guess I don't know Linux and missed the information
LFS conveys.

But I can't shake the feeling that I learned more about independent toolchain
than about the OS, and I'm lost trying to understand why a CLI http browser
refuse to access some domains for no apparent reason.

I'll read BLFS to see if some part of the knowledge I'm looking is there.

~~~
chimeracoder
What do you mean by 'independent toolchain'? And what part of the OS were you
looking to learn about?

Remember that LFS, despite the name, is not about learning Linux-the-kernel,
it's about learning 'Linux-the-operating-system' (which is more precisely
referred to as GNU - using 'Linux' to refer to the OS is technically
incorrect, though very widespread).

Most of the time this is just a point of either pedantry or politics, but if
you want to build your OS from scratch, you really need _the entire toolchain_
[1] if you want to build a 'usable' system.

[1] You can sub parts of other toolchains, so I guess the more correct answer
is that you need _an_ entire toolchain, with the GNU tools being the de-facto
default toolchain.

~~~
agumonkey
Agreed the toolchain is a requirement. But you raise the problem, what LFS
teaches you Linux or 'From Scratch' ? I[1] didn't learn about the kernel nor
the operating system there. Only about package building. The OS remain a
mystery to me for most of its part. See my example about elinks problems.

[1] I probably read LFS with the wrong mindset ..

------
oneandoneis2
I liked LFS, it was the first distro I ever installed that didn't annoy me
with "What? What's all this crap been installed for?!"

But the lack of a package manager prompted me to move on to Gentoo. I keep
meaning to give it another go, never seem to have the time..

------
octotoad
Hate to post a comment just to be negative, but, I seriously can't believe
this has appeared on the front page of a site like HN.

"Welcome to"?. LFS is so old that I would assume any self proclaimed
geek/hacker would've already been aware of it. It has existed for over ten
years.

~~~
TeMPOraL
> It has existed for over ten years.

So? I haven't heard of it before, and I doubt if many of my friends have
either. Programming landscape is very big now and everyone has a finite amount
of time for exploring it. I could use your argument to whine about how so many
self proclaimed geeks/hackers don't know about Lisp and keep reinventing
wheels all the time.

~~~
valisystem
The "Welcome to" is still left without explanation.

~~~
natep
It's the title of the site

------
subhro
LFS definitely provides an excellent learning opportunity to the beginner.
However, I think, considering the clarity of the available documentation,
there is little to "think".

Having said that, I have always considered LFS to be a kind of personal linux.
For running on servers, I think Gentoo would be the closest to LFS and having
well matured tools and package management.

~~~
w0utert
Gentoo is indeed a very nice option in between a bog-standard distro like
Ubuntu and LFS. It's easy to customize and tinker with, but still usable on a
day-to-day basis.

If you want something in between Gentoo and LFS, you could consider
OpenEmbedded, which is a distro builder primarily intended for specialized
embedded/low-power hardware, but can easily be repurposed and extended to also
build your own x86 desktop distro's, using one of the more generic profiles as
a template. It would take a lot of tinkering and learning (but that's the
point, right?), but once you have it working it's relatively easy to extend
and maintain.

~~~
alexchamberlain
Arch Linux deserves a mention here.

<http://www.archlinux.org/>

~~~
kaolinite
Am I right in saying that Arch still doesn't have package signing by default?
I know they've been working on adding it. Until it has that it can't really be
used imo.

~~~
ocharles
It has package signing. A quick Google search would have answered your
question - [http://linux.slashdot.org/story/12/01/17/1446248/package-
sig...](http://linux.slashdot.org/story/12/01/17/1446248/package-signing-
comes-to-pacman-and-arch-linux). Voila!

~~~
kaolinite
I know, however last I heard it wasn't enabled by default and many packages
don't support it.

------
albertzeyer
To those who haven't heard about LFS before:

You really should also check out Gentoo which is basically the same thing but
more elegant and easier. :)

~~~
fusiongyro
Right, but the point of LFS is to learn how Linux works, not how Gentoo
happens to have set things up.

~~~
albertzeyer
What do you learn in LFS that you don't learn in Gentoo?

I have started with Gentoo several years ago (and never tried LFS) but I
really learned a lot how Linux works. In Gentoo, you can basically do
everything. You are just supported in that by a really nice package manager.
But you are starting from scratch. You are bootstrapping the system, setting
up compiler flags, setting up build flags and decide about every single
package you want to have on your system.

~~~
fusiongyro
Right, and then Portage makes everything and puts it into place. And then you
use Gentoo's init scripts. And then you use Gentoo's package manager. And so
forth.

What you learn is exactly what it is that the distribution does, which parts
of the system are decided by it, which things are convention and which things
are configuration.

Gentoo's great, I ran it for several years, but I'm still glad I did LFS one
semester and could really see what's going on under the hood.

~~~
albertzeyer
But nothing is really decided on Gentoo. You can easily use another init-
system for example (all the common ones are in Portage). You can also use a
different package manager. I recall that there was a famous replacement for
emerge; forgot its name right now.

Otherwise, I don't see much difference between

    
    
        ./configure
        make install
    

and

    
    
        emerge x
    

Except that in the first case, you have to deal with some exceptions where it
doesn't work that way. But not sure if that knowledge is really valuable.

~~~
fusiongyro
I think you should give it a shot yourself and then come back and let us all
know what you learned and whether it's meaningful.

------
arafalov
Looks interesting if niche. Somebody should take all the documentation and
create gamification experience around it. With levels and all. Maybe even as a
submission to the currently running Gamification Coursera class....

I can just imagine: Level one: you managed to download all sources. All the
way to "You are the master, you can now serve your own ??? (ruby on rails
app?) from your own server".

Then build a community with badges and pledges and things around it. Have a
side quest or two for the adventurous players.

~~~
thmzlt
Does anyone older than 14 really care about that?

~~~
arafalov
Zynga made vast majority of its money from the people significantly older than
14. And they swear by gamification.

------
saurabh
I had installed LFS years ago and it was fun. Later I tried Gentoo and then
Arch Linux(which I currently use). It was a good learning experience.

------
qznc
I learned a lot by building a working desktop system this way. However, I
quickly switched to something else, once it came to updating parts.

If my memory is right, I switched to Gentoo afterwards, because it also had
this compile-from-source philosophy.

------
cientifico
I do it a few years ago (when compiling all of this take 1 day per step). I
totally recomend it. It give you the background needed to understand an
operate system, unix, kernel, modules/drivers, stdlib, et cetera...

You should do it.

------
roymabookie
How long would it take a noob to do this? hours? days? years?

~~~
nitrogen
It'd probably take about a week for a noob to get a reasonable desktop up and
running with LFS or Gentoo, but that week will be some of the most valuable
education about software build processes and operating system design one can
find.

~~~
stinos
I beg to differ. I don't recall how long it took me exactly, but the only
thing I learnt about build processes was, both on LFS and Gentoo: if it fails
to compile, lookup on google what to do and apply that. If all else fails,
edit the code and hope it does not cause a waterfall effct.And I even cared
about learning. If you just follow the manual you'll have learned nothing at
all.

~~~
nitrogen
That is exactly the kind of experience that forces one to understand the
interactions of complex systems and learn how to debug them.

------
krollew
Well. It's very nice project. Thanks that, I've learnt quite much about
building essentional environment. However it's tough as hell. I know pretty
much about Linux and Operating Systems, low level programming, but it was just
impossible to me to succeed some time ago. I admire anybody who can build it
properly. :P

To people who want to give a try I'd say - sure, do it. It's worth it, but
don't expect it's going to work. :)

------
giis
I really liked Linux From Scratch-Couple of years back It helped to build my
own distro -Initially It was around 100MB then I tried to trimmed it down to
less than 4MB :P . It was fun.anybody wants to try with their vm check this
out <http://giis.co.in/minili.iso> I guess it should work

------
kiallmacinnes
I installed LFS many many years ago, and learned huge amounts from it.

Anyone who does sysadmin work, and doesn't already know this stuff, should
take the time to run through it.

It might just save your snazzy new start-up some embarrassing downtime ;)

------
esolyt
<http://news.ycombinator.com/item?id=3171448>

<http://news.ycombinator.com/item?id=1159909>

<http://news.ycombinator.com/item?id=3677350>

<http://news.ycombinator.com/item?id=1779665>

<http://news.ycombinator.com/item?id=2336657>

~~~
sophacles
The newest of those is past the commenting period. That means any discussion
on this can't take place there, so you are either advocating that no one else,
particularly new people, has anything valid to say, or your are advocating
that we should cater specifically to you.

Since neither of these make a lick of sense, what value do you think you are
adding?

~~~
pavedwalden
The two comments that frame this as an over-reaction to a helpful list of
links have a valid point. But, for what it's worth, my first read of esolyt's
post was that it was a terse reprimand for reposting, and in that mindset I
definitely appreciated your reply.

I'm pretty sure that in another time and place (perhaps reddit, several years
back) I too would have presumed that esolyt had a friendly intent. I wonder if
I've stopped giving the benefit of the doubt in general, or if my perception
of the vibe in certain comment threads is darker.

------
cygwin98
Wow, reminds me of the old days 'building the world' in FreeBSD. It took a few
days on an old 386 box.

------
why-el
Anyone with a kindle version of this?

~~~
rejuvyesh
You can use calibre [<http://calibre-ebook.com/download>] to make one.

------
markmm
I've built a few LFSs and Gentoo countless times, it was a great learning
experience and I learned a lot of command line mad skillz that way. However I
wouldn't run a server using it.

~~~
darkstalker
Why not a Gentoo server? It has one of the best package managers (portage) and
with a decent knowledge of linux you can fix pretty much anything. I always
waste time on distros like CentOS because of binary incompatiblity or library
versions that are too old for what I need to run. Gentoo is the only distro
that I never had the need to override the package manager.

