Continuing the ‘help from a friendly
forumite’ trend, David Hayward has a look at LFS, with a chap who knows his
Linux inside and out
'What’s LFS?' some of you may very well be
asking. Well, LFS stands for 'Linux From Scratch', and it’s a project that’s
designed to help you build your very own custom Linux distribution from the
ground up - i.e. entirely from source code.
Linux
from scratch
While this may sound great, both Micro Mart
Forumite D-Dan and I have to point out that's something a complete novice
shouldn’t undertake. But if you have comfortable knowledge of the terminal,
BASH, and compiling code, then you should be good to go. However, this doesn’t
necessarily mean the rest of us should ignore it and take the ‘easy’ route.
Indeed, this is an ideal opportunity to really get to know how Linux works and
to create a distro that’s completely unique and as personal as you can get.
Starting Off
As D-Dan mentions, the first thing is to
"be prepared to type, and try to understand what you are typing."
This means heading on over to the LFS site at linuxfromscratch.org and reading
through everything carefully. Then have a look at the LFS book at bit.ly/KsHBpU
and read it from cover to cover. As
D-Dan said, one of the biggest hurdles to
completing a successful LFS build was the users "failed to read the whole
book, including all the notes and explanations."
Granted, it’s a lot to take in, but the
simple truth is that you’re not going to get anywhere without first having read
the manual. Of course, you’re not going to kick an LFS project off on your home
PC to start with, so get hold of a copy of VirtualBox, and be prepared to have
several goes before you get everything right. As D-Dan has done some fantastic
and very considerable work on LFS, his recommendation is perseverance. In other
words, be prepared for some very repetitive keyboard work, along with having to
check and double-check for typing errors, as the same packages need to be built
and re-built whenever the libraries from the initial build are altered or
changed.
Is it worth it?
In a word, yes. Building your own system is
one of the most satisfying experiences you could possibly have in the Linux
world. The knowledge and experience you’ll gain from a successful LFS build is
worth so much in real-world terms. Imagine how it would look on your CV, for
example?
Linux From Scratch (ou LFS, abreviadamente)
Anyway, if you’re planning on going for an
LFS build, then read the book, follow the tips from D-Dan below, pop on over to
the Micro Mart forum and don’t be afraid to ask for help.
D-Dans tips:
·
Do be sure to read every word of the LFS book as
you go (in my opinion, this is far and away the most important thing).
·
Do try to type as much as possible, rather than
copy and paste, since this will aid learning.
·
Do expect to fail on the first go.
·
Don't expect to have a system that you can sit
down with, watch YouTube, play games on etc. at the end - that's BLFS and
beyond stuff.
·
Don't deviate from LFS unless it's absolutely necessary,
and if you have to, make sure to read any changelogs etc. and adapt changes to
LFS.
·
Don't rush - that's a sure fire way to guarantee
failure.
·
Do persevere. The sense of accomplishment when
you get a first boot (even if it's to a very basic and dull xorg screen) is
immense.