| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 | <?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [  <!ENTITY % general-entities SYSTEM "../general.ent">  %general-entities;]><sect1 id="ch-scatter-how"><title>How things are going to be done</title><?dbhtml filename="how.html"?><para>You are going to build your LFS system by using a previously installedLinux distribution (such as Debian, Mandrake, Red Hat, or SuSE). This existingLinux system (the host) will be used as a starting point, because you will needprograms like a compiler, linker and shell to build the new system. Normallyall the required tools are available if you selected <quote>development</quote>as one of the options when you installed your distribution.</para><para>In <xref linkend="chapter-partitioning"/> you will first create a new Linux nativepartition and file system, the place where your new LFS system will be compiledand installed. Then in <xref linkend="chapter-getting-materials"/> you download all thepackages and patches needed to build an LFS system, and store them on the newfile system. In <xref linkend="chapter-final-preps"/> you set up a goodenvironment to work in.</para><para><xref linkend="chapter-temporary-tools"/> then discusses the installation of a numberof packages that will form the basic development suite (or <emphasis>toolchain</emphasis>) which isused to build the actual system in <xref linkend="chapter-building-system"/>. Some of thesepackages are needed to resolve circular dependencies -- for example, to compilea compiler you need a compiler.</para><para>The first thing to be done in <xref linkend="chapter-temporary-tools"/> is build afirst pass of the toolchain, made up of Binutils and GCC. The programs fromthese packages will be linked statically in order for them to be usableindependently of the host system. The second thing to do is build Glibc, theC library. Glibc will be compiled by the toolchain programs just built inthe first pass. The third thing to do is build a second pass of the toolchain.This time the toolchain will be dynamically linked against the newly builtGlibc. The remaining <xref linkend="chapter-temporary-tools"/> packages are all built usingthis second pass toolchain and dynamically linked against the newhost-independent Glibc. When this is done, the LFS installation process will nolonger depend on the host distribution, with the exception of the runningkernel.</para><para>You may be thinking that <quote>this seems like a lot of work, just toget away from my host distribution</quote>. Well, a full technical explanationis provided at the start of <xref linkend="chapter-temporary-tools"/>, including some noteson the differences between statically and dynamically linked programs.</para><para>In <xref linkend="chapter-building-system"/> your real LFS system will be built. Thechroot (change root) program is used to enter a virtual environment and starta new shell whose root directory will be set to the LFS partition. This is verysimilar to rebooting and instructing the kernel to mount the LFS partition asthe root partition. The reason that you don't actually reboot, but insteadchroot, is that creating a bootable system requires additional work which isn'tnecessary just yet. But the major advantage is that <quote>chrooting</quote> allows you tocontinue using the host while LFS is being built. While waiting for packagecompilation to complete, you can simply switch to a different VC (VirtualConsole) or X desktop and continue using the computer as you normallywould.</para><para>To finish the installation, the bootscripts are set up in<xref linkend="chapter-bootscripts"/>, the kernel and bootloader are set up in<xref linkend="chapter-bootable"/>, and <xref linkend="chapter-finalizing"/> contains somepointers to help you after you finish the book. Then, finally, you're ready toreboot your computer into your new LFS system.</para><para>This is the process in a nutshell. Detailed information on the steps you will take are discussed in the chapters and package descriptions as you progress through them. If something isn't completely clear now, don't worry, everything will fall into place soon.</para><para>Please read <xref linkend="chapter-final-preps"/> carefully as it explains a few important things you should be aware of before you begin to work through<xref linkend="chapter-temporary-tools"/> and beyond.</para></sect1>
 |