source: chapter01/how.xml@ fb34768

6.0
Last change on this file since fb34768 was fb34768, checked in by Gerard Beekmans <gerard@…>, 20 years ago

Unified boot loader and boot loading as two words everywhere

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/testing/BOOK@4087 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 4.3 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 %general-entities;
5]>
6<sect1 id="ch-scatter-how">
7<title>How to Build an LFS System</title>
8<?dbhtml filename="how.html"?>
9
10<para>The LFS system will be built by using a previously installed
11Linux distribution (such as Debian, Mandrake, Red Hat, or SuSE). This
12existing Linux system (the host) will be used as a starting point to
13provide necessary programs, including a compiler, linker, and shell,
14to build the new system. Select the <quote>development</quote> option
15during the distribution installation to be able to access these
16tools.</para>
17
18<para><xref linkend="chapter-partitioning"/> of this book describes how
19to create a new Linux native partition and file system, the place
20where the new LFS system will be compiled and installed. <xref
21linkend="chapter-getting-materials"/> explains which packages and
22patches need to be downloaded to build an LFS system and how to store
23them on the new file system. <xref linkend="chapter-final-preps"/>
24discusses the setup for an appropriate work environment. Please read
25<xref linkend="chapter-final-preps"/> carefully as it explains several
26important issues the developer should be aware of before beginning to
27work through <xref linkend="chapter-temporary-tools"/> and
28beyond.</para>
29
30<para><xref linkend="chapter-temporary-tools"/> explains the
31installation of a number of packages that will form the basic
32development suite (or toolchain) which is used to build the actual
33system in <xref linkend="chapter-building-system"/>. Some of these
34packages are needed to resolve circular dependencies&mdash;for example,
35to compile a compiler, you need a compiler.</para>
36
37<para><xref linkend="chapter-temporary-tools"/> also shows the user how
38to build a first pass of the toolchain, including Binutils and GCC
39(first pass basically means these two core packages will be
40re-installed a second time). The programs from these packages will be
41linked statically in order to be used independently of the host
42system. The next step is to build Glibc, the C library. Glibc will be
43compiled by the toolchain programs built in the first pass. Then, a
44second pass of the toolchain will be built. This time, the toolchain
45will be dynamically linked against the newly built Glibc. The
46remaining <xref linkend="chapter-temporary-tools"/> packages are built
47using this second pass toolchain. When this is done, the LFS
48installation process will no longer depend on the host distribution,
49with the exception of the running kernel.</para>
50
51<para>While this may initially seem like a lot of work to get away
52from a host distribution, a full technical explanation is provided at
53the beginning of Chapter 5, including notes on the differences between
54statically and dynamically-linked programs.</para>
55
56<para>In <xref linkend="chapter-building-system"/>, the full LFS system is
57built. The chroot (change root) program is used to enter a virtual
58environment and start a new shell whose root directory will be set to
59the LFS partition. This is very similar to rebooting and instructing
60the kernel to mount the LFS partition as the root partition. The
61system does not actually reboot, but instead chroots because creating a
62bootable system requires additional work which is not necessary just
63yet. The major advantage is that <quote>chrooting</quote> allows the
64builder to continue using the host while LFS is being built. While
65waiting for package compilation to complete, a user can switch to a
66different virtual console (VC) or X desktop and continue using the
67computer as normal.</para>
68
69<para>To finish the installation, the bootscripts are set up in <xref
70linkend="chapter-bootscripts"/>, and the kernel and boot loader are set
71up in <xref linkend="chapter-bootable"/>. <xref
72linkend="chapter-finalizing"/> contains information on furthering the
73LFS experience beyond this book. After the steps in this book have
74been implemented, the computer will be ready to reboot into the new
75LFS system.</para>
76
77<para>This is the process in a nutshell. Detailed information on each
78step is discussed in the following chapters and package descriptions.
79Items that may seem complicated will be clarified, and everything will
80fall into place as the developer embarks on the LFS adventure.</para>
81
82</sect1>
83
Note: See TracBrowser for help on using the repository browser.