source: chapter01/how.xml@ 3fe06fa

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 8.4 8.4-rc1 9.0 9.0-rc1 9.1 9.1-rc1 arm cross-chap5 ml-11.0 multilib old-trunk trunk xry111/clfs-ng xry111/git-transition xry111/glibc-2.34 xry111/lfs-next xry111/tester-nohack xry111/usr-move
Last change on this file since 3fe06fa was 1118b17, checked in by Bruce Dubbs <bdubbs@…>, 6 years ago

Create branches/merge in svn repo fo rtesting of merged LFS books

git-svn-id: 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 5.2 KB
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
5 %general-entities;
8<sect1 id="ch-intro-how">
9 <?dbhtml filename="how.html"?>
11 <title>How to Build an LFS System</title>
13 <para>The LFS system will be built by using an already installed
14 Linux distribution (such as Debian, OpenMandriva, Fedora, or openSUSE). This
15 existing Linux system (the host) will be used as a starting point to
16 provide necessary programs, including a compiler, linker, and shell,
17 to build the new system. Select the <quote>development</quote> option
18 during the distribution installation to be able to access these
19 tools.</para>
21 <para>As an alternative to installing a separate distribution onto your
22 machine, you may wish to use <!-- the Linux From Scratch LiveCD or --> a LiveCD from a
23 commercial distribution. <!-- The LFS LiveCD works well as a host system,
24 providing all the tools you need to successfully follow the instructions in
25 this book. The LiveCD version is behind the current book, but is still useful
26 as a host for building the current book. The <quote>-nosrc</quote> or
27 <quote>-min</quote> editions of the LiveCD are the most appropriate for
28 building a current LFS system. For more information about the LFS LiveCD or
29 to download a copy, visit <ulink url="&livecd-root;"/>. --></para>
31 <!--
32 <note>
33 <para>The LFS LiveCD might not work on newer hardware configurations,
34 failing to boot or failing to detect some devices such as some SATA hard
35 drives.</para>
36 </note> -->
38 <para><xref linkend="chapter-partitioning"/> of this book describes how
39 to create a new Linux native partition and file system. This is the place
40 where the new LFS system will be compiled and installed. <xref
41 linkend="chapter-getting-materials"/> explains which packages and
42 patches need to be downloaded to build an LFS system and how to store
43 them on the new file system. <xref linkend="chapter-final-preps"/>
44 discusses the setup of an appropriate working environment. Please read
45 <xref linkend="chapter-final-preps"/> carefully as it explains several
46 important issues you need be aware of before beginning to
47 work your way through <xref linkend="chapter-temporary-tools"/> and beyond.</para>
49 <para><xref linkend="chapter-temporary-tools"/> explains the
50 installation of a number of packages that will form the basic
51 development suite (or toolchain) which is used to build the actual
52 system in <xref linkend="chapter-building-system"/>. Some of these
53 packages are needed to resolve circular dependencies&mdash;for example,
54 to compile a compiler, you need a compiler.</para>
56 <para><xref linkend="chapter-temporary-tools"/> also shows you how to
57 build a first pass of the toolchain, including Binutils and GCC (first pass
58 basically means these two core packages will be reinstalled).
59 The next step is to build Glibc, the C library. Glibc will be compiled by
60 the toolchain programs built in the first pass. Then, a second pass of the
61 toolchain will be built. This time, the toolchain will be dynamically linked
62 against the newly built Glibc. The remaining <xref
63 linkend="chapter-temporary-tools"/> packages are built using this second
64 pass toolchain. When this is done, the LFS installation process will no
65 longer depend on the host distribution, with the exception of the running
66 kernel. </para>
68 <para>This effort to isolate the new system from the host distribution may
69 seem excessive. A full technical explanation as to why this is done is provided in
70 <xref linkend="ch-tools-toolchaintechnotes"/>.</para>
72 <para>In <xref linkend="chapter-building-system"/>, the full LFS system is
73 built. The <command>chroot</command> (change root) program is used to enter
74 a virtual environment and start a new shell whose root directory will be
75 set to the LFS partition. This is very similar to rebooting and instructing
76 the kernel to mount the LFS partition as the root partition. The system
77 does not actually reboot, but instead uses <command>chroot</command> because
78 creating a bootable system requires additional work which is not necessary
79 just yet. The major advantage is that <quote>chrooting</quote> allows you
80 to continue using the host system while LFS is being built. While waiting
81 for package compilations to complete, you can continue using your computer as
82 normal.</para>
84 <para>To finish the installation, the basic system configuration is set up in
85 <xref linkend="chapter-bootscripts"/>, and the kernel and boot loader are set
86 up in <xref linkend="chapter-bootable"/>. <xref linkend="chapter-finalizing"/>
87 contains information on continuing the LFS experience beyond this book.
88 After the steps in this book have been implemented, the computer will be
89 ready to reboot into the new LFS system.</para>
91 <para>This is the process in a nutshell. Detailed information on each
92 step is discussed in the following chapters and package descriptions.
93 Items that may seem complicated will be clarified, and everything will
94 fall into place as you embark on the LFS adventure.</para>
Note: See TracBrowser for help on using the repository browser.