4

I just quickly read the Linux From Scratch book and found it very interesting.

However I don't understand the role of the temporary system (Chapter 5). It is built from a working distribution, and then we use it to build the final system.

Couldn't we just make a partition and build a system on it ?

2
  • Then, it won't be building from "scratch" ;) Commented Jan 31, 2011 at 21:58
  • How do you build ground without any ground? Commented Dec 1, 2013 at 9:52

2 Answers 2

5

You could use a partition on an existing Linux system. That would be the same as using the temporary system. However, assuming you are using an empty system, you will need something to build the LFS software with. You can't just drop a compiler on a partition and start churning away. You need a little more than that. A kernel, for example, and a boat load of libraries :)

2

I don't have a copy of that book, but I can explain why a two-step process might be desirable if you're building a complete distro.

When building packages, it sometimes happens that properties of the build system creep into the binaries that you build. There are library paths, configuration variables etc, etc. At Sun/Oracle the standard process for building Solaris is that you need to build biweekly build 17 on a system that's running biweekly 16 (for example).

For example, there are many fields and structures in header files, you need to make sure that you're building the binaries using the header files that will be delivered on the system. But some of the packages you are building deliver their own header files. And those headers are used by other packages.

Hopefully I've given you an idea of how the system you are building can subtly depend on the system used to build it. So you would usually want to build on a system that is as close to the system you're building as possible.

1
  • 1
    The book is available for gratis on the web. Commented Feb 9, 2011 at 9:23

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.